2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-set-tags-to): New command. * org-latex.el (org-export-latex-set-initial-vars): Also check in the plist. * org.el (org-additional-option-like-keywords): Add LATEX_CLASS keyword. * org-exp.el (org-infile-export-plist): Add LATEX_CLASS keyword. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org-inlinetask.el (org-inlinetask-export): Option removed. (org-inlinetask-export-handler): Better export. * org-xoxo.el (org-export-xoxo-final-hook): New hook. (org-export-as-xoxo): Run the new hook. * org-html.el (org-export-html-final-hook): New hook. (org-export-as-html): Run the new hook. * org-docbook.el (org-export-docbook-final-hook): New hook. (org-export-as-docbook): Run the new hook. * org-ascii.el (org-export-ascii-final-hook): New hook. (org-export-as-ascii): Run the new hook. * org-latex.el (org-export-latex-treat-sub-super-char): Allow a space character as the character before the ^/_. (org-export-latex-final-hook): New hook. (org-export-as-latex): Run `org-export-latex-final-hook'. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org-macs.el (org-if-unprotected-at): Fix docstring. * org-agenda.el (org-agenda-change-all-lines): Handle invisible text in the prefix (if category is a link). * org-latex.el (org-export-latex-preprocess): Deal properly with empty lines in verse environments. * org.el (org-format-latex-header): Inline fullpage.sty. * org-footnote.el (org-footnote-create-definition): Reveal context to add a new footnote definition. * org.el (org-ctrl-c-ctrl-c): Pass prefix arg to org-table-recalculate when cursor is in TBLFM line. * org-list.el (org-renumber-ordered-list): Fix cursor position when bullet length has changed. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-format-latex): Mention `org-format-latex-options' in the docstring. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-agenda-get): New function. * org-agenda.el (org-agenda-post-command-hook): No longer move point away from end of line. (org-agenda-add-entry-text, org-agenda-collect-markers) (org-finalize-agenda, org-agenda-mark-clocking-task) (org-agenda-dim-blocked-tasks, org-agenda-entry-text-show-here) (org-agenda-entry-text-show, org-agenda-highlight-todo) (org-agenda-compare-effort, org-agenda-filter-apply) (org-agenda-later, org-agenda-change-time-span) (org-agenda-post-command-hook, org-agenda-show-priority) (org-agenda-show-tags, org-agenda-goto, org-agenda-kill) (org-agenda-archive, org-agenda-archive-to-archive-sibling) (org-remove-subtree-entries-from-agenda, org-agenda-refile) (org-agenda-open-link, org-agenda-copy-local-variable) (org-agenda-switch-to, org-agenda-check-no-diary) (org-agenda-tree-to-indirect-buffer, org-agenda-todo) (org-agenda-add-note, org-agenda-change-all-lines) (org-agenda-priority, org-agenda-set-tags) (org-agenda-set-property, org-agenda-set-effort) (org-agenda-toggle-archive-tag, org-agenda-date-later) (org-agenda-show-new-time, org-agenda-date-prompt) (org-agenda-schedule, org-agenda-deadline, org-agenda-action) (org-agenda-clock-in, org-agenda-bulk-mark) (org-agenda-bulk-unmark, org-agenda-show-the-flagging-note): Use `org-get-at-bol'. * org-colview.el (org-columns-display-here) (org-columns-edit-allowed, org-agenda-columns): Use `org-get-at-bol'. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-special-ctrl-a/e): Improve documentation and customize type. (org-end-of-line): Don't jump to after the ellipsis. (org-mode-map): Bind <home> and <end> as well. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-fontify-meta-lines-and-blocks): Treat lines with a space after #+ as comments. (org-open-at-point): Run `org-follow-link-hook' always. * org-latex.el (org-export-latex-emph-format): Use better commands to insert special characters in verbatim snippets. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org-faces.el (org-copy-face): New function. Use it to create various faces formerly created by using `copy-face'. * org-agenda.el (org-prepare-agenda): Don't officially mark this window dedicated. (org-agenda-quit): Kill the frame containing the agenda window if that frame was created for the agenda. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-agenda-date-prompt): Mark the changed time stamp in the agenda. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-prepare-agenda): Reset `org-drawers-for-agenda'. (org-prepare-agenda): Uniquify list of drawers. * org.el (org-complex-heading-regexp-format): New variable. (org-set-regexps-and-options): Define `org-complex-heading-regexp-format'. (org-drawers-for-agenda): New variable. (org-map-entries): Bind `org-drawers-for-agenda'. (org-prepare-agenda-buffers): Add to `org-drawers-for-agenda'. * org-remember.el (org-go-to-remember-target) (org-remember-handler): Use `org-complex-heading-regexp-format'. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-agenda-highlight-todo): Fix text property problem. * org.el (org-on-heading-p, org-at-heading-p): Make sure these are always with `invisible-ok'. (org-store-link): No error when there is nothing to link to in the agenda. * org-list.el (org-update-checkbox-count): Insert changed cookie before the old, to avoid problems with invisibility at the end of the line. (org-update-checkbox-count): Insert changed cookie before the old, to avoid problems with invisibility at the end of the line. * org.el (org-sort-entries-or-items): Include the final newline. (org-fontify-meta-lines-and-blocks): Add indented dynamic block lines for fontification. (org-dblock-start-re, org-dblock-end-re): Allow indentation. (org-prepare-dblock): Store the current indentation of the BEGIN line. (org-update-dblock): Apply the indentation of the begin line to the rest of the block. (org-ctrl-c-ctrl-c): Also find indented dblock lines. (org-startup-folded): New allowed value `showeverything'. (org-startup-options): Add STARTUP keyword `showeverything'. (org-set-startup-visibility): Respect value `showeverything' in org-startup-folded. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-closest-date): Fix issue with past preference. * org-archive.el (org-archive-set-tag) (org-archive-subtree-default): New commands. * org-clock.el (org-clock-clocktable-default-properties): New option. (org-clock-report): Use `org-clock-clocktable-default-properties'. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-iswitchb-completing-read): Fix typo. * org-crypt.el: New file. * org.el: Add an entry for org-crypt. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-agenda-menu): Reorganize the menu for more consistency. (org-batch-store-agenda-views): New function. (org-agenda-title-append): Define variable. (org-write-agenda): New export to Org files. (org-agenda-get-some-entry-text): New arguments INDENT and KEEP. (org-agenda): Allow to keep the restricted file list if a special variable is bound to t. (org-agenda): Define a special agenda view for working on flagged entries. (org-agenda-get-restriction-and-command): List the new agenda view. (org-agenda-show-the-flagging-note): New command. (org-agenda-mode-map): New key `?' for looking at the flagging note. * org.el (org-autoload): Autoload org-mobile.el. (org-org-menu): Add menu commands for MobileOrg in the Org menu. * org-mobile.el: New file. * org-id.el (org-id-get): Fix bug with forcing ID on an item. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org-table.el (orgtbl-line-start-regexp): Match also TBLNAME statements. (org-table-get-remote-range): Match indented #+TBLNAME statements. * org.el (org-convert-to-odd-levels) (org-convert-to-oddeven-levels): Work also correctly if the file is in outline-mode. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-store-link): When in agenda buffer, link to referenced entry. (org-add-planning-info): Remove spaces at eol. * org-macs.el (org-with-point-at): Add a `lisp-indent-function' property. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org-latex.el (org-export-latex-first-lines): Fix problem with LaTeX export of first line and selected subtree. * org.el (org-shifttab): Interpret arg differently when using only odd levels. 2009-10-01 Bastien Guerry <bzg@altern.org> * org.el (org-check-agenda-file): Use a more explicit message 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-remove-special-table-lines): Don't remove normal lines. 2009-10-01 Bastien Guerry <bzg@altern.org> * org.el (org-offer-links-in-entry): Don't use "Select link" as a prompt in the temporary window. * org-agenda.el (org-agenda-bulk-mark): Use a slightly soberer prefix for marked entries in the agenda view. 2009-10-01 Andreas Burtzlaff <andy13@gmx.net> (tiny change) * org.el (outline-end-of-subtree): Bugfix: advise this function in a way that prevents any trailing character from being displayed. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-agenda-menu): Fix bugs in the bulk action menu. * org-exp.el (org-export-remove-special-table-lines): Remove bad slow regexp match. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org-latex.el (org-export-latex-preprocess): Do not protect in the LaTeX header. * org-src.el (org-edit-src-save): Save window setup while saving. (org-edit-src-code): Use new buffer name construction scheme. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-agenda-entry-text-exclude-regexps): New variable. (org-agenda-entry-text-cleanup-hook): New hook. (org-agenda-get-some-entry-text): Remove matches of `org-agenda-entry-text-exclude-regexps' and run the hook `org-agenda-entry-text-cleanup-hook'. * org.el (org-offer-links-in-entry): New argument ZERO to implement a link with index zero. (org-cycle-show-empty-lines): Not keep empty line under header hidden. (org-iswitchb-completing-read): Bind `switchb-use-virtual-buffers' to nil for special completion. (org-store-link): Don't error before the first heading. * org-agenda.el (org-agenda-open-link): Pass the prefix to `org-offer-links-in-entry'. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-agenda-quit): Provide the window argument for `window-dedicated-p', Emacs 22 needs it. (org-format-agenda-item): If the category is a link, arrange for invisible text to replaced with spaces. (org-compile-prefix-format): Add the extra space. (org-prefix-category-length): New variable. * org-exp.el (org-export-cleanup-toc-line): Remove footnote references from TOC lines. * org.el (org-selected-window): New variable. * org-table.el (org-table-edit-formulas): Remember the selected window. (org-table-fedit-finish, org-table-fedit-abort): Select the window that was originally selected. * org-exp.el (org-export-preprocess-apply-macros): Scan the expansion of a macro for more macro definitions. * org-agenda.el (org-agenda-dim-blocked-tasks): Make sure the invisibility overlay starts on the newline.
This commit is contained in:
parent
9bf6c65c2f
commit
8d64207425
46 changed files with 1984 additions and 525 deletions
|
@ -1,3 +1,329 @@
|
|||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.el (org-set-tags-to): New command.
|
||||
|
||||
* org-latex.el (org-export-latex-set-initial-vars): Also check in
|
||||
the plist.
|
||||
|
||||
* org.el (org-additional-option-like-keywords): Add LATEX_CLASS
|
||||
keyword.
|
||||
|
||||
* org-exp.el (org-infile-export-plist): Add LATEX_CLASS keyword.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-inlinetask.el (org-inlinetask-export): Option removed.
|
||||
(org-inlinetask-export-handler): Better export.
|
||||
|
||||
* org-xoxo.el (org-export-xoxo-final-hook): New hook.
|
||||
(org-export-as-xoxo): Run the new hook.
|
||||
|
||||
* org-html.el (org-export-html-final-hook): New hook.
|
||||
(org-export-as-html): Run the new hook.
|
||||
|
||||
* org-docbook.el (org-export-docbook-final-hook): New hook.
|
||||
(org-export-as-docbook): Run the new hook.
|
||||
|
||||
* org-ascii.el (org-export-ascii-final-hook): New hook.
|
||||
(org-export-as-ascii): Run the new hook.
|
||||
|
||||
* org-latex.el (org-export-latex-treat-sub-super-char): Allow a
|
||||
space character as the character before the ^/_.
|
||||
(org-export-latex-final-hook): New hook.
|
||||
(org-export-as-latex): Run `org-export-latex-final-hook'.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-macs.el (org-if-unprotected-at): Fix docstring.
|
||||
|
||||
* org-agenda.el (org-agenda-change-all-lines): Handle invisible
|
||||
text in the prefix (if category is a link).
|
||||
|
||||
* org-latex.el (org-export-latex-preprocess): Deal properly with
|
||||
empty lines in verse environments.
|
||||
|
||||
* org.el (org-format-latex-header): Inline fullpage.sty.
|
||||
|
||||
* org-footnote.el (org-footnote-create-definition): Reveal context
|
||||
to add a new footnote definition.
|
||||
|
||||
* org.el (org-ctrl-c-ctrl-c): Pass prefix arg to
|
||||
org-table-recalculate when cursor is in TBLFM line.
|
||||
|
||||
* org-list.el (org-renumber-ordered-list): Fix cursor position
|
||||
when bullet length has changed.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.el (org-format-latex): Mention `org-format-latex-options' in
|
||||
the docstring.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.el (org-agenda-get): New function.
|
||||
|
||||
* org-agenda.el (org-agenda-post-command-hook): No longer move
|
||||
point away from end of line.
|
||||
(org-agenda-add-entry-text, org-agenda-collect-markers)
|
||||
(org-finalize-agenda, org-agenda-mark-clocking-task)
|
||||
(org-agenda-dim-blocked-tasks, org-agenda-entry-text-show-here)
|
||||
(org-agenda-entry-text-show, org-agenda-highlight-todo)
|
||||
(org-agenda-compare-effort, org-agenda-filter-apply)
|
||||
(org-agenda-later, org-agenda-change-time-span)
|
||||
(org-agenda-post-command-hook, org-agenda-show-priority)
|
||||
(org-agenda-show-tags, org-agenda-goto, org-agenda-kill)
|
||||
(org-agenda-archive, org-agenda-archive-to-archive-sibling)
|
||||
(org-remove-subtree-entries-from-agenda, org-agenda-refile)
|
||||
(org-agenda-open-link, org-agenda-copy-local-variable)
|
||||
(org-agenda-switch-to, org-agenda-check-no-diary)
|
||||
(org-agenda-tree-to-indirect-buffer, org-agenda-todo)
|
||||
(org-agenda-add-note, org-agenda-change-all-lines)
|
||||
(org-agenda-priority, org-agenda-set-tags)
|
||||
(org-agenda-set-property, org-agenda-set-effort)
|
||||
(org-agenda-toggle-archive-tag, org-agenda-date-later)
|
||||
(org-agenda-show-new-time, org-agenda-date-prompt)
|
||||
(org-agenda-schedule, org-agenda-deadline, org-agenda-action)
|
||||
(org-agenda-clock-in, org-agenda-bulk-mark)
|
||||
(org-agenda-bulk-unmark, org-agenda-show-the-flagging-note): Use
|
||||
`org-get-at-bol'.
|
||||
|
||||
* org-colview.el (org-columns-display-here)
|
||||
(org-columns-edit-allowed, org-agenda-columns): Use
|
||||
`org-get-at-bol'.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.el (org-special-ctrl-a/e): Improve documentation and
|
||||
customize type.
|
||||
(org-end-of-line): Don't jump to after the ellipsis.
|
||||
(org-mode-map): Bind <home> and <end> as well.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.el (org-fontify-meta-lines-and-blocks): Treat lines with a
|
||||
space after #+ as comments.
|
||||
(org-open-at-point): Run `org-follow-link-hook' always.
|
||||
|
||||
* org-latex.el (org-export-latex-emph-format): Use better commands
|
||||
to insert special characters in verbatim snippets.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-faces.el (org-copy-face): New function. Use it to create
|
||||
various faces formerly created by using `copy-face'.
|
||||
|
||||
* org-agenda.el (org-prepare-agenda): Don't officially mark this
|
||||
window dedicated.
|
||||
(org-agenda-quit): Kill the frame containing the agenda window if
|
||||
that frame was created for the agenda.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-agenda.el (org-agenda-date-prompt): Mark the changed time
|
||||
stamp in the agenda.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-agenda.el (org-prepare-agenda): Reset
|
||||
`org-drawers-for-agenda'.
|
||||
(org-prepare-agenda): Uniquify list of drawers.
|
||||
|
||||
* org.el (org-complex-heading-regexp-format): New variable.
|
||||
(org-set-regexps-and-options): Define
|
||||
`org-complex-heading-regexp-format'.
|
||||
(org-drawers-for-agenda): New variable.
|
||||
(org-map-entries): Bind `org-drawers-for-agenda'.
|
||||
(org-prepare-agenda-buffers): Add to `org-drawers-for-agenda'.
|
||||
|
||||
* org-remember.el (org-go-to-remember-target)
|
||||
(org-remember-handler): Use `org-complex-heading-regexp-format'.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-agenda.el (org-agenda-highlight-todo): Fix text property
|
||||
problem.
|
||||
|
||||
* org.el (org-on-heading-p, org-at-heading-p): Make sure these are
|
||||
always with `invisible-ok'.
|
||||
(org-store-link): No error when there is nothing to link to in the
|
||||
agenda.
|
||||
|
||||
* org-list.el (org-update-checkbox-count): Insert changed cookie
|
||||
before the old, to avoid problems with invisibility at the end of
|
||||
the line.
|
||||
(org-update-checkbox-count): Insert changed cookie before the old,
|
||||
to avoid problems with invisibility at the end of the line.
|
||||
|
||||
* org.el (org-sort-entries-or-items): Include the final newline.
|
||||
(org-fontify-meta-lines-and-blocks): Add indented dynamic block
|
||||
lines for fontification.
|
||||
(org-dblock-start-re, org-dblock-end-re): Allow indentation.
|
||||
(org-prepare-dblock): Store the current indentation of the BEGIN
|
||||
line.
|
||||
(org-update-dblock): Apply the indentation of the begin line to
|
||||
the rest of the block.
|
||||
(org-ctrl-c-ctrl-c): Also find indented dblock lines.
|
||||
(org-startup-folded): New allowed value `showeverything'.
|
||||
(org-startup-options): Add STARTUP keyword `showeverything'.
|
||||
(org-set-startup-visibility): Respect value `showeverything' in
|
||||
org-startup-folded.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.el (org-closest-date): Fix issue with past preference.
|
||||
|
||||
* org-archive.el (org-archive-set-tag)
|
||||
(org-archive-subtree-default): New commands.
|
||||
|
||||
* org-clock.el (org-clock-clocktable-default-properties): New
|
||||
option.
|
||||
(org-clock-report): Use
|
||||
`org-clock-clocktable-default-properties'.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.el (org-iswitchb-completing-read): Fix typo.
|
||||
|
||||
* org-crypt.el: New file.
|
||||
|
||||
* org.el: Add an entry for org-crypt.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-agenda.el (org-agenda-menu): Reorganize the menu for more
|
||||
consistency.
|
||||
(org-batch-store-agenda-views): New function.
|
||||
(org-agenda-title-append): Define variable.
|
||||
(org-write-agenda): New export to Org files.
|
||||
(org-agenda-get-some-entry-text): New arguments INDENT and KEEP.
|
||||
(org-agenda): Allow to keep the restricted file list if a special
|
||||
variable is bound to t.
|
||||
(org-agenda): Define a special agenda view for working on flagged
|
||||
entries.
|
||||
(org-agenda-get-restriction-and-command): List the new agenda
|
||||
view.
|
||||
(org-agenda-show-the-flagging-note): New command.
|
||||
(org-agenda-mode-map): New key `?' for looking at the flagging
|
||||
note.
|
||||
|
||||
* org.el (org-autoload): Autoload org-mobile.el.
|
||||
(org-org-menu): Add menu commands for MobileOrg in the Org menu.
|
||||
|
||||
* org-mobile.el: New file.
|
||||
|
||||
* org-id.el (org-id-get): Fix bug with forcing ID on an item.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-table.el (orgtbl-line-start-regexp): Match also TBLNAME
|
||||
statements.
|
||||
(org-table-get-remote-range): Match indented #+TBLNAME
|
||||
statements.
|
||||
|
||||
* org.el (org-convert-to-odd-levels)
|
||||
(org-convert-to-oddeven-levels): Work also correctly if the file
|
||||
is in outline-mode.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.el (org-store-link): When in agenda buffer, link to
|
||||
referenced entry.
|
||||
(org-add-planning-info): Remove spaces at eol.
|
||||
|
||||
* org-macs.el (org-with-point-at): Add a `lisp-indent-function'
|
||||
property.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-latex.el (org-export-latex-first-lines): Fix problem with
|
||||
LaTeX export of first line and selected subtree.
|
||||
|
||||
* org.el (org-shifttab): Interpret arg differently when using only
|
||||
odd levels.
|
||||
|
||||
2009-10-01 Bastien Guerry <bzg@altern.org>
|
||||
|
||||
* org.el (org-check-agenda-file): Use a more explicit message
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-exp.el (org-export-remove-special-table-lines): Don't remove
|
||||
normal lines.
|
||||
|
||||
2009-10-01 Bastien Guerry <bzg@altern.org>
|
||||
|
||||
* org.el (org-offer-links-in-entry): Don't use "Select link" as a
|
||||
prompt in the temporary window.
|
||||
|
||||
* org-agenda.el (org-agenda-bulk-mark): Use a slightly soberer
|
||||
prefix for marked entries in the agenda view.
|
||||
|
||||
2009-10-01 Andreas Burtzlaff <andy13@gmx.net> (tiny change)
|
||||
|
||||
* org.el (outline-end-of-subtree): Bugfix: advise this function in
|
||||
a way that prevents any trailing character from being displayed.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-agenda.el (org-agenda-menu): Fix bugs in the bulk action
|
||||
menu.
|
||||
|
||||
* org-exp.el (org-export-remove-special-table-lines): Remove bad
|
||||
slow regexp match.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-latex.el (org-export-latex-preprocess): Do not protect in
|
||||
the LaTeX header.
|
||||
|
||||
* org-src.el (org-edit-src-save): Save window setup while saving.
|
||||
(org-edit-src-code): Use new buffer name construction scheme.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-agenda.el (org-agenda-entry-text-exclude-regexps): New
|
||||
variable.
|
||||
(org-agenda-entry-text-cleanup-hook): New hook.
|
||||
(org-agenda-get-some-entry-text): Remove matches of
|
||||
`org-agenda-entry-text-exclude-regexps' and run the hook
|
||||
`org-agenda-entry-text-cleanup-hook'.
|
||||
|
||||
* org.el (org-offer-links-in-entry): New argument ZERO to
|
||||
implement a link with index zero.
|
||||
(org-cycle-show-empty-lines): Not keep empty line under header
|
||||
hidden.
|
||||
(org-iswitchb-completing-read): Bind `switchb-use-virtual-buffers'
|
||||
to nil for special completion.
|
||||
(org-store-link): Don't error before the first heading.
|
||||
|
||||
* org-agenda.el (org-agenda-open-link): Pass the prefix to
|
||||
`org-offer-links-in-entry'.
|
||||
|
||||
2009-10-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-agenda.el (org-agenda-quit): Provide the window argument for
|
||||
`window-dedicated-p', Emacs 22 needs it.
|
||||
(org-format-agenda-item): If the category is a link, arrange for
|
||||
invisible text to replaced with spaces.
|
||||
(org-compile-prefix-format): Add the extra space.
|
||||
(org-prefix-category-length): New variable.
|
||||
|
||||
* org-exp.el (org-export-cleanup-toc-line): Remove footnote
|
||||
references from TOC lines.
|
||||
|
||||
* org.el (org-selected-window): New variable.
|
||||
|
||||
* org-table.el (org-table-edit-formulas): Remember the selected
|
||||
window.
|
||||
(org-table-fedit-finish, org-table-fedit-abort): Select the window
|
||||
that was originally selected.
|
||||
|
||||
* org-exp.el (org-export-preprocess-apply-macros): Scan the
|
||||
expansion of a macro for more macro definitions.
|
||||
|
||||
* org-agenda.el (org-agenda-dim-blocked-tasks): Make sure the
|
||||
invisibility overlay starts on the newline.
|
||||
|
||||
2009-10-01 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* org-agenda.el (calendar-check-holidays):
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -6,7 +6,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -34,6 +34,15 @@
|
|||
|
||||
(declare-function org-inlinetask-remove-END-maybe "org-inlinetask" ())
|
||||
|
||||
(defcustom org-archive-default-command 'org-archive-subtree
|
||||
"The default archiving command.
|
||||
Currently this is only used by org-mobile.el."
|
||||
:group 'org-archive
|
||||
:type '(choice
|
||||
(const org-archive-subtree)
|
||||
(const org-archive-to-archive-sibling)
|
||||
(const org-archive-set-tag)))
|
||||
|
||||
(defcustom org-archive-sibling-heading "Archive"
|
||||
"Name of the local archive sibling that is used to archive entries locally.
|
||||
Locally means: in the tree, under a sibling.
|
||||
|
@ -428,6 +437,18 @@ the children that do not contain any open TODO items."
|
|||
(and set (beginning-of-line 1))
|
||||
(message "Subtree %s" (if set "archived" "unarchived")))))
|
||||
|
||||
(defun org-archive-set-tag ()
|
||||
"Set the ARCHIVE tag."
|
||||
(interactive)
|
||||
(org-toggle-tag org-archive-tag 'on))
|
||||
|
||||
;;;###autoload
|
||||
(defun org-archive-subtree-default ()
|
||||
"Archive the current subtree with the default command.
|
||||
This command is set with the variable `org-archive-default-command'."
|
||||
(interactive)
|
||||
(call-interactively 'org-archive-default-command))
|
||||
|
||||
(provide 'org-archive)
|
||||
|
||||
;; arch-tag: 0837f601-9699-43c3-8b90-631572ae6c85
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -27,7 +27,8 @@
|
|||
;;; Commentary:
|
||||
|
||||
(require 'org-exp)
|
||||
(eval-when-compile (require 'cl))
|
||||
(eval-when-compile
|
||||
(require 'cl))
|
||||
|
||||
(defgroup org-export-ascii nil
|
||||
"Options specific for ASCII export of Org-mode files."
|
||||
|
@ -57,6 +58,11 @@ in this way, it will be wrapped."
|
|||
:group 'org-export-ascii
|
||||
:type 'boolean)
|
||||
|
||||
;;; Hooks
|
||||
|
||||
(defvar org-export-ascii-final-hook nil
|
||||
"Hook run at the end of ASCII export, in the new buffer.")
|
||||
|
||||
;;; ASCII export
|
||||
|
||||
(defvar org-ascii-current-indentation nil) ; For communication
|
||||
|
@ -456,6 +462,7 @@ publishing directory."
|
|||
(setq end (next-single-property-change beg 'org-cwidth))
|
||||
(delete-region beg end)
|
||||
(goto-char beg)))
|
||||
(run-hooks 'org-export-ascii-final-hook)
|
||||
(or to-buffer (save-buffer))
|
||||
(goto-char (point-min))
|
||||
(or (org-export-push-to-kill-ring "ASCII")
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: John Wiegley <johnw@newartisans.com>
|
||||
;; Keywords: org data task
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
;; Thomas Baumann <thomas dot baumann at ch dot tum dot de>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
;; Author: Bastien Guerry <bzg at altern dot org>
|
||||
;; Carsten Dominik <carsten dot dominik at gmail dot com>
|
||||
;; Keywords: org, wp, remember
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -201,6 +201,12 @@ string as argument."
|
|||
(string :tag "Program")
|
||||
(function :tag "Function")))
|
||||
|
||||
(defcustom org-clock-clocktable-default-properties '(:maxlevel 2 :scope file)
|
||||
"Default properties for new clocktables."
|
||||
:group 'org-clock
|
||||
:type 'plist)
|
||||
|
||||
|
||||
(defvar org-clock-in-prepare-hook nil
|
||||
"Hook run when preparing the clock.
|
||||
This hook is run before anything happens to the task that
|
||||
|
@ -1035,8 +1041,8 @@ buffer and update it."
|
|||
(org-show-entry))
|
||||
(if (org-in-clocktable-p)
|
||||
(goto-char (org-in-clocktable-p))
|
||||
(org-create-dblock (list :name "clocktable"
|
||||
:maxlevel 2 :scope 'file)))
|
||||
(org-create-dblock (append (list :name "clocktable")
|
||||
org-clock-clocktable-default-properties)))
|
||||
(org-update-dblock))
|
||||
|
||||
(defun org-in-clocktable-p ()
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -169,8 +169,8 @@ This is the compiled version of the format.")
|
|||
;; Check if the entry is in another buffer.
|
||||
(unless props
|
||||
(if (eq major-mode 'org-agenda-mode)
|
||||
(setq pom (or (get-text-property (point) 'org-hd-marker)
|
||||
(get-text-property (point) 'org-marker))
|
||||
(setq pom (or (org-get-at-bol 'org-hd-marker)
|
||||
(org-get-at-bol 'org-marker))
|
||||
props (if pom (org-entry-properties pom) nil))
|
||||
(setq props (org-entry-properties nil))))
|
||||
;; Walk the format
|
||||
|
@ -503,8 +503,8 @@ Where possible, use the standard interface for changing this line."
|
|||
(defun org-columns-edit-allowed ()
|
||||
"Edit the list of allowed values for the current property."
|
||||
(interactive)
|
||||
(let* ((pom (or (get-text-property (point-at-bol) 'org-marker)
|
||||
(get-text-property (point-at-bol) 'org-hd-marker)
|
||||
(let* ((pom (or (org-get-at-bol 'org-marker)
|
||||
(org-get-at-bol 'org-hd-marker)
|
||||
(point)))
|
||||
(key (get-char-property (point) 'org-columns-key))
|
||||
(key1 (concat key "_ALL"))
|
||||
|
@ -1259,7 +1259,7 @@ and tailing newline characters."
|
|||
org-agenda-overriding-columns-format)
|
||||
(setq fmt org-agenda-overriding-columns-format)
|
||||
(org-set-local 'org-agenda-overriding-columns-format fmt))
|
||||
((setq m (get-text-property (point-at-bol) 'org-hd-marker))
|
||||
((setq m (org-get-at-bol 'org-hd-marker))
|
||||
(setq fmt (or (org-entry-get m "COLUMNS" t)
|
||||
(with-current-buffer (marker-buffer m)
|
||||
org-columns-default-format))))
|
||||
|
@ -1281,8 +1281,8 @@ and tailing newline characters."
|
|||
;; Get and cache the properties
|
||||
(goto-char (point-min))
|
||||
(while (not (eobp))
|
||||
(when (setq m (or (get-text-property (point) 'org-hd-marker)
|
||||
(get-text-property (point) 'org-marker)))
|
||||
(when (setq m (or (org-get-at-bol 'org-hd-marker)
|
||||
(org-get-at-bol 'org-marker)))
|
||||
(setq p (org-entry-properties m))
|
||||
|
||||
(when (or (not (setq a (assoc org-effort-property p)))
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -36,7 +36,7 @@
|
|||
|
||||
(require 'org-macs)
|
||||
|
||||
(declare-function find-library-name "find-func" (library))
|
||||
(declare-function find-library-name "find-func" (library))
|
||||
(declare-function w32-focus-frame "term/w32-win" (frame))
|
||||
|
||||
(defconst org-xemacs-p (featurep 'xemacs)) ; not used by org.el itself
|
||||
|
|
178
lisp/org/org-crypt.el
Normal file
178
lisp/org/org-crypt.el
Normal file
|
@ -0,0 +1,178 @@
|
|||
;;; org-crypt.el --- Public key encryption for org-mode entries
|
||||
|
||||
;; Copyright (C) 2009 Peter Jones <pjones@pmade.com>
|
||||
;; Copyright (C) 2007 John Wiegley <johnw@gnu.org>
|
||||
|
||||
;; Emacs Lisp Archive Entry
|
||||
;; Filename: org-crypt.el
|
||||
;; Version: 6.31a
|
||||
;; Keywords: org-mode
|
||||
;; Author: John Wiegley <johnw@gnu.org>
|
||||
;; Maintainer: Peter Jones <pjones@pmade.com>
|
||||
;; Description: Adds public key encryption to org-mode buffers
|
||||
;; URL: http://www.newartisans.com/software/emacs.html
|
||||
;; Compatibility: Emacs22
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
;; GNU Emacs is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; GNU Emacs is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Right now this is just a set of functions to play with. It depends
|
||||
;; on the epg library. Here's how you would use it:
|
||||
;;
|
||||
;; 1. To mark an entry for encryption, tag the heading with "crypt".
|
||||
;; You can change the tag to any complex tag matching string by
|
||||
;; setting the `org-crypt-tag-matcher' variable.
|
||||
;;
|
||||
;; 2. Set the encryption key to use in the `org-crypt-key' variable,
|
||||
;; or use `M-x org-set-property' to set the property CRYPTKEY to
|
||||
;; any address in your public keyring. The text of the entry (but
|
||||
;; not its properties or headline) will be encrypted for this user.
|
||||
;; For them to read it, the corresponding secret key must be
|
||||
;; located in the secret key ring of the account where you try to
|
||||
;; decrypt it. This makes it possible to leave secure notes that
|
||||
;; only the intended recipient can read in a shared-org-mode-files
|
||||
;; scenario.
|
||||
;;
|
||||
;; 3. To later decrypt an entry, use `org-decrypt-entries' or
|
||||
;; `org-decrypt-entry'. It might be useful to bind this to a key,
|
||||
;; like C-c C-/. I hope that in the future, C-c C-r can be might
|
||||
;; overloaded to also decrypt an entry if it's encrypted, since
|
||||
;; that fits nicely with the meaning of "reveal".
|
||||
;;
|
||||
;; 4. To automatically encrypt all necessary entries when saving a
|
||||
;; file, call `org-crypt-use-before-save-magic' after loading
|
||||
;; org-crypt.el.
|
||||
;;
|
||||
;; TODO:
|
||||
;; - Allow symmetric encryption as well
|
||||
|
||||
;;; Thanks:
|
||||
|
||||
;; - Carsten Dominik
|
||||
;; - Vitaly Ostanin
|
||||
|
||||
(require 'org)
|
||||
|
||||
(declare-function epg-decrypt-string "epg" (context cipher))
|
||||
(declare-function epg-list-keys "epg" (context &optional name mode))
|
||||
(declare-function epg-make-context "epg"
|
||||
(&optional protocol armor textmode include-certs
|
||||
cipher-algorithm digest-algorithm
|
||||
compress-algorithm))
|
||||
(declare-function epg-encrypt-string "epg"
|
||||
(context plain recipients &optional sign always-trust))
|
||||
|
||||
(defgroup org-crypt nil
|
||||
"Org Crypt"
|
||||
:tag "Org Crypt" :group 'org)
|
||||
|
||||
(defcustom org-crypt-tag-matcher "crypt"
|
||||
"The tag matcher used to find headings whose contents should be
|
||||
encrypted. See the \"Match syntax\" section of the org manual
|
||||
for more details."
|
||||
:type 'string :group 'org-crypt)
|
||||
|
||||
(defcustom org-crypt-key nil
|
||||
"The default key to use when encrypting the contents of a
|
||||
heading. This can also be overridden in the CRYPTKEY property."
|
||||
:type 'string :group 'org-crypt)
|
||||
|
||||
(defun org-crypt-key-for-heading ()
|
||||
"Returns the encryption key for the current heading."
|
||||
(save-excursion
|
||||
(org-back-to-heading t)
|
||||
(or (org-entry-get nil "CRYPTKEY" 'selective)
|
||||
org-crypt-key
|
||||
(and (boundp 'epa-file-encrypt-to) epa-file-encrypt-to)
|
||||
(error "No crypt key set"))))
|
||||
|
||||
(defun org-encrypt-entry ()
|
||||
"Encrypt the content of the current headline."
|
||||
(interactive)
|
||||
(require 'epg)
|
||||
(save-excursion
|
||||
(org-back-to-heading t)
|
||||
(forward-line)
|
||||
(when (not (looking-at "-----BEGIN PGP MESSAGE-----"))
|
||||
(let ((folded (org-invisible-p))
|
||||
(epg-context (epg-make-context nil t t))
|
||||
(crypt-key (org-crypt-key-for-heading))
|
||||
(beg (point))
|
||||
end encrypted-text)
|
||||
(org-end-of-subtree t t)
|
||||
(org-back-over-empty-lines)
|
||||
(setq end (point)
|
||||
encrypted-text
|
||||
(epg-encrypt-string
|
||||
epg-context
|
||||
(buffer-substring-no-properties beg end)
|
||||
(epg-list-keys epg-context crypt-key)))
|
||||
(delete-region beg end)
|
||||
(insert encrypted-text)
|
||||
(when folded
|
||||
(save-excursion
|
||||
(org-back-to-heading t)
|
||||
(hide-subtree)))
|
||||
nil))))
|
||||
|
||||
(defun org-decrypt-entry ()
|
||||
(interactive)
|
||||
(require 'epg)
|
||||
(save-excursion
|
||||
(org-back-to-heading t)
|
||||
(forward-line)
|
||||
(when (looking-at "-----BEGIN PGP MESSAGE-----")
|
||||
(let* ((beg (point))
|
||||
(end (save-excursion
|
||||
(search-forward "-----END PGP MESSAGE-----")
|
||||
(forward-line)
|
||||
(point)))
|
||||
(epg-context (epg-make-context nil t t))
|
||||
(decrypted-text
|
||||
(decode-coding-string
|
||||
(epg-decrypt-string
|
||||
epg-context
|
||||
(buffer-substring-no-properties beg end))
|
||||
'utf-8)))
|
||||
(delete-region beg end)
|
||||
(insert decrypted-text)
|
||||
nil))))
|
||||
|
||||
(defun org-encrypt-entries ()
|
||||
(interactive)
|
||||
(org-scan-tags
|
||||
'org-encrypt-entry
|
||||
(cdr (org-make-tags-matcher org-crypt-tag-matcher))))
|
||||
|
||||
(defun org-decrypt-entries ()
|
||||
(interactive)
|
||||
(org-scan-tags
|
||||
'org-decrypt-entry
|
||||
(cdr (org-make-tags-matcher org-crypt-tag-matcher))))
|
||||
|
||||
(defun org-crypt-use-before-save-magic ()
|
||||
"Adds a hook that will automatically encrypt entries before a
|
||||
file is saved to disk."
|
||||
(add-hook
|
||||
'org-mode-hook
|
||||
(lambda () (add-hook 'before-save-hook 'org-encrypt-entries nil t))))
|
||||
|
||||
(provide 'org-crypt)
|
||||
|
||||
;; arch-tag: 8202ed2c-221e-4001-9e4b-54674a7e846e
|
||||
|
||||
;;; org-crypt.el ends here
|
|
@ -4,7 +4,7 @@
|
|||
;;
|
||||
;; Emacs Lisp Archive Entry
|
||||
;; Filename: org-docbook.el
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;; Author: Baoqiu Cui <cbaoqiu AT yahoo DOT com>
|
||||
;; Maintainer: Baoqiu Cui <cbaoqiu AT yahoo DOT com>
|
||||
;; Keywords: org, wp, docbook
|
||||
|
@ -242,6 +242,11 @@ the variable to
|
|||
:group 'org-export-docbook
|
||||
:type 'string)
|
||||
|
||||
;;; Hooks
|
||||
|
||||
(defvar org-export-docbook-final-hook nil
|
||||
"Hook run at the end of DocBook export, in the new buffer.")
|
||||
|
||||
;;; Autoload functions:
|
||||
|
||||
;;;###autoload
|
||||
|
@ -1123,6 +1128,7 @@ publishing directory."
|
|||
(goto-char (point-max))
|
||||
(unless body-only
|
||||
(insert "</article>"))
|
||||
(run-hooks 'org-export-docbook-final-hook)
|
||||
(or to-buffer (save-buffer))
|
||||
(goto-char (point-min))
|
||||
(or (org-export-push-to-kill-ring "DocBook")
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -27,6 +27,7 @@
|
|||
;;; Commentary:
|
||||
|
||||
(require 'org)
|
||||
(require 'org-macs)
|
||||
(require 'org-agenda)
|
||||
(require 'org-exp-blocks)
|
||||
(eval-when-compile
|
||||
|
@ -655,12 +656,13 @@ modified) list.")
|
|||
(let ((re (org-make-options-regexp
|
||||
(append
|
||||
'("TITLE" "AUTHOR" "DATE" "EMAIL" "TEXT" "OPTIONS" "LANGUAGE"
|
||||
"LINK_UP" "LINK_HOME" "SETUPFILE" "STYLE" "LATEX_HEADER"
|
||||
"LINK_UP" "LINK_HOME" "SETUPFILE" "STYLE"
|
||||
"LATEX_HEADER" "LATEX_CLASS"
|
||||
"EXPORT_SELECT_TAGS" "EXPORT_EXCLUDE_TAGS"
|
||||
"KEYWORDS" "DESCRIPTION" "MACRO" "BIND")
|
||||
(mapcar 'car org-export-inbuffer-options-extra))))
|
||||
p key val text options a pr style
|
||||
latex-header macros letbind
|
||||
latex-header latex-class macros letbind
|
||||
ext-setup-or-nil setup-contents (start 0))
|
||||
(while (or (and ext-setup-or-nil
|
||||
(string-match re ext-setup-or-nil start)
|
||||
|
@ -685,6 +687,8 @@ modified) list.")
|
|||
(setq style (concat style "\n" val)))
|
||||
((string-equal key "LATEX_HEADER")
|
||||
(setq latex-header (concat latex-header "\n" val)))
|
||||
((string-equal key "LATEX_CLASS")
|
||||
(setq latex-class val))
|
||||
((string-equal key "TEXT")
|
||||
(setq text (if text (concat text "\n" val) val)))
|
||||
((string-equal key "OPTIONS")
|
||||
|
@ -719,6 +723,8 @@ modified) list.")
|
|||
(when style (setq p (plist-put p :style-extra style)))
|
||||
(when latex-header
|
||||
(setq p (plist-put p :latex-header-extra (substring latex-header 1))))
|
||||
(when latex-class
|
||||
(setq p (plist-put p :latex-class latex-class)))
|
||||
(when options
|
||||
(setq p (org-export-add-options-to-plist p options)))
|
||||
;; Add macro definitions
|
||||
|
@ -1840,8 +1846,17 @@ When it is nil, all comments will be removed."
|
|||
(while (re-search-forward "^[ \t]*|" nil t)
|
||||
(beginning-of-line 1)
|
||||
(if (or (looking-at "[ \t]*| *[!_^] *|")
|
||||
(and (looking-at "[ \t]*|\\( *\\(<[0-9]+>\\|<[rl]>\\|<[rl][0-9]+>\\)? *|\\)+[ \t]*$")
|
||||
(not (looking-at ".*?| *[^ <|\n]"))))
|
||||
(not
|
||||
(memq
|
||||
nil
|
||||
(mapcar
|
||||
(lambda (f)
|
||||
(or (= (length f) 0)
|
||||
(string-match
|
||||
"\\`<\\([0-9]\\|[rl]\\|[rl][0-9]+\\)>\\'" f)))
|
||||
(org-split-string ;; FIXME, can't we do this without splitting???
|
||||
(buffer-substring (point-at-bol) (point-at-eol))
|
||||
"[ \t]*|[ \t]*")))))
|
||||
(delete-region (max (point-min) (1- (point-at-bol)))
|
||||
(point-at-eol))
|
||||
(end-of-line 1))))
|
||||
|
@ -2076,36 +2091,41 @@ TYPE must be a string, any of:
|
|||
(while (re-search-forward
|
||||
"{{{\\([a-zA-Z][-a-zA-Z0-9_]*\\)\\(([ \t\n]*\\([^\000]*?\\))\\)?}}}"
|
||||
nil t)
|
||||
(setq key (downcase (match-string 1))
|
||||
args (match-string 3))
|
||||
(when (setq val (or (plist-get org-export-opt-plist
|
||||
(intern (concat ":macro-" key)))
|
||||
(plist-get org-export-opt-plist
|
||||
(intern (concat ":" key)))))
|
||||
(save-match-data
|
||||
(when args
|
||||
(setq args (org-split-string args ",[ \t\n]*") args2 nil)
|
||||
(setq args (mapcar 'org-trim args))
|
||||
(while args
|
||||
(while (string-match "\\\\\\'" (car args))
|
||||
;; repair bad splits
|
||||
(setcar (cdr args) (concat (substring (car args) 0 -1)
|
||||
";" (nth 1 args)))
|
||||
(pop args))
|
||||
(push (pop args) args2))
|
||||
(setq args (nreverse args2))
|
||||
(setq s 0)
|
||||
(while (string-match "\\$\\([0-9]+\\)" val s)
|
||||
(setq s (1+ (match-beginning 0))
|
||||
n (string-to-number (match-string 1 val)))
|
||||
(and (>= (length args) n)
|
||||
(setq val (replace-match (nth (1- n) args) t t val)))))
|
||||
(when (string-match "\\`(eval\\>" val)
|
||||
(setq val (eval (read val))))
|
||||
(if (and val (not (stringp val)))
|
||||
(setq val (format "%s" val))))
|
||||
(and (stringp val)
|
||||
(replace-match val t t))))))
|
||||
(unless (save-match-data
|
||||
(save-excursion
|
||||
(goto-char (point-at-bol))
|
||||
(looking-at "[ \t]*#\\+macro")))
|
||||
(setq key (downcase (match-string 1))
|
||||
args (match-string 3))
|
||||
(when (setq val (or (plist-get org-export-opt-plist
|
||||
(intern (concat ":macro-" key)))
|
||||
(plist-get org-export-opt-plist
|
||||
(intern (concat ":" key)))))
|
||||
(save-match-data
|
||||
(when args
|
||||
(setq args (org-split-string args ",[ \t\n]*") args2 nil)
|
||||
(setq args (mapcar 'org-trim args))
|
||||
(while args
|
||||
(while (string-match "\\\\\\'" (car args))
|
||||
;; repair bad splits
|
||||
(setcar (cdr args) (concat (substring (car args) 0 -1)
|
||||
";" (nth 1 args)))
|
||||
(pop args))
|
||||
(push (pop args) args2))
|
||||
(setq args (nreverse args2))
|
||||
(setq s 0)
|
||||
(while (string-match "\\$\\([0-9]+\\)" val s)
|
||||
(setq s (1+ (match-beginning 0))
|
||||
n (string-to-number (match-string 1 val)))
|
||||
(and (>= (length args) n)
|
||||
(setq val (replace-match (nth (1- n) args) t t val)))))
|
||||
(when (string-match "\\`(eval\\>" val)
|
||||
(setq val (eval (read val))))
|
||||
(if (and val (not (stringp val)))
|
||||
(setq val (format "%s" val))))
|
||||
(and (stringp val)
|
||||
(prog1 (replace-match val t t)
|
||||
(goto-char (match-beginning 0)))))))))
|
||||
|
||||
(defun org-export-apply-macros-in-string (s)
|
||||
"Apply the macros in string S."
|
||||
|
@ -2801,6 +2821,8 @@ If yes remove the column and the special lines."
|
|||
(while (string-match org-bracket-link-regexp s)
|
||||
(setq s (replace-match (match-string (if (match-end 3) 3 1) s)
|
||||
t t s)))
|
||||
(while (string-match "\\[\\([0-9]\\|fn:[^]]*\\)\\]" s)
|
||||
(setq s (replace-match "" t t s)))
|
||||
s)
|
||||
|
||||
(defun org-create-multibrace-regexp (left right n)
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -33,6 +33,18 @@
|
|||
(require 'org-macs)
|
||||
(require 'org-compat)
|
||||
|
||||
(defun org-copy-face (old-face new-face docstring &rest attributes)
|
||||
(unless (facep new-face)
|
||||
(if (fboundp 'set-face-attribute)
|
||||
(progn
|
||||
(make-face new-face)
|
||||
(set-face-attribute new-face nil :inherit old-face)
|
||||
(apply 'set-face-attribute new-face nil attributes)
|
||||
(set-face-doc-string new-face docstring))
|
||||
(copy-face old-face new-face)
|
||||
(if (fboundp 'set-face-doc-string)
|
||||
(set-face-doc-string new-face docstring)))))
|
||||
|
||||
(defgroup org-faces nil
|
||||
"Faces in Org-mode."
|
||||
:tag "Org Faces"
|
||||
|
@ -363,15 +375,12 @@ list of attributes, like (:foreground \"blue\" :weight bold :underline t)."
|
|||
"Face for checkboxes"
|
||||
:group 'org-faces)
|
||||
|
||||
(unless (facep 'org-checkbox-statistics-todo)
|
||||
(copy-face 'org-todo 'org-checkbox-statistics-todo)
|
||||
(set-face-doc-string 'org-checkbox-statistics-todo
|
||||
"Face used for unfinished checkbox statistics."))
|
||||
|
||||
(unless (facep 'org-checkbox-statistics-done)
|
||||
(copy-face 'org-done 'org-checkbox-statistics-done)
|
||||
(set-face-doc-string 'org-checkbox-statistics-done
|
||||
"Face used for finished checkbox statistics."))
|
||||
(org-copy-face 'org-todo 'org-checkbox-statistics-todo
|
||||
"Face used for unfinished checkbox statistics.")
|
||||
|
||||
(org-copy-face 'org-done 'org-checkbox-statistics-done
|
||||
"Face used for finished checkbox statistics.")
|
||||
|
||||
(defcustom org-tag-faces nil
|
||||
"Faces for specific tags.
|
||||
|
@ -486,31 +495,21 @@ changes."
|
|||
"Face used in agenda for captions and dates."
|
||||
:group 'org-faces)
|
||||
|
||||
(unless (facep 'org-agenda-date)
|
||||
(copy-face 'org-agenda-structure 'org-agenda-date)
|
||||
(set-face-doc-string 'org-agenda-date
|
||||
"Face used in agenda for normal days."))
|
||||
(org-copy-face 'org-agenda-structure 'org-agenda-date
|
||||
"Face used in agenda for normal days.")
|
||||
|
||||
(unless (facep 'org-agenda-date-today)
|
||||
(copy-face 'org-agenda-date 'org-agenda-date-today)
|
||||
(set-face-doc-string 'org-agenda-date-today
|
||||
"Face used in agenda for today.")
|
||||
(when (fboundp 'set-face-attribute)
|
||||
(set-face-attribute 'org-agenda-date-today nil :weight 'bold :italic 't)))
|
||||
(org-copy-face 'org-agenda-date 'org-agenda-date-today
|
||||
"Face used in agenda for today."
|
||||
:weight 'bold :italic 't)
|
||||
|
||||
(unless (facep 'org-agenda-clocking)
|
||||
(copy-face 'secondary-selection 'org-agenda-clocking)
|
||||
(set-face-doc-string 'org-agenda-clocking
|
||||
"Face marking the current clock item in the agenda."))
|
||||
(org-copy-face 'secondary-selection 'org-agenda-clocking
|
||||
"Face marking the current clock item in the agenda.")
|
||||
|
||||
(unless (facep 'org-agenda-date-weekend)
|
||||
(copy-face 'org-agenda-date 'org-agenda-date-weekend)
|
||||
(set-face-doc-string 'org-agenda-date-weekend
|
||||
"Face used in agenda for weekend days.
|
||||
(org-copy-face 'org-agenda-date 'org-agenda-date-weekend
|
||||
"Face used in agenda for weekend days.
|
||||
See the variable `org-agenda-weekend-days' for a definition of which days
|
||||
belong to the weekend.")
|
||||
(when (fboundp 'set-face-attribute)
|
||||
(set-face-attribute 'org-agenda-date-weekend nil :weight 'bold)))
|
||||
belong to the weekend."
|
||||
:weight 'bold)
|
||||
|
||||
(defface org-scheduled
|
||||
(org-compatible-face nil
|
||||
|
@ -628,10 +627,8 @@ If it is less than 8, the level-1 face gets re-used for level N+1 etc."
|
|||
"Face used to highlight math latex and other special exporter stuff."
|
||||
:group 'org-faces)
|
||||
|
||||
(unless (facep 'org-mode-line-clock)
|
||||
(copy-face 'modeline 'org-mode-line-clock)
|
||||
(set-face-doc-string 'org-agenda-date
|
||||
"Face used for clock display in mode line."))
|
||||
(org-copy-face 'modeline 'org-mode-line-clock
|
||||
"Face used for clock display in mode line.")
|
||||
|
||||
(provide 'org-faces)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -290,7 +290,8 @@ or new, let the user edit the definition of the footnote."
|
|||
(goto-char (point-max))
|
||||
(insert "\n\n* " org-footnote-section "\n")))
|
||||
;; Now go to the end of this entry and insert there.
|
||||
(org-footnote-goto-local-insertion-point))
|
||||
(org-footnote-goto-local-insertion-point)
|
||||
(org-show-context 'link-search))
|
||||
(t
|
||||
(setq re (concat "^" org-footnote-tag-for-non-org-mode-files "[ \t]*$"))
|
||||
(unless (re-search-forward re nil t)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
;; Tassilo Horn <tassilo at member dot fsf dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -36,6 +36,12 @@
|
|||
(require 'org)
|
||||
(eval-when-compile (require 'gnus-sum))
|
||||
|
||||
;; Declare external functions and variables
|
||||
(declare-function message-fetch-field "message" (header &optional not-all))
|
||||
(declare-function message-narrow-to-head-1 "message" nil)
|
||||
;; The following line suppresses a compiler warning stemming from gnus-sum.el
|
||||
(declare-function gnus-summary-last-subject "gnus-sum" nil)
|
||||
|
||||
;; Customization variables
|
||||
|
||||
(when (fboundp 'defvaralias)
|
||||
|
@ -49,11 +55,6 @@ negates this setting for the duration of the command."
|
|||
:group 'org-link-store
|
||||
:type 'boolean)
|
||||
|
||||
;; Declare external functions and variables
|
||||
|
||||
(defvar gnus-other-frame-object)
|
||||
(defvar gnus-group-name)
|
||||
(defvar gnus-article-current)
|
||||
|
||||
;; Install the link type
|
||||
(org-add-link-type "gnus" 'org-gnus-open)
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -419,6 +419,9 @@ This may also be a function, building and inserting the postamble.")
|
|||
(defvar org-export-html-after-blockquotes-hook nil
|
||||
"Hook run during HTML export, after blockquote, verse, center are done.")
|
||||
|
||||
(defvar org-export-html-final-hook nil
|
||||
"Hook run during HTML export, after blockquote, verse, center are done.")
|
||||
|
||||
;;; HTML export
|
||||
|
||||
(defun org-export-html-preprocess (parameters)
|
||||
|
@ -1461,6 +1464,7 @@ lang=\"%s\" xml:lang=\"%s\">
|
|||
(delete-region beg end)
|
||||
(insert (format "<span style=\"visibility:hidden;\">%s</span>"
|
||||
(make-string n ?x)))))
|
||||
(run-hooks 'org-export-html-final-hook)
|
||||
(or to-buffer (save-buffer))
|
||||
(goto-char (point-min))
|
||||
(or (org-export-push-to-kill-ring "HTML")
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -212,16 +212,17 @@ If the entry does not have an ID, the function returns nil.
|
|||
However, when CREATE is non nil, create an ID if none is present already.
|
||||
PREFIX will be passed through to `org-id-new'.
|
||||
In any case, the ID of the entry is returned."
|
||||
(let ((id (org-entry-get pom "ID")))
|
||||
(cond
|
||||
((and id (stringp id) (string-match "\\S-" id))
|
||||
id)
|
||||
(create
|
||||
(setq id (org-id-new prefix))
|
||||
(org-entry-put pom "ID" id)
|
||||
(org-id-add-location id (buffer-file-name (buffer-base-buffer)))
|
||||
id)
|
||||
(t nil))))
|
||||
(org-with-point-at pom
|
||||
(let ((id (org-entry-get nil "ID")))
|
||||
(cond
|
||||
((and id (stringp id) (string-match "\\S-" id))
|
||||
id)
|
||||
(create
|
||||
(setq id (org-id-new prefix))
|
||||
(org-entry-put pom "ID" id)
|
||||
(org-id-add-location id (buffer-file-name (buffer-base-buffer)))
|
||||
id)
|
||||
(t nil)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun org-id-get-with-outline-path-completion (&optional targets)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -277,5 +277,5 @@ Point is assumed to be at the beginning of a headline."
|
|||
|
||||
(provide 'org-indent)
|
||||
|
||||
;; arch-tag: 981f57e3-d747-49d1-8e63-ed460682cee6
|
||||
;; arch-tag: b76736bc-9f4a-43cd-977c-ecfd6689846a
|
||||
;;; org-indent.el ends here
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
|
@ -93,25 +93,6 @@ the value of this variable."
|
|||
:group 'org-inlinetask
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom org-inlinetask-export 'arrow+content
|
||||
"What should be done with inlinetasks upon export?
|
||||
Possible values:
|
||||
|
||||
nil Remove entirely, headline and \"content\"
|
||||
arrow Insert heading in bold, preceeded by an arrow
|
||||
arrow+content Insert arrow and headline, add content below in an
|
||||
#+begin_example box (ugly, but works for now)
|
||||
|
||||
The \"content\" of an inline task is the material below the planning
|
||||
line and any drawers, up to a lines wit the same number of stars,
|
||||
but containing only the word END."
|
||||
:group 'org-inlinetask
|
||||
:group 'org-export-general
|
||||
:type '(choice
|
||||
(const :tag "Remove entirely" nil)
|
||||
(const :tag "Headline preceeded by arrow" arrow)
|
||||
(const :tag "Arrow, headline, + content" arrow+content)))
|
||||
|
||||
(defvar org-odd-levels-only)
|
||||
(defvar org-keyword-time-regexp)
|
||||
(defvar org-drawer-regexp)
|
||||
|
@ -127,6 +108,8 @@ but containing only the word END."
|
|||
(end-of-line -1))
|
||||
(define-key org-mode-map "\C-c\C-xt" 'org-inlinetask-insert-task)
|
||||
|
||||
(defvar htmlp) ; dynamically scoped into the next function
|
||||
(defvar latexp) ; dynamically scoped into the next function
|
||||
(defun org-inlinetask-export-handler ()
|
||||
"Handle headlines with level larger or equal to `org-inlinetask-min-level'.
|
||||
Either remove headline and meta data, or do special formatting."
|
||||
|
@ -136,7 +119,7 @@ Either remove headline and meta data, or do special formatting."
|
|||
(or org-inlinetask-min-level 200)))
|
||||
(re1 (format "^\\(\\*\\{%d,\\}\\) .*\n" nstars))
|
||||
(re2 (concat "^[ \t]*" org-keyword-time-regexp))
|
||||
headline beg end stars content)
|
||||
headline beg end stars content indent)
|
||||
(while (re-search-forward re1 nil t)
|
||||
(setq headline (match-string 0)
|
||||
stars (match-string 1)
|
||||
|
@ -156,15 +139,24 @@ Either remove headline and meta data, or do special formatting."
|
|||
(setq content (buffer-substring beg (1- (point-at-bol))))
|
||||
(delete-region beg (1+ (match-end 0))))
|
||||
(goto-char beg)
|
||||
(when (and org-inlinetask-export
|
||||
(string-match org-complex-heading-regexp headline))
|
||||
(when (memq org-inlinetask-export '(arrow+content arrow))
|
||||
(insert "\n\n\\Rightarrow\\Rightarrow\\Rightarrow *"
|
||||
(if (match-end 2) (concat (match-string 2 headline) " ") "")
|
||||
(match-string 4 headline) "*\n"))
|
||||
(when (and content (eq org-inlinetask-export 'arrow+content))
|
||||
(insert "#+BEGIN_EXAMPLE\n" content "\n#+END_EXAMPLE\n"))
|
||||
(insert "\n")))))
|
||||
(when (string-match org-complex-heading-regexp headline)
|
||||
(setq headline (concat
|
||||
(if (match-end 2)
|
||||
(concat (match-string 2 headline) " ") "")
|
||||
(match-string 4 headline)))
|
||||
(if (not (string-match "\\S-" content))
|
||||
(setq content nil)
|
||||
(if (string-match "[ \t\n]+\\'" content)
|
||||
(setq content (substring content 0 (match-beginning 0))))
|
||||
(setq content (org-remove-indentation content))
|
||||
(if latexp (setq content (concat "\\quad \\\\\n" content))))
|
||||
(insert "- ")
|
||||
(setq indent (make-string (current-column) ?\ ))
|
||||
(insert headline " ::")
|
||||
(when content
|
||||
(insert (if htmlp " " (concat "\n" indent))
|
||||
(mapconcat 'identity (org-split-string content "\n")
|
||||
(concat "\n" indent)) "\n"))))))
|
||||
|
||||
(defun org-inlinetask-fontify (limit)
|
||||
"Fontify the inline tasks."
|
||||
|
@ -196,5 +188,4 @@ Either remove headline and meta data, or do special formatting."
|
|||
|
||||
(provide 'org-inlinetask)
|
||||
|
||||
;; arch-tag: b76736bc-9f4a-43cd-977c-ecfd6689846a
|
||||
;;; org-inlinetask.el ends here
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
;;
|
||||
;; Author: Philip Jackson <emacs@shellarchive.co.uk>
|
||||
;; Keywords: erc, irc, link, org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
;;
|
||||
;; Emacs Lisp Archive Entry
|
||||
;; Filename: org-latex.el
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;; Author: Bastien Guerry <bzg AT altern DOT org>
|
||||
;; Maintainer: Carsten Dominik <carsten.dominik AT gmail DOT com>
|
||||
;; Keywords: org, wp, tex
|
||||
|
@ -49,6 +49,7 @@
|
|||
(require 'footnote)
|
||||
(require 'org)
|
||||
(require 'org-exp)
|
||||
(require 'org-macs)
|
||||
|
||||
;;; Variables:
|
||||
(defvar org-export-latex-class nil)
|
||||
|
@ -410,6 +411,9 @@ These are the .aux, .log, .out, and .toc files."
|
|||
(defvar org-export-latex-after-blockquotes-hook nil
|
||||
"Hook run during LaTeX export, after blockquote, verse, center are done.")
|
||||
|
||||
(defvar org-export-latex-final-hook nil
|
||||
"Hook run in the finalized LaTeX buffer.")
|
||||
|
||||
;;; Autoload functions:
|
||||
|
||||
;;;###autoload
|
||||
|
@ -662,6 +666,7 @@ when PUB-DIR is set, use this as the publishing directory."
|
|||
(and (re-search-forward "\\[TABLE-OF-CONTENTS\\]" nil t)
|
||||
(replace-match "\\tableofcontents" t t)))
|
||||
|
||||
(run-hooks 'org-export-latex-final-hook)
|
||||
(or to-buffer (save-buffer))
|
||||
(goto-char (point-min))
|
||||
(or (org-export-push-to-kill-ring "LaTeX")
|
||||
|
@ -923,6 +928,7 @@ LEVEL indicates the default depth for export."
|
|||
(goto-char (point-min))
|
||||
(and (re-search-forward "^#\\+LaTeX_CLASS:[ \t]*\\([a-zA-Z]+\\)" nil t)
|
||||
(match-string 1))))
|
||||
(plist-get org-export-latex-options-plist :latex-class)
|
||||
org-export-latex-default-class)
|
||||
org-export-latex-class
|
||||
(or (car (assoc org-export-latex-class org-export-latex-classes))
|
||||
|
@ -1003,11 +1009,10 @@ If BEG is non-nil, it is the beginning of the region.
|
|||
If END is non-nil, it is the end of the region."
|
||||
(save-excursion
|
||||
(goto-char (or beg (point-min)))
|
||||
(let* ((pt (point)))
|
||||
(or end
|
||||
(and (re-search-forward "^\\*+ " end t)
|
||||
(setq end (match-beginning 0)))
|
||||
(setq end (point-max)))
|
||||
(let* ((pt (point))
|
||||
(end (if (re-search-forward "^\\*+ " end t)
|
||||
(goto-char (match-beginning 0))
|
||||
(goto-char (or end (point-max))))))
|
||||
(prog1
|
||||
(org-export-latex-content
|
||||
(org-export-preprocess-string
|
||||
|
@ -1233,9 +1238,8 @@ SUBSUP corresponds to the ^: option in the #+OPTIONS line.
|
|||
Convert CHAR depending on STRING-BEFORE and STRING-AFTER."
|
||||
(cond ((equal string-before "\\")
|
||||
(concat string-before char string-after))
|
||||
;; this is part of a math formula
|
||||
((and (string-match "\\S-+" string-before)
|
||||
(string-match "\\S-+" string-after))
|
||||
((and (string-match "\\S-+" string-after))
|
||||
;; this is part of a math formula
|
||||
(cond ((eq 'org-link (get-text-property 0 'face char))
|
||||
(concat string-before "\\" char string-after))
|
||||
((save-match-data (org-inside-latex-math-p))
|
||||
|
@ -1480,9 +1484,9 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
|
|||
"%s" (substring ll i (1+ i))))
|
||||
(throw 'exit nil))))))
|
||||
(let ((start 0)
|
||||
(trans '(("\\" . "\\backslash")
|
||||
("~" . "\\ensuremath{\\sim}")
|
||||
("^" . "\\ensuremath{\\wedge}")))
|
||||
(trans '(("\\" . "\\textbackslash{}")
|
||||
("~" . "\\textasciitilde{}")
|
||||
("^" . "\\textasciicircum{}")))
|
||||
(rtn "") char)
|
||||
(while (string-match "[\\{}$%&_#~^]" string)
|
||||
(setq char (match-string 0 string))
|
||||
|
@ -1551,8 +1555,8 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
|
|||
(cond ((and imgp (plist-get org-export-latex-options-plist :inline-images))
|
||||
(insert
|
||||
(concat
|
||||
(if floatp "\\begin{figure}[htb]\n")
|
||||
(format "\\centerline{\\includegraphics[%s]{%s}}\n"
|
||||
(if floatp "\\begin{figure}[htb]\n\\centering\n")
|
||||
(format "\\includegraphics[%s]{%s}\n"
|
||||
attr
|
||||
(if (file-name-absolute-p raw-path)
|
||||
(expand-file-name raw-path)
|
||||
|
@ -1561,7 +1565,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
|
|||
(format "\\caption{%s%s}\n"
|
||||
(if label (concat "\\label{" label "}") "")
|
||||
(or caption "")))
|
||||
(if floatp "\\end{figure}\n"))))
|
||||
(if floatp "\\end{figure}"))))
|
||||
(coderefp
|
||||
(insert (format
|
||||
(org-export-get-coderef-format path desc)
|
||||
|
@ -1662,9 +1666,11 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
|
|||
(org-export-latex-protect-string
|
||||
(concat "\\hspace*{1cm}" (match-string 2))) t t)
|
||||
(beginning-of-line 1))
|
||||
(unless (looking-at ".*?[^ \t\n].*?\\\\\\\\[ \t]*$")
|
||||
(end-of-line 1)
|
||||
(insert "\\\\"))
|
||||
(if (looking-at "[ \t]*$")
|
||||
(insert "\\vspace*{1em}")
|
||||
(unless (looking-at ".*?[^ \t\n].*?\\\\\\\\[ \t]*$")
|
||||
(end-of-line 1)
|
||||
(insert "\\\\")))
|
||||
(beginning-of-line 2))
|
||||
(and (looking-at "[ \t]*ORG-VERSE-END.*")
|
||||
(org-replace-match-keep-properties "\\end{verse}" t t)))
|
||||
|
@ -1691,8 +1697,10 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
|
|||
"\\)?"
|
||||
(org-create-multibrace-regexp "{" "}" 3))))
|
||||
(while (re-search-forward re nil t)
|
||||
(add-text-properties (match-beginning 0) (match-end 0)
|
||||
'(org-protected t))))
|
||||
(unless (save-excursion (goto-char (match-beginning 0))
|
||||
(equal (char-after (point-at-bol)) ?#))
|
||||
(add-text-properties (match-beginning 0) (match-end 0)
|
||||
'(org-protected t)))))
|
||||
|
||||
;; Protect LaTeX entities
|
||||
(goto-char (point-min))
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
;; Bastien Guerry <bzg AT altern DOT org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -427,7 +427,7 @@ the whole buffer."
|
|||
(re "\\(\\(\\[[0-9]*%\\]\\)\\|\\(\\[[0-9]*/[0-9]*\\]\\)\\)")
|
||||
(re-box "^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[- X]\\]\\)")
|
||||
(re-find (concat re "\\|" re-box))
|
||||
beg-cookie end-cookie is-percent c-on c-off lim
|
||||
beg-cookie end-cookie is-percent c-on c-off lim new
|
||||
eline curr-ind next-ind continue-from startsearch
|
||||
(recursive
|
||||
(or (not org-hierarchical-checkbox-statistics)
|
||||
|
@ -488,12 +488,12 @@ the whole buffer."
|
|||
(goto-char continue-from)
|
||||
;; update cookie
|
||||
(when end-cookie
|
||||
(delete-region beg-cookie end-cookie)
|
||||
(setq new (if is-percent
|
||||
(format "[%d%%]" (/ (* 100 c-on) (max 1 (+ c-on c-off))))
|
||||
(format "[%d/%d]" c-on (+ c-on c-off))))
|
||||
(goto-char beg-cookie)
|
||||
(insert
|
||||
(if is-percent
|
||||
(format "[%d%%]" (/ (* 100 c-on) (max 1 (+ c-on c-off))))
|
||||
(format "[%d/%d]" c-on (+ c-on c-off)))))
|
||||
(insert new)
|
||||
(delete-region (point) (+ (point) (- end-cookie beg-cookie))))
|
||||
;; update items checkbox if it has one
|
||||
(when (org-at-item-p)
|
||||
(org-beginning-of-item)
|
||||
|
@ -812,7 +812,7 @@ with something like \"1.\" or \"2)\"."
|
|||
(buffer-substring (point-at-bol) (match-beginning 3))))
|
||||
;; (term (substring (match-string 3) -1))
|
||||
ind1 (n (1- arg))
|
||||
fmt bobp old new)
|
||||
fmt bobp old new delta)
|
||||
;; find where this list begins
|
||||
(org-beginning-of-item-list)
|
||||
(setq bobp (bobp))
|
||||
|
@ -834,7 +834,9 @@ with something like \"1.\" or \"2)\"."
|
|||
(delete-region (match-beginning 2) (match-end 2))
|
||||
(goto-char (match-beginning 2))
|
||||
(insert (setq new (format fmt (setq n (1+ n)))))
|
||||
(org-shift-item-indentation (- (length new) (length old))))))
|
||||
(setq delta (- (length new) (length old)))
|
||||
(org-shift-item-indentation delta)
|
||||
(if (= (org-current-line) line) (setq col (+ col delta))))))
|
||||
(org-goto-line line)
|
||||
(org-move-to-column col)))
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
;; Author: John Wiegley <johnw@gnu.org>
|
||||
;; Christopher Suckling <suckling at gmail dot com>
|
||||
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -102,6 +102,7 @@ We use a macro so that the test can happen at compilation time."
|
|||
(save-excursion
|
||||
(goto-char (or ,pom (point)))
|
||||
,@body)))
|
||||
(put 'org-with-point-at 'lisp-indent-function 1)
|
||||
|
||||
(defmacro org-no-warnings (&rest body)
|
||||
(cons (if (fboundp 'with-no-warnings) 'with-no-warnings 'progn) body))
|
||||
|
@ -117,7 +118,7 @@ We use a macro so that the test can happen at compilation time."
|
|||
,@body))
|
||||
|
||||
(defmacro org-if-unprotected-at (pos &rest body)
|
||||
"Execute BODY if there is no `org-protected' text property at point-1."
|
||||
"Execute BODY if there is no `org-protected' text property at POS."
|
||||
`(unless (get-text-property ,pos 'org-protected)
|
||||
,@body))
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
;; Author: Tokuya Kameshima <kames at fa2 dot so-net dot ne dot jp>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Author: Thomas Baumann <thomas dot baumann at ch dot tum dot de>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
|
511
lisp/org/org-mobile.el
Normal file
511
lisp/org/org-mobile.el
Normal file
|
@ -0,0 +1,511 @@
|
|||
;;; org-mobile.el --- Code for asymmetric sync with a mobile device
|
||||
;; Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
;;
|
||||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
;; GNU Emacs is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
;;
|
||||
;; GNU Emacs is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; This file contains the code to interact with Richard Moreland's iPhone
|
||||
;; application MobileOrg. This code is documented in Appendix B of the
|
||||
;; Org-mode manual. The code is not specific for the iPhone, however.
|
||||
;; Any external viewer and flagging application that uses the same
|
||||
;; conventions could be used.
|
||||
|
||||
(require 'org)
|
||||
(require 'org-agenda)
|
||||
|
||||
(defgroup org-mobile nil
|
||||
"Options concerning support for a viewer on a mobile device."
|
||||
:tag "Org Mobile"
|
||||
:group 'org)
|
||||
|
||||
(defcustom org-mobile-files '(org-agenda-files)
|
||||
"Files to be staged for MobileOrg.
|
||||
This is basically a list of filesand directories. Files will be staged
|
||||
directly. Directories will be search for files with the extension `.org'.
|
||||
In addition to this, the list may also contain the following symbols:
|
||||
|
||||
org-agenda-files
|
||||
This means, include the complete, unrestricted list of files given in
|
||||
the variable `org-agenda-files'.
|
||||
org-agenda-text-search-extra-files
|
||||
Include the files given in the variable
|
||||
`org-agenda-text-search-extra-files'"
|
||||
:group 'org-mobile
|
||||
:type '(list :greedy t
|
||||
(option (const :tag "org-agenda-files" org-agenda-files))
|
||||
(option (const :tag "org-agenda-text-search-extra-files"
|
||||
org-agenda-text-search-extra-files))
|
||||
(repeat :inline t :tag "Additional files"
|
||||
(file))))
|
||||
|
||||
(defcustom org-mobile-directory ""
|
||||
"The WebDAV directory where the interaction with the mobile takes place."
|
||||
:group 'org-mobile
|
||||
:type 'directory)
|
||||
|
||||
(defcustom org-mobile-inbox-for-pull "~/org/from-mobile.org"
|
||||
"The file where captured notes and flags will be appended to.
|
||||
During the execution of `org-mobile-pull', the file
|
||||
`org-mobile-capture-file' will be emptied it's contents have
|
||||
been appended to the file given here."
|
||||
:group 'org-mobile
|
||||
:type 'file)
|
||||
|
||||
(defconst org-mobile-capture-file "mobileorg.org"
|
||||
"The capture file where the mobile stores captured notes and flags.
|
||||
This should not be changed, because MobileOrg assumes this name.")
|
||||
|
||||
(defcustom org-mobile-index-file "index.org"
|
||||
"The index file with inks to all Org files that should be loaded by MobileOrg.
|
||||
Relative to `org-mobile-directory'. The Address field in the MobileOrg setup
|
||||
should point to this file."
|
||||
:group 'org-mobile
|
||||
:type 'file)
|
||||
|
||||
(defcustom org-mobile-force-id-on-agenda-items t
|
||||
"Non-nil means make all agenda items carry and ID."
|
||||
:group 'org-mobile
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom org-mobile-action-alist
|
||||
'(("d" . (org-todo 'done))
|
||||
("a" . (org-archive-subtree-default))
|
||||
("d-a" . (progn (org-todo 'done) (org-archive-subtree-default)))
|
||||
("todo" . (org-todo data))
|
||||
("tags" . (org-set-tags-to data)))
|
||||
"Alist with flags and actions for mobile sync.
|
||||
When flagging an entry, MobileOrg will create entries that look like
|
||||
|
||||
* F(action:data) [[id:entry-id][entry title]]
|
||||
|
||||
This alist defines that the ACTION in the parentheses of F() should mean,
|
||||
i.e. what action should be taken. The :data part in the parenthesis is
|
||||
optional. If present, the string after the colon will be passed to the
|
||||
action form as the `data' variable.
|
||||
The car of each elements of the alist is an actions string. The cdr is
|
||||
an Emacs Lisp form that will be evaluated with the cursor on the headline
|
||||
of that entry."
|
||||
:group 'org-mobile
|
||||
:type '(repeat
|
||||
(cons (string :tag "Action flag")
|
||||
(sexp :tag "Action form"))))
|
||||
|
||||
(defvar org-mobile-pre-push-hook nil
|
||||
"Hook run before running `org-mobile-push'.
|
||||
This could be used to clean up `org-mobile-directory', for example to
|
||||
remove files that used to be included in the agenda but no longer are.
|
||||
The presence of such files would not really be a problem, but after time
|
||||
they may accumulate.")
|
||||
|
||||
(defvar org-mobile-post-push-hook nil
|
||||
"Hook run after running `org-mobile-push'.
|
||||
If Emacs does not have direct write access to the WebDAV directory used
|
||||
by the mobile device, this hook should be used to copy all files from the
|
||||
local staging directory `org-mobile-directory' to the WebDAV directory,
|
||||
for example using `rsync' or `scp'.")
|
||||
|
||||
(defvar org-mobile-pre-pull-hook nil
|
||||
"Hook run before executing `org-mobile-pull'.
|
||||
If Emacs does not have direct write access to the WebDAV directory used
|
||||
by the mobile device, this hook should be used to copy the capture file
|
||||
`mobileorg.org' from the WebDAV location to the local staging
|
||||
directory `org-mobile-directory'.")
|
||||
|
||||
(defvar org-mobile-post-pull-hook nil
|
||||
"Hook run after running `org-mobile-pull'.
|
||||
If Emacs does not have direct write access to the WebDAV directory used
|
||||
by the mobile device, this hook should be used to copy the emptied
|
||||
capture file `mobileorg.org' back to the WebDAV directory, for example
|
||||
using `rsync' or `scp'.")
|
||||
|
||||
(defvar org-mobile-last-flagged-files nil
|
||||
"List of files containing entreis flagged in the latest pull.")
|
||||
|
||||
(defvar org-mobile-files-alist nil)
|
||||
(defvar org-mobile-checksum-files nil)
|
||||
|
||||
(defun org-mobile-prepare-file-lists ()
|
||||
(setq org-mobile-files-alist (org-mobile-files-alist))
|
||||
(setq org-mobile-checksum-files (mapcar 'cdr org-mobile-files-alist)))
|
||||
|
||||
(defun org-mobile-files-alist ()
|
||||
"Expand the list in `org-mobile-files' to a list of existing files."
|
||||
(let* ((files
|
||||
(apply 'append (mapcar
|
||||
(lambda (f)
|
||||
(cond
|
||||
((eq f 'org-agenda-files) (org-agenda-files t))
|
||||
((eq f 'org-agenda-text-search-extra-files)
|
||||
org-agenda-text-search-extra-files)
|
||||
((and (stringp f) (file-directory-p f))
|
||||
(directory-files f 'full "\\.org\\'"))
|
||||
((and (stringp f) (file-exists-p f))
|
||||
(list f))
|
||||
(t nil)))
|
||||
org-mobile-files)))
|
||||
(orgdir-uname (file-name-as-directory (file-truename org-directory)))
|
||||
(orgdir-re (concat "\\`" (regexp-quote orgdir-uname)))
|
||||
uname seen rtn file link-name)
|
||||
;; Make the files unique, and determine the name under which they will
|
||||
;; be listed.
|
||||
(while (setq file (pop files))
|
||||
(setq uname (file-truename file))
|
||||
(unless (member uname seen)
|
||||
(push uname seen)
|
||||
(if (string-match orgdir-re uname)
|
||||
(setq link-name (substring uname (match-end 0)))
|
||||
(setq link-name (file-name-nondirectory uname)))
|
||||
(push (cons file link-name) rtn)))
|
||||
(nreverse rtn)))
|
||||
|
||||
;;;###autoload
|
||||
(defun org-mobile-push ()
|
||||
"Push the current state of Org affairs to the WebDAV directory.
|
||||
This will create the index file, copy all agenda files there, and also
|
||||
create all custom agenda views, for upload to the mobile phone."
|
||||
(interactive)
|
||||
(org-mobile-check-setup)
|
||||
(org-mobile-prepare-file-lists)
|
||||
(run-hooks 'org-mobile-pre-push-hook)
|
||||
(org-mobile-create-sumo-agenda)
|
||||
(org-save-all-org-buffers) ; to save any IDs created by this process
|
||||
(org-mobile-copy-agenda-files)
|
||||
(org-mobile-create-index-file)
|
||||
(org-mobile-write-checksums)
|
||||
(run-hooks 'org-mobile-post-push-hook)
|
||||
(message "Files for mobile viewer staged"))
|
||||
|
||||
;;;###autoload
|
||||
(defun org-mobile-pull ()
|
||||
"Pull the contents of `org-mobile-capture-file' and integrate them.
|
||||
Apply all flagged actions, flag entries to be flagged and then call an
|
||||
agenda view showing the flagged items."
|
||||
(interactive)
|
||||
(org-mobile-check-setup)
|
||||
(run-hooks 'org-mobile-pre-pull-hook)
|
||||
(let ((insertion-marker (org-mobile-move-capture)))
|
||||
(if (not (markerp insertion-marker))
|
||||
(message "No new items")
|
||||
(org-with-point-at insertion-marker
|
||||
(org-mobile-apply-flags (point) (point-max)))
|
||||
(move-marker insertion-marker nil)
|
||||
(run-hooks 'org-mobile-post-pull-hook)
|
||||
(when org-mobile-last-flagged-files
|
||||
;; Make an agenda view of flagged entries, but only in the files
|
||||
;; where stuff has been added.
|
||||
(put 'org-agenda-files 'org-restrict org-mobile-last-flagged-files)
|
||||
(let ((org-agenda-keep-restriced-file-list t))
|
||||
(org-agenda nil "?"))))))
|
||||
|
||||
(defun org-mobile-check-setup ()
|
||||
"Check if org-mobile-directory has been set up."
|
||||
(when (or (not org-mobile-directory)
|
||||
(not (stringp org-mobile-directory))
|
||||
(not (string-match "\\S-" org-mobile-directory))
|
||||
(not (file-exists-p org-mobile-directory))
|
||||
(not (file-directory-p org-mobile-directory)))
|
||||
(error
|
||||
"Variable `org-mobile-directory' must point to an existing directory"))
|
||||
(when (or (not org-mobile-inbox-for-pull)
|
||||
(not (stringp org-mobile-inbox-for-pull))
|
||||
(not (string-match "\\S-" org-mobile-inbox-for-pull))
|
||||
(not (file-exists-p
|
||||
(file-name-directory org-mobile-inbox-for-pull))))
|
||||
(error
|
||||
"Variable `org-mobile-inbox-for-pull' must point to a file in an existing directory")))
|
||||
|
||||
(defun org-mobile-create-index-file ()
|
||||
"Write the index file in the WebDAV directory."
|
||||
(let ((files-alist org-mobile-files-alist)
|
||||
file link-name todo-kwds done-kwds tags drawers entry)
|
||||
(org-prepare-agenda-buffers (mapcar 'car files-alist))
|
||||
(setq done-kwds (org-uniquify org-done-keywords-for-agenda))
|
||||
(setq todo-kwds (org-delete-all
|
||||
done-kwds
|
||||
(org-uniquify org-todo-keywords-for-agenda)))
|
||||
(setq drawers (org-uniquify org-drawers-for-agenda))
|
||||
(setq tags (org-uniquify
|
||||
(delq nil
|
||||
(mapcar
|
||||
(lambda (e)
|
||||
(cond ((stringp e) e)
|
||||
((listp e)
|
||||
(if (stringp (car e)) (car e) nil))
|
||||
(t nil)))
|
||||
org-tag-alist-for-agenda))))
|
||||
(with-temp-file
|
||||
(expand-file-name org-mobile-index-file org-mobile-directory)
|
||||
(insert "#+TODO: " (mapconcat 'identity todo-kwds " ") " | "
|
||||
(mapconcat 'identity done-kwds " ") "\n"
|
||||
"#+TAGS: " (mapconcat 'identity tags " ") "\n"
|
||||
"#+DRAWERS: " (mapconcat 'identity drawers " ") "\n")
|
||||
(insert "* [[file:agendas.org][Agenda Views]]\n")
|
||||
(while (setq entry (pop files-alist))
|
||||
(setq file (car entry)
|
||||
link-name (cdr entry))
|
||||
(insert (format "* [[file:%s][%s]]\n"
|
||||
link-name link-name)))
|
||||
(insert (format "* [[file:%s][Captured before last sync]]\n"
|
||||
org-mobile-capture-file)))))
|
||||
|
||||
(defun org-mobile-copy-agenda-files ()
|
||||
"Copy all agenda files to the stage or WebDAV directory."
|
||||
(let ((files-alist org-mobile-files-alist)
|
||||
file buf entry link-name target-path target-dir)
|
||||
(while (setq entry (pop files-alist))
|
||||
(setq file (car entry) link-name (cdr entry))
|
||||
(when (file-exists-p file)
|
||||
(setq target-path (expand-file-name link-name org-mobile-directory)
|
||||
target-dir (file-name-directory target-path))
|
||||
(unless (file-directory-p target-dir)
|
||||
(make-directory target-dir 'parents)
|
||||
(copy-file file target-path 'ok-if-exists))))
|
||||
(setq file (expand-file-name org-mobile-capture-file
|
||||
org-mobile-directory))
|
||||
(unless (file-exists-p file)
|
||||
(save-excursion
|
||||
(setq buf (find-file file))
|
||||
(insert "\n")
|
||||
(save-buffer))
|
||||
(kill-buffer buf))))
|
||||
|
||||
(defun org-mobile-write-checksums ()
|
||||
"Create checksums for all files in `org-mobile-directory'.
|
||||
The table of checksums is written to the file mobile-checksums."
|
||||
(let ((cmd (cond ((executable-find "shasum"))
|
||||
((executable-find "sha1sum"))
|
||||
((executable-find "md5sum"))
|
||||
((executable-find "md5"))))
|
||||
(files org-mobile-checksum-files))
|
||||
(if (not cmd)
|
||||
(message "Checksums could not be generated: no executable")
|
||||
(with-temp-buffer
|
||||
(cd org-mobile-directory)
|
||||
(if (file-exists-p "agendas.org")
|
||||
(push "agendas.org" files))
|
||||
(if (file-exists-p "mobileorg.org")
|
||||
(push "mobileorg.org" files))
|
||||
(setq cmd (concat cmd " " (mapconcat 'shell-quote-argument files " ")
|
||||
" > checksums.dat"))
|
||||
(if (equal 0 (shell-command cmd))
|
||||
(message "Checksums written")
|
||||
(message "Checksums could not be generated"))))))
|
||||
|
||||
(defun org-mobile-sumo-agenda-command ()
|
||||
"Return an agenda custom command that comprises all custom commands."
|
||||
(let ((custom-list
|
||||
;; normalize different versions
|
||||
(delq nil
|
||||
(mapcar
|
||||
(lambda (x)
|
||||
(cond ((stringp (cdr x)) nil)
|
||||
((stringp (nth 1 x)) x)
|
||||
((not (nth 1 x)) (cons (car x) (cons "" (cddr x))))
|
||||
(t (cons (car x) (cons "" (cdr x))))))
|
||||
org-agenda-custom-commands)))
|
||||
new e key desc type match settings cmds gkey gdesc gsettings cnt)
|
||||
(while (setq e (pop custom-list))
|
||||
(cond
|
||||
((stringp (cdr e))
|
||||
;; this is a description entry - skip it
|
||||
)
|
||||
((eq (nth 2 e) 'search)
|
||||
;; Search view is interactive, skip
|
||||
)
|
||||
((memq (nth 2 e) '(todo-tree tags-tree occur-tree))
|
||||
;; These are trees, not really agenda commands
|
||||
)
|
||||
((memq (nth 2 e) '(agenda todo tags))
|
||||
;; a normal command
|
||||
(setq key (car e) desc (nth 1 e) type (nth 2 e) match (nth 3 e)
|
||||
settings (nth 4 e))
|
||||
(setq settings
|
||||
(cons (list 'org-agenda-title-append
|
||||
(concat "<break>KEYS=" key " TITLE: "
|
||||
(if (and (stringp desc) (> (length desc) 0))
|
||||
desc (symbol-name type))
|
||||
" " match))
|
||||
settings))
|
||||
(push (list type match settings) new))
|
||||
((symbolp (nth 2 e))
|
||||
;; A user-defined function, not sure how to handle that yet
|
||||
)
|
||||
(t
|
||||
;; a block agenda
|
||||
(setq gkey (car e) gdesc (nth 1 e) gsettings (nth 3 e) cmds (nth 2 e))
|
||||
(setq cnt 0)
|
||||
(while (setq e (pop cmds))
|
||||
(setq type (car e) match (nth 1 e) settings (nth 2 e))
|
||||
(setq settings (append gsettings settings))
|
||||
(setq settings
|
||||
(cons (list 'org-agenda-title-append
|
||||
(concat "<break>KEYS=" gkey "#" (number-to-string
|
||||
(setq cnt (1+ cnt)))
|
||||
" TITLE: " gdesc " " match))
|
||||
settings))
|
||||
(push (list type match settings) new)))))
|
||||
(list "X" "SUMO" (reverse new) nil)))
|
||||
|
||||
;;;###autoload
|
||||
(defun org-mobile-create-sumo-agenda ()
|
||||
"Create a file that contains all custom agenda views."
|
||||
(interactive)
|
||||
(let* ((file (expand-file-name "agendas.org"
|
||||
org-mobile-directory))
|
||||
(org-agenda-custom-commands
|
||||
(list (append (org-mobile-sumo-agenda-command)
|
||||
(list (list file))))))
|
||||
(unless (file-writable-p file)
|
||||
(error "Cannot write to file %s" file))
|
||||
(org-store-agenda-views)))
|
||||
|
||||
(defun org-mobile-move-capture ()
|
||||
"Move the contents of the capture file to the inbox file.
|
||||
Return a marker to the location where the new content has been added.
|
||||
If nothing new has beed added, return nil."
|
||||
(interactive)
|
||||
(let ((inbox-buffer (find-file-noselect org-mobile-inbox-for-pull))
|
||||
(capture-buffer (find-file-noselect
|
||||
(expand-file-name org-mobile-capture-file
|
||||
org-mobile-directory)))
|
||||
(insertion-point (make-marker))
|
||||
not-empty content)
|
||||
(save-excursion
|
||||
(set-buffer capture-buffer)
|
||||
(setq content (buffer-string))
|
||||
(setq not-empty (string-match "\\S-" content))
|
||||
(when not-empty
|
||||
(set-buffer inbox-buffer)
|
||||
(widen)
|
||||
(goto-char (point-max))
|
||||
(or (bolp) (newline))
|
||||
(move-marker insertion-point
|
||||
(prog1 (point) (insert content)))
|
||||
(save-buffer)
|
||||
(set-buffer capture-buffer)
|
||||
(erase-buffer)
|
||||
(save-buffer)))
|
||||
(kill-buffer capture-buffer)
|
||||
(if not-empty insertion-point)))
|
||||
|
||||
(defun org-mobile-apply-flags (&optional beg end)
|
||||
"Apply all flags in the current buffer.
|
||||
If BEG and END are given, only do this in that region."
|
||||
(interactive)
|
||||
(require 'org-archive)
|
||||
(setq org-mobile-last-flagged-files nil)
|
||||
(setq beg (or beg (point-min)) end (or end (point-max)))
|
||||
(goto-char beg)
|
||||
(let ((marker (make-marker))
|
||||
(org-inhibit-logging 'note)
|
||||
(end (move-marker (make-marker) end))
|
||||
action data id id-pos cmd text)
|
||||
(while (re-search-forward
|
||||
"^\\*+[ \t]+F(\\([^():\n]*\\)\\(:\\([^()\n]*\\)\\)?)[ \t]+\\[\\[id:\\([^]\n ]+\\)" end t)
|
||||
(goto-char (- (match-beginning 1) 2))
|
||||
(catch 'next
|
||||
(setq action (match-string 1)
|
||||
data (and (match-end 3) (match-string 3))
|
||||
id (match-string 4)
|
||||
cmd (if (equal action "")
|
||||
'(progn
|
||||
(org-toggle-tag "FLAGGED" 'on)
|
||||
(and text (org-entry-put nil "THEFLAGGINGNOTE" text)))
|
||||
(cdr (assoc action org-mobile-action-alist)))
|
||||
text (org-trim (buffer-substring (1+ (point-at-eol))
|
||||
(save-excursion
|
||||
(org-end-of-subtree t))))
|
||||
id-pos (org-id-find id 'marker))
|
||||
(if (> (length text) 0)
|
||||
;; Make TEXT into a single line, to fit into a property
|
||||
(setq text (mapconcat 'identity
|
||||
(org-split-string text "\n")
|
||||
"\\n"))
|
||||
(setq text nil))
|
||||
(unless id-pos
|
||||
(insert "BAD ID REFERENCE ")
|
||||
(throw 'next t))
|
||||
(unless cmd
|
||||
(insert "BAD FLAG ")
|
||||
(throw 'next t))
|
||||
(move-marker marker (point))
|
||||
(save-excursion
|
||||
(condition-case nil
|
||||
(org-with-point-at id-pos
|
||||
(progn
|
||||
(eval cmd)
|
||||
(if (member "FLAGGED" (org-get-tags))
|
||||
(add-to-list 'org-mobile-last-flagged-files
|
||||
(buffer-file-name (current-buffer))))))
|
||||
(error
|
||||
(progn
|
||||
(switch-to-buffer (marker-buffer marker))
|
||||
(goto-char marker)
|
||||
(insert "EXECUTION FAILED ")
|
||||
(throw 'next t)))))
|
||||
;; If we get here, the action has been applied successfully
|
||||
;; So remove the entry
|
||||
(org-back-to-heading t)
|
||||
(delete-region (point) (org-end-of-subtree t t))))
|
||||
(move-marker marker nil)
|
||||
(move-marker end nil)))
|
||||
|
||||
(defun org-mobile-smart-read ()
|
||||
"Parse the entry at point for shortcuts and expand them.
|
||||
These shortcuts are meant for fast and easy typing on the limited
|
||||
keyboards of a mobile device. Below we show a list of the shortcuts
|
||||
currently implemented.
|
||||
|
||||
The entry is expected to contain an inactive time stamp indicating when
|
||||
the entry was created. When setting dates and
|
||||
times (for example for deadlines), the time strings are interpreted
|
||||
relative to that creation date.
|
||||
Abbreviations are expected to take up entire lines, jst because it is so
|
||||
easy to type RET on a mobile device. Abbreviations start with one or two
|
||||
letters, followed immediately by a dot and then additional information.
|
||||
Generally the entire shortcut line is removed after action have been taken.
|
||||
Time stamps will be constructed using `org-read-date'. So for example a
|
||||
line \"dd. 2tue\" will set a deadline on the second Tuesday after the
|
||||
creation date.
|
||||
|
||||
Here are the shortcuts currently implemented:
|
||||
|
||||
dd. string set deadline
|
||||
ss. string set scheduling
|
||||
tt. string set time tamp, here.
|
||||
ti. string set inactive time
|
||||
|
||||
tg. tag1 tag2 tag3 set all these tags, change case where necessary
|
||||
td. kwd set this todo keyword, change case where necessary
|
||||
|
||||
FIXME: Hmmm, not sure if we can make his work against the
|
||||
auto-correction feature. Needs a bit more thinking. So this function
|
||||
is currently a noop.")
|
||||
|
||||
(provide 'org-mobile)
|
||||
|
||||
;; arch-tag: ace0e26c-58f2-4309-8a61-05ec1535f658
|
||||
|
||||
;;; org-mobile.el ends here
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
;;
|
||||
;; Author: Piotr Zielinski <piotr dot zielinski at gmail dot com>
|
||||
;; Maintainer: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
;; Author: Eric Schulte <schulte dot eric at gmail dot com>
|
||||
;; Keywords: tables, plotting
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
;; Author: Ross Patterson <me AT rpatterson DOT net>
|
||||
;; Maintainer: Sebastian Rose <sebastian_rose AT gmx DOT de>
|
||||
;; Keywords: org, emacsclient, wp
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
;; Author: David O'Toole <dto@gnu.org>
|
||||
;; Maintainer: Carsten Dominik <carsten DOT dominik AT gmail DOT com>
|
||||
;; Keywords: hypermedia, outlines, wp
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -771,8 +771,7 @@ The user is queried for the template."
|
|||
(widen)
|
||||
(goto-char (point-min))
|
||||
(if (re-search-forward
|
||||
(concat "^\\*+[ \t]+" (regexp-quote heading)
|
||||
(org-re "\\([ \t]+:[[:alnum:]@_:]*\\)?[ \t]*$"))
|
||||
(format org-complex-heading-regexp-format (regexp-quote heading))
|
||||
nil t)
|
||||
(goto-char (match-beginning 0))
|
||||
(error "Target headline not found: %s" heading))))
|
||||
|
@ -951,8 +950,8 @@ See also the variable `org-reverse-note-order'."
|
|||
((and (stringp heading) (string-match "\\S-" heading))
|
||||
(goto-char (point-min))
|
||||
(if (re-search-forward
|
||||
(concat "^\\*+[ \t]+" (regexp-quote heading)
|
||||
(org-re "\\([ \t]+:[[:alnum:]@_:]*\\)?[ \t]*$"))
|
||||
(format org-complex-heading-regexp-format
|
||||
(regexp-quote heading))
|
||||
nil t)
|
||||
(setq org-goto-start-pos (match-beginning 0))
|
||||
(when fastp
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.21b
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -36,11 +36,8 @@
|
|||
|
||||
;; Declare external functions and variables
|
||||
(declare-function rmail-show-message "rmail" (&optional n no-summary))
|
||||
(declare-function rmail-get-header "rmail" (name &optional msgnum))
|
||||
(declare-function rmail-what-message "rmail" ())
|
||||
(defvar rmail-current-message)
|
||||
(defvar rmail-buffer)
|
||||
(defvar rmail-view-buffer)
|
||||
|
||||
;; Install the link type
|
||||
(org-add-link-type "rmail" 'org-rmail-open)
|
||||
|
@ -49,35 +46,29 @@
|
|||
;; Implementation
|
||||
(defun org-rmail-store-link ()
|
||||
"Store a link to an Rmail folder or message."
|
||||
(when (memq major-mode '(rmail-mode rmail-summary-mode))
|
||||
(let (message-id from to subject desc link)
|
||||
(if (fboundp 'rmail-get-header) ; Emacs 23
|
||||
(setq message-id (rmail-get-header "message-id")
|
||||
from (rmail-get-header "from")
|
||||
to (rmail-get-header "to")
|
||||
subject (rmail-get-header "subject"))
|
||||
(save-window-excursion ; Emacs 22
|
||||
(save-restriction
|
||||
(when (eq major-mode 'rmail-summary-mode)
|
||||
(rmail-show-message rmail-current-message))
|
||||
(with-no-warnings ; don't warn when compiling Emacs 23
|
||||
(rmail-narrow-to-non-pruned-header))
|
||||
(setq message-id (mail-fetch-field "message-id")
|
||||
from (mail-fetch-field "from")
|
||||
to (mail-fetch-field "to")
|
||||
subject (mail-fetch-field "subject"))
|
||||
(rmail-show-message rmail-current-message))))
|
||||
(org-store-link-props
|
||||
:type "rmail" :from from :to to
|
||||
:subject subject :message-id message-id)
|
||||
(setq message-id (org-remove-angle-brackets message-id))
|
||||
(setq desc (org-email-link-description))
|
||||
(setq link (org-make-link "rmail:"
|
||||
(with-current-buffer rmail-buffer
|
||||
buffer-file-name)
|
||||
"#" message-id))
|
||||
(org-add-link-props :link link :description desc)
|
||||
link)))
|
||||
(when (or (eq major-mode 'rmail-mode)
|
||||
(eq major-mode 'rmail-summary-mode))
|
||||
(save-window-excursion
|
||||
(save-restriction
|
||||
(when (eq major-mode 'rmail-summary-mode)
|
||||
(rmail-show-message rmail-current-message))
|
||||
(when (fboundp 'rmail-narrow-to-non-pruned-header)
|
||||
(rmail-narrow-to-non-pruned-header))
|
||||
(let* ((folder buffer-file-name)
|
||||
(message-id (mail-fetch-field "message-id"))
|
||||
(from (mail-fetch-field "from"))
|
||||
(to (mail-fetch-field "to"))
|
||||
(subject (mail-fetch-field "subject"))
|
||||
desc link)
|
||||
(org-store-link-props
|
||||
:type "rmail" :from from :to to
|
||||
:subject subject :message-id message-id)
|
||||
(setq message-id (org-remove-angle-brackets message-id))
|
||||
(setq desc (org-email-link-description))
|
||||
(setq link (org-make-link "rmail:" folder "#" message-id))
|
||||
(org-add-link-props :link link :description desc)
|
||||
(rmail-show-message rmail-current-message)
|
||||
link)))))
|
||||
|
||||
(defun org-rmail-open (path)
|
||||
"Follow an Rmail message link to the specified PATH."
|
||||
|
@ -92,27 +83,19 @@
|
|||
"Follow an Rmail link to FOLDER and ARTICLE."
|
||||
(require 'rmail)
|
||||
(setq article (org-add-angle-brackets article))
|
||||
(let (message-number buff)
|
||||
(let (message-number)
|
||||
(save-excursion
|
||||
(save-window-excursion
|
||||
(rmail (if (string= folder "RMAIL") rmail-file-name folder))
|
||||
(setq buff (current-buffer)
|
||||
message-number
|
||||
(with-current-buffer
|
||||
(if (and (fboundp 'rmail-buffers-swapped-p)
|
||||
(rmail-buffers-swapped-p))
|
||||
rmail-view-buffer
|
||||
(current-buffer))
|
||||
(save-restriction
|
||||
(widen)
|
||||
(goto-char (point-max))
|
||||
(if (re-search-backward
|
||||
(concat "^Message-ID:\\s-+" (regexp-quote
|
||||
(or article "")))
|
||||
nil t)
|
||||
;; This is an rmail "debugging" function. :(
|
||||
(with-current-buffer buff
|
||||
(rmail-what-message))))))))
|
||||
(setq message-number
|
||||
(save-restriction
|
||||
(widen)
|
||||
(goto-char (point-max))
|
||||
(if (re-search-backward
|
||||
(concat "^Message-ID:\\s-+" (regexp-quote
|
||||
(or article "")))
|
||||
nil t)
|
||||
(rmail-what-message))))))
|
||||
(if message-number
|
||||
(progn
|
||||
(rmail (if (string= folder "RMAIL") rmail-file-name folder))
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
;; Bastien Guerry <bzg AT altern DOT org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -110,7 +110,8 @@ or similar things which you want to have when editing a source code file,
|
|||
but which mess up the display of a snippet in Org exported files.")
|
||||
|
||||
(defcustom org-src-lang-modes
|
||||
'(("ocaml" . tuareg) ("elisp" . emacs-lisp) ("ditaa" . artist))
|
||||
'(("ocaml" . tuareg) ("elisp" . emacs-lisp) ("ditaa" . artist)
|
||||
("asymptote" . asy))
|
||||
"Alist mapping languages to their major mode.
|
||||
The key is the language name, the value is the string that should
|
||||
be inserted as the name of the major mode. For many languages this is
|
||||
|
@ -185,7 +186,7 @@ the edited version."
|
|||
(org-delete-overlay org-edit-src-overlay)))
|
||||
(kill-buffer buffer))
|
||||
(setq buffer (generate-new-buffer
|
||||
(concat "*Org Src " (file-name-nondirectory buffer-file-name) "[" lang "]*")))
|
||||
(org-src-construct-edit-buffer-name (buffer-name) lang)))
|
||||
(setq ovl (org-make-overlay beg end))
|
||||
(org-overlay-put ovl 'face 'secondary-selection)
|
||||
(org-overlay-put ovl 'edit-buffer buffer)
|
||||
|
@ -231,13 +232,17 @@ the edited version."
|
|||
(if buf (switch-to-buffer buf)
|
||||
(error "Something is wrong here"))))
|
||||
|
||||
(defun org-src-construct-edit-buffer-name (org-buffer-name lang)
|
||||
"Construct the buffer name for a source editing buffer"
|
||||
(concat "*Org Src " org-buffer-name "[ " lang " ]*"))
|
||||
|
||||
(defun org-edit-src-find-buffer (beg end)
|
||||
"Find a source editing buffer that is already editing the region BEG to END."
|
||||
(catch 'exit
|
||||
(mapc
|
||||
(lambda (b)
|
||||
(with-current-buffer b
|
||||
(if (and (string-match "\\`*Org Edit " (buffer-name))
|
||||
(if (and (string-match "\\`*Org Src " (buffer-name))
|
||||
(local-variable-p 'org-edit-src-beg-marker (current-buffer))
|
||||
(local-variable-p 'org-edit-src-end-marker (current-buffer))
|
||||
(equal beg org-edit-src-beg-marker)
|
||||
|
@ -289,7 +294,9 @@ the fragment in the Org-mode buffer."
|
|||
(if (boundp 'org-edit-src-overlay)
|
||||
(org-delete-overlay org-edit-src-overlay)))
|
||||
(kill-buffer buffer))
|
||||
(setq buffer (generate-new-buffer "*Org Edit Src Example*"))
|
||||
(setq buffer (generate-new-buffer
|
||||
(org-src-construct-edit-buffer-name
|
||||
(buffer-name) "Fixed Width")))
|
||||
(setq ovl (org-make-overlay beg end))
|
||||
(org-overlay-put ovl 'face 'secondary-selection)
|
||||
(org-overlay-put ovl 'edit-buffer buffer)
|
||||
|
@ -474,14 +481,15 @@ the language, a switch telling of the content should be in a single line."
|
|||
(defun org-edit-src-save ()
|
||||
"Save parent buffer with current state source-code buffer."
|
||||
(interactive)
|
||||
(let ((p (point)) (m (mark)) msg)
|
||||
(org-edit-src-exit)
|
||||
(save-buffer)
|
||||
(setq msg (current-message))
|
||||
(org-edit-src-code)
|
||||
(push-mark m 'nomessage)
|
||||
(goto-char (min p (point-max)))
|
||||
(message (or msg ""))))
|
||||
(save-window-excursion
|
||||
(let ((p (point)) (m (mark)) msg)
|
||||
(org-edit-src-exit)
|
||||
(save-buffer)
|
||||
(setq msg (current-message))
|
||||
(org-edit-src-code)
|
||||
(push-mark m 'nomessage)
|
||||
(goto-char (min p (point-max)))
|
||||
(message (or msg "")))))
|
||||
|
||||
(defun org-src-mode-configure-edit-buffer ()
|
||||
(when org-edit-src-from-org-mode
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -614,6 +614,7 @@ When nil, simply write \"#ERROR\" in corrupted fields.")
|
|||
(re-search-forward "<[rl]?[0-9]+>" end t)))
|
||||
(goto-char beg)
|
||||
(setq falign (re-search-forward "<[rl][0-9]*>" end t))
|
||||
(goto-char beg)
|
||||
;; Get the rows
|
||||
(setq lines (org-split-string
|
||||
(buffer-substring beg end) "\n"))
|
||||
|
@ -2712,6 +2713,7 @@ Parameters get priority."
|
|||
(pos (move-marker (make-marker) (point)))
|
||||
(startline 1)
|
||||
(wc (current-window-configuration))
|
||||
(sel-win (selected-window))
|
||||
(titles '((column . "# Column Formulas\n")
|
||||
(field . "# Field Formulas\n")
|
||||
(named . "# Named Field Formulas\n")))
|
||||
|
@ -2724,6 +2726,7 @@ Parameters get priority."
|
|||
(org-set-local 'font-lock-global-modes (list 'not major-mode))
|
||||
(org-set-local 'org-pos pos)
|
||||
(org-set-local 'org-window-configuration wc)
|
||||
(org-set-local 'org-selected-window sel-win)
|
||||
(use-local-map org-table-fedit-map)
|
||||
(org-add-hook 'post-command-hook 'org-table-fedit-post-command t t)
|
||||
(easy-menu-add org-table-fedit-menu)
|
||||
|
@ -2944,7 +2947,7 @@ With prefix ARG, apply the new formulas to the table."
|
|||
(progn
|
||||
(org-table-fedit-convert-buffer 'org-table-convert-refs-to-rc)
|
||||
(setq org-table-buffer-is-an nil)))
|
||||
(let ((pos org-pos) eql var form)
|
||||
(let ((pos org-pos) (sel-win org-selected-window) eql var form)
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward
|
||||
"^\\(@[0-9]+\\$[0-9]+\\|\\$\\([a-zA-Z0-9]+\\)\\) *= *\\(.*\\(\n[ \t]+.*$\\)*\\)"
|
||||
|
@ -2960,7 +2963,7 @@ With prefix ARG, apply the new formulas to the table."
|
|||
(push (cons var form) eql)))
|
||||
(setq org-pos nil)
|
||||
(set-window-configuration org-window-configuration)
|
||||
(select-window (get-buffer-window (marker-buffer pos)))
|
||||
(select-window sel-win)
|
||||
(goto-char pos)
|
||||
(unless (org-at-table-p)
|
||||
(error "Lost table position - cannot install formulae"))
|
||||
|
@ -2975,9 +2978,9 @@ With prefix ARG, apply the new formulas to the table."
|
|||
"Abort editing formulas, without installing the changes."
|
||||
(interactive)
|
||||
(org-table-remove-rectangle-highlight)
|
||||
(let ((pos org-pos))
|
||||
(let ((pos org-pos) (sel-win org-selected-window))
|
||||
(set-window-configuration org-window-configuration)
|
||||
(select-window (get-buffer-window (marker-buffer pos)))
|
||||
(select-window sel-win)
|
||||
(goto-char pos)
|
||||
(move-marker pos nil)
|
||||
(message "Formula editing aborted without installing changes")))
|
||||
|
@ -3340,7 +3343,8 @@ table editor in arbitrary modes.")
|
|||
(defvar org-old-auto-fill-inhibit-regexp nil
|
||||
"Local variable used by `orgtbl-mode'")
|
||||
|
||||
(defconst orgtbl-line-start-regexp "[ \t]*\\(|\\|#\\+\\(TBLFM\\|ORGTBL\\):\\)"
|
||||
(defconst orgtbl-line-start-regexp
|
||||
"[ \t]*\\(|\\|#\\+\\(TBLFM\\|ORGTBL\\|TBLNAME\\):\\)"
|
||||
"Matches a line belonging to an orgtbl.")
|
||||
|
||||
(defconst orgtbl-extra-font-lock-keywords
|
||||
|
@ -4221,7 +4225,7 @@ list of the fields in the rectangle ."
|
|||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(if (re-search-forward
|
||||
(concat "^#[ \t]*\\+TBLNAME:[ \t]*" (regexp-quote name-or-id) "[ \t]*$")
|
||||
(concat "^[ \t]*#\\+TBLNAME:[ \t]*" (regexp-quote name-or-id) "[ \t]*$")
|
||||
nil t)
|
||||
(setq buffer (current-buffer) loc (match-beginning 0))
|
||||
(setq id-loc (org-id-find name-or-id 'marker))
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
;; Author: Andy Stewart <lazycat dot manatee at gmail dot com>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Author: Tokuya Kameshima <kames at fa2 dot so-net dot ne dot jp>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -54,8 +54,6 @@
|
|||
;; Backward compatibility to old version of wl
|
||||
(declare-function wl "ext:wl" () t)
|
||||
(declare-function wl-summary-buffer-msgdb "ext:wl-folder" () t)
|
||||
;(declare-function wl-folder-get-elmo-folder "ext:wl-folder"
|
||||
; (entity &optional no-cache))
|
||||
(declare-function wl-summary-jump-to-msg-by-message-id "ext:wl-summary"
|
||||
(&optional id))
|
||||
(declare-function wl-summary-line-from "ext:wl-summary" ())
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -30,6 +30,9 @@
|
|||
|
||||
;;; XOXO export
|
||||
|
||||
(defvar org-export-xoxo-final-hook nil
|
||||
"Hook run after XOXO export, in the new buffer.")
|
||||
|
||||
(defun org-export-as-xoxo-insert-into (buffer &rest output)
|
||||
(with-current-buffer buffer
|
||||
(apply 'insert output)))
|
||||
|
@ -112,6 +115,7 @@ The XOXO buffer is named *xoxo-<source buffer name>*"
|
|||
;; Finish the buffer off and clean it up.
|
||||
(switch-to-buffer-other-window out)
|
||||
(indent-region (point-min) (point-max) nil)
|
||||
(run-hooks 'org-export-xoxo-final-hook)
|
||||
(save-buffer)
|
||||
(goto-char (point-min))
|
||||
)))
|
||||
|
|
310
lisp/org/org.el
310
lisp/org/org.el
|
@ -6,7 +6,7 @@
|
|||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Version: 6.30c
|
||||
;; Version: 6.31a
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -95,7 +95,7 @@
|
|||
|
||||
;;; Version
|
||||
|
||||
(defconst org-version "6.30c"
|
||||
(defconst org-version "6.31a"
|
||||
"The version number of the file org.el.")
|
||||
|
||||
(defun org-version (&optional here)
|
||||
|
@ -172,7 +172,7 @@ and loading it will require that you have downloaded and properly installed
|
|||
the org-mode distribution.
|
||||
|
||||
You can also use this system to load external packages (i.e. neither Org
|
||||
core modules, not modules from the CONTRIB directory). Just add symbols
|
||||
core modules, nor modules from the CONTRIB directory). Just add symbols
|
||||
to the end of the list. If the package is called org-xyz.el, then you need
|
||||
to add the symbol `xyz', and the package must have a call to
|
||||
|
||||
|
@ -183,6 +183,7 @@ to add the symbol `xyz', and the package must have a call to
|
|||
'(set :greedy t
|
||||
(const :tag " bbdb: Links to BBDB entries" org-bbdb)
|
||||
(const :tag " bibtex: Links to BibTeX entries" org-bibtex)
|
||||
(const :tag " crypt: Encryption of subtrees" org-crypt)
|
||||
(const :tag " gnus: Links to GNUS folders/messages" org-gnus)
|
||||
(const :tag " id: Global IDs for identifying entries" org-id)
|
||||
(const :tag " info: Links to Info nodes" org-info)
|
||||
|
@ -200,19 +201,22 @@ to add the symbol `xyz', and the package must have a call to
|
|||
(const :tag " mouse: Additional mouse support" org-mouse)
|
||||
|
||||
(const :tag "C annotate-file: Annotate a file with org syntax" org-annotate-file)
|
||||
(const :tag "C annotation-helper: Call Remember directly from Browser (OBSOLETE, use org-protocol)" org-annotation-helper)
|
||||
(const :tag "C annotation-helper: Call Remember directly from Browser\n\t\t\t(OBSOLETE, use org-protocol)" org-annotation-helper)
|
||||
(const :tag "C bookmark: Org links to bookmarks" org-bookmark)
|
||||
(const :tag "C browser-url: Store link, directly from Browser (OBSOLETE, use org-protocol)" org-browser-url)
|
||||
(const :tag "C browser-url: Store link, directly from Browser\n\t\t\t(OBSOLETE, use org-protocol)" org-browser-url)
|
||||
(const :tag "C checklist: Extra functions for checklists in repeated tasks" org-checklist)
|
||||
(const :tag "C choose: Use TODO keywords to mark decisions states" org-choose)
|
||||
(const :tag "C collector: Collect properties into tables" org-collector)
|
||||
(const :tag "C depend: TODO dependencies for Org-mode (PARTIALLY OBSOLETE, see built-in dependency support))" org-depend)
|
||||
(const :tag "C depend: TODO dependencies for Org-mode\n\t\t\t(PARTIALLY OBSOLETE, see built-in dependency support))" org-depend)
|
||||
(const :tag "C elisp-symbol: Org links to emacs-lisp symbols" org-elisp-symbol)
|
||||
(const :tag "C eval: Include command output as text" org-eval)
|
||||
(const :tag "C eval-light: Evaluate inbuffer-code on demand" org-eval-light)
|
||||
(const :tag "C expiry: Expiry mechanism for Org entries" org-expiry)
|
||||
(const :tag "C exp-bibtex: Export citations using BibTeX" org-exp-bibtex)
|
||||
(const :tag "C interactive-query: Interactive modification of tags query (PARTIALLY OBSOLETE, see secondary filtering)" org-interactive-query)
|
||||
(const :tag "C interactive-query: Interactive modification of tags query\n\t\t\t(PARTIALLY OBSOLETE, see secondary filtering)" org-interactive-query)
|
||||
|
||||
(const :tag "C invoice Help manage client invoices in OrgMode" org-invoice)
|
||||
|
||||
(const :tag "C jira Add a jira:ticket protocol to Org" org-jira)
|
||||
(const :tag "C mairix: Hook mairix search into Org for different MUAs" org-mairix)
|
||||
(const :tag "C mac-iCal Imports events from iCal.app to the Emacs diary" org-mac-iCal)
|
||||
|
@ -282,14 +286,16 @@ is Emacs 23 only."
|
|||
This can also be configured on a per-file basis by adding one of
|
||||
the following lines anywhere in the buffer:
|
||||
|
||||
#+STARTUP: fold
|
||||
#+STARTUP: nofold
|
||||
#+STARTUP: content"
|
||||
#+STARTUP: fold (or `overview', this is equivalent)
|
||||
#+STARTUP: nofold (or `showall', this is equivalent)
|
||||
#+STARTUP: content
|
||||
#+STARTUP: showeverything"
|
||||
:group 'org-startup
|
||||
:type '(choice
|
||||
(const :tag "nofold: show all" nil)
|
||||
(const :tag "fold: overview" t)
|
||||
(const :tag "content: all headlines" content)))
|
||||
(const :tag "content: all headlines" content)
|
||||
(const :tag "show everything, even drawers" showeverything)))
|
||||
|
||||
(defcustom org-startup-truncated t
|
||||
"Non-nil means, entering Org-mode will set `truncate-lines'.
|
||||
|
@ -759,7 +765,9 @@ it to the beginning of the line.
|
|||
|
||||
`C-e' will jump to the end of the headline, ignoring the presence of tags
|
||||
in the headline. A second `C-e' will then jump to the true end of the
|
||||
line, after any tags.
|
||||
line, after any tags. This also means that, when this variable is
|
||||
non-nil, `C-e' also will never jump beyond the end of the heading of a
|
||||
folded section, i.e. not after the ellipses.
|
||||
|
||||
When set to the symbol `reversed', the first `C-a' or `C-e' works normally,
|
||||
going to the true line boundary first. Only a directly following, identical
|
||||
|
@ -770,17 +778,17 @@ set separately."
|
|||
:group 'org-edit-structure
|
||||
:type '(choice
|
||||
(const :tag "off" nil)
|
||||
(const :tag "after stars/bullet and before tags first" t)
|
||||
(const :tag "true line boundary first" reversed)
|
||||
(const :tag "on: after stars/bullet and before tags first" t)
|
||||
(const :tag "reversed: true line boundary first" reversed)
|
||||
(cons :tag "Set C-a and C-e separately"
|
||||
(choice :tag "Special C-a"
|
||||
(const :tag "off" nil)
|
||||
(const :tag "after stars/bullet first" t)
|
||||
(const :tag "before stars/bullet first" reversed))
|
||||
(const :tag "on: after stars/bullet first" t)
|
||||
(const :tag "reversed: before stars/bullet first" reversed))
|
||||
(choice :tag "Special C-e"
|
||||
(const :tag "off" nil)
|
||||
(const :tag "before tags first" t)
|
||||
(const :tag "after tags first" reversed)))))
|
||||
(const :tag "on: before tags first" t)
|
||||
(const :tag "reversed: after tags first" reversed)))))
|
||||
(if (fboundp 'defvaralias)
|
||||
(defvaralias 'org-special-ctrl-a 'org-special-ctrl-a/e))
|
||||
|
||||
|
@ -1699,6 +1707,7 @@ taken from the (otherwise obsolete) variable `org-todo-interpretation'."
|
|||
(make-variable-buffer-local 'org-todo-keywords-1)
|
||||
(defvar org-todo-keywords-for-agenda nil)
|
||||
(defvar org-done-keywords-for-agenda nil)
|
||||
(defvar org-drawers-for-agenda nil)
|
||||
(defvar org-todo-keyword-alist-for-agenda nil)
|
||||
(defvar org-tag-alist-for-agenda nil)
|
||||
(defvar org-agenda-contributing-files nil)
|
||||
|
@ -2022,11 +2031,11 @@ When nil, the notes will be orderer according to time."
|
|||
|
||||
(defcustom org-log-repeat 'time
|
||||
"Non-nil means, record moving through the DONE state when triggering repeat.
|
||||
An auto-repeating tasks is immediately switched back to TODO when marked
|
||||
done. If you are not logging state changes (by adding \"@\" or \"!\" to
|
||||
the TODO keyword definition, or recording a closing note by setting
|
||||
`org-log-done', there will be no record of the task moving through DONE.
|
||||
This variable forces taking a note anyway. Possible values are:
|
||||
An auto-repeating task is immediately switched back to TODO when
|
||||
marked DONE. If you are not logging state changes (by adding \"@\"
|
||||
or \"!\" to the TODO keyword definition), or set `org-log-done' to
|
||||
record a closing note, there will be no record of the task moving
|
||||
through DONE. This variable forces taking a note anyway.
|
||||
|
||||
nil Don't force a record
|
||||
time Record a time stamp
|
||||
|
@ -2669,14 +2678,28 @@ This is a property list with the following properties:
|
|||
:type 'plist)
|
||||
|
||||
(defcustom org-format-latex-header "\\documentclass{article}
|
||||
\\usepackage{fullpage} % do not remove
|
||||
\\usepackage{amssymb}
|
||||
\\usepackage[usenames]{color}
|
||||
\\usepackage{amsmath}
|
||||
\\usepackage{latexsym}
|
||||
\\usepackage[mathscr]{eucal}
|
||||
\\pagestyle{empty} % do not remove"
|
||||
"The document header used for processing LaTeX fragments."
|
||||
\\pagestyle{empty} % do not remove
|
||||
% The settings below are copied from fullpage.sty
|
||||
\\setlength{\\textwidth}{\\paperwidth}
|
||||
\\addtolength{\\textwidth}{-3cm}
|
||||
\\setlength{\\oddsidemargin}{1.5cm}
|
||||
\\addtolength{\\oddsidemargin}{-2.54cm}
|
||||
\\setlength{\\evensidemargin}{\\oddsidemargin}
|
||||
\\setlength{\\textheight}{\\paperheight}
|
||||
\\addtolength{\\textheight}{-\\headheight}
|
||||
\\addtolength{\\textheight}{-\\headsep}
|
||||
\\addtolength{\\textheight}{-\\footskip}
|
||||
\\addtolength{\\textheight}{-3cm}
|
||||
\\setlength{\\topmargin}{1.5cm}
|
||||
\\addtolength{\\topmargin}{-2.54cm}"
|
||||
"The document header used for processing LaTeX fragments.
|
||||
It is imperative that this header make sure that no page number
|
||||
appears on the page."
|
||||
:group 'org-latex
|
||||
:type 'string)
|
||||
|
||||
|
@ -3211,6 +3234,13 @@ If yes, offer to stop it and to save the buffer with the changes."
|
|||
"org-indent"
|
||||
'(org-indent-mode)))
|
||||
|
||||
;; Autoload org-mobile.el
|
||||
|
||||
(eval-and-compile
|
||||
(org-autoload
|
||||
"org-mobile"
|
||||
'(org-mobile-push org-mobile-pull org-mobile-create-sumo-agenda)))
|
||||
|
||||
;; Autoload archiving code
|
||||
;; The stuff that is needed for cycling and tags has to be defined here.
|
||||
|
||||
|
@ -3401,6 +3431,8 @@ group 3: Priority cookie
|
|||
group 4: True headline
|
||||
group 5: Tags")
|
||||
(make-variable-buffer-local 'org-complex-heading-regexp)
|
||||
(defvar org-complex-heading-regexp-format nil)
|
||||
(make-variable-buffer-local 'org-complex-heading-regexp-format)
|
||||
(defvar org-todo-line-tags-regexp nil
|
||||
"Matches a headline and puts TODO state into group 2 if present.
|
||||
Also put tags into group 4 if tags are present.")
|
||||
|
@ -3491,6 +3523,7 @@ After a match, the following groups carry important information:
|
|||
("overview" org-startup-folded t)
|
||||
("nofold" org-startup-folded nil)
|
||||
("showall" org-startup-folded nil)
|
||||
("showeverything" org-startup-folded showeverything)
|
||||
("content" org-startup-folded content)
|
||||
("indent" org-startup-indented t)
|
||||
("noindent" org-startup-indented nil)
|
||||
|
@ -3755,6 +3788,11 @@ means to push this value onto the list in the variable.")
|
|||
(mapconcat 'regexp-quote org-todo-keywords-1 "\\|")
|
||||
"\\)\\>\\)?\\(?:[ \t]*\\(\\[#.\\]\\)\\)?[ \t]*\\(.*?\\)"
|
||||
"\\(?:[ \t]+\\(:[[:alnum:]_@:]+:\\)\\)?[ \t]*$")
|
||||
org-complex-heading-regexp-format
|
||||
(concat "^\\(\\*+\\)[ \t]+\\(?:\\("
|
||||
(mapconcat 'regexp-quote org-todo-keywords-1 "\\|")
|
||||
"\\)\\>\\)?\\(?:[ \t]*\\(\\[#.\\]\\)\\)?[ \t]*\\(%s\\)"
|
||||
"\\(?:[ \t]+\\(:[[:alnum:]_@:]+:\\)\\)?[ \t]*$")
|
||||
org-nl-done-regexp
|
||||
(concat "\n\\*+[ \t]+"
|
||||
"\\(?:" (mapconcat 'regexp-quote org-done-keywords "\\|")
|
||||
|
@ -3872,6 +3910,8 @@ Respect keys that are already there."
|
|||
|
||||
(defvar org-window-configuration nil
|
||||
"Used in various places to store a window configuration.")
|
||||
(defvar org-selected-window nil
|
||||
"Used in various places to store a window configuration.")
|
||||
(defvar org-finish-function nil
|
||||
"Function to be called when `C-c C-c' is used.
|
||||
This is for getting out of special buffers like remember.")
|
||||
|
@ -4302,7 +4342,7 @@ will be prompted for."
|
|||
"Fontify #+ lines and blocks, in the correct ways."
|
||||
(let ((case-fold-search t))
|
||||
(if (re-search-forward
|
||||
"^\\([ \t]*#\\+\\(\\([a-zA-Z]+:?\\)\\(_\\([a-zA-Z]+\\)\\)?\\)\\(.*\\)\\)"
|
||||
"^\\([ \t]*#\\+\\(\\([a-zA-Z]+:?\\| \\|$\\)\\(_\\([a-zA-Z]+\\)\\)?\\)\\(.*\\)\\)"
|
||||
limit t)
|
||||
(let ((beg (match-beginning 0))
|
||||
(beg1 (line-beginning-position 2))
|
||||
|
@ -4345,12 +4385,17 @@ will be prompted for."
|
|||
beg (match-end 0)
|
||||
'(font-lock-fontified t face org-meta-line))
|
||||
t)
|
||||
((or (member dc1 '("caption:" "label:" "orgtbl:" "tblfm:" "tblname:"))
|
||||
((or (member dc1 '("begin:" "end:" "caption:" "label:"
|
||||
"orgtbl:" "tblfm:" "tblname:"))
|
||||
(and (match-end 4) (equal dc3 "attr")))
|
||||
(add-text-properties
|
||||
beg (match-end 0)
|
||||
'(font-lock-fontified t face org-meta-line))
|
||||
t)
|
||||
((member dc3 '(" " ""))
|
||||
(add-text-properties
|
||||
beg (match-end 0)
|
||||
'(font-lock-fontified t face font-lock-comment-face)))
|
||||
(t nil))))))
|
||||
|
||||
(defun org-activate-angle-links (limit)
|
||||
|
@ -5083,11 +5128,12 @@ With a numeric prefix, show all headlines up to that level."
|
|||
((eq org-startup-folded 'content)
|
||||
(let ((this-command 'org-cycle) (last-command 'org-cycle))
|
||||
(org-cycle '(4)) (org-cycle '(4)))))
|
||||
(if org-hide-block-startup (org-hide-block-all))
|
||||
(org-set-visibility-according-to-property 'no-cleanup)
|
||||
(org-cycle-hide-archived-subtrees 'all)
|
||||
(org-cycle-hide-drawers 'all)
|
||||
(org-cycle-show-empty-lines 'all))
|
||||
(unless (eq org-startup-folded 'showeverything)
|
||||
(if org-hide-block-startup (org-hide-block-all))
|
||||
(org-set-visibility-according-to-property 'no-cleanup)
|
||||
(org-cycle-hide-archived-subtrees 'all)
|
||||
(org-cycle-hide-drawers 'all)
|
||||
(org-cycle-show-empty-lines 'all)))
|
||||
|
||||
(defun org-set-visibility-according-to-property (&optional no-cleanup)
|
||||
"Switch subtree visibilities according to :VISIBILITY: property."
|
||||
|
@ -5251,7 +5297,11 @@ are at least `org-cycle-separator-lines' empty lines before the headline."
|
|||
(setq b (save-excursion
|
||||
(goto-char (match-beginning 0))
|
||||
(org-back-over-empty-lines)
|
||||
(point)))
|
||||
(if (save-excursion
|
||||
(goto-char (max (point-min) (1- (point))))
|
||||
(org-on-heading-p))
|
||||
(1- (point))
|
||||
(point))))
|
||||
(setq b (match-beginning 1)))
|
||||
(outline-flag-region b e nil)))))))
|
||||
;; Never hide empty lines at the end of the file.
|
||||
|
@ -5626,7 +5676,7 @@ frame is not changed."
|
|||
(outline-up-heading 1 t)))
|
||||
(setq beg (point)
|
||||
heading (org-get-heading))
|
||||
(org-end-of-subtree t) (setq end (point)))
|
||||
(org-end-of-subtree t t) (setq end (point)))
|
||||
(if (and (buffer-live-p org-last-indirect-buffer)
|
||||
(not (eq org-indirect-buffer-display 'new-frame))
|
||||
(not arg))
|
||||
|
@ -6045,7 +6095,9 @@ This will leave level 1 alone, convert level 2 to level 3, level 3 to
|
|||
level 5 etc."
|
||||
(interactive)
|
||||
(when (yes-or-no-p "Are you sure you want to globally change levels to odd? ")
|
||||
(let ((org-odd-levels-only nil) n)
|
||||
(let ((outline-regexp org-outline-regexp)
|
||||
(outline-level 'org-outline-level)
|
||||
(org-odd-levels-only nil) n)
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "^\\*\\*+ " nil t)
|
||||
|
@ -6054,7 +6106,6 @@ level 5 etc."
|
|||
(org-demote))
|
||||
(end-of-line 1))))))
|
||||
|
||||
|
||||
(defun org-convert-to-oddeven-levels ()
|
||||
"Convert an org-mode file with only odd levels to one with odd and even levels.
|
||||
This promotes level 3 to level 2, level 5 to level 3 etc. If the file contains a
|
||||
|
@ -6067,7 +6118,9 @@ is signaled in this case."
|
|||
(org-show-context t)
|
||||
(error "Not all levels are odd in this file. Conversion not possible"))
|
||||
(when (yes-or-no-p "Are you sure you want to globally change levels to odd-even? ")
|
||||
(let ((org-odd-levels-only nil) n)
|
||||
(let ((outline-regexp org-outline-regexp)
|
||||
(outline-level 'org-outline-level)
|
||||
(org-odd-levels-only nil) n)
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "^\\*\\*+ " nil t)
|
||||
|
@ -6392,7 +6445,7 @@ If yes, remember the marker and the distance to BEG."
|
|||
(save-match-data
|
||||
(narrow-to-region
|
||||
(progn (org-back-to-heading t) (point))
|
||||
(progn (org-end-of-subtree t) (point))))))
|
||||
(progn (org-end-of-subtree t t) (point))))))
|
||||
|
||||
(defun org-clone-subtree-with-time-shift (n &optional shift)
|
||||
"Clone the task (subtree) at point N times.
|
||||
|
@ -7127,6 +7180,8 @@ type. For a simple example of an export function, see `org-bbdb.el'."
|
|||
(setcdr (assoc type org-link-protocols) (list follow export))
|
||||
(push (list type follow export) org-link-protocols)))
|
||||
|
||||
(defvar org-agenda-buffer-name)
|
||||
|
||||
;;;###autoload
|
||||
(defun org-store-link (arg)
|
||||
"\\<org-mode-map>Store an org-link to the current location.
|
||||
|
@ -7166,6 +7221,14 @@ For file links, arg negates `org-context-in-file-links'."
|
|||
(insert link)
|
||||
(setq link (concat "(" label ")") desc nil)))
|
||||
|
||||
((equal (org-bound-and-true-p org-agenda-buffer-name) (buffer-name))
|
||||
;; We are in the agenda, link to referenced location
|
||||
(let ((m (or (get-text-property (point) 'org-hd-marker)
|
||||
(get-text-property (point) 'org-marker))))
|
||||
(when m
|
||||
(org-with-point-at m
|
||||
(call-interactively 'org-store-link)))))
|
||||
|
||||
((eq major-mode 'calendar-mode)
|
||||
(let ((cd (calendar-cursor-to-date)))
|
||||
(setq link
|
||||
|
@ -7255,7 +7318,8 @@ For file links, arg negates `org-context-in-file-links'."
|
|||
(condition-case nil
|
||||
(org-make-org-heading-search-string txt)
|
||||
(error "")))
|
||||
desc (or (nth 4 (org-heading-components)) "NONE"))))
|
||||
desc (or (nth 4 (ignore-errors
|
||||
(org-heading-components))) "NONE"))))
|
||||
(if (string-match "::\\'" cpltxt)
|
||||
(setq cpltxt (substring cpltxt 0 -2)))
|
||||
(setq link (org-make-link cpltxt)))))
|
||||
|
@ -7692,9 +7756,10 @@ Use TAB to complete link prefixes, then RET for type-specific completion support
|
|||
"Use iswitch as a completing-read replacement to choose from choices.
|
||||
PROMPT is a string to prompt with. CHOICES is a list of strings to choose
|
||||
from."
|
||||
(let ((iswitchb-make-buflist-hook
|
||||
(lambda ()
|
||||
(setq iswitchb-temp-buflist choices))))
|
||||
(let* ((iswitchb-use-virtual-buffers nil)
|
||||
(iswitchb-make-buflist-hook
|
||||
(lambda ()
|
||||
(setq iswitchb-temp-buflist choices))))
|
||||
(iswitchb-read-buffer prompt)))
|
||||
|
||||
(defun org-icompleting-read (&rest args)
|
||||
|
@ -8041,21 +8106,25 @@ application the system uses for this file type."
|
|||
(error "Abort"))))
|
||||
|
||||
(t
|
||||
(browse-url-at-point))))))
|
||||
(move-marker org-open-link-marker nil)
|
||||
(run-hook-with-args 'org-follow-link-hook)))
|
||||
(browse-url-at-point)))))))
|
||||
(move-marker org-open-link-marker nil)
|
||||
(run-hook-with-args 'org-follow-link-hook))
|
||||
|
||||
(defun org-offer-links-in-entry (&optional nth)
|
||||
(defun org-offer-links-in-entry (&optional nth zero)
|
||||
"Offer links in the curren entry and follow the selected link.
|
||||
If there is only one link, follow it immediately as well.
|
||||
If NTH is an integer immediately pick the NTH link found."
|
||||
If NTH is an integer, immediately pick the NTH link found.
|
||||
If ZERO is a string, check also this string for a link, and if
|
||||
there is one, offer it as link number zero."
|
||||
(let ((re (concat "\\(" org-bracket-link-regexp "\\)\\|"
|
||||
"\\(" org-angle-link-re "\\)\\|"
|
||||
"\\(" org-plain-link-re "\\)"))
|
||||
(cnt ?0)
|
||||
(in-emacs (if (integerp nth) nil nth))
|
||||
end
|
||||
links link c)
|
||||
have-zero end links link c)
|
||||
(when (and (stringp zero) (string-match org-bracket-link-regexp zero))
|
||||
(push (match-string 0 zero) links)
|
||||
(setq cnt (1- cnt) have-zero t))
|
||||
(save-excursion
|
||||
(org-back-to-heading t)
|
||||
(setq end (save-excursion (outline-next-heading) (point)))
|
||||
|
@ -8067,14 +8136,13 @@ If NTH is an integer immediately pick the NTH link found."
|
|||
((null links) (error "No links"))
|
||||
((equal (length links) 1)
|
||||
(setq link (car links)))
|
||||
((and (integerp nth) (>= (length links) nth))
|
||||
(setq link (nth (1- nth) links)))
|
||||
((and (integerp nth) (>= (length links) (if have-zero (1+ nth) nth)))
|
||||
(setq link (nth (if have-zero nth (1- nth)) links)))
|
||||
(t ; we have to select a link
|
||||
(save-excursion
|
||||
(save-window-excursion
|
||||
(delete-other-windows)
|
||||
(with-output-to-temp-buffer "*Select Link*"
|
||||
(princ "Select link\n\n")
|
||||
(mapc (lambda (l)
|
||||
(if (not (string-match org-bracket-link-regexp l))
|
||||
(princ (format "[%c] %s\n" (incf cnt)
|
||||
|
@ -8091,6 +8159,7 @@ If NTH is an integer immediately pick the NTH link found."
|
|||
(and (get-buffer "*Select Link*") (kill-buffer "*Select Link*"))))
|
||||
(when (equal c ?q) (error "Abort"))
|
||||
(setq nth (- c ?0))
|
||||
(if have-zero (setq nth (1+ nth)))
|
||||
(unless (and (integerp nth) (>= (length links) nth))
|
||||
(error "Invalid link selection"))
|
||||
(setq link (nth (1- nth) links))))
|
||||
|
@ -8924,23 +8993,26 @@ If not found, stay at current position and return nil."
|
|||
pos))
|
||||
|
||||
(defconst org-dblock-start-re
|
||||
"^#\\+BEGIN:[ \t]+\\(\\S-+\\)\\([ \t]+\\(.*\\)\\)?"
|
||||
"^[ \t]*#\\+BEGIN:[ \t]+\\(\\S-+\\)\\([ \t]+\\(.*\\)\\)?"
|
||||
"Matches the startline of a dynamic block, with parameters.")
|
||||
|
||||
(defconst org-dblock-end-re "^#\\+END\\([: \t\r\n]\\|$\\)"
|
||||
(defconst org-dblock-end-re "^[ \t]*#\\+END\\([: \t\r\n]\\|$\\)"
|
||||
"Matches the end of a dynamic block.")
|
||||
|
||||
(defun org-create-dblock (plist)
|
||||
"Create a dynamic block section, with parameters taken from PLIST.
|
||||
PLIST must contain a :name entry which is used as name of the block."
|
||||
(unless (bolp) (newline))
|
||||
(let ((name (plist-get plist :name)))
|
||||
(when (string-match "\\S-" (buffer-substring (point-at-bol) (point-at-eol)))
|
||||
(end-of-line 1)
|
||||
(newline))
|
||||
(let ((col (current-column))
|
||||
(name (plist-get plist :name)))
|
||||
(insert "#+BEGIN: " name)
|
||||
(while plist
|
||||
(if (eq (car plist) :name)
|
||||
(setq plist (cddr plist))
|
||||
(insert " " (prin1-to-string (pop plist)))))
|
||||
(insert "\n\n#+END:\n")
|
||||
(insert "\n\n" (make-string col ?\ ) "#+END:\n")
|
||||
(beginning-of-line -2)))
|
||||
|
||||
(defun org-prepare-dblock ()
|
||||
|
@ -8953,6 +9025,10 @@ the property list including an extra property :name with the block name."
|
|||
(name (org-no-properties (match-string 1)))
|
||||
(params (append (list :name name)
|
||||
(read (concat "(" (match-string 3) ")")))))
|
||||
(save-excursion
|
||||
(beginning-of-line 1)
|
||||
(skip-chars-forward " \t")
|
||||
(setq params (plist-put params :indentation-column (current-column))))
|
||||
(unless (re-search-forward org-dblock-end-re nil t)
|
||||
(error "Dynamic block not terminated"))
|
||||
(setq params
|
||||
|
@ -9000,11 +9076,24 @@ the correct writing function."
|
|||
(line (org-current-line))
|
||||
(params (org-prepare-dblock))
|
||||
(name (plist-get params :name))
|
||||
(indent (plist-get params :indentation-column))
|
||||
(cmd (intern (concat "org-dblock-write:" name))))
|
||||
(message "Updating dynamic block `%s' at line %d..." name line)
|
||||
(funcall cmd params)
|
||||
(message "Updating dynamic block `%s' at line %d...done" name line)
|
||||
(goto-char pos))))
|
||||
(goto-char pos)
|
||||
(when (and indent (> indent 0))
|
||||
(setq indent (make-string indent ?\ ))
|
||||
(save-excursion
|
||||
(org-beginning-of-dblock)
|
||||
(forward-line 1)
|
||||
(while (not (looking-at org-dblock-end-re))
|
||||
(insert indent)
|
||||
(beginning-of-line 2))
|
||||
(when (looking-at org-dblock-end-re)
|
||||
(and (looking-at "[ \t]+")
|
||||
(replace-match ""))
|
||||
(insert indent)))))))
|
||||
|
||||
(defun org-beginning-of-dblock ()
|
||||
"Find the beginning of the dynamic block at point.
|
||||
|
@ -9032,7 +9121,7 @@ This function can be used in a hook."
|
|||
(defconst org-additional-option-like-keywords
|
||||
'("BEGIN_HTML" "END_HTML" "HTML:" "ATTR_HTML"
|
||||
"BEGIN_DocBook" "END_DocBook" "DocBook:" "ATTR_DocBook"
|
||||
"BEGIN_LaTeX" "END_LaTeX" "LaTeX:" "LATEX_HEADER:" "ATTR_LaTeX"
|
||||
"BEGIN_LaTeX" "END_LaTeX" "LaTeX:" "LATEX_HEADER:" "LATEX_CLASS:" "ATTR_LaTeX"
|
||||
"BEGIN:" "END:"
|
||||
"ORGTBL" "TBLFM:" "TBLNAME:"
|
||||
"BEGIN_EXAMPLE" "END_EXAMPLE"
|
||||
|
@ -9698,7 +9787,7 @@ statistics everywhere."
|
|||
lim))
|
||||
(first t)
|
||||
(box-re "\\(\\(\\[[0-9]*%\\]\\)\\|\\(\\[[0-9]*/[0-9]*\\]\\)\\)")
|
||||
level ltoggle l1
|
||||
level ltoggle l1 new ndel
|
||||
(cnt-all 0) (cnt-done 0) is-percent kwd cookie-present)
|
||||
(catch 'exit
|
||||
(save-excursion
|
||||
|
@ -9737,10 +9826,14 @@ statistics everywhere."
|
|||
(and (member kwd org-done-keywords)
|
||||
(setq cnt-done (1+ cnt-done)))
|
||||
(outline-next-heading)))
|
||||
(replace-match
|
||||
(if is-percent
|
||||
(format "[%d%%]" (/ (* 100 cnt-done) (max 1 cnt-all)))
|
||||
(format "[%d/%d]" cnt-done cnt-all)))))
|
||||
(setq new
|
||||
(if is-percent
|
||||
(format "[%d%%]" (/ (* 100 cnt-done) (max 1 cnt-all)))
|
||||
(format "[%d/%d]" cnt-done cnt-all))
|
||||
ndel (- (match-end 0) (match-beginning 0)))
|
||||
(goto-char (match-beginning 0))
|
||||
(insert new)
|
||||
(delete-region (point) (+ (point) ndel))))
|
||||
(when cookie-present
|
||||
(run-hook-with-args 'org-after-todo-statistics-hook
|
||||
cnt-done (- cnt-all cnt-done)))))
|
||||
|
@ -10164,6 +10257,7 @@ be removed."
|
|||
(re-search-forward org-closed-time-regexp nil t)))
|
||||
(replace-match "")
|
||||
(if (looking-at "--+<[^>]+>") (replace-match ""))
|
||||
(skip-chars-backward " ")
|
||||
(if (looking-at " +") (replace-match ""))))
|
||||
(goto-char (point-max))
|
||||
(when what
|
||||
|
@ -11149,6 +11243,38 @@ If ONOFF is `on' or `off', don't toggle but set to this state."
|
|||
(org-back-to-heading t)
|
||||
(org-set-tags arg just-align))))
|
||||
|
||||
(defun org-set-tags-to (data)
|
||||
"Set the tags of the current entry to DATA, replacing the current tags.
|
||||
DATA may be a tags string like :aa:bb:cc:, or a list of tags.
|
||||
If DATA is nil or the empty string, any tags will be removed."
|
||||
(interactive "sTags: ")
|
||||
(setq data
|
||||
(cond
|
||||
((eq data nil) "")
|
||||
((equal data "") "")
|
||||
((stringp data)
|
||||
(concat ":" (mapconcat 'identity (org-split-string data ":+") ":")
|
||||
":"))
|
||||
((listp data)
|
||||
(concat ":" (mapconcat 'identity data ":") ":"))
|
||||
(t nil)))
|
||||
(when data
|
||||
(save-excursion
|
||||
(org-back-to-heading t)
|
||||
(when (looking-at org-complex-heading-regexp)
|
||||
(if (match-end 5)
|
||||
(progn
|
||||
(goto-char (match-beginning 5))
|
||||
(insert data)
|
||||
(delete-region (point) (point-at-eol))
|
||||
(org-set-tags nil 'align))
|
||||
(goto-char (point-at-eol))
|
||||
(insert " " data)
|
||||
(org-set-tags nil 'align)))
|
||||
(beginning-of-line 1)
|
||||
(if (looking-at ".*?\\([ \t]+\\)$")
|
||||
(delete-region (match-beginning 1) (match-end 1))))))
|
||||
|
||||
(defun org-set-tags (&optional arg just-align)
|
||||
"Set the tags for the current headline.
|
||||
With prefix ARG, realign all tags in headings in the current buffer."
|
||||
|
@ -11604,6 +11730,7 @@ a *different* entry, you cannot use these techniques."
|
|||
org-todo-keywords-for-agenda
|
||||
org-done-keywords-for-agenda
|
||||
org-todo-keyword-alist-for-agenda
|
||||
org-drawers-for-agenda
|
||||
org-tag-alist-for-agenda)
|
||||
|
||||
(cond
|
||||
|
@ -13234,11 +13361,11 @@ When SHOW-ALL is nil, only return the current occurrence of a time stamp."
|
|||
(setq n0 n1 n1 (min n1 n2) n2 (max n0 n2))
|
||||
(if show-all
|
||||
(cond
|
||||
((eq prefer 'past) n1)
|
||||
((eq prefer 'past) (if (= cday n2) n2 n1))
|
||||
((eq prefer 'future) (if (= cday n1) n1 n2))
|
||||
(t (if (> (abs (- cday n1)) (abs (- cday n2))) n2 n1)))
|
||||
(cond
|
||||
((eq prefer 'past) n1)
|
||||
((eq prefer 'past) (if (= cday n2) n2 n1))
|
||||
((eq prefer 'future) (if (= cday n1) n1 n2))
|
||||
(t (if (= cday n1) n1 n2)))))))
|
||||
|
||||
|
@ -13768,7 +13895,7 @@ Optional argument FILE means, use this file instead of the current."
|
|||
(defun org-check-agenda-file (file)
|
||||
"Make sure FILE exists. If not, ask user what to do."
|
||||
(when (not (file-exists-p file))
|
||||
(message "non-existent file %s. [R]emove from list or [A]bort?"
|
||||
(message "non-existent agenda file %s. [R]emove from list or [A]bort?"
|
||||
(abbreviate-file-name file))
|
||||
(let ((r (downcase (read-char-exclusive))))
|
||||
(cond
|
||||
|
@ -13827,6 +13954,8 @@ When a buffer is unmodified, it is just killed. When modified, it is saved
|
|||
(append org-done-keywords-for-agenda org-done-keywords))
|
||||
(setq org-todo-keyword-alist-for-agenda
|
||||
(append org-todo-keyword-alist-for-agenda org-todo-key-alist))
|
||||
(setq org-drawers-for-agenda
|
||||
(append org-drawers-for-agenda org-drawers))
|
||||
(setq org-tag-alist-for-agenda
|
||||
(append org-tag-alist-for-agenda org-tag-alist))
|
||||
|
||||
|
@ -14036,7 +14165,9 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]."
|
|||
"Regular expressions for matching embedded LaTeX.")
|
||||
|
||||
(defun org-format-latex (prefix &optional dir overlays msg at forbuffer)
|
||||
"Replace LaTeX fragments with links to an image, and produce images."
|
||||
"Replace LaTeX fragments with links to an image, and produce images.
|
||||
Some of the options can be changed using the variable
|
||||
`org-format-latex-options'."
|
||||
(if (and overlays (fboundp 'clear-image-cache)) (clear-image-cache))
|
||||
(let* ((prefixnodir (file-name-nondirectory prefix))
|
||||
(absprefix (expand-file-name prefix dir))
|
||||
|
@ -14114,6 +14245,7 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]."
|
|||
(defvar org-export-latex-packages-alist) ;; defined in org-latex.el
|
||||
;; This function borrows from Ganesh Swami's latex2png.el
|
||||
(defun org-create-formula-image (string tofile options buffer)
|
||||
"This calls dvipng."
|
||||
(require 'org-latex)
|
||||
(let* ((tmpdir (if (featurep 'xemacs)
|
||||
(temp-directory)
|
||||
|
@ -14332,6 +14464,8 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]."
|
|||
(org-defkey org-mode-map "\C-c:" 'org-toggle-fixed-width-section)
|
||||
(org-defkey org-mode-map "\C-c\C-x\C-f" 'org-emphasize)
|
||||
(org-defkey org-mode-map "\C-c\C-xf" 'org-footnote-action)
|
||||
(org-defkey org-mode-map "\C-c\C-x\C-mg" 'org-mobile-pull)
|
||||
(org-defkey org-mode-map "\C-c\C-x\C-mp" 'org-mobile-push)
|
||||
(org-defkey org-mode-map [?\C-c (control ?*)] 'org-list-make-subtree)
|
||||
;;(org-defkey org-mode-map [?\C-c (control ?-)] 'org-list-make-list-from-subtree)
|
||||
|
||||
|
@ -14597,9 +14731,10 @@ See the individual commands for more information."
|
|||
(cond
|
||||
((org-at-table-p) (call-interactively 'org-table-previous-field))
|
||||
((integerp arg)
|
||||
(message "Content view to level: %d" arg)
|
||||
(org-content (prefix-numeric-value arg))
|
||||
(setq org-cycle-global-status 'overview))
|
||||
(let ((arg2 (if org-odd-levels-only (1- (* 2 arg)) arg)))
|
||||
(message "Content view to level: %d" arg)
|
||||
(org-content (prefix-numeric-value arg2))
|
||||
(setq org-cycle-global-status 'overview)))
|
||||
(t (call-interactively 'org-global-cycle))))
|
||||
|
||||
(defun org-shiftmetaleft ()
|
||||
|
@ -15000,7 +15135,7 @@ This command does many different things, depending on context:
|
|||
(if arg
|
||||
(call-interactively 'org-toggle-checkbox)
|
||||
(call-interactively 'org-maybe-renumber-ordered-list)))
|
||||
((save-excursion (beginning-of-line 1) (looking-at "#\\+BEGIN:"))
|
||||
((save-excursion (beginning-of-line 1) (looking-at org-dblock-start-re))
|
||||
;; Dynamic block
|
||||
(beginning-of-line 1)
|
||||
(save-excursion (org-update-dblock)))
|
||||
|
@ -15014,7 +15149,7 @@ This command does many different things, depending on context:
|
|||
(beginning-of-line 1)
|
||||
(skip-chars-backward " \r\n\t")
|
||||
(if (org-at-table-p)
|
||||
(org-call-with-arg 'org-table-recalculate t))))
|
||||
(org-call-with-arg 'org-table-recalculate (or arg t)))))
|
||||
(t
|
||||
; (org-set-regexps-and-options)
|
||||
; (org-restart-font-lock)
|
||||
|
@ -15453,6 +15588,13 @@ See the individual commands for more information."
|
|||
:style toggle :selected (and (boundp 'org-export-with-LaTeX-fragments)
|
||||
org-export-with-LaTeX-fragments)])
|
||||
"--"
|
||||
("MobileOrg"
|
||||
["Push Files and Views" org-mobile-push t]
|
||||
["Get Captured and Flagged" org-mobile-pull t]
|
||||
["Find FLAGGED Tasks" (org-agenda nil "?") :active t :keys "C-c a ?"]
|
||||
"--"
|
||||
["Setup" (progn (require 'org-mobile) (customize-group 'org-mobile)) t])
|
||||
"--"
|
||||
("Documentation"
|
||||
["Show Version" org-version t]
|
||||
["Info Documentation" org-info t])
|
||||
|
@ -15627,6 +15769,10 @@ With prefix arg UNCOMPILED, load the uncompiled versions."
|
|||
|
||||
;;; Generally useful functions
|
||||
|
||||
(defun org-get-at-bol (property)
|
||||
"Get text property PROPERTY at beginning of line."
|
||||
(get-text-property (point-at-bol) property))
|
||||
|
||||
(defun org-find-text-property-in-string (prop s)
|
||||
"Return the first non-nil value of property PROP in string S."
|
||||
(or (get-text-property 0 prop s)
|
||||
|
@ -16291,7 +16437,7 @@ which make use of the date at the cursor."
|
|||
;; text in a line directly attached to a headline would otherwise
|
||||
;; fill the headline as well.
|
||||
(org-set-local 'comment-start-skip "^#+[ \t]*")
|
||||
(org-set-local 'paragraph-separate "\f\\|\\*+ \\|[ ]*$\\|[ \t]*[:|]")
|
||||
(org-set-local 'paragraph-separate "\f\\|\\*+ \\|[ ]*$\\|[ \t]*[:|#]")
|
||||
;; The paragraph starter includes hand-formatted lists.
|
||||
(org-set-local
|
||||
'paragraph-start
|
||||
|
@ -16299,6 +16445,7 @@ which make use of the date at the cursor."
|
|||
"\f" "\\|"
|
||||
"[ ]*$" "\\|"
|
||||
"\\*+ " "\\|"
|
||||
"[ \t]*#" "\\|"
|
||||
"[ \t]*\\([-+*][ \t]+\\|[0-9]+[.)][ \t]+\\)" "\\|"
|
||||
"[ \t]*[:|]" "\\|"
|
||||
"\\$\\$" "\\|"
|
||||
|
@ -16512,7 +16659,7 @@ beyond the end of the headline."
|
|||
(t 'end-of-line)))
|
||||
(let ((pos (point)))
|
||||
(beginning-of-line 1)
|
||||
(if (looking-at (org-re ".*?\\([ \t]*\\)\\(:[[:alnum:]_@:]+:\\)[ \t]*$"))
|
||||
(if (looking-at (org-re ".*?\\(?:\\([ \t]*\\)\\(:[[:alnum:]_@:]+:\\)?[ \t]*\\)?$"))
|
||||
(if (eq special t)
|
||||
(if (or (< pos (match-beginning 1))
|
||||
(= pos (match-end 0)))
|
||||
|
@ -16529,6 +16676,8 @@ beyond the end of the headline."
|
|||
|
||||
(define-key org-mode-map "\C-a" 'org-beginning-of-line)
|
||||
(define-key org-mode-map "\C-e" 'org-end-of-line)
|
||||
(define-key org-mode-map [home] 'org-beginning-of-line)
|
||||
(define-key org-mode-map [end] 'org-end-of-line)
|
||||
|
||||
(defun org-backward-sentence (&optional arg)
|
||||
"Go to beginning of sentence, or beginning of table field.
|
||||
|
@ -16696,8 +16845,11 @@ interactive command with similar behavior."
|
|||
(save-excursion
|
||||
(null (re-search-backward "^\\*+ " nil t))))
|
||||
|
||||
(defalias 'org-on-heading-p 'outline-on-heading-p)
|
||||
(defalias 'org-at-heading-p 'outline-on-heading-p)
|
||||
(defun org-on-heading-p (&optional ignored)
|
||||
(outline-on-heading-p t))
|
||||
(defun org-at-heading-p (&optional ignored)
|
||||
(outline-on-heading-p t))
|
||||
|
||||
(defun org-at-heading-or-item-p ()
|
||||
(or (org-on-heading-p) (org-at-item-p)))
|
||||
|
||||
|
@ -16858,7 +17010,7 @@ If there is no such heading, return nil."
|
|||
(if (eq major-mode 'org-mode)
|
||||
(progn
|
||||
(org-end-of-subtree nil t)
|
||||
(backward-char 1))
|
||||
(unless (eobp) (backward-char 1)))
|
||||
ad-do-it))
|
||||
|
||||
(defun org-forward-same-level (arg &optional invisible-ok)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue