diff options
| author | Bastien Guerry | 2012-10-26 16:42:05 +0200 |
|---|---|---|
| committer | Bastien Guerry | 2012-10-26 16:42:05 +0200 |
| commit | bdebdb64b35d6a0a28e04335f4e8e46949206ad3 (patch) | |
| tree | ea3e0d00bd8da93ae89e86744a80f4e162c5361c | |
| parent | ccc83f50a4ca55842bcf955b9f8156c17aa43864 (diff) | |
| download | emacs-bdebdb64b35d6a0a28e04335f4e8e46949206ad3.tar.gz emacs-bdebdb64b35d6a0a28e04335f4e8e46949206ad3.zip | |
Merge upstream Org (from commit acbbe2)
56 files changed, 1253 insertions, 601 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index fc44828e8bf..a0cfd675f0a 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-10-26 Bastien Guerry <bzg@gnu.org> | ||
| 2 | |||
| 3 | * org.texi (Installation): Update the link to Org's ELPA. Also | ||
| 4 | don't mention org-install.el anymore as the replacement file | ||
| 5 | org-loaddefs.el is now loaded by org.el. | ||
| 6 | |||
| 1 | 2012-10-25 Michael Albinus <michael.albinus@gmx.de> | 7 | 2012-10-25 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 8 | ||
| 3 | * tramp.texi (Frequently Asked Questions): Mention | 9 | * tramp.texi (Frequently Asked Questions): Mention |
diff --git a/doc/misc/org.texi b/doc/misc/org.texi index 89c99018460..cdaf1174a26 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi | |||
| @@ -857,7 +857,7 @@ Theory Ltd.} | |||
| 857 | @b{Important:} @i{If you the version of Org that comes with Emacs or as a | 857 | @b{Important:} @i{If you the version of Org that comes with Emacs or as a |
| 858 | XEmacs package, please skip this section and go directly to @ref{Activation}. | 858 | XEmacs package, please skip this section and go directly to @ref{Activation}. |
| 859 | If you downloaded Org as an ELPA package, please read the instructions on the | 859 | If you downloaded Org as an ELPA package, please read the instructions on the |
| 860 | @uref{http://orgmode.org/elpa/, Org ELPA page}. To see what version of Org | 860 | @uref{http://orgmode.org/elpa.html, Org ELPA page}. To see what version of Org |
| 861 | (if any) is part of your Emacs distribution, type @kbd{M-x org-version} (if | 861 | (if any) is part of your Emacs distribution, type @kbd{M-x org-version} (if |
| 862 | your Emacs distribution does not come with Org, this function will not be | 862 | your Emacs distribution does not come with Org, this function will not be |
| 863 | defined).} | 863 | defined).} |
| @@ -947,7 +947,7 @@ description on Worg}. | |||
| 947 | Installing Info files is system dependent, because of differences in the | 947 | Installing Info files is system dependent, because of differences in the |
| 948 | @file{install-info} program. The Info documentation is installed together | 948 | @file{install-info} program. The Info documentation is installed together |
| 949 | with the rest of Org mode. If you don't install Org mode, it is possible to | 949 | with the rest of Org mode. If you don't install Org mode, it is possible to |
| 950 | install the Info documentation separately (you need to have | 950 | install the Info documentation seperately (you need to have |
| 951 | install-info@footnote{The output from install-info (if any) is system | 951 | install-info@footnote{The output from install-info (if any) is system |
| 952 | dependent. In particular Debian and its derivatives use two different | 952 | dependent. In particular Debian and its derivatives use two different |
| 953 | versions of install-info and you may see the message: | 953 | versions of install-info and you may see the message: |
| @@ -964,13 +964,6 @@ on your system). | |||
| 964 | make install-info | 964 | make install-info |
| 965 | @end example | 965 | @end example |
| 966 | 966 | ||
| 967 | Then add the following line to @file{.emacs}. It is needed so that | ||
| 968 | Emacs can autoload functions that are located in files not immediately loaded | ||
| 969 | when Org mode starts. | ||
| 970 | @lisp | ||
| 971 | (require 'org-install) | ||
| 972 | @end lisp | ||
| 973 | |||
| 974 | Do not forget to activate Org as described in the following section. | 967 | Do not forget to activate Org as described in the following section. |
| 975 | @page | 968 | @page |
| 976 | 969 | ||
| @@ -1092,9 +1085,6 @@ shown below. | |||
| 1092 | ;; add latest org-mode to load path | 1085 | ;; add latest org-mode to load path |
| 1093 | (add-to-list 'load-path (expand-file-name "/path/to/org-mode/lisp")) | 1086 | (add-to-list 'load-path (expand-file-name "/path/to/org-mode/lisp")) |
| 1094 | (add-to-list 'load-path (expand-file-name "/path/to/org-mode/contrib/lisp" t)) | 1087 | (add-to-list 'load-path (expand-file-name "/path/to/org-mode/contrib/lisp" t)) |
| 1095 | |||
| 1096 | ;; activate org | ||
| 1097 | (require 'org-install) | ||
| 1098 | @end example | 1088 | @end example |
| 1099 | 1089 | ||
| 1100 | If an error occurs, a backtrace can be very useful (see below on how to | 1090 | If an error occurs, a backtrace can be very useful (see below on how to |
| @@ -3785,7 +3775,7 @@ mostly if more than two TODO states are possible (@pxref{TODO | |||
| 3785 | extensions}). See also @ref{Conflicts}, for a discussion of the interaction | 3775 | extensions}). See also @ref{Conflicts}, for a discussion of the interaction |
| 3786 | with @code{shift-selection-mode}. See also the variable | 3776 | with @code{shift-selection-mode}. See also the variable |
| 3787 | @code{org-treat-S-cursor-todo-selection-as-state-change}. | 3777 | @code{org-treat-S-cursor-todo-selection-as-state-change}. |
| 3788 | @orgcmd{C-c / t,org-show-todo-key} | 3778 | @orgcmd{C-c / t,org-show-todo-tree} |
| 3789 | @cindex sparse tree, for TODO | 3779 | @cindex sparse tree, for TODO |
| 3790 | @vindex org-todo-keywords | 3780 | @vindex org-todo-keywords |
| 3791 | View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}). Folds the | 3781 | View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}). Folds the |
| @@ -9386,16 +9376,16 @@ so often, shortcuts are provided using the Easy Templates facility | |||
| 9386 | @item C-c ' | 9376 | @item C-c ' |
| 9387 | Edit the source code example at point in its native mode. This works by | 9377 | Edit the source code example at point in its native mode. This works by |
| 9388 | switching to a temporary buffer with the source code. You need to exit by | 9378 | switching to a temporary buffer with the source code. You need to exit by |
| 9389 | pressing @kbd{C-c '} again@footnote{Upon exit, lines starting with @samp{*} | 9379 | pressing @kbd{C-c '} again@footnote{Upon exit, lines starting with @samp{*}, |
| 9390 | or @samp{#} will get a comma prepended, to keep them from being interpreted | 9380 | @samp{,*}, @samp{#+} and @samp{,#+} will get a comma prepended, to keep them |
| 9391 | by Org as outline nodes or special comments. These commas will be stripped | 9381 | from being interpreted by Org as outline nodes or special syntax. These |
| 9392 | for editing with @kbd{C-c '}, and also for export.}. The edited version will | 9382 | commas will be stripped for editing with @kbd{C-c '}, and also for export.}. |
| 9393 | then replace the old version in the Org buffer. Fixed-width regions | 9383 | The edited version will then replace the old version in the Org buffer. |
| 9394 | (where each line starts with a colon followed by a space) will be edited | 9384 | Fixed-width regions (where each line starts with a colon followed by a space) |
| 9395 | using @code{artist-mode}@footnote{You may select a different-mode with the | 9385 | will be edited using @code{artist-mode}@footnote{You may select |
| 9396 | variable @code{org-edit-fixed-width-region-mode}.} to allow creating ASCII | 9386 | a different-mode with the variable @code{org-edit-fixed-width-region-mode}.} |
| 9397 | drawings easily. Using this command in an empty line will create a new | 9387 | to allow creating ASCII drawings easily. Using this command in an empty line |
| 9398 | fixed-width region. | 9388 | will create a new fixed-width region. |
| 9399 | @kindex C-c l | 9389 | @kindex C-c l |
| 9400 | @item C-c l | 9390 | @item C-c l |
| 9401 | Calling @code{org-store-link} while editing a source code example in a | 9391 | Calling @code{org-store-link} while editing a source code example in a |
| @@ -14523,14 +14513,13 @@ Be sure to adjust the paths to fit your system. | |||
| 14523 | # | 14513 | # |
| 14524 | DIR=`pwd` | 14514 | DIR=`pwd` |
| 14525 | FILES="" | 14515 | FILES="" |
| 14526 | ORGINSTALL="~/src/org/lisp/org-install.el" | ||
| 14527 | 14516 | ||
| 14528 | # wrap each argument in the code required to call tangle on it | 14517 | # wrap each argument in the code required to call tangle on it |
| 14529 | for i in $@@; do | 14518 | for i in $@@; do |
| 14530 | FILES="$FILES \"$i\"" | 14519 | FILES="$FILES \"$i\"" |
| 14531 | done | 14520 | done |
| 14532 | 14521 | ||
| 14533 | emacs -Q --batch -l $ORGINSTALL \ | 14522 | emacs -Q --batch \ |
| 14534 | --eval "(progn | 14523 | --eval "(progn |
| 14535 | (add-to-list 'load-path (expand-file-name \"~/src/org/lisp/\")) | 14524 | (add-to-list 'load-path (expand-file-name \"~/src/org/lisp/\")) |
| 14536 | (add-to-list 'load-path (expand-file-name \"~/src/org/contrib/lisp/\" t)) | 14525 | (add-to-list 'load-path (expand-file-name \"~/src/org/contrib/lisp/\" t)) |
| @@ -16704,7 +16693,7 @@ on @file{org-element.el} and @file{org-export.el} has been outstanding, and | |||
| 16704 | opened the doors for many new ideas and features. | 16693 | opened the doors for many new ideas and features. |
| 16705 | 16694 | ||
| 16706 | @item Jambunathan K | 16695 | @item Jambunathan K |
| 16707 | Jambunathan contributed the ODT exporter, definitely a killer feature of | 16696 | Jambunathan contributed the ODT exporter, definitly a killer feature of |
| 16708 | Org mode. He also contributed the new HTML exporter, which is another core | 16697 | Org mode. He also contributed the new HTML exporter, which is another core |
| 16709 | feature of Org. Here too, I knew I could rely on him to fix bugs in these | 16698 | feature of Org. Here too, I knew I could rely on him to fix bugs in these |
| 16710 | areas and to patiently explain the users what was the problems and solutions. | 16699 | areas and to patiently explain the users what was the problems and solutions. |
| @@ -16712,7 +16701,7 @@ areas and to patiently explain the users what was the problems and solutions. | |||
| 16712 | @item Achim Gratz | 16701 | @item Achim Gratz |
| 16713 | Achim rewrote the building process of Org, turning some @emph{ad hoc} tools | 16702 | Achim rewrote the building process of Org, turning some @emph{ad hoc} tools |
| 16714 | into a flexible and conceptually clean process. He patiently coped with the | 16703 | into a flexible and conceptually clean process. He patiently coped with the |
| 16715 | many hiccups that such a change can create for users. | 16704 | many hicups that such a change can create for users. |
| 16716 | 16705 | ||
| 16717 | @item Nick Dokos | 16706 | @item Nick Dokos |
| 16718 | The Org mode mailing list would not be such a nice place without Nick, who | 16707 | The Org mode mailing list would not be such a nice place without Nick, who |
diff --git a/etc/ChangeLog b/etc/ChangeLog index 3ebe18b407f..60d4a7aa271 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-10-26 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 2 | |||
| 3 | * refcards/orgcard.tex: Fix keybindings about | ||
| 4 | `org-show-todo-tree'. | ||
| 5 | |||
| 1 | 2012-10-23 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2012-10-23 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | Fix outdated timestamp documentation in Elisp manual (bug#12706). | 8 | Fix outdated timestamp documentation in Elisp manual (bug#12706). |
diff --git a/etc/refcards/orgcard.pdf b/etc/refcards/orgcard.pdf index 2f004418443..720f08d9ded 100644 --- a/etc/refcards/orgcard.pdf +++ b/etc/refcards/orgcard.pdf | |||
| Binary files differ | |||
diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex index 45b8ef04732..9ce2923e845 100644 --- a/etc/refcards/orgcard.tex +++ b/etc/refcards/orgcard.tex | |||
| @@ -484,9 +484,9 @@ after ``{\tt :}'', and dictionary words elsewhere. | |||
| 484 | \metax{select next/previous state}{S-LEFT/RIGHT} | 484 | \metax{select next/previous state}{S-LEFT/RIGHT} |
| 485 | \metax{select next/previous set}{C-S-LEFT/RIGHT} | 485 | \metax{select next/previous set}{C-S-LEFT/RIGHT} |
| 486 | \key{toggle ORDERED property}{C-c C-x o} | 486 | \key{toggle ORDERED property}{C-c C-x o} |
| 487 | \key{view TODO items in a sparse tree}{C-c C-v} | ||
| 488 | \key{view 3rd TODO keyword's sparse tree}{C-3 C-c C-v} | ||
| 489 | 487 | ||
| 488 | \key{view TODO items in a sparse tree}{C-c / t} | ||
| 489 | \key{view 3rd TODO keyword's sparse tree}{C-3 C-c / t} | ||
| 490 | \key{set the priority of the current item}{C-c , [ABC]} | 490 | \key{set the priority of the current item}{C-c , [ABC]} |
| 491 | \key{remove priority cookie from current item}{C-c , SPC} | 491 | \key{remove priority cookie from current item}{C-c , SPC} |
| 492 | \key{raise/lower priority of current item}{S-UP/DOWN\notetwo} | 492 | \key{raise/lower priority of current item}{S-UP/DOWN\notetwo} |
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index ef40c9316cf..9bf731fb6b2 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1,3 +1,300 @@ | |||
| 1 | 2012-10-26 Achim Gratz <stromeko@stromeko.de> | ||
| 2 | |||
| 3 | * ob-ditaa.el: Needs to (require 'org-compat) for | ||
| 4 | org-find-library-dir. | ||
| 5 | |||
| 6 | * org.el: Remove utf-8 codepoints in docstrings, bytecode doesn't | ||
| 7 | work when loaded from compressed files. | ||
| 8 | |||
| 9 | * org-compat.el: Make sure that file-name-directory is getting a | ||
| 10 | stringp. This avoids a possible " (wrong-type-argument stringp | ||
| 11 | nil)" error when the library in question does not exist. | ||
| 12 | |||
| 13 | * org-odt.el: Replace arc-mode.el by arc-mode. | ||
| 14 | |||
| 15 | * org.el: Replace org-macs.el by org-macs. | ||
| 16 | |||
| 17 | * org-install.el: Provide an empty file that prints a warning | ||
| 18 | about an outdated configuration. | ||
| 19 | |||
| 20 | 2012-10-26 Bastien Guerry <bzg@gnu.org> | ||
| 21 | |||
| 22 | * org-latex.el (org-export-as-latex): Remove obsolete argument | ||
| 23 | `hidden'. Also fix the docstring: using 'string as the value | ||
| 24 | for `to-buffer' outputs a string with no LaTeX header. | ||
| 25 | (org-export-as-latex-batch) | ||
| 26 | (org-export-as-latex-to-buffer, org-export-region-as-latex) | ||
| 27 | (org-export-as-pdf): Don't use the obsoleted argument. | ||
| 28 | |||
| 29 | * ob-haskell.el (org-export-as-latex): Don't use the obsoleted | ||
| 30 | argument `hidden'. | ||
| 31 | |||
| 32 | * org.el (org-refile): Run within `with-demoted-errors' so | ||
| 33 | that a corrupted bookmark file does not stop the refile | ||
| 34 | process. | ||
| 35 | |||
| 36 | * org-capture.el (org-capture-bookmark-last-stored-position): | ||
| 37 | Ditto for the capture process. | ||
| 38 | |||
| 39 | * org-src.el (org-edit-src-exit): Fix bug when saving an empty | ||
| 40 | source buffer. | ||
| 41 | |||
| 42 | * org-lparse.el (org-lparse): Fix bug by returning the output | ||
| 43 | of `org-do-lparse'. | ||
| 44 | |||
| 45 | * org.el (org-refile-check-position): Throw an error when the | ||
| 46 | refile target is the current buffer and is not a file. | ||
| 47 | (org-agenda-file-to-front, org-remove-file): Throw an error | ||
| 48 | when the current buffer is not a file. | ||
| 49 | (org-check-agenda-file): Enhance the message. | ||
| 50 | (org-element-type): Autoload. | ||
| 51 | (org-element-context, org-element-paragraph-parser): Don't | ||
| 52 | declare as these two functions are not used in org.el. | ||
| 53 | |||
| 54 | * org-lparse.el (browse-url-file-url): Declare. | ||
| 55 | |||
| 56 | * org.el (org-refile-check-position): Fix typo in docstring. | ||
| 57 | |||
| 58 | * org-clock.el (org-clock-modeline-total): Make obsolete. | ||
| 59 | (org-clock-mode-line-total): Rename from | ||
| 60 | `org-clock-modeline-total'. | ||
| 61 | (org-clock-get-sum-start): Fix references to | ||
| 62 | `org-clock-modeline-total'. | ||
| 63 | |||
| 64 | * org-faces.el (org-agenda-filter-tags) | ||
| 65 | (org-agenda-filter-category, mode-line): Use the 'mode-line | ||
| 66 | face instead of the obsolete 'modeline. | ||
| 67 | |||
| 68 | * org-odt.el (org-odt-styles-dir): Try more directories. | ||
| 69 | Don't throw an error, just send a message. | ||
| 70 | |||
| 71 | * org-odt.el (org-odt-lib-dir, org-odt-data-dir) | ||
| 72 | (org-odt-schema-dir-list, org-odt-styles-dir-list): Delete. | ||
| 73 | (org-export-odt-schema-dir, org-odt-styles-dir): Infer the | ||
| 74 | correct directories without requiring other variables. | ||
| 75 | |||
| 76 | * org-fixup.el (org-make-org-version, org-make-autoloads): | ||
| 77 | Don't define `org-odt-data-dir' in org-version.el. | ||
| 78 | |||
| 79 | * org-loaddefs.el: New file. | ||
| 80 | |||
| 81 | * org.el ("org-loaddefs.el"): Don't throw an error if the file | ||
| 82 | cannot be fund. | ||
| 83 | (org-version): Use org-loaddefs.el instead of org-install.el. | ||
| 84 | |||
| 85 | * org.el: Don't dynamically autoload already autoloaded | ||
| 86 | functions. | ||
| 87 | (org-clock-update-time-maybe): Move to org-clock.el. | ||
| 88 | |||
| 89 | * org-exp.el (org-insert-export-options-template): Remove | ||
| 90 | autoload cookie. | ||
| 91 | |||
| 92 | * org-clock.el (org-resolve-clocks, org-clock-in) | ||
| 93 | (org-clock-out, org-clock-cancel, org-clock-goto) | ||
| 94 | (org-clock-sum, org-clock-display, org-clock-report) | ||
| 95 | (org-dblock-write:clocktable): Add autoload cookie. | ||
| 96 | (org-clock-update-time-maybe): Moved from org.el. | ||
| 97 | |||
| 98 | * org-beamer.el (org-beamer-sectioning, org-beamer-mode): Ditto. | ||
| 99 | |||
| 100 | * org-ascii.el (org-export-ascii-preprocess): Ditto. | ||
| 101 | |||
| 102 | * org-archive.el (org-archive-subtree) | ||
| 103 | (org-archive-to-archive-sibling, org-toggle-archive-tag): Add | ||
| 104 | autoload cookie. | ||
| 105 | |||
| 106 | * org-colview.el (org-columns, org-dblock-write:columnview) | ||
| 107 | (org-insert-columns-dblock, org-agenda-columns): Ditto. | ||
| 108 | |||
| 109 | * org-table.el (org-table-create-with-table.el) | ||
| 110 | (org-table-create-or-convert-from-region, org-table-create) | ||
| 111 | (org-table-convert-region, org-table-import) | ||
| 112 | (org-table-export, org-table-align) | ||
| 113 | (org-table-justify-field-maybe, org-table-next-field) | ||
| 114 | (org-table-previous-field, org-table-next-row) | ||
| 115 | (org-table-copy-down, org-table-field-info) | ||
| 116 | (org-table-current-dline, org-table-goto-column) | ||
| 117 | (org-table-insert-column, org-table-delete-column) | ||
| 118 | (org-table-move-column-right, org-table-move-column-left) | ||
| 119 | (org-table-move-column, org-table-move-row-down) | ||
| 120 | (org-table-move-row-up, org-table-move-row) | ||
| 121 | (org-table-insert-row, org-table-insert-hline) | ||
| 122 | (org-table-hline-and-move, org-table-kill-row) | ||
| 123 | (org-table-sort-lines, org-table-cut-region) | ||
| 124 | (org-table-copy-region, org-table-paste-rectangle) | ||
| 125 | (org-table-convert, org-table-wrap-region) | ||
| 126 | (org-table-edit-field, org-table-sum) | ||
| 127 | (org-table-get-stored-formulas) | ||
| 128 | (org-table-maybe-eval-formula) | ||
| 129 | (org-table-rotate-recalc-marks) | ||
| 130 | (org-table-maybe-recalculate-line, org-table-eval-formula) | ||
| 131 | (org-table-recalculate, org-table-iterate) | ||
| 132 | (org-table-edit-formulas) | ||
| 133 | (org-table-toggle-coordinate-overlays) | ||
| 134 | (org-table-toggle-formula-debugger, orgtbl-to-generic) | ||
| 135 | (orgtbl-to-tsv, orgtbl-to-csv, orgtbl-to-latex) | ||
| 136 | (orgtbl-to-html, orgtbl-to-texinfo, orgtbl-to-orgtbl): Ditto. | ||
| 137 | |||
| 138 | * org.el (turn-on-orgtbl): Moved here from org-table.el. | ||
| 139 | (org-clock-persistence-insinuate): Moved here from org-clock.el. | ||
| 140 | (org-update-all-dblocks, org-map-entries) | ||
| 141 | (org-require-autoloaded-modules, org-forward-element) | ||
| 142 | (org-backward-element, org-up-element) | ||
| 143 | (org-element-greater-elements, org-drag-element-backward) | ||
| 144 | (org-drag-element-forward, org-mark-element) | ||
| 145 | (org-narrow-to-element, org-transpose-element) | ||
| 146 | (org-unindent-buffer): Don't autoload. | ||
| 147 | |||
| 148 | * org-clock.el (org-clock-get-clocktable): Rename from | ||
| 149 | `org-get-clocktable'. | ||
| 150 | (org-clock-persistence-insinuate): Move to org.el. | ||
| 151 | |||
| 152 | * org-capture.el: Do no set `generated-autoload-file' locally. | ||
| 153 | Minor code clean up. | ||
| 154 | |||
| 155 | * org-agenda.el (org-agenda-list): Use | ||
| 156 | `org-clock-get-clocktable'. Do no set | ||
| 157 | `generated-autoload-file' locally. | ||
| 158 | |||
| 159 | * org-table.el (org-table-iterate-buffer-tables): Minor | ||
| 160 | reformatting. | ||
| 161 | (turn-on-orgtbl): Move to org.el. | ||
| 162 | |||
| 163 | * org-html.el (org-export-htmlize-generate-css): Don't autoload. | ||
| 164 | |||
| 165 | * org-timer.el (org-timer-pause-or-continue, org-timer-stop): | ||
| 166 | Ditto. | ||
| 167 | |||
| 168 | * ob-tangle.el (org-babel-tangle-lang-exts): Ditto. | ||
| 169 | |||
| 170 | * ob-lob.el (org-babel-lob-ingest): Ditto. | ||
| 171 | |||
| 172 | * org-id.el (org-id-copy) | ||
| 173 | (org-id-get-with-outline-path-completion) | ||
| 174 | (org-id-get-with-outline-drilling): Ditto. | ||
| 175 | |||
| 176 | * org-lparse.el (org-lparse-and-open, org-lparse-batch) | ||
| 177 | (org-lparse-to-buffer, org-replace-region-by) | ||
| 178 | (org-lparse-region): Ditto. | ||
| 179 | |||
| 180 | * org-mobile.el (org-mobile-create-sumo-agenda): Ditto. | ||
| 181 | |||
| 182 | * org.el (org-cycle): Fix misplaced autoload cookie. | ||
| 183 | |||
| 184 | * org-agenda.el (org-agenda-get-timestamps): Check if the item | ||
| 185 | is an habit when formatting it with `org-agenda-format-item'. | ||
| 186 | (org-agenda-get-blocks): Fix bug: don't assume the item is an | ||
| 187 | habit when formatting with `org-agenda-format-item'. | ||
| 188 | |||
| 189 | * org.el (org-calendar-agenda-action-key): Delete an option. | ||
| 190 | (org-mode-map): Delete its keybinding. | ||
| 191 | (org-agenda-action-marker, org-mark-entry-for-agenda-action): | ||
| 192 | Delete. | ||
| 193 | |||
| 194 | * org-agenda.el (org-agenda-diary-entry): Don't prevent from | ||
| 195 | being used outside of Org agendas, as it can be used in | ||
| 196 | calendar buffers too. | ||
| 197 | |||
| 198 | 2012-10-26 Caio Tiago Oliveira <asrail@gmail.com> (tiny change) | ||
| 199 | |||
| 200 | * ob-scala.el (org-babel-scala-wrapper-method): Use a Scala | ||
| 201 | block enclosing the submitted code. | ||
| 202 | |||
| 203 | 2012-10-26 Myles English <mylesenglish@gmail.com> (tiny change) | ||
| 204 | |||
| 205 | * org-clock.el (org-clock-in): Moved the call to | ||
| 206 | org-clock-in-prepare-hook until the task's properties | ||
| 207 | can be accessed. | ||
| 208 | |||
| 209 | 2012-10-26 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 210 | |||
| 211 | * org.el (org-auto-fill-function): Make sure `adaptive-fill-mode' | ||
| 212 | mode is nil when pre-computed `fill-prefix' is the empty string. | ||
| 213 | Otherwise filling functions from fill.el think it has to be computed | ||
| 214 | again and overwrite it. | ||
| 215 | |||
| 216 | * org.el: Make `org-closest-date' aware of hours repeaters. | ||
| 217 | |||
| 218 | * org.el (org-end-of-line): Do not call `end-of-visual-line' when | ||
| 219 | moving to the end of line. Also improve behaviour on elements that | ||
| 220 | can be hidden. | ||
| 221 | |||
| 222 | * org.el (org-sparse-tree): Allow to call `org-show-todo-tree' | ||
| 223 | with an argument. | ||
| 224 | |||
| 225 | * org-element.el (org-element--get-next-object-candidates): Fix | ||
| 226 | parsing of objects of the same type in a single paragraph. | ||
| 227 | |||
| 228 | * org-element.el (org-element-sub/superscript-successor): Fix | ||
| 229 | parsing of sub/superscript at beginning of item. | ||
| 230 | (org-element-latex-or-entity-successor): Fix parsing of latex | ||
| 231 | fragments at beginning of item. | ||
| 232 | |||
| 233 | * org-agenda.el (org-agenda-later): Fix function when span is | ||
| 234 | a number and an argument was provided. Also fix typo in docstring. | ||
| 235 | |||
| 236 | * org.el (org-read-date-analyze): Fix analyzing for dates like | ||
| 237 | "29.03 16:40". | ||
| 238 | |||
| 239 | * org-element.el (org-element-center-block-parser) | ||
| 240 | (org-element-drawer-parser, , org-element-footnote-definition-parser) | ||
| 241 | (org-element-inlinetask-parser, org-element-plain-list-parser) | ||
| 242 | (org-element-quote-block-parser, org-element-special-block-parser) | ||
| 243 | (org-element-babel-call-parser, org-element-clock-parser) | ||
| 244 | (org-element-comment-parser, org-element-comment-block-parser) | ||
| 245 | (org-element-example-block-parser, org-element-export-block-parser) | ||
| 246 | (org-element-fixed-width-parser, org-element-horizontal-rule-parser) | ||
| 247 | (org-element-keyword-parser, org-element-latex-environment-parser) | ||
| 248 | (org-element-paragraph-parser, org-element-planning-parser) | ||
| 249 | (org-element-property-drawer-parser, org-element-src-block-parser) | ||
| 250 | (org-element-table-parser) | ||
| 251 | (org-element-verse-block-parserorg-element-dynamic-block-parser): | ||
| 252 | Make sure element never ends at the end of a blank non-empty line. | ||
| 253 | |||
| 254 | * org-element.el (org-element-context) | ||
| 255 | (org-element--get-next-object-candidates): Fix `org-element-context'. | ||
| 256 | In particular, the restrictions for an object may be different from | ||
| 257 | those of its container (i.e. table rows and table cells). | ||
| 258 | |||
| 259 | * org-element.el (org-element-example-block-parser) | ||
| 260 | (org-element-src-block-parser): Store value of example-blocks and | ||
| 261 | src-blocks unescaped. | ||
| 262 | (org-element-example-block-interpreter) | ||
| 263 | (org-element-src-block-interpreter): Escape value again when storing | ||
| 264 | it. | ||
| 265 | |||
| 266 | * org-src.el (org-escape-code-in-string) | ||
| 267 | (org-unescape-code-in-string, org-escape-code-in-region) | ||
| 268 | (org-unescape-code-in-region): New functions. | ||
| 269 | (org-edit-src-code, org-edit-src-exit): Use new functions. | ||
| 270 | |||
| 271 | * org.el (org-strip-protective-commas): Removed function. | ||
| 272 | |||
| 273 | * org-exp.el (org-export-select-backend-specific-text): Use new | ||
| 274 | function. | ||
| 275 | |||
| 276 | * ob.el (org-babel-parse-src-block-match) | ||
| 277 | (org-babel-parse-inline-src-block-match, org-babel-insert-result): | ||
| 278 | Always escape produced blocks, independently on the language of the | ||
| 279 | block, if any. Use new functions. | ||
| 280 | |||
| 281 | * org-element.el (org-element-paragraph-parser): Fix regexp | ||
| 282 | starting a block. | ||
| 283 | |||
| 284 | * org-element.el (org-element-center-block-parser): | ||
| 285 | (org-element-drawer-parser, org-element-dynamic-block-parser) | ||
| 286 | (org-element-example-block-parser, org-element-export-block-parser) | ||
| 287 | (org-element-latex-environment-parser, org-element-paragraph-parser) | ||
| 288 | (org-element-property-drawer-parser, org-element-src-block-parser) | ||
| 289 | (org-element-verse-block-parser): Use stricter regexps for boundaries | ||
| 290 | of elements. | ||
| 291 | |||
| 292 | 2012-10-26 Toby S. Cubitt <tsc25@cantab.net> | ||
| 293 | |||
| 294 | * org-agenda.el (org-agenda-get-sexps): Reset `extra' to nil at | ||
| 295 | beginning of re-search-forward loop, otherwise next iteration picks up | ||
| 296 | `extra' value from previous entry. | ||
| 297 | |||
| 1 | 2012-09-30 Abdó Roig-Maranges <abdo.roig@gmail.com> | 298 | 2012-09-30 Abdó Roig-Maranges <abdo.roig@gmail.com> |
| 2 | 299 | ||
| 3 | * org-html.el (org-export-html-preprocess) | 300 | * org-html.el (org-export-html-preprocess) |
diff --git a/lisp/org/ob-ditaa.el b/lisp/org/ob-ditaa.el index ae7794b659c..7c545c47437 100644 --- a/lisp/org/ob-ditaa.el +++ b/lisp/org/ob-ditaa.el | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | 40 | ||
| 41 | ;;; Code: | 41 | ;;; Code: |
| 42 | (require 'ob) | 42 | (require 'ob) |
| 43 | (require 'org-compat) | ||
| 43 | 44 | ||
| 44 | (defvar org-ditaa-jar-path) ;; provided by org-exp-blocks | 45 | (defvar org-ditaa-jar-path) ;; provided by org-exp-blocks |
| 45 | 46 | ||
diff --git a/lisp/org/ob-haskell.el b/lisp/org/ob-haskell.el index 1588f99f1e4..03972efeec1 100644 --- a/lisp/org/ob-haskell.el +++ b/lisp/org/ob-haskell.el | |||
| @@ -147,6 +147,8 @@ specifying a variable of the same value." | |||
| 147 | (format "%S" var))) | 147 | (format "%S" var))) |
| 148 | 148 | ||
| 149 | (defvar org-src-preserve-indentation) | 149 | (defvar org-src-preserve-indentation) |
| 150 | (declare-function org-export-as-latex "org-latex" | ||
| 151 | (arg &optional ext-plist to-buffer body-only pub-dir)) | ||
| 150 | (defun org-babel-haskell-export-to-lhs (&optional arg) | 152 | (defun org-babel-haskell-export-to-lhs (&optional arg) |
| 151 | "Export to a .lhs file with all haskell code blocks escaped. | 153 | "Export to a .lhs file with all haskell code blocks escaped. |
| 152 | When called with a prefix argument the resulting | 154 | When called with a prefix argument the resulting |
diff --git a/lisp/org/ob-io.el b/lisp/org/ob-io.el index 20648266056..881f35afbda 100644 --- a/lisp/org/ob-io.el +++ b/lisp/org/ob-io.el | |||
| @@ -38,12 +38,12 @@ | |||
| 38 | (require 'ob-eval) | 38 | (require 'ob-eval) |
| 39 | (eval-when-compile (require 'cl)) | 39 | (eval-when-compile (require 'cl)) |
| 40 | 40 | ||
| 41 | (defvar org-babel-tangle-lang-exts) ;; Autoloaded | ||
| 41 | (add-to-list 'org-babel-tangle-lang-exts '("io" . "io")) | 42 | (add-to-list 'org-babel-tangle-lang-exts '("io" . "io")) |
| 42 | (defvar org-babel-default-header-args:io '()) | 43 | (defvar org-babel-default-header-args:io '()) |
| 43 | (defvar org-babel-io-command "io" | 44 | (defvar org-babel-io-command "io" |
| 44 | "Name of the command to use for executing Io code.") | 45 | "Name of the command to use for executing Io code.") |
| 45 | 46 | ||
| 46 | |||
| 47 | (defun org-babel-execute:io (body params) | 47 | (defun org-babel-execute:io (body params) |
| 48 | "Execute a block of Io code with org-babel. This function is | 48 | "Execute a block of Io code with org-babel. This function is |
| 49 | called by `org-babel-execute-src-block'" | 49 | called by `org-babel-execute-src-block'" |
diff --git a/lisp/org/ob-keys.el b/lisp/org/ob-keys.el index 759bef3905f..3e3f496ff35 100644 --- a/lisp/org/ob-keys.el +++ b/lisp/org/ob-keys.el | |||
| @@ -98,6 +98,8 @@ a-list placed behind the generic `org-babel-key-prefix'.") | |||
| 98 | 98 | ||
| 99 | (provide 'ob-keys) | 99 | (provide 'ob-keys) |
| 100 | 100 | ||
| 101 | 101 | ;; Local variables: | |
| 102 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 103 | ;; End: | ||
| 102 | 104 | ||
| 103 | ;;; ob-keys.el ends here | 105 | ;;; ob-keys.el ends here |
diff --git a/lisp/org/ob-lob.el b/lisp/org/ob-lob.el index 6aafe34dcd3..8b5f14d0252 100644 --- a/lisp/org/ob-lob.el +++ b/lisp/org/ob-lob.el | |||
| @@ -45,7 +45,6 @@ To add files to this list use the `org-babel-lob-ingest' command." | |||
| 45 | (defvar org-babel-default-lob-header-args '((:exports . "results")) | 45 | (defvar org-babel-default-lob-header-args '((:exports . "results")) |
| 46 | "Default header arguments to use when exporting #+lob/call lines.") | 46 | "Default header arguments to use when exporting #+lob/call lines.") |
| 47 | 47 | ||
| 48 | ;;;###autoload | ||
| 49 | (defun org-babel-lob-ingest (&optional file) | 48 | (defun org-babel-lob-ingest (&optional file) |
| 50 | "Add all named source-blocks defined in FILE to | 49 | "Add all named source-blocks defined in FILE to |
| 51 | `org-babel-library-of-babel'." | 50 | `org-babel-library-of-babel'." |
| @@ -143,6 +142,8 @@ if so then run the appropriate source block from the Library." | |||
| 143 | 142 | ||
| 144 | (provide 'ob-lob) | 143 | (provide 'ob-lob) |
| 145 | 144 | ||
| 146 | 145 | ;; Local variables: | |
| 146 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 147 | ;; End: | ||
| 147 | 148 | ||
| 148 | ;;; ob-lob.el ends here | 149 | ;;; ob-lob.el ends here |
diff --git a/lisp/org/ob-picolisp.el b/lisp/org/ob-picolisp.el index dd0704fc14e..025993c5847 100644 --- a/lisp/org/ob-picolisp.el +++ b/lisp/org/ob-picolisp.el | |||
| @@ -60,6 +60,7 @@ | |||
| 60 | (eval-when-compile (require 'cl)) | 60 | (eval-when-compile (require 'cl)) |
| 61 | 61 | ||
| 62 | (declare-function run-picolisp "ext:inferior-picolisp" (cmd)) | 62 | (declare-function run-picolisp "ext:inferior-picolisp" (cmd)) |
| 63 | (defvar org-babel-tangle-lang-exts) ;; Autoloaded | ||
| 63 | 64 | ||
| 64 | ;; optionally define a file extension for this language | 65 | ;; optionally define a file extension for this language |
| 65 | (add-to-list 'org-babel-tangle-lang-exts '("picolisp" . "l")) | 66 | (add-to-list 'org-babel-tangle-lang-exts '("picolisp" . "l")) |
diff --git a/lisp/org/ob-ref.el b/lisp/org/ob-ref.el index 79861f1b78a..af4ee6a1a4d 100644 --- a/lisp/org/ob-ref.el +++ b/lisp/org/ob-ref.el | |||
| @@ -59,6 +59,7 @@ | |||
| 59 | (declare-function org-at-item-p "org-list" ()) | 59 | (declare-function org-at-item-p "org-list" ()) |
| 60 | (declare-function org-narrow-to-subtree "org" ()) | 60 | (declare-function org-narrow-to-subtree "org" ()) |
| 61 | (declare-function org-id-find-id-in-file "org-id" (id file &optional markerp)) | 61 | (declare-function org-id-find-id-in-file "org-id" (id file &optional markerp)) |
| 62 | (declare-function org-id-find-id-file "org-id" (id)) | ||
| 62 | (declare-function org-show-context "org" (&optional key)) | 63 | (declare-function org-show-context "org" (&optional key)) |
| 63 | (declare-function org-pop-to-buffer-same-window | 64 | (declare-function org-pop-to-buffer-same-window |
| 64 | "org-compat" (&optional buffer-or-name norecord label)) | 65 | "org-compat" (&optional buffer-or-name norecord label)) |
diff --git a/lisp/org/ob-scala.el b/lisp/org/ob-scala.el index b5eb18484b9..ea3c3f28112 100644 --- a/lisp/org/ob-scala.el +++ b/lisp/org/ob-scala.el | |||
| @@ -36,12 +36,12 @@ | |||
| 36 | (require 'ob-eval) | 36 | (require 'ob-eval) |
| 37 | (eval-when-compile (require 'cl)) | 37 | (eval-when-compile (require 'cl)) |
| 38 | 38 | ||
| 39 | (defvar org-babel-tangle-lang-exts) ;; Autoloaded | ||
| 39 | (add-to-list 'org-babel-tangle-lang-exts '("scala" . "scala")) | 40 | (add-to-list 'org-babel-tangle-lang-exts '("scala" . "scala")) |
| 40 | (defvar org-babel-default-header-args:scala '()) | 41 | (defvar org-babel-default-header-args:scala '()) |
| 41 | (defvar org-babel-scala-command "scala" | 42 | (defvar org-babel-scala-command "scala" |
| 42 | "Name of the command to use for executing Scala code.") | 43 | "Name of the command to use for executing Scala code.") |
| 43 | 44 | ||
| 44 | |||
| 45 | (defun org-babel-execute:scala (body params) | 45 | (defun org-babel-execute:scala (body params) |
| 46 | "Execute a block of Scala code with org-babel. This function is | 46 | "Execute a block of Scala code with org-babel. This function is |
| 47 | called by `org-babel-execute-src-block'" | 47 | called by `org-babel-execute-src-block'" |
| @@ -72,9 +72,17 @@ Emacs-lisp table, otherwise return the results as a string." | |||
| 72 | 72 | ||
| 73 | 73 | ||
| 74 | (defvar org-babel-scala-wrapper-method | 74 | (defvar org-babel-scala-wrapper-method |
| 75 | "( | 75 | |
| 76 | "var str_result :String = null; | ||
| 77 | |||
| 78 | Console.withOut(new java.io.OutputStream() {def write(b: Int){ | ||
| 79 | }}) { | ||
| 80 | str_result = { | ||
| 76 | %s | 81 | %s |
| 77 | ) asString print | 82 | }.toString |
| 83 | } | ||
| 84 | |||
| 85 | print(str_result) | ||
| 78 | ") | 86 | ") |
| 79 | 87 | ||
| 80 | 88 | ||
diff --git a/lisp/org/ob-sql.el b/lisp/org/ob-sql.el index ad7b1e29a93..20a136a80fb 100644 --- a/lisp/org/ob-sql.el +++ b/lisp/org/ob-sql.el | |||
| @@ -47,7 +47,8 @@ | |||
| 47 | (eval-when-compile (require 'cl)) | 47 | (eval-when-compile (require 'cl)) |
| 48 | 48 | ||
| 49 | (declare-function org-table-import "org-table" (file arg)) | 49 | (declare-function org-table-import "org-table" (file arg)) |
| 50 | (declare-function orgtbl-to-csv "org-table" (TABLE PARAMS)) | 50 | (declare-function orgtbl-to-csv "org-table" (table params)) |
| 51 | (declare-function org-table-to-lisp "org-table" (&optional txt)) | ||
| 51 | 52 | ||
| 52 | (defvar org-babel-default-header-args:sql '()) | 53 | (defvar org-babel-default-header-args:sql '()) |
| 53 | 54 | ||
diff --git a/lisp/org/ob-sqlite.el b/lisp/org/ob-sqlite.el index 24a7dd58c2c..b1696d94d3c 100644 --- a/lisp/org/ob-sqlite.el +++ b/lisp/org/ob-sqlite.el | |||
| @@ -33,7 +33,8 @@ | |||
| 33 | (declare-function org-fill-template "org" (template alist)) | 33 | (declare-function org-fill-template "org" (template alist)) |
| 34 | (declare-function org-table-convert-region "org-table" | 34 | (declare-function org-table-convert-region "org-table" |
| 35 | (beg0 end0 &optional separator)) | 35 | (beg0 end0 &optional separator)) |
| 36 | (declare-function orgtbl-to-csv "org-table" (TABLE PARAMS)) | 36 | (declare-function orgtbl-to-csv "org-table" (table params)) |
| 37 | (declare-function org-table-to-lisp "org-table" (&optional txt)) | ||
| 37 | 38 | ||
| 38 | (defvar org-babel-default-header-args:sqlite '()) | 39 | (defvar org-babel-default-header-args:sqlite '()) |
| 39 | 40 | ||
diff --git a/lisp/org/ob-tangle.el b/lisp/org/ob-tangle.el index 7077a1571eb..7e25b2cd1bc 100644 --- a/lisp/org/ob-tangle.el +++ b/lisp/org/ob-tangle.el | |||
| @@ -38,7 +38,6 @@ | |||
| 38 | (declare-function org-babel-update-block-body "org" (new-body)) | 38 | (declare-function org-babel-update-block-body "org" (new-body)) |
| 39 | (declare-function make-directory "files" (dir &optional parents)) | 39 | (declare-function make-directory "files" (dir &optional parents)) |
| 40 | 40 | ||
| 41 | ;;;###autoload | ||
| 42 | (defcustom org-babel-tangle-lang-exts | 41 | (defcustom org-babel-tangle-lang-exts |
| 43 | '(("emacs-lisp" . "el")) | 42 | '(("emacs-lisp" . "el")) |
| 44 | "Alist mapping languages to their file extensions. | 43 | "Alist mapping languages to their file extensions. |
| @@ -514,6 +513,8 @@ which enable the original code blocks to be found." | |||
| 514 | 513 | ||
| 515 | (provide 'ob-tangle) | 514 | (provide 'ob-tangle) |
| 516 | 515 | ||
| 517 | 516 | ;; Local variables: | |
| 517 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 518 | ;; End: | ||
| 518 | 519 | ||
| 519 | ;;; ob-tangle.el ends here | 520 | ;;; ob-tangle.el ends here |
diff --git a/lisp/org/ob.el b/lisp/org/ob.el index f15457d68e2..b06aac11f69 100644 --- a/lisp/org/ob.el +++ b/lisp/org/ob.el | |||
| @@ -39,7 +39,6 @@ | |||
| 39 | (declare-function show-all "outline" ()) | 39 | (declare-function show-all "outline" ()) |
| 40 | (declare-function org-reduce "org" (CL-FUNC CL-SEQ &rest CL-KEYS)) | 40 | (declare-function org-reduce "org" (CL-FUNC CL-SEQ &rest CL-KEYS)) |
| 41 | (declare-function org-mark-ring-push "org" (&optional pos buffer)) | 41 | (declare-function org-mark-ring-push "org" (&optional pos buffer)) |
| 42 | (declare-function org-strip-protective-commas "org" (beg end)) | ||
| 43 | (declare-function tramp-compat-make-temp-file "tramp-compat" | 42 | (declare-function tramp-compat-make-temp-file "tramp-compat" |
| 44 | (filename &optional dir-flag)) | 43 | (filename &optional dir-flag)) |
| 45 | (declare-function tramp-dissect-file-name "tramp" (name &optional nodefault)) | 44 | (declare-function tramp-dissect-file-name "tramp" (name &optional nodefault)) |
| @@ -64,7 +63,6 @@ | |||
| 64 | (declare-function org-cycle "org" (&optional arg)) | 63 | (declare-function org-cycle "org" (&optional arg)) |
| 65 | (declare-function org-uniquify "org" (list)) | 64 | (declare-function org-uniquify "org" (list)) |
| 66 | (declare-function org-current-level "org" ()) | 65 | (declare-function org-current-level "org" ()) |
| 67 | (declare-function org-strip-protective-commas "org" (beg end)) | ||
| 68 | (declare-function org-table-import "org-table" (file arg)) | 66 | (declare-function org-table-import "org-table" (file arg)) |
| 69 | (declare-function org-add-hook "org-compat" | 67 | (declare-function org-add-hook "org-compat" |
| 70 | (hook function &optional append local)) | 68 | (hook function &optional append local)) |
| @@ -87,10 +85,11 @@ | |||
| 87 | (declare-function org-list-struct "org-list" ()) | 85 | (declare-function org-list-struct "org-list" ()) |
| 88 | (declare-function org-list-prevs-alist "org-list" (struct)) | 86 | (declare-function org-list-prevs-alist "org-list" (struct)) |
| 89 | (declare-function org-list-get-list-end "org-list" (item struct prevs)) | 87 | (declare-function org-list-get-list-end "org-list" (item struct prevs)) |
| 90 | (declare-function org-strip-protective-commas "org" (beg end)) | ||
| 91 | (declare-function org-remove-if "org" (predicate seq)) | 88 | (declare-function org-remove-if "org" (predicate seq)) |
| 92 | (declare-function org-completing-read "org" (&rest args)) | 89 | (declare-function org-completing-read "org" (&rest args)) |
| 93 | (declare-function org-add-protective-commas "org-src" (beg end)) | 90 | (declare-function org-escape-code-in-region "org-src" (beg end)) |
| 91 | (declare-function org-unescape-code-in-string "org-src" (s)) | ||
| 92 | (declare-function org-table-to-lisp "org-table" (&optional txt)) | ||
| 94 | 93 | ||
| 95 | (defgroup org-babel nil | 94 | (defgroup org-babel nil |
| 96 | "Code block evaluation and management in `org-mode' documents." | 95 | "Code block evaluation and management in `org-mode' documents." |
| @@ -494,8 +493,8 @@ can not be resolved.") | |||
| 494 | 493 | ||
| 495 | ;;; functions | 494 | ;;; functions |
| 496 | (defvar call-process-region) | 495 | (defvar call-process-region) |
| 497 | ;;;###autoload | ||
| 498 | 496 | ||
| 497 | ;;;###autoload | ||
| 499 | (defun org-babel-execute-src-block (&optional arg info params) | 498 | (defun org-babel-execute-src-block (&optional arg info params) |
| 500 | "Execute the current source code block. | 499 | "Execute the current source code block. |
| 501 | Insert the results of execution into the buffer. Source code | 500 | Insert the results of execution into the buffer. Source code |
| @@ -838,6 +837,7 @@ evaluation mechanisms." | |||
| 838 | (key-binding (or key (read-key-sequence nil)))))) | 837 | (key-binding (or key (read-key-sequence nil)))))) |
| 839 | 838 | ||
| 840 | (defvar org-bracket-link-regexp) | 839 | (defvar org-bracket-link-regexp) |
| 840 | |||
| 841 | ;;;###autoload | 841 | ;;;###autoload |
| 842 | (defun org-babel-open-src-block-result (&optional re-run) | 842 | (defun org-babel-open-src-block-result (&optional re-run) |
| 843 | "If `point' is on a src block then open the results of the | 843 | "If `point' is on a src block then open the results of the |
| @@ -944,6 +944,7 @@ buffer." | |||
| 944 | (def-edebug-spec org-babel-map-inline-src-blocks (form body)) | 944 | (def-edebug-spec org-babel-map-inline-src-blocks (form body)) |
| 945 | 945 | ||
| 946 | (defvar org-babel-lob-one-liner-regexp) | 946 | (defvar org-babel-lob-one-liner-regexp) |
| 947 | |||
| 947 | ;;;###autoload | 948 | ;;;###autoload |
| 948 | (defmacro org-babel-map-call-lines (file &rest body) | 949 | (defmacro org-babel-map-call-lines (file &rest body) |
| 949 | "Evaluate BODY forms on each call line in FILE. | 950 | "Evaluate BODY forms on each call line in FILE. |
| @@ -1241,7 +1242,7 @@ may be specified in the properties of the current outline entry." | |||
| 1241 | ;; get block body less properties, protective commas, and indentation | 1242 | ;; get block body less properties, protective commas, and indentation |
| 1242 | (with-temp-buffer | 1243 | (with-temp-buffer |
| 1243 | (save-match-data | 1244 | (save-match-data |
| 1244 | (insert (org-babel-strip-protective-commas body lang)) | 1245 | (insert (org-unescape-code-in-string body)) |
| 1245 | (unless preserve-indentation (org-do-remove-indentation)) | 1246 | (unless preserve-indentation (org-do-remove-indentation)) |
| 1246 | (buffer-string))) | 1247 | (buffer-string))) |
| 1247 | (org-babel-merge-params | 1248 | (org-babel-merge-params |
| @@ -1258,8 +1259,7 @@ may be specified in the properties of the current outline entry." | |||
| 1258 | (let* ((lang (org-no-properties (match-string 2))) | 1259 | (let* ((lang (org-no-properties (match-string 2))) |
| 1259 | (lang-headers (intern (concat "org-babel-default-header-args:" lang)))) | 1260 | (lang-headers (intern (concat "org-babel-default-header-args:" lang)))) |
| 1260 | (list lang | 1261 | (list lang |
| 1261 | (org-babel-strip-protective-commas | 1262 | (org-unescape-code-in-string (org-no-properties (match-string 5))) |
| 1262 | (org-no-properties (match-string 5)) lang) | ||
| 1263 | (org-babel-merge-params | 1263 | (org-babel-merge-params |
| 1264 | org-babel-default-inline-header-args | 1264 | org-babel-default-inline-header-args |
| 1265 | (org-babel-params-from-properties lang) | 1265 | (org-babel-params-from-properties lang) |
| @@ -1937,10 +1937,10 @@ code ---- the results are extracted in the syntax of the source | |||
| 1937 | ((member "prepend" result-params)))) ; already there | 1937 | ((member "prepend" result-params)))) ; already there |
| 1938 | (setq results-switches | 1938 | (setq results-switches |
| 1939 | (if results-switches (concat " " results-switches) "")) | 1939 | (if results-switches (concat " " results-switches) "")) |
| 1940 | (let ((wrap (lambda (start finish &optional escape) | 1940 | (let ((wrap (lambda (start finish) |
| 1941 | (goto-char end) (insert (concat finish "\n")) | 1941 | (goto-char end) (insert (concat finish "\n")) |
| 1942 | (goto-char beg) (insert (concat start "\n")) | 1942 | (goto-char beg) (insert (concat start "\n")) |
| 1943 | (if escape (org-add-protective-commas (point) end)) | 1943 | (org-escape-code-in-region (point) end) |
| 1944 | (goto-char end) (goto-char (point-at-eol)) | 1944 | (goto-char end) (goto-char (point-at-eol)) |
| 1945 | (setq end (point-marker)))) | 1945 | (setq end (point-marker)))) |
| 1946 | (proper-list-p (lambda (it) (and (listp it) (null (cdr (last it))))))) | 1946 | (proper-list-p (lambda (it) (and (listp it) (null (cdr (last it))))))) |
| @@ -1987,7 +1987,7 @@ code ---- the results are extracted in the syntax of the source | |||
| 1987 | ((member "latex" result-params) | 1987 | ((member "latex" result-params) |
| 1988 | (funcall wrap "#+BEGIN_LaTeX" "#+END_LaTeX")) | 1988 | (funcall wrap "#+BEGIN_LaTeX" "#+END_LaTeX")) |
| 1989 | ((member "org" result-params) | 1989 | ((member "org" result-params) |
| 1990 | (funcall wrap "#+BEGIN_SRC org" "#+END_SRC" 'escape)) | 1990 | (funcall wrap "#+BEGIN_SRC org" "#+END_SRC")) |
| 1991 | ((member "code" result-params) | 1991 | ((member "code" result-params) |
| 1992 | (funcall wrap (format "#+BEGIN_SRC %s%s" (or lang "none") results-switches) | 1992 | (funcall wrap (format "#+BEGIN_SRC %s%s" (or lang "none") results-switches) |
| 1993 | "#+END_SRC")) | 1993 | "#+END_SRC")) |
| @@ -2370,17 +2370,6 @@ block but are passed literally to the \"example-block\"." | |||
| 2370 | (funcall nb-add (buffer-substring index (point-max)))) | 2370 | (funcall nb-add (buffer-substring index (point-max)))) |
| 2371 | new-body)) | 2371 | new-body)) |
| 2372 | 2372 | ||
| 2373 | (defun org-babel-strip-protective-commas (body &optional lang) | ||
| 2374 | "Strip protective commas from bodies of source blocks." | ||
| 2375 | (with-temp-buffer | ||
| 2376 | (insert body) | ||
| 2377 | (if (and lang (string= lang "org")) | ||
| 2378 | (progn (goto-char (point-min)) | ||
| 2379 | (while (re-search-forward "^[ \t]*\\(,\\)" nil t) | ||
| 2380 | (replace-match "" nil nil nil 1))) | ||
| 2381 | (org-strip-protective-commas (point-min) (point-max))) | ||
| 2382 | (buffer-string))) | ||
| 2383 | |||
| 2384 | (defun org-babel-script-escape (str &optional force) | 2373 | (defun org-babel-script-escape (str &optional force) |
| 2385 | "Safely convert tables into elisp lists." | 2374 | "Safely convert tables into elisp lists." |
| 2386 | (let (in-single in-double out) | 2375 | (let (in-single in-double out) |
| @@ -2599,6 +2588,8 @@ of `org-babel-temporary-directory'." | |||
| 2599 | 2588 | ||
| 2600 | (provide 'ob) | 2589 | (provide 'ob) |
| 2601 | 2590 | ||
| 2602 | 2591 | ;; Local variables: | |
| 2592 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 2593 | ;; End: | ||
| 2603 | 2594 | ||
| 2604 | ;;; ob.el ends here | 2595 | ;;; ob.el ends here |
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 32fecde2af0..36f3fcb9974 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el | |||
| @@ -1871,6 +1871,7 @@ When nil, `q' will kill the single agenda buffer." | |||
| 1871 | :version "24.3" | 1871 | :version "24.3" |
| 1872 | :type 'boolean) | 1872 | :type 'boolean) |
| 1873 | 1873 | ||
| 1874 | |||
| 1874 | ;;;###autoload | 1875 | ;;;###autoload |
| 1875 | (defun org-toggle-sticky-agenda (&optional arg) | 1876 | (defun org-toggle-sticky-agenda (&optional arg) |
| 1876 | "Toggle `org-agenda-sticky'." | 1877 | "Toggle `org-agenda-sticky'." |
| @@ -1888,6 +1889,11 @@ When nil, `q' will kill the single agenda buffer." | |||
| 1888 | (message "Sticky agenda was %s" | 1889 | (message "Sticky agenda was %s" |
| 1889 | (if org-agenda-sticky "enabled" "disabled")))))) | 1890 | (if org-agenda-sticky "enabled" "disabled")))))) |
| 1890 | 1891 | ||
| 1892 | (autoload 'org-toggle-sticky-agenda "org-agenda" "\ | ||
| 1893 | Toggle `org-agenda-sticky'. | ||
| 1894 | |||
| 1895 | \(fn &optional ARG)" t nil) | ||
| 1896 | |||
| 1891 | (defvar org-agenda-buffer nil | 1897 | (defvar org-agenda-buffer nil |
| 1892 | "Agenda buffer currently being generated.") | 1898 | "Agenda buffer currently being generated.") |
| 1893 | 1899 | ||
| @@ -2563,6 +2569,43 @@ Pressing `<' twice means to restrict to the current subtree or region | |||
| 2563 | ((equal org-keys "!") (customize-variable 'org-stuck-projects)) | 2569 | ((equal org-keys "!") (customize-variable 'org-stuck-projects)) |
| 2564 | (t (error "Invalid agenda key")))))) | 2570 | (t (error "Invalid agenda key")))))) |
| 2565 | 2571 | ||
| 2572 | (autoload 'org-agenda "org-agenda" "\ | ||
| 2573 | Dispatch agenda commands to collect entries to the agenda buffer. | ||
| 2574 | Prompts for a command to execute. Any prefix arg will be passed | ||
| 2575 | on to the selected command. The default selections are: | ||
| 2576 | |||
| 2577 | a Call `org-agenda-list' to display the agenda for current day or week. | ||
| 2578 | t Call `org-todo-list' to display the global todo list. | ||
| 2579 | T Call `org-todo-list' to display the global todo list, select only | ||
| 2580 | entries with a specific TODO keyword (the user gets a prompt). | ||
| 2581 | m Call `org-tags-view' to display headlines with tags matching | ||
| 2582 | a condition (the user is prompted for the condition). | ||
| 2583 | M Like `m', but select only TODO entries, no ordinary headlines. | ||
| 2584 | L Create a timeline for the current buffer. | ||
| 2585 | e Export views to associated files. | ||
| 2586 | s Search entries for keywords. | ||
| 2587 | S Search entries for keywords, only with TODO keywords. | ||
| 2588 | / Multi occur across all agenda files and also files listed | ||
| 2589 | in `org-agenda-text-search-extra-files'. | ||
| 2590 | < Restrict agenda commands to buffer, subtree, or region. | ||
| 2591 | Press several times to get the desired effect. | ||
| 2592 | > Remove a previous restriction. | ||
| 2593 | # List \"stuck\" projects. | ||
| 2594 | ! Configure what \"stuck\" means. | ||
| 2595 | C Configure custom agenda commands. | ||
| 2596 | |||
| 2597 | More commands can be added by configuring the variable | ||
| 2598 | `org-agenda-custom-commands'. In particular, specific tags and TODO keyword | ||
| 2599 | searches can be pre-defined in this way. | ||
| 2600 | |||
| 2601 | If the current buffer is in Org-mode and visiting a file, you can also | ||
| 2602 | first press `<' once to indicate that the agenda should be temporarily | ||
| 2603 | \(until the next use of \\[org-agenda]) restricted to the current file. | ||
| 2604 | Pressing `<' twice means to restrict to the current subtree or region | ||
| 2605 | \(if active). | ||
| 2606 | |||
| 2607 | \(fn &optional ARG ORG-KEYS RESTRICTION)" t nil) | ||
| 2608 | |||
| 2566 | (defun org-agenda-append-agenda () | 2609 | (defun org-agenda-append-agenda () |
| 2567 | "Append another agenda view to the current one. | 2610 | "Append another agenda view to the current one. |
| 2568 | This function allows interactive building of block agendas. | 2611 | This function allows interactive building of block agendas. |
| @@ -2857,6 +2900,16 @@ before running the agenda command." | |||
| 2857 | (org-agenda nil cmd-key))) | 2900 | (org-agenda nil cmd-key))) |
| 2858 | (set-buffer org-agenda-buffer-name) | 2901 | (set-buffer org-agenda-buffer-name) |
| 2859 | (princ (buffer-string))) | 2902 | (princ (buffer-string))) |
| 2903 | |||
| 2904 | (autoload 'org-batch-agenda "org-agenda" "\ | ||
| 2905 | Run an agenda command in batch mode and send the result to STDOUT. | ||
| 2906 | If CMD-KEY is a string of length 1, it is used as a key in | ||
| 2907 | `org-agenda-custom-commands' and triggers this command. If it is a | ||
| 2908 | longer string it is used as a tags/todo match string. | ||
| 2909 | Parameters are alternating variable names and values that will be bound | ||
| 2910 | before running the agenda command. | ||
| 2911 | |||
| 2912 | \(fn CMD-KEY &rest PARAMETERS)" nil t) | ||
| 2860 | (def-edebug-spec org-batch-agenda (form &rest sexp)) | 2913 | (def-edebug-spec org-batch-agenda (form &rest sexp)) |
| 2861 | 2914 | ||
| 2862 | (defvar org-agenda-info nil) | 2915 | (defvar org-agenda-info nil) |
| @@ -2915,6 +2968,43 @@ agenda-day The day in the agenda where this is listed" | |||
| 2915 | priority-letter priority agenda-day) | 2968 | priority-letter priority agenda-day) |
| 2916 | ",")) | 2969 | ",")) |
| 2917 | (princ "\n"))))) | 2970 | (princ "\n"))))) |
| 2971 | |||
| 2972 | (autoload 'org-batch-agenda-csv "org-agenda" "\ | ||
| 2973 | Run an agenda command in batch mode and send the result to STDOUT. | ||
| 2974 | If CMD-KEY is a string of length 1, it is used as a key in | ||
| 2975 | `org-agenda-custom-commands' and triggers this command. If it is a | ||
| 2976 | longer string it is used as a tags/todo match string. | ||
| 2977 | Parameters are alternating variable names and values that will be bound | ||
| 2978 | before running the agenda command. | ||
| 2979 | |||
| 2980 | The output gives a line for each selected agenda item. Each | ||
| 2981 | item is a list of comma-separated values, like this: | ||
| 2982 | |||
| 2983 | category,head,type,todo,tags,date,time,extra,priority-l,priority-n | ||
| 2984 | |||
| 2985 | category The category of the item | ||
| 2986 | head The headline, without TODO kwd, TAGS and PRIORITY | ||
| 2987 | type The type of the agenda entry, can be | ||
| 2988 | todo selected in TODO match | ||
| 2989 | tagsmatch selected in tags match | ||
| 2990 | diary imported from diary | ||
| 2991 | deadline a deadline on given date | ||
| 2992 | scheduled scheduled on given date | ||
| 2993 | timestamp entry has timestamp on given date | ||
| 2994 | closed entry was closed on given date | ||
| 2995 | upcoming-deadline warning about deadline | ||
| 2996 | past-scheduled forwarded scheduled item | ||
| 2997 | block entry has date block including g. date | ||
| 2998 | todo The todo keyword, if any | ||
| 2999 | tags All tags including inherited ones, separated by colons | ||
| 3000 | date The relevant date, like 2007-2-14 | ||
| 3001 | time The time, like 15:00-16:50 | ||
| 3002 | extra Sting with extra planning info | ||
| 3003 | priority-l The priority letter if any was given | ||
| 3004 | priority-n The computed numerical priority | ||
| 3005 | agenda-day The day in the agenda where this is listed | ||
| 3006 | |||
| 3007 | \(fn CMD-KEY &rest PARAMETERS)" nil t) | ||
| 2918 | (def-edebug-spec org-batch-agenda-csv (form &rest sexp)) | 3008 | (def-edebug-spec org-batch-agenda-csv (form &rest sexp)) |
| 2919 | 3009 | ||
| 2920 | (defun org-fix-agenda-info (props) | 3010 | (defun org-fix-agenda-info (props) |
| @@ -2964,6 +3054,11 @@ This ensures the export commands can easily use it." | |||
| 2964 | (interactive) | 3054 | (interactive) |
| 2965 | (eval (list 'org-batch-store-agenda-views))) | 3055 | (eval (list 'org-batch-store-agenda-views))) |
| 2966 | 3056 | ||
| 3057 | (autoload 'org-store-agenda-views "org-agenda" "\ | ||
| 3058 | |||
| 3059 | |||
| 3060 | \(fn &rest PARAMETERS)" t nil) | ||
| 3061 | |||
| 2967 | ;;;###autoload | 3062 | ;;;###autoload |
| 2968 | (defmacro org-batch-store-agenda-views (&rest parameters) | 3063 | (defmacro org-batch-store-agenda-views (&rest parameters) |
| 2969 | "Run all custom agenda commands that have a file argument." | 3064 | "Run all custom agenda commands that have a file argument." |
| @@ -2998,6 +3093,11 @@ This ensures the export commands can easily use it." | |||
| 2998 | (org-agenda-write (expand-file-name (pop files) dir) nil t bufname))) | 3093 | (org-agenda-write (expand-file-name (pop files) dir) nil t bufname))) |
| 2999 | (and (get-buffer bufname) | 3094 | (and (get-buffer bufname) |
| 3000 | (kill-buffer bufname))))))) | 3095 | (kill-buffer bufname))))))) |
| 3096 | |||
| 3097 | (autoload 'org-batch-store-agenda-views "org-agenda" "\ | ||
| 3098 | Run all custom agenda commands that have a file argument. | ||
| 3099 | |||
| 3100 | \(fn &rest PARAMETERS)" nil t) | ||
| 3001 | (def-edebug-spec org-batch-store-agenda-views (&rest sexp)) | 3101 | (def-edebug-spec org-batch-store-agenda-views (&rest sexp)) |
| 3002 | 3102 | ||
| 3003 | (defvar org-agenda-current-span nil | 3103 | (defvar org-agenda-current-span nil |
| @@ -4002,7 +4102,7 @@ given in `org-agenda-start-on-weekday'." | |||
| 4002 | "" | 4102 | "" |
| 4003 | x)) | 4103 | x)) |
| 4004 | filter "")))) | 4104 | filter "")))) |
| 4005 | (setq tbl (apply 'org-get-clocktable p)) | 4105 | (setq tbl (apply 'org-clock-get-clocktable p)) |
| 4006 | (insert tbl))) | 4106 | (insert tbl))) |
| 4007 | (goto-char (point-min)) | 4107 | (goto-char (point-min)) |
| 4008 | (or org-agenda-multi (org-agenda-fit-window-to-buffer)) | 4108 | (or org-agenda-multi (org-agenda-fit-window-to-buffer)) |
| @@ -4026,6 +4126,20 @@ given in `org-agenda-start-on-weekday'." | |||
| 4026 | (setq buffer-read-only t) | 4126 | (setq buffer-read-only t) |
| 4027 | (message "")))) | 4127 | (message "")))) |
| 4028 | 4128 | ||
| 4129 | (autoload 'org-agenda-list "org-agenda" "\ | ||
| 4130 | Produce a daily/weekly view from all files in variable `org-agenda-files'. | ||
| 4131 | The view will be for the current day or week, but from the overview buffer | ||
| 4132 | you will be able to go to other days/weeks. | ||
| 4133 | |||
| 4134 | With a numeric prefix argument in an interactive call, the agenda will | ||
| 4135 | span ARG days. Lisp programs should instead specify SPAN to change | ||
| 4136 | the number of days. SPAN defaults to `org-agenda-span'. | ||
| 4137 | |||
| 4138 | START-DAY defaults to TODAY, or to the most recent match for the weekday | ||
| 4139 | given in `org-agenda-start-on-weekday'. | ||
| 4140 | |||
| 4141 | \(fn &optional ARG START-DAY SPAN)" t nil) | ||
| 4142 | |||
| 4029 | (defun org-agenda-ndays-to-span (n) | 4143 | (defun org-agenda-ndays-to-span (n) |
| 4030 | "Return a span symbol for a span of N days, or N if none matches." | 4144 | "Return a span symbol for a span of N days, or N if none matches." |
| 4031 | (cond ((symbolp n) n) | 4145 | (cond ((symbolp n) n) |
| @@ -4328,6 +4442,52 @@ in `org-agenda-text-search-extra-files'." | |||
| 4328 | (org-agenda-finalize) | 4442 | (org-agenda-finalize) |
| 4329 | (setq buffer-read-only t)))) | 4443 | (setq buffer-read-only t)))) |
| 4330 | 4444 | ||
| 4445 | (autoload 'org-search-view "org-agenda" "\ | ||
| 4446 | Show all entries that contain a phrase or words or regular expressions. | ||
| 4447 | |||
| 4448 | With optional prefix argument TODO-ONLY, only consider entries that are | ||
| 4449 | TODO entries. The argument STRING can be used to pass a default search | ||
| 4450 | string into this function. If EDIT-AT is non-nil, it means that the | ||
| 4451 | user should get a chance to edit this string, with cursor at position | ||
| 4452 | EDIT-AT. | ||
| 4453 | |||
| 4454 | The search string can be viewed either as a phrase that should be found as | ||
| 4455 | is, or it can be broken into a number of snippets, each of which must match | ||
| 4456 | in a Boolean way to select an entry. The default depends on the variable | ||
| 4457 | `org-agenda-search-view-always-boolean'. | ||
| 4458 | Even if this is turned off (the default) you can always switch to | ||
| 4459 | Boolean search dynamically by preceding the first word with \"+\" or \"-\". | ||
| 4460 | |||
| 4461 | The default is a direct search of the whole phrase, where each space in | ||
| 4462 | the search string can expand to an arbitrary amount of whitespace, | ||
| 4463 | including newlines. | ||
| 4464 | |||
| 4465 | If using a Boolean search, the search string is split on whitespace and | ||
| 4466 | each snippet is searched separately, with logical AND to select an entry. | ||
| 4467 | Words prefixed with a minus must *not* occur in the entry. Words without | ||
| 4468 | a prefix or prefixed with a plus must occur in the entry. Matching is | ||
| 4469 | case-insensitive. Words are enclosed by word delimiters (i.e. they must | ||
| 4470 | match whole words, not parts of a word) if | ||
| 4471 | `org-agenda-search-view-force-full-words' is set (default is nil). | ||
| 4472 | |||
| 4473 | Boolean search snippets enclosed by curly braces are interpreted as | ||
| 4474 | regular expressions that must or (when preceded with \"-\") must not | ||
| 4475 | match in the entry. Snippets enclosed into double quotes will be taken | ||
| 4476 | as a whole, to include whitespace. | ||
| 4477 | |||
| 4478 | - If the search string starts with an asterisk, search only in headlines. | ||
| 4479 | - If (possibly after the leading star) the search string starts with an | ||
| 4480 | exclamation mark, this also means to look at TODO entries only, an effect | ||
| 4481 | that can also be achieved with a prefix argument. | ||
| 4482 | - If (possibly after star and exclamation mark) the search string starts | ||
| 4483 | with a colon, this will mean that the (non-regexp) snippets of the | ||
| 4484 | Boolean search must match as full words. | ||
| 4485 | |||
| 4486 | This command searches the agenda files, and in addition the files listed | ||
| 4487 | in `org-agenda-text-search-extra-files'. | ||
| 4488 | |||
| 4489 | \(fn &optional TODO-ONLY STRING EDIT-AT)" t nil) | ||
| 4490 | |||
| 4331 | ;;; Agenda TODO list | 4491 | ;;; Agenda TODO list |
| 4332 | 4492 | ||
| 4333 | (defvar org-select-this-todo-keyword nil) | 4493 | (defvar org-select-this-todo-keyword nil) |
| @@ -4418,6 +4578,15 @@ for a keyword. A numeric prefix directly selects the Nth keyword in | |||
| 4418 | (org-agenda-finalize) | 4578 | (org-agenda-finalize) |
| 4419 | (setq buffer-read-only t)))) | 4579 | (setq buffer-read-only t)))) |
| 4420 | 4580 | ||
| 4581 | (autoload 'org-todo-list "org-agenda" "\ | ||
| 4582 | Show all (not done) TODO entries from all agenda file in a single list. | ||
| 4583 | The prefix arg can be used to select a specific TODO keyword and limit | ||
| 4584 | the list to these. When using \\[universal-argument], you will be prompted | ||
| 4585 | for a keyword. A numeric prefix directly selects the Nth keyword in | ||
| 4586 | `org-todo-keywords-1'. | ||
| 4587 | |||
| 4588 | \(fn &optional ARG)" t nil) | ||
| 4589 | |||
| 4421 | ;;; Agenda tags match | 4590 | ;;; Agenda tags match |
| 4422 | 4591 | ||
| 4423 | ;;;###autoload | 4592 | ;;;###autoload |
| @@ -4503,6 +4672,12 @@ The prefix arg TODO-ONLY limits the search to TODO entries." | |||
| 4503 | (org-agenda-finalize) | 4672 | (org-agenda-finalize) |
| 4504 | (setq buffer-read-only t)))) | 4673 | (setq buffer-read-only t)))) |
| 4505 | 4674 | ||
| 4675 | (autoload 'org-tags-view "org-agenda" "\ | ||
| 4676 | Show all headlines for all `org-agenda-files' matching a TAGS criterion. | ||
| 4677 | The prefix arg TODO-ONLY limits the search to TODO entries. | ||
| 4678 | |||
| 4679 | \(fn &optional TODO-ONLY MATCH)" t nil) | ||
| 4680 | |||
| 4506 | ;;; Agenda Finding stuck projects | 4681 | ;;; Agenda Finding stuck projects |
| 4507 | 4682 | ||
| 4508 | (defvar org-agenda-skip-regexp nil | 4683 | (defvar org-agenda-skip-regexp nil |
| @@ -4731,6 +4906,14 @@ of what a project is and how to check if it stuck, customize the variable | |||
| 4731 | (setq org-agenda-redo-command | 4906 | (setq org-agenda-redo-command |
| 4732 | `(org-agenda-list-stuck-projects ,current-prefix-arg))))) | 4907 | `(org-agenda-list-stuck-projects ,current-prefix-arg))))) |
| 4733 | 4908 | ||
| 4909 | (autoload 'org-agenda-list-stuck-projects "org-agenda" "\ | ||
| 4910 | Create agenda view for projects that are stuck. | ||
| 4911 | Stuck projects are project that have no next actions. For the definitions | ||
| 4912 | of what a project is and how to check if it stuck, customize the variable | ||
| 4913 | `org-stuck-projects'. | ||
| 4914 | |||
| 4915 | \(fn &rest IGNORE)" t nil) | ||
| 4916 | |||
| 4734 | ;;; Diary integration | 4917 | ;;; Diary integration |
| 4735 | 4918 | ||
| 4736 | (defvar org-disable-agenda-to-diary nil) ;Dynamically-scoped param. | 4919 | (defvar org-disable-agenda-to-diary nil) ;Dynamically-scoped param. |
| @@ -4909,6 +5092,35 @@ function from a program - use `org-agenda-get-day-entries' instead." | |||
| 4909 | (if results | 5092 | (if results |
| 4910 | (concat (org-agenda-finalize-entries results) "\n")))) | 5093 | (concat (org-agenda-finalize-entries results) "\n")))) |
| 4911 | 5094 | ||
| 5095 | (autoload 'org-diary "org-agenda" "\ | ||
| 5096 | Return diary information from org files. | ||
| 5097 | This function can be used in a \"sexp\" diary entry in the Emacs calendar. | ||
| 5098 | It accesses org files and extracts information from those files to be | ||
| 5099 | listed in the diary. The function accepts arguments specifying what | ||
| 5100 | items should be listed. For a list of arguments allowed here, see the | ||
| 5101 | variable `org-agenda-entry-types'. | ||
| 5102 | |||
| 5103 | The call in the diary file should look like this: | ||
| 5104 | |||
| 5105 | &%%(org-diary) ~/path/to/some/orgfile.org | ||
| 5106 | |||
| 5107 | Use a separate line for each org file to check. Or, if you omit the file name, | ||
| 5108 | all files listed in `org-agenda-files' will be checked automatically: | ||
| 5109 | |||
| 5110 | &%%(org-diary) | ||
| 5111 | |||
| 5112 | If you don't give any arguments (as in the example above), the default | ||
| 5113 | arguments (:deadline :scheduled :timestamp :sexp) are used. | ||
| 5114 | So the example above may also be written as | ||
| 5115 | |||
| 5116 | &%%(org-diary :deadline :timestamp :sexp :scheduled) | ||
| 5117 | |||
| 5118 | The function expects the lisp variables `entry' and `date' to be provided | ||
| 5119 | by the caller, because this is how the calendar works. Don't use this | ||
| 5120 | function from a program - use `org-agenda-get-day-entries' instead. | ||
| 5121 | |||
| 5122 | \(fn &rest ARGS)" nil nil) | ||
| 5123 | |||
| 4912 | ;;; Agenda entry finders | 5124 | ;;; Agenda entry finders |
| 4913 | 5125 | ||
| 4914 | (defun org-agenda-get-day-entries (file date &rest args) | 5126 | (defun org-agenda-get-day-entries (file date &rest args) |
| @@ -5035,7 +5247,6 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', | |||
| 5035 | (>= days n) | 5247 | (>= days n) |
| 5036 | (<= days n)))) | 5248 | (<= days n)))) |
| 5037 | 5249 | ||
| 5038 | ;;;###autoload | ||
| 5039 | (defun org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item | 5250 | (defun org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item |
| 5040 | (&optional end) | 5251 | (&optional end) |
| 5041 | "Do we have a reason to ignore this TODO entry because it has a time stamp?" | 5252 | "Do we have a reason to ignore this TODO entry because it has a time stamp?" |
| @@ -5098,6 +5309,11 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', | |||
| 5098 | (match-string 1) org-agenda-todo-ignore-timestamp)) | 5309 | (match-string 1) org-agenda-todo-ignore-timestamp)) |
| 5099 | (t)))))))))) | 5310 | (t)))))))))) |
| 5100 | 5311 | ||
| 5312 | (autoload 'org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item "org-agenda" "\ | ||
| 5313 | Do we have a reason to ignore this TODO entry because it has a time stamp? | ||
| 5314 | |||
| 5315 | \(fn &optional END)" nil nil) | ||
| 5316 | |||
| 5101 | (defconst org-agenda-no-heading-message | 5317 | (defconst org-agenda-no-heading-message |
| 5102 | "No heading for this item in buffer or region.") | 5318 | "No heading for this item in buffer or region.") |
| 5103 | 5319 | ||
| @@ -5133,12 +5349,13 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', | |||
| 5133 | "\\|\\(<%%\\(([^>\n]+)\\)>\\)")) | 5349 | "\\|\\(<%%\\(([^>\n]+)\\)>\\)")) |
| 5134 | marker hdmarker deadlinep scheduledp clockp closedp inactivep | 5350 | marker hdmarker deadlinep scheduledp clockp closedp inactivep |
| 5135 | donep tmp priority category category-pos ee txt timestr tags | 5351 | donep tmp priority category category-pos ee txt timestr tags |
| 5136 | b0 b3 e3 head todo-state end-of-match show-all warntime) | 5352 | b0 b3 e3 head todo-state end-of-match show-all warntime habitp) |
| 5137 | (goto-char (point-min)) | 5353 | (goto-char (point-min)) |
| 5138 | (while (setq end-of-match (re-search-forward regexp nil t)) | 5354 | (while (setq end-of-match (re-search-forward regexp nil t)) |
| 5139 | (setq b0 (match-beginning 0) | 5355 | (setq b0 (match-beginning 0) |
| 5140 | b3 (match-beginning 3) e3 (match-end 3) | 5356 | b3 (match-beginning 3) e3 (match-end 3) |
| 5141 | todo-state (save-match-data (ignore-errors (org-get-todo-state))) | 5357 | todo-state (save-match-data (ignore-errors (org-get-todo-state))) |
| 5358 | habitp (and (functionp 'org-is-habit-p) (save-match-data (org-is-habit-p))) | ||
| 5142 | show-all (or (eq org-agenda-repeating-timestamp-show-all t) | 5359 | show-all (or (eq org-agenda-repeating-timestamp-show-all t) |
| 5143 | (member todo-state | 5360 | (member todo-state |
| 5144 | org-agenda-repeating-timestamp-show-all))) | 5361 | org-agenda-repeating-timestamp-show-all))) |
| @@ -5190,7 +5407,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', | |||
| 5190 | (setq txt (org-agenda-format-item | 5407 | (setq txt (org-agenda-format-item |
| 5191 | (if inactivep org-agenda-inactive-leader nil) | 5408 | (if inactivep org-agenda-inactive-leader nil) |
| 5192 | head category tags timestr | 5409 | head category tags timestr |
| 5193 | remove-re t))) | 5410 | remove-re habitp))) |
| 5194 | (setq priority (org-get-priority txt)) | 5411 | (setq priority (org-get-priority txt)) |
| 5195 | (org-add-props txt props | 5412 | (org-add-props txt props |
| 5196 | 'org-marker marker 'org-hd-marker hdmarker) | 5413 | 'org-marker marker 'org-hd-marker hdmarker) |
| @@ -5237,7 +5454,8 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', | |||
| 5237 | tags (save-excursion (org-backward-heading-same-level 0) | 5454 | tags (save-excursion (org-backward-heading-same-level 0) |
| 5238 | (org-get-tags-at)) | 5455 | (org-get-tags-at)) |
| 5239 | todo-state (org-get-todo-state) | 5456 | todo-state (org-get-todo-state) |
| 5240 | warntime (org-entry-get (point) "APPT_WARNTIME")) | 5457 | warntime (org-entry-get (point) "APPT_WARNTIME") |
| 5458 | extra nil) | ||
| 5241 | 5459 | ||
| 5242 | (dolist (r (if (stringp result) | 5460 | (dolist (r (if (stringp result) |
| 5243 | (list result) | 5461 | (list result) |
| @@ -5848,7 +6066,7 @@ FRACTION is what fraction of the head-warning time has passed." | |||
| 5848 | (concat "<" start-time ">")) | 6066 | (concat "<" start-time ">")) |
| 5849 | ((= d2 d0) | 6067 | ((= d2 d0) |
| 5850 | (concat "<" end-time ">"))) | 6068 | (concat "<" end-time ">"))) |
| 5851 | remove-re t)))) | 6069 | remove-re)))) |
| 5852 | (org-add-props txt props | 6070 | (org-add-props txt props |
| 5853 | 'org-marker marker 'org-hd-marker hdmarker | 6071 | 'org-marker marker 'org-hd-marker hdmarker |
| 5854 | 'type "block" 'date date | 6072 | 'type "block" 'date date |
| @@ -7059,7 +7277,7 @@ Negative selection means regexp must not match for selection of an entry." | |||
| 7059 | (move-beginning-of-line 1))))) | 7277 | (move-beginning-of-line 1))))) |
| 7060 | 7278 | ||
| 7061 | (defun org-agenda-later (arg) | 7279 | (defun org-agenda-later (arg) |
| 7062 | "Go forward in time by thee current span. | 7280 | "Go forward in time by the current span. |
| 7063 | With prefix ARG, go forward that many times the current span." | 7281 | With prefix ARG, go forward that many times the current span." |
| 7064 | (interactive "p") | 7282 | (interactive "p") |
| 7065 | (org-agenda-check-type t 'agenda) | 7283 | (org-agenda-check-type t 'agenda) |
| @@ -7071,7 +7289,7 @@ With prefix ARG, go forward that many times the current span." | |||
| 7071 | greg2) | 7289 | greg2) |
| 7072 | (cond | 7290 | (cond |
| 7073 | ((numberp span) | 7291 | ((numberp span) |
| 7074 | (setq sd (+ span sd))) | 7292 | (setq sd (+ (* span arg) sd))) |
| 7075 | ((eq span 'day) | 7293 | ((eq span 'day) |
| 7076 | (setq sd (+ arg sd))) | 7294 | (setq sd (+ arg sd))) |
| 7077 | ((eq span 'week) | 7295 | ((eq span 'week) |
| @@ -8654,7 +8872,6 @@ When `org-agenda-diary-file' points to a file, | |||
| 8654 | `org-agenda-diary-entry-in-org-file' is called instead to create | 8872 | `org-agenda-diary-entry-in-org-file' is called instead to create |
| 8655 | entries in that Org-mode file." | 8873 | entries in that Org-mode file." |
| 8656 | (interactive) | 8874 | (interactive) |
| 8657 | (org-agenda-check-type t 'agenda 'timeline) | ||
| 8658 | (if (not (eq org-agenda-diary-file 'diary-file)) | 8875 | (if (not (eq org-agenda-diary-file 'diary-file)) |
| 8659 | (org-agenda-diary-entry-in-org-file) | 8876 | (org-agenda-diary-entry-in-org-file) |
| 8660 | (require 'diary-lib) | 8877 | (require 'diary-lib) |
| @@ -8765,6 +8982,12 @@ This is a command that has to be installed in `calendar-mode-map'." | |||
| 8765 | (calendar-cursor-to-date)) | 8982 | (calendar-cursor-to-date)) |
| 8766 | nil)) | 8983 | nil)) |
| 8767 | 8984 | ||
| 8985 | (autoload 'org-calendar-goto-agenda "org-agenda" "\ | ||
| 8986 | Compute the Org-mode agenda for the calendar date displayed at the cursor. | ||
| 8987 | This is a command that has to be installed in `calendar-mode-map'. | ||
| 8988 | |||
| 8989 | \(fn)" t nil) | ||
| 8990 | |||
| 8768 | (defun org-agenda-convert-date () | 8991 | (defun org-agenda-convert-date () |
| 8769 | (interactive) | 8992 | (interactive) |
| 8770 | (org-agenda-check-type t 'agenda 'timeline) | 8993 | (org-agenda-check-type t 'agenda 'timeline) |
| @@ -9207,6 +9430,40 @@ to override `appt-message-warning-time'." | |||
| 9207 | (message "No event to add") | 9430 | (message "No event to add") |
| 9208 | (message "Added %d event%s for today" cnt (if (> cnt 1) "s" ""))))) | 9431 | (message "Added %d event%s for today" cnt (if (> cnt 1) "s" ""))))) |
| 9209 | 9432 | ||
| 9433 | (autoload 'org-agenda-to-appt "org-agenda" "\ | ||
| 9434 | Activate appointments found in `org-agenda-files'. | ||
| 9435 | With a \\[universal-argument] prefix, refresh the list of | ||
| 9436 | appointments. | ||
| 9437 | |||
| 9438 | If FILTER is t, interactively prompt the user for a regular | ||
| 9439 | expression, and filter out entries that don't match it. | ||
| 9440 | |||
| 9441 | If FILTER is a string, use this string as a regular expression | ||
| 9442 | for filtering entries out. | ||
| 9443 | |||
| 9444 | If FILTER is a function, filter out entries against which | ||
| 9445 | calling the function returns nil. This function takes one | ||
| 9446 | argument: an entry from `org-agenda-get-day-entries'. | ||
| 9447 | |||
| 9448 | FILTER can also be an alist with the car of each cell being | ||
| 9449 | either 'headline or 'category. For example: | ||
| 9450 | |||
| 9451 | '((headline \"IMPORTANT\") | ||
| 9452 | (category \"Work\")) | ||
| 9453 | |||
| 9454 | will only add headlines containing IMPORTANT or headlines | ||
| 9455 | belonging to the \"Work\" category. | ||
| 9456 | |||
| 9457 | ARGS are symbols indicating what kind of entries to consider. | ||
| 9458 | By default `org-agenda-to-appt' will use :deadline, :scheduled | ||
| 9459 | and :timestamp entries. See the docstring of `org-diary' for | ||
| 9460 | details and examples. | ||
| 9461 | |||
| 9462 | If an entry as a APPT_WARNTIME property, its value will be used | ||
| 9463 | to override `appt-message-warning-time'. | ||
| 9464 | |||
| 9465 | \(fn &optional REFRESH FILTER &rest ARGS)" t nil) | ||
| 9466 | |||
| 9210 | (defun org-agenda-todayp (date) | 9467 | (defun org-agenda-todayp (date) |
| 9211 | "Does DATE mean today, when considering `org-extend-today-until'?" | 9468 | "Does DATE mean today, when considering `org-extend-today-until'?" |
| 9212 | (let ((today (org-today)) | 9469 | (let ((today (org-today)) |
diff --git a/lisp/org/org-archive.el b/lisp/org/org-archive.el index 29b883824ef..d41a1d38a89 100644 --- a/lisp/org/org-archive.el +++ b/lisp/org/org-archive.el | |||
| @@ -181,6 +181,7 @@ if LOCATION is not given, the value of `org-archive-location' is used." | |||
| 181 | (file-name-nondirectory | 181 | (file-name-nondirectory |
| 182 | (buffer-file-name (buffer-base-buffer)))))) | 182 | (buffer-file-name (buffer-base-buffer)))))) |
| 183 | 183 | ||
| 184 | ;;;###autoload | ||
| 184 | (defun org-archive-subtree (&optional find-done) | 185 | (defun org-archive-subtree (&optional find-done) |
| 185 | "Move the current subtree to the archive. | 186 | "Move the current subtree to the archive. |
| 186 | The archive can be a certain top-level heading in the current file, or in | 187 | The archive can be a certain top-level heading in the current file, or in |
| @@ -369,6 +370,7 @@ this heading." | |||
| 369 | (if (looking-at "^[ \t]*$") | 370 | (if (looking-at "^[ \t]*$") |
| 370 | (outline-next-visible-heading 1)))) | 371 | (outline-next-visible-heading 1)))) |
| 371 | 372 | ||
| 373 | ;;;###autoload | ||
| 372 | (defun org-archive-to-archive-sibling () | 374 | (defun org-archive-to-archive-sibling () |
| 373 | "Archive the current heading by moving it under the archive sibling. | 375 | "Archive the current heading by moving it under the archive sibling. |
| 374 | The archive sibling is a sibling of the heading with the heading name | 376 | The archive sibling is a sibling of the heading with the heading name |
| @@ -483,6 +485,7 @@ When TAG is non-nil, don't move trees, but mark them with the ARCHIVE tag." | |||
| 483 | (goto-char end))))) | 485 | (goto-char end))))) |
| 484 | (message "%d trees archived" cntarch))) | 486 | (message "%d trees archived" cntarch))) |
| 485 | 487 | ||
| 488 | ;;;###autoload | ||
| 486 | (defun org-toggle-archive-tag (&optional find-done) | 489 | (defun org-toggle-archive-tag (&optional find-done) |
| 487 | "Toggle the archive tag for the current headline. | 490 | "Toggle the archive tag for the current headline. |
| 488 | With prefix ARG, check all children of current headline and offer tagging | 491 | With prefix ARG, check all children of current headline and offer tagging |
| @@ -537,4 +540,8 @@ This command is set with the variable `org-archive-default-command'." | |||
| 537 | 540 | ||
| 538 | (provide 'org-archive) | 541 | (provide 'org-archive) |
| 539 | 542 | ||
| 543 | ;; Local variables: | ||
| 544 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 545 | ;; End: | ||
| 546 | |||
| 540 | ;;; org-archive.el ends here | 547 | ;;; org-archive.el ends here |
diff --git a/lisp/org/org-ascii.el b/lisp/org/org-ascii.el index 655b8db668d..575b830f2c0 100644 --- a/lisp/org/org-ascii.el +++ b/lisp/org/org-ascii.el | |||
| @@ -553,6 +553,7 @@ publishing directory." | |||
| 553 | (kill-buffer (current-buffer))) | 553 | (kill-buffer (current-buffer))) |
| 554 | (current-buffer)))) | 554 | (current-buffer)))) |
| 555 | 555 | ||
| 556 | ;;;###autoload | ||
| 556 | (defun org-export-ascii-preprocess (parameters) | 557 | (defun org-export-ascii-preprocess (parameters) |
| 557 | "Do extra work for ASCII export." | 558 | "Do extra work for ASCII export." |
| 558 | ;; | 559 | ;; |
| @@ -726,4 +727,8 @@ publishing directory." | |||
| 726 | 727 | ||
| 727 | (provide 'org-ascii) | 728 | (provide 'org-ascii) |
| 728 | 729 | ||
| 730 | ;; Local variables: | ||
| 731 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 732 | ;; End: | ||
| 733 | |||
| 729 | ;;; org-ascii.el ends here | 734 | ;;; org-ascii.el ends here |
diff --git a/lisp/org/org-attach.el b/lisp/org/org-attach.el index e02d7e07a4c..25bd6e89d97 100644 --- a/lisp/org/org-attach.el +++ b/lisp/org/org-attach.el | |||
| @@ -451,4 +451,8 @@ prefix." | |||
| 451 | 451 | ||
| 452 | (provide 'org-attach) | 452 | (provide 'org-attach) |
| 453 | 453 | ||
| 454 | ;; Local variables: | ||
| 455 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 456 | ;; End: | ||
| 457 | |||
| 454 | ;;; org-attach.el ends here | 458 | ;;; org-attach.el ends here |
diff --git a/lisp/org/org-bbdb.el b/lisp/org/org-bbdb.el index be395ad3927..0fcf27565d5 100644 --- a/lisp/org/org-bbdb.el +++ b/lisp/org/org-bbdb.el | |||
| @@ -338,7 +338,7 @@ This is used by Org to re-create the anniversary hash table." | |||
| 338 | (add-hook 'bbdb-after-change-hook 'org-bbdb-updated) | 338 | (add-hook 'bbdb-after-change-hook 'org-bbdb-updated) |
| 339 | 339 | ||
| 340 | ;;;###autoload | 340 | ;;;###autoload |
| 341 | (defun org-bbdb-anniversaries() | 341 | (defun org-bbdb-anniversaries () |
| 342 | "Extract anniversaries from BBDB for display in the agenda." | 342 | "Extract anniversaries from BBDB for display in the agenda." |
| 343 | (require 'bbdb) | 343 | (require 'bbdb) |
| 344 | (require 'diary-lib) | 344 | (require 'diary-lib) |
| @@ -433,4 +433,8 @@ END:VEVENT\n" | |||
| 433 | 433 | ||
| 434 | (provide 'org-bbdb) | 434 | (provide 'org-bbdb) |
| 435 | 435 | ||
| 436 | ;; Local variables: | ||
| 437 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 438 | ;; End: | ||
| 439 | |||
| 436 | ;;; org-bbdb.el ends here | 440 | ;;; org-bbdb.el ends here |
diff --git a/lisp/org/org-beamer.el b/lisp/org/org-beamer.el index b5f3013e000..73d15416e60 100644 --- a/lisp/org/org-beamer.el +++ b/lisp/org/org-beamer.el | |||
| @@ -228,7 +228,7 @@ the tag does not have any semantic meaning." | |||
| 228 | (org-entry-put nil "BEAMER_env" (match-string 1 tags))) | 228 | (org-entry-put nil "BEAMER_env" (match-string 1 tags))) |
| 229 | (t (org-entry-delete nil "BEAMER_env")))))) | 229 | (t (org-entry-delete nil "BEAMER_env")))))) |
| 230 | 230 | ||
| 231 | 231 | ;;;###autoload | |
| 232 | (defun org-beamer-sectioning (level text) | 232 | (defun org-beamer-sectioning (level text) |
| 233 | "Return the sectioning entry for the current headline. | 233 | "Return the sectioning entry for the current headline. |
| 234 | LEVEL is the reduced level of the headline. | 234 | LEVEL is the reduced level of the headline. |
| @@ -370,6 +370,7 @@ org-beamer-extra are all scoped into this function dynamically." | |||
| 370 | "The keymap for `org-beamer-mode'.") | 370 | "The keymap for `org-beamer-mode'.") |
| 371 | (define-key org-beamer-mode-map "\C-c\C-b" 'org-beamer-select-environment) | 371 | (define-key org-beamer-mode-map "\C-c\C-b" 'org-beamer-select-environment) |
| 372 | 372 | ||
| 373 | ;;;###autoload | ||
| 373 | (define-minor-mode org-beamer-mode | 374 | (define-minor-mode org-beamer-mode |
| 374 | "Special support for editing Org-mode files made to export to beamer." | 375 | "Special support for editing Org-mode files made to export to beamer." |
| 375 | nil " Bm" nil) | 376 | nil " Bm" nil) |
diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el index 9d20814a2ca..1dfffc6fe1d 100644 --- a/lisp/org/org-capture.el +++ b/lisp/org/org-capture.el | |||
| @@ -434,9 +434,10 @@ Turning on this mode runs the normal hook `org-capture-mode-hook'." | |||
| 434 | 434 | ||
| 435 | ;;; The main commands | 435 | ;;; The main commands |
| 436 | 436 | ||
| 437 | ;;;###autoload | ||
| 438 | (defvar org-capture-initial nil) | 437 | (defvar org-capture-initial nil) |
| 439 | (defvar org-capture-entry nil) | 438 | (defvar org-capture-entry nil) |
| 439 | |||
| 440 | ;;;###autoload | ||
| 440 | (defun org-capture-string (string &optional keys) | 441 | (defun org-capture-string (string &optional keys) |
| 441 | (interactive "sInitial text: \n") | 442 | (interactive "sInitial text: \n") |
| 442 | (let ((org-capture-initial string) | 443 | (let ((org-capture-initial string) |
| @@ -1249,7 +1250,8 @@ Of course, if exact position has been required, just put it there." | |||
| 1249 | (save-restriction | 1250 | (save-restriction |
| 1250 | (widen) | 1251 | (widen) |
| 1251 | (goto-char pos) | 1252 | (goto-char pos) |
| 1252 | (bookmark-set "org-capture-last-stored") | 1253 | (with-demoted-errors |
| 1254 | (bookmark-set "org-capture-last-stored")) | ||
| 1253 | (move-marker org-capture-last-stored-marker (point))))))) | 1255 | (move-marker org-capture-last-stored-marker (point))))))) |
| 1254 | 1256 | ||
| 1255 | (defun org-capture-narrow (beg end) | 1257 | (defun org-capture-narrow (beg end) |
| @@ -1280,7 +1282,7 @@ Point will remain at the first line after the inserted text." | |||
| 1280 | (goto-char pos))) | 1282 | (goto-char pos))) |
| 1281 | 1283 | ||
| 1282 | (defvar org-clock-marker) ; Defined in org.el | 1284 | (defvar org-clock-marker) ; Defined in org.el |
| 1283 | ;;;###autoload | 1285 | |
| 1284 | (defun org-capture-insert-template-here () | 1286 | (defun org-capture-insert-template-here () |
| 1285 | (let* ((template (org-capture-get :template)) | 1287 | (let* ((template (org-capture-get :template)) |
| 1286 | (type (org-capture-get :type)) | 1288 | (type (org-capture-get :type)) |
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index bb6f2b955b3..3f252fd8c32 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el | |||
| @@ -201,7 +201,10 @@ file name play this sound file. If not possible, fall back to beep" | |||
| 201 | (const :tag "Standard beep" t) | 201 | (const :tag "Standard beep" t) |
| 202 | (file :tag "Play sound file"))) | 202 | (file :tag "Play sound file"))) |
| 203 | 203 | ||
| 204 | (defcustom org-clock-modeline-total 'auto | 204 | (define-obsolete-variable-alias 'org-clock-modeline-total |
| 205 | 'org-clock-mode-line-total "24.3") | ||
| 206 | |||
| 207 | (defcustom org-clock-mode-line-total 'auto | ||
| 205 | "Default setting for the time included for the mode line clock. | 208 | "Default setting for the time included for the mode line clock. |
| 206 | This can be overruled locally using the CLOCK_MODELINE_TOTAL property. | 209 | This can be overruled locally using the CLOCK_MODELINE_TOTAL property. |
| 207 | Allowed values are: | 210 | Allowed values are: |
| @@ -962,6 +965,7 @@ to be CLOCKED OUT."))) | |||
| 962 | (not (memq ch '(?K ?G ?S ?C)))) | 965 | (not (memq ch '(?K ?G ?S ?C)))) |
| 963 | fail-quietly))))) | 966 | fail-quietly))))) |
| 964 | 967 | ||
| 968 | ;;;###autoload | ||
| 965 | (defun org-resolve-clocks (&optional only-dangling-p prompt-fn last-valid) | 969 | (defun org-resolve-clocks (&optional only-dangling-p prompt-fn last-valid) |
| 966 | "Resolve all currently open org-mode clocks. | 970 | "Resolve all currently open org-mode clocks. |
| 967 | If `only-dangling-p' is non-nil, only ask to resolve dangling | 971 | If `only-dangling-p' is non-nil, only ask to resolve dangling |
| @@ -1059,6 +1063,8 @@ so long." | |||
| 1059 | (setq org-clock-current-task nil)) | 1063 | (setq org-clock-current-task nil)) |
| 1060 | 1064 | ||
| 1061 | (defvar org-clock-out-time nil) ; store the time of the last clock-out | 1065 | (defvar org-clock-out-time nil) ; store the time of the last clock-out |
| 1066 | |||
| 1067 | ;;;###autoload | ||
| 1062 | (defun org-clock-in (&optional select start-time) | 1068 | (defun org-clock-in (&optional select start-time) |
| 1063 | "Start the clock on the current item. | 1069 | "Start the clock on the current item. |
| 1064 | If necessary, clock-out of the currently active clock. | 1070 | If necessary, clock-out of the currently active clock. |
| @@ -1132,7 +1138,6 @@ make this the default behavior.)" | |||
| 1132 | (if (and (eobp) (not (org-at-heading-p))) | 1138 | (if (and (eobp) (not (org-at-heading-p))) |
| 1133 | (point-at-bol 0) | 1139 | (point-at-bol 0) |
| 1134 | (point))) | 1140 | (point))) |
| 1135 | (run-hooks 'org-clock-in-prepare-hook) | ||
| 1136 | (save-excursion | 1141 | (save-excursion |
| 1137 | (when (and selected-task (marker-buffer selected-task)) | 1142 | (when (and selected-task (marker-buffer selected-task)) |
| 1138 | ;; There is a selected task, move to the correct buffer | 1143 | ;; There is a selected task, move to the correct buffer |
| @@ -1151,6 +1156,7 @@ make this the default behavior.)" | |||
| 1151 | ;; beginning of the heading, since the | 1156 | ;; beginning of the heading, since the |
| 1152 | ;; user is liking to insert stuff here | 1157 | ;; user is liking to insert stuff here |
| 1153 | ;; manually | 1158 | ;; manually |
| 1159 | (run-hooks 'org-clock-in-prepare-hook) | ||
| 1154 | (org-clock-history-push)) | 1160 | (org-clock-history-push)) |
| 1155 | (org-clock-set-current) | 1161 | (org-clock-set-current) |
| 1156 | (cond ((functionp org-clock-in-switch-to-state) | 1162 | (cond ((functionp org-clock-in-switch-to-state) |
| @@ -1310,10 +1316,10 @@ for a todo state to switch to, overriding the existing value | |||
| 1310 | This is for the currently running clock as it is displayed | 1316 | This is for the currently running clock as it is displayed |
| 1311 | in the mode line. This function looks at the properties | 1317 | in the mode line. This function looks at the properties |
| 1312 | LAST_REPEAT and in particular CLOCK_MODELINE_TOTAL and the | 1318 | LAST_REPEAT and in particular CLOCK_MODELINE_TOTAL and the |
| 1313 | corresponding variable `org-clock-modeline-total' and then | 1319 | corresponding variable `org-clock-mode-line-total' and then |
| 1314 | decides which time to use." | 1320 | decides which time to use." |
| 1315 | (let ((cmt (or (org-entry-get nil "CLOCK_MODELINE_TOTAL") | 1321 | (let ((cmt (or (org-entry-get nil "CLOCK_MODELINE_TOTAL") |
| 1316 | (symbol-name org-clock-modeline-total))) | 1322 | (symbol-name org-clock-mode-line-total))) |
| 1317 | (lr (org-entry-get nil "LAST_REPEAT"))) | 1323 | (lr (org-entry-get nil "LAST_REPEAT"))) |
| 1318 | (cond | 1324 | (cond |
| 1319 | ((equal cmt "current") | 1325 | ((equal cmt "current") |
| @@ -1428,6 +1434,7 @@ line and position cursor in that line." | |||
| 1428 | (and (re-search-forward org-property-end-re nil t) | 1434 | (and (re-search-forward org-property-end-re nil t) |
| 1429 | (goto-char (match-beginning 0)))))))) | 1435 | (goto-char (match-beginning 0)))))))) |
| 1430 | 1436 | ||
| 1437 | ;;;###autoload | ||
| 1431 | (defun org-clock-out (&optional switch-to-state fail-quietly at-time) | 1438 | (defun org-clock-out (&optional switch-to-state fail-quietly at-time) |
| 1432 | "Stop the currently running clock. | 1439 | "Stop the currently running clock. |
| 1433 | Throw an error if there is no running clock and FAIL-QUIETLY is nil. | 1440 | Throw an error if there is no running clock and FAIL-QUIETLY is nil. |
| @@ -1587,6 +1594,7 @@ UPDOWN tells whether to change 'up or 'down." | |||
| 1587 | ((eq org-ts-what 'year) (* 24 3600 365.2))))) | 1594 | ((eq org-ts-what 'year) (* 24 3600 365.2))))) |
| 1588 | org-ts-what 'updown))))))) | 1595 | org-ts-what 'updown))))))) |
| 1589 | 1596 | ||
| 1597 | ;;;###autoload | ||
| 1590 | (defun org-clock-cancel () | 1598 | (defun org-clock-cancel () |
| 1591 | "Cancel the running clock by removing the start timestamp." | 1599 | "Cancel the running clock by removing the start timestamp." |
| 1592 | (interactive) | 1600 | (interactive) |
| @@ -1613,6 +1621,7 @@ UPDOWN tells whether to change 'up or 'down." | |||
| 1613 | (message "Clock canceled") | 1621 | (message "Clock canceled") |
| 1614 | (run-hooks 'org-clock-cancel-hook)) | 1622 | (run-hooks 'org-clock-cancel-hook)) |
| 1615 | 1623 | ||
| 1624 | ;;;###autoload | ||
| 1616 | (defun org-clock-goto (&optional select) | 1625 | (defun org-clock-goto (&optional select) |
| 1617 | "Go to the currently clocked-in entry, or to the most recently clocked one. | 1626 | "Go to the currently clocked-in entry, or to the most recently clocked one. |
| 1618 | With prefix arg SELECT, offer recently clocked tasks for selection." | 1627 | With prefix arg SELECT, offer recently clocked tasks for selection." |
| @@ -1651,6 +1660,7 @@ With prefix arg SELECT, offer recently clocked tasks for selection." | |||
| 1651 | (let ((range (org-clock-special-range 'today))) | 1660 | (let ((range (org-clock-special-range 'today))) |
| 1652 | (org-clock-sum (car range) (cadr range) nil :org-clock-minutes-today))) | 1661 | (org-clock-sum (car range) (cadr range) nil :org-clock-minutes-today))) |
| 1653 | 1662 | ||
| 1663 | ;;;###autoload | ||
| 1654 | (defun org-clock-sum (&optional tstart tend headline-filter propname) | 1664 | (defun org-clock-sum (&optional tstart tend headline-filter propname) |
| 1655 | "Sum the times for each subtree. | 1665 | "Sum the times for each subtree. |
| 1656 | Puts the resulting times in minutes as a text property on each headline. | 1666 | Puts the resulting times in minutes as a text property on each headline. |
| @@ -1749,6 +1759,7 @@ PROPNAME lets you set a custom text property instead of :org-clock-minutes." | |||
| 1749 | (org-clock-sum tstart) | 1759 | (org-clock-sum tstart) |
| 1750 | org-clock-file-total-minutes))) | 1760 | org-clock-file-total-minutes))) |
| 1751 | 1761 | ||
| 1762 | ;;;###autoload | ||
| 1752 | (defun org-clock-display (&optional total-only) | 1763 | (defun org-clock-display (&optional total-only) |
| 1753 | "Show subtree times in the entire buffer. | 1764 | "Show subtree times in the entire buffer. |
| 1754 | If TOTAL-ONLY is non-nil, only show the total time for the entire file | 1765 | If TOTAL-ONLY is non-nil, only show the total time for the entire file |
| @@ -1859,7 +1870,7 @@ and is only done if the variable `org-clock-out-when-done' is not nil." | |||
| 1859 | 'org-clock-out-if-current) | 1870 | 'org-clock-out-if-current) |
| 1860 | 1871 | ||
| 1861 | ;;;###autoload | 1872 | ;;;###autoload |
| 1862 | (defun org-get-clocktable (&rest props) | 1873 | (defun org-clock-get-clocktable (&rest props) |
| 1863 | "Get a formatted clocktable with parameters according to PROPS. | 1874 | "Get a formatted clocktable with parameters according to PROPS. |
| 1864 | The table is created in a temporary buffer, fully formatted and | 1875 | The table is created in a temporary buffer, fully formatted and |
| 1865 | fontified, and then returned." | 1876 | fontified, and then returned." |
| @@ -1879,6 +1890,7 @@ fontified, and then returned." | |||
| 1879 | (re-search-forward "^[ \t]*#\\+END" nil t) | 1890 | (re-search-forward "^[ \t]*#\\+END" nil t) |
| 1880 | (point-at-bol))))) | 1891 | (point-at-bol))))) |
| 1881 | 1892 | ||
| 1893 | ;;;###autoload | ||
| 1882 | (defun org-clock-report (&optional arg) | 1894 | (defun org-clock-report (&optional arg) |
| 1883 | "Create a table containing a report about clocked time. | 1895 | "Create a table containing a report about clocked time. |
| 1884 | If the cursor is inside an existing clocktable block, then the table | 1896 | If the cursor is inside an existing clocktable block, then the table |
| @@ -2165,6 +2177,7 @@ the currently selected interval size." | |||
| 2165 | (org-update-dblock) | 2177 | (org-update-dblock) |
| 2166 | t))))) | 2178 | t))))) |
| 2167 | 2179 | ||
| 2180 | ;;;###autoload | ||
| 2168 | (defun org-dblock-write:clocktable (params) | 2181 | (defun org-dblock-write:clocktable (params) |
| 2169 | "Write the standard clocktable." | 2182 | "Write the standard clocktable." |
| 2170 | (setq params (org-combine-plists org-clocktable-defaults params)) | 2183 | (setq params (org-combine-plists org-clocktable-defaults params)) |
| @@ -2675,6 +2688,48 @@ This function is made for clock tables." | |||
| 2675 | (defvar org-clock-loaded nil | 2688 | (defvar org-clock-loaded nil |
| 2676 | "Was the clock file loaded?") | 2689 | "Was the clock file loaded?") |
| 2677 | 2690 | ||
| 2691 | (defun org-clock-update-time-maybe () | ||
| 2692 | "If this is a CLOCK line, update it and return t. | ||
| 2693 | Otherwise, return nil." | ||
| 2694 | (interactive) | ||
| 2695 | (save-excursion | ||
| 2696 | (beginning-of-line 1) | ||
| 2697 | (skip-chars-forward " \t") | ||
| 2698 | (when (looking-at org-clock-string) | ||
| 2699 | (let ((re (concat "[ \t]*" org-clock-string | ||
| 2700 | " *[[<]\\([^]>]+\\)[]>]\\(-+[[<]\\([^]>]+\\)[]>]" | ||
| 2701 | "\\([ \t]*=>.*\\)?\\)?")) | ||
| 2702 | ts te h m s neg) | ||
| 2703 | (cond | ||
| 2704 | ((not (looking-at re)) | ||
| 2705 | nil) | ||
| 2706 | ((not (match-end 2)) | ||
| 2707 | (when (and (equal (marker-buffer org-clock-marker) (current-buffer)) | ||
| 2708 | (> org-clock-marker (point)) | ||
| 2709 | (<= org-clock-marker (point-at-eol))) | ||
| 2710 | ;; The clock is running here | ||
| 2711 | (setq org-clock-start-time | ||
| 2712 | (apply 'encode-time | ||
| 2713 | (org-parse-time-string (match-string 1)))) | ||
| 2714 | (org-clock-update-mode-line))) | ||
| 2715 | (t | ||
| 2716 | (and (match-end 4) (delete-region (match-beginning 4) (match-end 4))) | ||
| 2717 | (end-of-line 1) | ||
| 2718 | (setq ts (match-string 1) | ||
| 2719 | te (match-string 3)) | ||
| 2720 | (setq s (- (org-float-time | ||
| 2721 | (apply 'encode-time (org-parse-time-string te))) | ||
| 2722 | (org-float-time | ||
| 2723 | (apply 'encode-time (org-parse-time-string ts)))) | ||
| 2724 | neg (< s 0) | ||
| 2725 | s (abs s) | ||
| 2726 | h (floor (/ s 3600)) | ||
| 2727 | s (- s (* 3600 h)) | ||
| 2728 | m (floor (/ s 60)) | ||
| 2729 | s (- s (* 60 s))) | ||
| 2730 | (insert " => " (format (if neg "-%d:%02d" "%2d:%02d") h m)) | ||
| 2731 | t)))))) | ||
| 2732 | |||
| 2678 | (defun org-clock-save () | 2733 | (defun org-clock-save () |
| 2679 | "Persist various clock-related data to disk. | 2734 | "Persist various clock-related data to disk. |
| 2680 | The details of what will be saved are regulated by the variable | 2735 | The details of what will be saved are regulated by the variable |
| @@ -2766,15 +2821,13 @@ The details of what will be saved are regulated by the variable | |||
| 2766 | (if (outline-invisible-p) | 2821 | (if (outline-invisible-p) |
| 2767 | (org-show-context)))))))))) | 2822 | (org-show-context)))))))))) |
| 2768 | 2823 | ||
| 2769 | ;;;###autoload | ||
| 2770 | (defun org-clock-persistence-insinuate () | ||
| 2771 | "Set up hooks for clock persistence." | ||
| 2772 | (add-hook 'org-mode-hook 'org-clock-load) | ||
| 2773 | (add-hook 'kill-emacs-hook 'org-clock-save)) | ||
| 2774 | |||
| 2775 | ;; Suggested bindings | 2824 | ;; Suggested bindings |
| 2776 | (org-defkey org-mode-map "\C-c\C-x\C-e" 'org-clock-modify-effort-estimate) | 2825 | (org-defkey org-mode-map "\C-c\C-x\C-e" 'org-clock-modify-effort-estimate) |
| 2777 | 2826 | ||
| 2778 | (provide 'org-clock) | 2827 | (provide 'org-clock) |
| 2779 | 2828 | ||
| 2829 | ;; Local variables: | ||
| 2830 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 2831 | ;; End: | ||
| 2832 | |||
| 2780 | ;;; org-clock.el ends here | 2833 | ;;; org-clock.el ends here |
diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el index e17210b7ff5..1be105d44fb 100644 --- a/lisp/org/org-colview.el +++ b/lisp/org/org-colview.el | |||
| @@ -686,6 +686,7 @@ around it." | |||
| 686 | (move-marker org-columns-top-level-marker org-entry-property-inherited-from) | 686 | (move-marker org-columns-top-level-marker org-entry-property-inherited-from) |
| 687 | (move-marker org-columns-top-level-marker (point)))) | 687 | (move-marker org-columns-top-level-marker (point)))) |
| 688 | 688 | ||
| 689 | ;;;###autoload | ||
| 689 | (defun org-columns (&optional columns-fmt-string) | 690 | (defun org-columns (&optional columns-fmt-string) |
| 690 | "Turn on column view on an org-mode file. | 691 | "Turn on column view on an org-mode file. |
| 691 | When COLUMNS-FMT-STRING is non-nil, use it as the column format." | 692 | When COLUMNS-FMT-STRING is non-nil, use it as the column format." |
| @@ -1222,6 +1223,7 @@ of fields." | |||
| 1222 | (push row tbl))))) | 1223 | (push row tbl))))) |
| 1223 | (append (list title 'hline) (nreverse tbl))))) | 1224 | (append (list title 'hline) (nreverse tbl))))) |
| 1224 | 1225 | ||
| 1226 | ;;;###autoload | ||
| 1225 | (defun org-dblock-write:columnview (params) | 1227 | (defun org-dblock-write:columnview (params) |
| 1226 | "Write the column view table. | 1228 | "Write the column view table. |
| 1227 | PARAMS is a property list of parameters: | 1229 | PARAMS is a property list of parameters: |
| @@ -1334,6 +1336,7 @@ and tailing newline characters." | |||
| 1334 | (t (error "Garbage in listtable: %s" x)))) | 1336 | (t (error "Garbage in listtable: %s" x)))) |
| 1335 | tbl "\n")) | 1337 | tbl "\n")) |
| 1336 | 1338 | ||
| 1339 | ;;;###autoload | ||
| 1337 | (defun org-insert-columns-dblock () | 1340 | (defun org-insert-columns-dblock () |
| 1338 | "Create a dynamic block capturing a column view table." | 1341 | "Create a dynamic block capturing a column view table." |
| 1339 | (interactive) | 1342 | (interactive) |
| @@ -1357,6 +1360,7 @@ and tailing newline characters." | |||
| 1357 | (defvar org-agenda-columns-compute-summary-properties); defined in org-agenda.el | 1360 | (defvar org-agenda-columns-compute-summary-properties); defined in org-agenda.el |
| 1358 | (defvar org-agenda-columns-add-appointments-to-effort-sum); as well | 1361 | (defvar org-agenda-columns-add-appointments-to-effort-sum); as well |
| 1359 | 1362 | ||
| 1363 | ;;;###autoload | ||
| 1360 | (defun org-agenda-columns () | 1364 | (defun org-agenda-columns () |
| 1361 | "Turn on or update column view in the agenda." | 1365 | "Turn on or update column view in the agenda." |
| 1362 | (interactive) | 1366 | (interactive) |
diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index 76042849663..6e582b8c1d6 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el | |||
| @@ -327,7 +327,7 @@ Works on both Emacs and XEmacs." | |||
| 327 | (apply 'propertize string properties))) | 327 | (apply 'propertize string properties))) |
| 328 | 328 | ||
| 329 | (defmacro org-find-library-dir (library) | 329 | (defmacro org-find-library-dir (library) |
| 330 | `(file-name-directory (locate-library ,library))) | 330 | `(file-name-directory (or (locate-library ,library) ""))) |
| 331 | 331 | ||
| 332 | (defun org-count-lines (s) | 332 | (defun org-count-lines (s) |
| 333 | "How many lines in string S?" | 333 | "How many lines in string S?" |
diff --git a/lisp/org/org-datetree.el b/lisp/org/org-datetree.el index 4ff8e7d00d0..a2b2e5621da 100644 --- a/lisp/org/org-datetree.el +++ b/lisp/org/org-datetree.el | |||
| @@ -207,4 +207,8 @@ before running this command, even though the command tries to be smart." | |||
| 207 | 207 | ||
| 208 | (provide 'org-datetree) | 208 | (provide 'org-datetree) |
| 209 | 209 | ||
| 210 | ;; Local variables: | ||
| 211 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 212 | ;; End: | ||
| 213 | |||
| 210 | ;;; org-datetree.el ends here | 214 | ;;; org-datetree.el ends here |
diff --git a/lisp/org/org-docbook.el b/lisp/org/org-docbook.el index 22cc5a7cdac..a40d5b969f3 100644 --- a/lisp/org/org-docbook.el +++ b/lisp/org/org-docbook.el | |||
| @@ -1451,4 +1451,8 @@ the alist of previous items." | |||
| 1451 | 1451 | ||
| 1452 | (provide 'org-docbook) | 1452 | (provide 'org-docbook) |
| 1453 | 1453 | ||
| 1454 | ;; Local variables: | ||
| 1455 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 1456 | ;; End: | ||
| 1457 | |||
| 1454 | ;;; org-docbook.el ends here | 1458 | ;;; org-docbook.el ends here |
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index 8b44d4936f5..5da2dec3fb3 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el | |||
| @@ -478,7 +478,7 @@ containing `:begin', `:end', `:hiddenp', `:contents-begin', | |||
| 478 | Assume point is at the beginning of the block." | 478 | Assume point is at the beginning of the block." |
| 479 | (let ((case-fold-search t)) | 479 | (let ((case-fold-search t)) |
| 480 | (if (not (save-excursion | 480 | (if (not (save-excursion |
| 481 | (re-search-forward "^[ \t]*#\\+END_CENTER" limit t))) | 481 | (re-search-forward "^[ \t]*#\\+END_CENTER[ \t]*$" limit t))) |
| 482 | ;; Incomplete block: parse it as a paragraph. | 482 | ;; Incomplete block: parse it as a paragraph. |
| 483 | (org-element-paragraph-parser limit) | 483 | (org-element-paragraph-parser limit) |
| 484 | (let ((block-end-line (match-beginning 0))) | 484 | (let ((block-end-line (match-beginning 0))) |
| @@ -494,7 +494,8 @@ Assume point is at the beginning of the block." | |||
| 494 | (forward-line) | 494 | (forward-line) |
| 495 | (point))) | 495 | (point))) |
| 496 | (end (save-excursion (skip-chars-forward " \r\t\n" limit) | 496 | (end (save-excursion (skip-chars-forward " \r\t\n" limit) |
| 497 | (if (eobp) (point) (point-at-bol))))) | 497 | (skip-chars-backward " \t") |
| 498 | (if (bolp) (point) (line-end-position))))) | ||
| 498 | (list 'center-block | 499 | (list 'center-block |
| 499 | (nconc | 500 | (nconc |
| 500 | (list :begin begin | 501 | (list :begin begin |
| @@ -524,7 +525,7 @@ Return a list whose CAR is `drawer' and CDR is a plist containing | |||
| 524 | 525 | ||
| 525 | Assume point is at beginning of drawer." | 526 | Assume point is at beginning of drawer." |
| 526 | (let ((case-fold-search t)) | 527 | (let ((case-fold-search t)) |
| 527 | (if (not (save-excursion (re-search-forward "^[ \t]*:END:" limit t))) | 528 | (if (not (save-excursion (re-search-forward "^[ \t]*:END:[ \t]*$" limit t))) |
| 528 | ;; Incomplete drawer: parse it as a paragraph. | 529 | ;; Incomplete drawer: parse it as a paragraph. |
| 529 | (org-element-paragraph-parser limit) | 530 | (org-element-paragraph-parser limit) |
| 530 | (let ((drawer-end-line (match-beginning 0))) | 531 | (let ((drawer-end-line (match-beginning 0))) |
| @@ -544,7 +545,8 @@ Assume point is at beginning of drawer." | |||
| 544 | (forward-line) | 545 | (forward-line) |
| 545 | (point))) | 546 | (point))) |
| 546 | (end (progn (skip-chars-forward " \r\t\n" limit) | 547 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 547 | (if (eobp) (point) (point-at-bol))))) | 548 | (skip-chars-backward " \t") |
| 549 | (if (bolp) (point) (line-end-position))))) | ||
| 548 | (list 'drawer | 550 | (list 'drawer |
| 549 | (nconc | 551 | (nconc |
| 550 | (list :begin begin | 552 | (list :begin begin |
| @@ -578,7 +580,8 @@ containing `:block-name', `:begin', `:end', `:hiddenp', | |||
| 578 | 580 | ||
| 579 | Assume point is at beginning of dynamic block." | 581 | Assume point is at beginning of dynamic block." |
| 580 | (let ((case-fold-search t)) | 582 | (let ((case-fold-search t)) |
| 581 | (if (not (save-excursion (re-search-forward org-dblock-end-re limit t))) | 583 | (if (not (save-excursion |
| 584 | (re-search-forward "^[ \t]*#\\+END:?[ \t]*$" limit t))) | ||
| 582 | ;; Incomplete block: parse it as a paragraph. | 585 | ;; Incomplete block: parse it as a paragraph. |
| 583 | (org-element-paragraph-parser limit) | 586 | (org-element-paragraph-parser limit) |
| 584 | (let ((block-end-line (match-beginning 0))) | 587 | (let ((block-end-line (match-beginning 0))) |
| @@ -598,7 +601,8 @@ Assume point is at beginning of dynamic block." | |||
| 598 | (forward-line) | 601 | (forward-line) |
| 599 | (point))) | 602 | (point))) |
| 600 | (end (progn (skip-chars-forward " \r\t\n" limit) | 603 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 601 | (if (eobp) (point) (point-at-bol))))) | 604 | (skip-chars-backward " \t") |
| 605 | (if (bolp) (point) (line-end-position))))) | ||
| 602 | (list 'dynamic-block | 606 | (list 'dynamic-block |
| 603 | (nconc | 607 | (nconc |
| 604 | (list :begin begin | 608 | (list :begin begin |
| @@ -653,7 +657,8 @@ Assume point is at the beginning of the footnote definition." | |||
| 653 | (contents-end (and contents-begin ending)) | 657 | (contents-end (and contents-begin ending)) |
| 654 | (end (progn (goto-char ending) | 658 | (end (progn (goto-char ending) |
| 655 | (skip-chars-forward " \r\t\n" limit) | 659 | (skip-chars-forward " \r\t\n" limit) |
| 656 | (if (eobp) (point) (point-at-bol))))) | 660 | (skip-chars-backward " \t") |
| 661 | (if (bolp) (point) (line-end-position))))) | ||
| 657 | (list 'footnote-definition | 662 | (list 'footnote-definition |
| 658 | (nconc | 663 | (nconc |
| 659 | (list :label label | 664 | (list :label label |
| @@ -904,7 +909,8 @@ Assume point is at beginning of the inline task." | |||
| 904 | (forward-line) | 909 | (forward-line) |
| 905 | (point))) | 910 | (point))) |
| 906 | (end (progn (skip-chars-forward " \r\t\n" limit) | 911 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 907 | (if (eobp) (point) (point-at-bol)))) | 912 | (skip-chars-backward " \t") |
| 913 | (if (bolp) (point) (line-end-position)))) | ||
| 908 | (inlinetask | 914 | (inlinetask |
| 909 | (list 'inlinetask | 915 | (list 'inlinetask |
| 910 | (nconc | 916 | (nconc |
| @@ -1108,7 +1114,8 @@ Assume point is at the beginning of the list." | |||
| 1108 | (unless (bolp) (forward-line)) | 1114 | (unless (bolp) (forward-line)) |
| 1109 | (point))) | 1115 | (point))) |
| 1110 | (end (progn (skip-chars-forward " \r\t\n" limit) | 1116 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 1111 | (if (eobp) (point) (point-at-bol))))) | 1117 | (skip-chars-backward " \t") |
| 1118 | (if (bolp) (point) (line-end-position))))) | ||
| 1112 | ;; Return value. | 1119 | ;; Return value. |
| 1113 | (list 'plain-list | 1120 | (list 'plain-list |
| 1114 | (nconc | 1121 | (nconc |
| @@ -1145,7 +1152,7 @@ containing `:begin', `:end', `:hiddenp', `:contents-begin', | |||
| 1145 | Assume point is at the beginning of the block." | 1152 | Assume point is at the beginning of the block." |
| 1146 | (let ((case-fold-search t)) | 1153 | (let ((case-fold-search t)) |
| 1147 | (if (not (save-excursion | 1154 | (if (not (save-excursion |
| 1148 | (re-search-forward "^[ \t]*#\\+END_QUOTE" limit t))) | 1155 | (re-search-forward "^[ \t]*#\\+END_QUOTE[ \t]*$" limit t))) |
| 1149 | ;; Incomplete block: parse it as a paragraph. | 1156 | ;; Incomplete block: parse it as a paragraph. |
| 1150 | (org-element-paragraph-parser limit) | 1157 | (org-element-paragraph-parser limit) |
| 1151 | (let ((block-end-line (match-beginning 0))) | 1158 | (let ((block-end-line (match-beginning 0))) |
| @@ -1162,7 +1169,8 @@ Assume point is at the beginning of the block." | |||
| 1162 | (forward-line) | 1169 | (forward-line) |
| 1163 | (point))) | 1170 | (point))) |
| 1164 | (end (progn (skip-chars-forward " \r\t\n" limit) | 1171 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 1165 | (if (eobp) (point) (point-at-bol))))) | 1172 | (skip-chars-backward " \t") |
| 1173 | (if (bolp) (point) (line-end-position))))) | ||
| 1166 | (list 'quote-block | 1174 | (list 'quote-block |
| 1167 | (nconc | 1175 | (nconc |
| 1168 | (list :begin begin | 1176 | (list :begin begin |
| @@ -1227,7 +1235,8 @@ Assume point is at the beginning of the block." | |||
| 1227 | (type (progn (looking-at "[ \t]*#\\+BEGIN_\\(S-+\\)") | 1235 | (type (progn (looking-at "[ \t]*#\\+BEGIN_\\(S-+\\)") |
| 1228 | (upcase (match-string-no-properties 1))))) | 1236 | (upcase (match-string-no-properties 1))))) |
| 1229 | (if (not (save-excursion | 1237 | (if (not (save-excursion |
| 1230 | (re-search-forward (concat "^[ \t]*#\\+END_" type) limit t))) | 1238 | (re-search-forward |
| 1239 | (format "^[ \t]*#\\+END_%s[ \t]*$" type) limit t))) | ||
| 1231 | ;; Incomplete block: parse it as a paragraph. | 1240 | ;; Incomplete block: parse it as a paragraph. |
| 1232 | (org-element-paragraph-parser limit) | 1241 | (org-element-paragraph-parser limit) |
| 1233 | (let ((block-end-line (match-beginning 0))) | 1242 | (let ((block-end-line (match-beginning 0))) |
| @@ -1243,8 +1252,9 @@ Assume point is at the beginning of the block." | |||
| 1243 | (pos-before-blank (progn (goto-char block-end-line) | 1252 | (pos-before-blank (progn (goto-char block-end-line) |
| 1244 | (forward-line) | 1253 | (forward-line) |
| 1245 | (point))) | 1254 | (point))) |
| 1246 | (end (progn (org-skip-whitespace) | 1255 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 1247 | (if (eobp) (point) (point-at-bol))))) | 1256 | (skip-chars-backward " \t") |
| 1257 | (if (bolp) (point) (line-end-position))))) | ||
| 1248 | (list 'special-block | 1258 | (list 'special-block |
| 1249 | (nconc | 1259 | (nconc |
| 1250 | (list :type type | 1260 | (list :type type |
| @@ -1295,7 +1305,8 @@ keywords." | |||
| 1295 | (begin (point-at-bol)) | 1305 | (begin (point-at-bol)) |
| 1296 | (pos-before-blank (progn (forward-line) (point))) | 1306 | (pos-before-blank (progn (forward-line) (point))) |
| 1297 | (end (progn (skip-chars-forward " \r\t\n" limit) | 1307 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 1298 | (if (eobp) (point) (point-at-bol))))) | 1308 | (skip-chars-backward " \t") |
| 1309 | (if (bolp) (point) (line-end-position))))) | ||
| 1299 | (list 'babel-call | 1310 | (list 'babel-call |
| 1300 | (list :begin begin | 1311 | (list :begin begin |
| 1301 | :end end | 1312 | :end end |
| @@ -1338,7 +1349,8 @@ as keywords." | |||
| 1338 | (status (if time 'closed 'running)) | 1349 | (status (if time 'closed 'running)) |
| 1339 | (post-blank (let ((before-blank (progn (forward-line) (point)))) | 1350 | (post-blank (let ((before-blank (progn (forward-line) (point)))) |
| 1340 | (skip-chars-forward " \r\t\n" limit) | 1351 | (skip-chars-forward " \r\t\n" limit) |
| 1341 | (unless (eobp) (beginning-of-line)) | 1352 | (skip-chars-backward " \t") |
| 1353 | (unless (bolp) (end-of-line)) | ||
| 1342 | (count-lines before-blank (point)))) | 1354 | (count-lines before-blank (point)))) |
| 1343 | (end (point))) | 1355 | (end (point))) |
| 1344 | (list 'clock | 1356 | (list 'clock |
| @@ -1396,7 +1408,8 @@ Assume point is at comment beginning." | |||
| 1396 | (point))) | 1408 | (point))) |
| 1397 | (end (progn (goto-char com-end) | 1409 | (end (progn (goto-char com-end) |
| 1398 | (skip-chars-forward " \r\t\n" limit) | 1410 | (skip-chars-forward " \r\t\n" limit) |
| 1399 | (if (eobp) (point) (point-at-bol))))) | 1411 | (skip-chars-backward " \t") |
| 1412 | (if (bolp) (point) (line-end-position))))) | ||
| 1400 | (list 'comment | 1413 | (list 'comment |
| 1401 | (nconc | 1414 | (nconc |
| 1402 | (list :begin begin | 1415 | (list :begin begin |
| @@ -1425,7 +1438,7 @@ containing `:begin', `:end', `:hiddenp', `:value' and | |||
| 1425 | Assume point is at comment block beginning." | 1438 | Assume point is at comment block beginning." |
| 1426 | (let ((case-fold-search t)) | 1439 | (let ((case-fold-search t)) |
| 1427 | (if (not (save-excursion | 1440 | (if (not (save-excursion |
| 1428 | (re-search-forward "^[ \t]*#\\+END_COMMENT" limit t))) | 1441 | (re-search-forward "^[ \t]*#\\+END_COMMENT[ \t]*$" limit t))) |
| 1429 | ;; Incomplete block: parse it as a paragraph. | 1442 | ;; Incomplete block: parse it as a paragraph. |
| 1430 | (org-element-paragraph-parser limit) | 1443 | (org-element-paragraph-parser limit) |
| 1431 | (let ((contents-end (match-beginning 0))) | 1444 | (let ((contents-end (match-beginning 0))) |
| @@ -1438,7 +1451,8 @@ Assume point is at comment block beginning." | |||
| 1438 | (forward-line) | 1451 | (forward-line) |
| 1439 | (point))) | 1452 | (point))) |
| 1440 | (end (progn (skip-chars-forward " \r\t\n" limit) | 1453 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 1441 | (if (eobp) (point) (point-at-bol)))) | 1454 | (skip-chars-backward " \t") |
| 1455 | (if (bolp) (point) (line-end-position)))) | ||
| 1442 | (value (buffer-substring-no-properties | 1456 | (value (buffer-substring-no-properties |
| 1443 | contents-begin contents-end))) | 1457 | contents-begin contents-end))) |
| 1444 | (list 'comment-block | 1458 | (list 'comment-block |
| @@ -1470,7 +1484,7 @@ containing `:begin', `:end', `:number-lines', `:preserve-indent', | |||
| 1470 | `:switches', `:value' and `:post-blank' keywords." | 1484 | `:switches', `:value' and `:post-blank' keywords." |
| 1471 | (let ((case-fold-search t)) | 1485 | (let ((case-fold-search t)) |
| 1472 | (if (not (save-excursion | 1486 | (if (not (save-excursion |
| 1473 | (re-search-forward "^[ \t]*#\\+END_EXAMPLE" limit t))) | 1487 | (re-search-forward "^[ \t]*#\\+END_EXAMPLE[ \t]*$" limit t))) |
| 1474 | ;; Incomplete block: parse it as a paragraph. | 1488 | ;; Incomplete block: parse it as a paragraph. |
| 1475 | (org-element-paragraph-parser limit) | 1489 | (org-element-paragraph-parser limit) |
| 1476 | (let ((contents-end (match-beginning 0))) | 1490 | (let ((contents-end (match-beginning 0))) |
| @@ -1502,12 +1516,15 @@ containing `:begin', `:end', `:number-lines', `:preserve-indent', | |||
| 1502 | (begin (car keywords)) | 1516 | (begin (car keywords)) |
| 1503 | (contents-begin (progn (forward-line) (point))) | 1517 | (contents-begin (progn (forward-line) (point))) |
| 1504 | (hidden (org-invisible-p2)) | 1518 | (hidden (org-invisible-p2)) |
| 1505 | (value (buffer-substring-no-properties contents-begin contents-end)) | 1519 | (value (org-unescape-code-in-string |
| 1520 | (buffer-substring-no-properties | ||
| 1521 | contents-begin contents-end))) | ||
| 1506 | (pos-before-blank (progn (goto-char contents-end) | 1522 | (pos-before-blank (progn (goto-char contents-end) |
| 1507 | (forward-line) | 1523 | (forward-line) |
| 1508 | (point))) | 1524 | (point))) |
| 1509 | (end (progn (skip-chars-forward " \r\t\n" limit) | 1525 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 1510 | (if (eobp) (point) (point-at-bol))))) | 1526 | (skip-chars-backward " \t") |
| 1527 | (if (bolp) (point) (line-end-position))))) | ||
| 1511 | (list 'example-block | 1528 | (list 'example-block |
| 1512 | (nconc | 1529 | (nconc |
| 1513 | (list :begin begin | 1530 | (list :begin begin |
| @@ -1529,7 +1546,8 @@ CONTENTS is nil." | |||
| 1529 | (let ((switches (org-element-property :switches example-block))) | 1546 | (let ((switches (org-element-property :switches example-block))) |
| 1530 | (concat "#+BEGIN_EXAMPLE" (and switches (concat " " switches)) "\n" | 1547 | (concat "#+BEGIN_EXAMPLE" (and switches (concat " " switches)) "\n" |
| 1531 | (org-remove-indentation | 1548 | (org-remove-indentation |
| 1532 | (org-element-property :value example-block)) | 1549 | (org-escape-code-in-string |
| 1550 | (org-element-property :value example-block))) | ||
| 1533 | "#+END_EXAMPLE"))) | 1551 | "#+END_EXAMPLE"))) |
| 1534 | 1552 | ||
| 1535 | 1553 | ||
| @@ -1549,7 +1567,8 @@ Assume point is at export-block beginning." | |||
| 1549 | (type (progn (looking-at "[ \t]*#\\+BEGIN_\\(\\S-+\\)") | 1567 | (type (progn (looking-at "[ \t]*#\\+BEGIN_\\(\\S-+\\)") |
| 1550 | (upcase (org-match-string-no-properties 1))))) | 1568 | (upcase (org-match-string-no-properties 1))))) |
| 1551 | (if (not (save-excursion | 1569 | (if (not (save-excursion |
| 1552 | (re-search-forward (concat "^[ \t]*#\\+END_" type) limit t))) | 1570 | (re-search-forward |
| 1571 | (format "^[ \t]*#\\+END_%s[ \t]*$" type) limit t))) | ||
| 1553 | ;; Incomplete block: parse it as a paragraph. | 1572 | ;; Incomplete block: parse it as a paragraph. |
| 1554 | (org-element-paragraph-parser limit) | 1573 | (org-element-paragraph-parser limit) |
| 1555 | (let ((contents-end (match-beginning 0))) | 1574 | (let ((contents-end (match-beginning 0))) |
| @@ -1562,7 +1581,8 @@ Assume point is at export-block beginning." | |||
| 1562 | (forward-line) | 1581 | (forward-line) |
| 1563 | (point))) | 1582 | (point))) |
| 1564 | (end (progn (skip-chars-forward " \r\t\n" limit) | 1583 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 1565 | (if (eobp) (point) (point-at-bol)))) | 1584 | (skip-chars-backward " \t") |
| 1585 | (if (bolp) (point) (line-end-position)))) | ||
| 1566 | (value (buffer-substring-no-properties contents-begin | 1586 | (value (buffer-substring-no-properties contents-begin |
| 1567 | contents-end))) | 1587 | contents-end))) |
| 1568 | (list 'export-block | 1588 | (list 'export-block |
| @@ -1612,7 +1632,8 @@ Assume point is at the beginning of the fixed-width area." | |||
| 1612 | (forward-line)) | 1632 | (forward-line)) |
| 1613 | (point))) | 1633 | (point))) |
| 1614 | (end (progn (skip-chars-forward " \r\t\n" limit) | 1634 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 1615 | (if (eobp) (point) (point-at-bol))))) | 1635 | (skip-chars-backward " \t") |
| 1636 | (if (bolp) (point) (line-end-position))))) | ||
| 1616 | (list 'fixed-width | 1637 | (list 'fixed-width |
| 1617 | (nconc | 1638 | (nconc |
| 1618 | (list :begin begin | 1639 | (list :begin begin |
| @@ -1642,7 +1663,8 @@ containing `:begin', `:end' and `:post-blank' keywords." | |||
| 1642 | (begin (car keywords)) | 1663 | (begin (car keywords)) |
| 1643 | (post-hr (progn (forward-line) (point))) | 1664 | (post-hr (progn (forward-line) (point))) |
| 1644 | (end (progn (skip-chars-forward " \r\t\n" limit) | 1665 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 1645 | (if (eobp) (point) (point-at-bol))))) | 1666 | (skip-chars-backward " \t") |
| 1667 | (if (bolp) (point) (line-end-position))))) | ||
| 1646 | (list 'horizontal-rule | 1668 | (list 'horizontal-rule |
| 1647 | (nconc | 1669 | (nconc |
| 1648 | (list :begin begin | 1670 | (list :begin begin |
| @@ -1675,7 +1697,8 @@ keywords." | |||
| 1675 | (match-end 0) (point-at-eol)))) | 1697 | (match-end 0) (point-at-eol)))) |
| 1676 | (pos-before-blank (progn (forward-line) (point))) | 1698 | (pos-before-blank (progn (forward-line) (point))) |
| 1677 | (end (progn (skip-chars-forward " \r\t\n" limit) | 1699 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 1678 | (if (eobp) (point) (point-at-bol))))) | 1700 | (skip-chars-backward " \t") |
| 1701 | (if (bolp) (point) (line-end-position))))) | ||
| 1679 | (list 'keyword | 1702 | (list 'keyword |
| 1680 | (list :key key | 1703 | (list :key key |
| 1681 | :value value | 1704 | :value value |
| @@ -1711,12 +1734,14 @@ Assume point is at the beginning of the latex environment." | |||
| 1711 | (env (progn (looking-at "^[ \t]*\\\\begin{\\([A-Za-z0-9]+\\*?\\)}") | 1734 | (env (progn (looking-at "^[ \t]*\\\\begin{\\([A-Za-z0-9]+\\*?\\)}") |
| 1712 | (regexp-quote (match-string 1)))) | 1735 | (regexp-quote (match-string 1)))) |
| 1713 | (code-end | 1736 | (code-end |
| 1714 | (progn (re-search-forward (format "^[ \t]*\\\\end{%s}" env) limit t) | 1737 | (progn (re-search-forward |
| 1738 | (format "^[ \t]*\\\\end{%s}[ \t]*$" env) limit t) | ||
| 1715 | (forward-line) | 1739 | (forward-line) |
| 1716 | (point))) | 1740 | (point))) |
| 1717 | (value (buffer-substring-no-properties code-begin code-end)) | 1741 | (value (buffer-substring-no-properties code-begin code-end)) |
| 1718 | (end (progn (skip-chars-forward " \r\t\n" limit) | 1742 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 1719 | (if (eobp) (point) (point-at-bol))))) | 1743 | (skip-chars-backward " \t") |
| 1744 | (if (bolp) (point) (line-end-position))))) | ||
| 1720 | (list 'latex-environment | 1745 | (list 'latex-environment |
| 1721 | (nconc | 1746 | (nconc |
| 1722 | (list :begin begin | 1747 | (list :begin begin |
| @@ -1744,69 +1769,80 @@ containing `:begin', `:end', `:contents-begin' and | |||
| 1744 | 1769 | ||
| 1745 | Assume point is at the beginning of the paragraph." | 1770 | Assume point is at the beginning of the paragraph." |
| 1746 | (save-excursion | 1771 | (save-excursion |
| 1747 | (let* (;; INNER-PAR-P is non-nil when paragraph is at the | 1772 | (let* ((contents-begin (point)) |
| 1773 | ;; INNER-PAR-P is non-nil when paragraph is at the | ||
| 1748 | ;; beginning of an item or a footnote reference. In that | 1774 | ;; beginning of an item or a footnote reference. In that |
| 1749 | ;; case, we mustn't look for affiliated keywords since they | 1775 | ;; case, we mustn't look for affiliated keywords since they |
| 1750 | ;; belong to the container. | 1776 | ;; belong to the container. |
| 1751 | (inner-par-p (not (bolp))) | 1777 | (inner-par-p (not (bolp))) |
| 1752 | (contents-begin (point)) | ||
| 1753 | (keywords (unless inner-par-p | 1778 | (keywords (unless inner-par-p |
| 1754 | (org-element--collect-affiliated-keywords))) | 1779 | (org-element--collect-affiliated-keywords))) |
| 1755 | (begin (if inner-par-p contents-begin (car keywords))) | 1780 | (begin (if inner-par-p contents-begin (car keywords))) |
| 1756 | (before-blank | 1781 | (before-blank |
| 1757 | (let ((case-fold-search t)) | 1782 | (let ((case-fold-search t)) |
| 1758 | (end-of-line) | 1783 | (end-of-line) |
| 1759 | (re-search-forward org-element-paragraph-separate limit 'm) | 1784 | (if (not (re-search-forward |
| 1760 | (while (and (/= (point) limit) | 1785 | org-element-paragraph-separate limit 'm)) |
| 1761 | (cond | 1786 | limit |
| 1762 | ;; Skip non-existent or incomplete drawer. | 1787 | ;; A matching `org-element-paragraph-separate' is not |
| 1763 | ((save-excursion | 1788 | ;; necessarily the end of the paragraph. In |
| 1764 | (beginning-of-line) | 1789 | ;; particular, lines starting with # or : as a first |
| 1765 | (and (looking-at "[ \t]*:\\S-") | 1790 | ;; non-space character are ambiguous. We have check |
| 1766 | (or (not (looking-at org-drawer-regexp)) | 1791 | ;; if they are valid Org syntax (i.e. not an |
| 1767 | (not (save-excursion | 1792 | ;; incomplete keyword). |
| 1768 | (re-search-forward | 1793 | (beginning-of-line) |
| 1769 | "^[ \t]*:END:" limit t))))))) | 1794 | (while (not |
| 1770 | ;; Stop at comments. | 1795 | (or |
| 1771 | ((save-excursion | 1796 | ;; There's no ambiguity for other symbols or |
| 1772 | (beginning-of-line) | 1797 | ;; empty lines: stop here. |
| 1773 | (not (looking-at "[ \t]*#\\S-"))) nil) | 1798 | (looking-at "[ \t]*\\(?:[^:#]\\|$\\)") |
| 1774 | ;; Skip incomplete dynamic blocks. | 1799 | ;; Stop at valid fixed-width areas. |
| 1775 | ((save-excursion | 1800 | (looking-at "[ \t]*:\\(?: \\|$\\)") |
| 1776 | (beginning-of-line) | 1801 | ;; Stop at drawers. |
| 1777 | (looking-at "[ \t]*#\\+BEGIN: ")) | 1802 | (and (looking-at org-drawer-regexp) |
| 1778 | (not (save-excursion | 1803 | (save-excursion |
| 1779 | (re-search-forward | 1804 | (re-search-forward |
| 1780 | "^[ \t]*\\+END:" limit t)))) | 1805 | "^[ \t]*:END:[ \t]*$" limit t))) |
| 1781 | ;; Skip incomplete blocks. | 1806 | ;; Stop at valid comments. |
| 1782 | ((save-excursion | 1807 | (looking-at "[ \t]*#\\(?: \\|$\\)") |
| 1783 | (beginning-of-line) | 1808 | ;; Stop at valid dynamic blocks. |
| 1784 | (looking-at "[ \t]*#\\+BEGIN_\\(\\S-+\\)")) | 1809 | (and (looking-at org-dblock-start-re) |
| 1785 | (not (save-excursion | 1810 | (save-excursion |
| 1786 | (re-search-forward | 1811 | (re-search-forward |
| 1787 | (concat "^[ \t]*#\\+END_" | 1812 | "^[ \t]*#\\+END:?[ \t]*$" limit t))) |
| 1788 | (match-string 1)) | 1813 | ;; Stop at valid blocks. |
| 1789 | limit t)))) | 1814 | (and (looking-at |
| 1790 | ;; Skip incomplete latex environments. | 1815 | "[ \t]*#\\+BEGIN_\\(\\S-+\\)") |
| 1791 | ((save-excursion | 1816 | (save-excursion |
| 1792 | (beginning-of-line) | 1817 | (re-search-forward |
| 1793 | (looking-at "^[ \t]*\\\\begin{\\([A-Za-z0-9]+\\*?\\)}")) | 1818 | (format "^[ \t]*#\\+END_%s[ \t]*$" |
| 1794 | (not (save-excursion | 1819 | (match-string 1)) |
| 1795 | (re-search-forward | 1820 | limit t))) |
| 1796 | (format "^[ \t]*\\\\end{%s}" | 1821 | ;; Stop at valid latex environments. |
| 1797 | (match-string 1)) | 1822 | (and (looking-at |
| 1798 | limit t)))) | 1823 | "^[ \t]*\\\\begin{\\([A-Za-z0-9]+\\*?\\)}[ \t]*$") |
| 1799 | ;; Skip ill-formed keywords. | 1824 | (save-excursion |
| 1800 | ((not (save-excursion | 1825 | (re-search-forward |
| 1801 | (beginning-of-line) | 1826 | (format "^[ \t]*\\\\end{%s}[ \t]*$" |
| 1802 | (looking-at "[ \t]*#\\+\\S-+:")))))) | 1827 | (match-string 1)) |
| 1803 | (re-search-forward org-element-paragraph-separate limit 'm)) | 1828 | limit t))) |
| 1804 | (if (eobp) (point) (goto-char (line-beginning-position))))) | 1829 | ;; Stop at valid keywords. |
| 1830 | (looking-at "[ \t]*#\\+\\S-+:") | ||
| 1831 | ;; Skip everything else. | ||
| 1832 | (not | ||
| 1833 | (progn | ||
| 1834 | (end-of-line) | ||
| 1835 | (re-search-forward org-element-paragraph-separate | ||
| 1836 | limit 'm))))) | ||
| 1837 | (beginning-of-line))) | ||
| 1838 | (if (= (point) limit) limit | ||
| 1839 | (goto-char (line-beginning-position))))) | ||
| 1805 | (contents-end (progn (skip-chars-backward " \r\t\n" contents-begin) | 1840 | (contents-end (progn (skip-chars-backward " \r\t\n" contents-begin) |
| 1806 | (forward-line) | 1841 | (forward-line) |
| 1807 | (point))) | 1842 | (point))) |
| 1808 | (end (progn (skip-chars-forward " \r\t\n" limit) | 1843 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 1809 | (if (eobp) (point) (point-at-bol))))) | 1844 | (skip-chars-backward " \t") |
| 1845 | (if (bolp) (point) (line-end-position))))) | ||
| 1810 | (list 'paragraph | 1846 | (list 'paragraph |
| 1811 | (nconc | 1847 | (nconc |
| 1812 | (list :begin begin | 1848 | (list :begin begin |
| @@ -1837,7 +1873,8 @@ and `:post-blank' keywords." | |||
| 1837 | (begin (point)) | 1873 | (begin (point)) |
| 1838 | (post-blank (let ((before-blank (progn (forward-line) (point)))) | 1874 | (post-blank (let ((before-blank (progn (forward-line) (point)))) |
| 1839 | (skip-chars-forward " \r\t\n" limit) | 1875 | (skip-chars-forward " \r\t\n" limit) |
| 1840 | (unless (eobp) (beginning-of-line)) | 1876 | (skip-chars-backward " \t") |
| 1877 | (unless (bolp) (end-of-line)) | ||
| 1841 | (count-lines before-blank (point)))) | 1878 | (count-lines before-blank (point)))) |
| 1842 | (end (point)) | 1879 | (end (point)) |
| 1843 | closed deadline scheduled) | 1880 | closed deadline scheduled) |
| @@ -1895,7 +1932,7 @@ Assume point is at the beginning of the property drawer." | |||
| 1895 | (hidden (org-invisible-p2)) | 1932 | (hidden (org-invisible-p2)) |
| 1896 | (properties | 1933 | (properties |
| 1897 | (let (val) | 1934 | (let (val) |
| 1898 | (while (not (looking-at "^[ \t]*:END:")) | 1935 | (while (not (looking-at "^[ \t]*:END:[ \t]*$")) |
| 1899 | (when (looking-at "[ \t]*:\\([A-Za-z][-_A-Za-z0-9]*\\):") | 1936 | (when (looking-at "[ \t]*:\\([A-Za-z][-_A-Za-z0-9]*\\):") |
| 1900 | (push (cons (org-match-string-no-properties 1) | 1937 | (push (cons (org-match-string-no-properties 1) |
| 1901 | (org-trim | 1938 | (org-trim |
| @@ -1908,7 +1945,8 @@ Assume point is at the beginning of the property drawer." | |||
| 1908 | (point-at-bol))) | 1945 | (point-at-bol))) |
| 1909 | (pos-before-blank (progn (forward-line) (point))) | 1946 | (pos-before-blank (progn (forward-line) (point))) |
| 1910 | (end (progn (skip-chars-forward " \r\t\n" limit) | 1947 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 1911 | (if (eobp) (point) (point-at-bol))))) | 1948 | (skip-chars-backward " \t") |
| 1949 | (if (bolp) (point) (line-end-position))))) | ||
| 1912 | (list 'property-drawer | 1950 | (list 'property-drawer |
| 1913 | (list :begin begin | 1951 | (list :begin begin |
| 1914 | :end end | 1952 | :end end |
| @@ -1974,7 +2012,8 @@ containing `:language', `:switches', `:parameters', `:begin', | |||
| 1974 | 2012 | ||
| 1975 | Assume point is at the beginning of the block." | 2013 | Assume point is at the beginning of the block." |
| 1976 | (let ((case-fold-search t)) | 2014 | (let ((case-fold-search t)) |
| 1977 | (if (not (save-excursion (re-search-forward "^[ \t]*#\\+END_SRC" limit t))) | 2015 | (if (not (save-excursion (re-search-forward "^[ \t]*#\\+END_SRC[ \t]*$" |
| 2016 | limit t))) | ||
| 1978 | ;; Incomplete block: parse it as a paragraph. | 2017 | ;; Incomplete block: parse it as a paragraph. |
| 1979 | (org-element-paragraph-parser limit) | 2018 | (org-element-paragraph-parser limit) |
| 1980 | (let ((contents-end (match-beginning 0))) | 2019 | (let ((contents-end (match-beginning 0))) |
| @@ -2017,13 +2056,15 @@ Assume point is at the beginning of the block." | |||
| 2017 | ;; Get visibility status. | 2056 | ;; Get visibility status. |
| 2018 | (hidden (progn (forward-line) (org-invisible-p2))) | 2057 | (hidden (progn (forward-line) (org-invisible-p2))) |
| 2019 | ;; Retrieve code. | 2058 | ;; Retrieve code. |
| 2020 | (value (buffer-substring-no-properties (point) contents-end)) | 2059 | (value (org-unescape-code-in-string |
| 2060 | (buffer-substring-no-properties (point) contents-end))) | ||
| 2021 | (pos-before-blank (progn (goto-char contents-end) | 2061 | (pos-before-blank (progn (goto-char contents-end) |
| 2022 | (forward-line) | 2062 | (forward-line) |
| 2023 | (point))) | 2063 | (point))) |
| 2024 | ;; Get position after ending blank lines. | 2064 | ;; Get position after ending blank lines. |
| 2025 | (end (progn (skip-chars-forward " \r\t\n" limit) | 2065 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 2026 | (if (eobp) (point) (point-at-bol))))) | 2066 | (skip-chars-backward " \t") |
| 2067 | (if (bolp) (point) (line-end-position))))) | ||
| 2027 | (list 'src-block | 2068 | (list 'src-block |
| 2028 | (nconc | 2069 | (nconc |
| 2029 | (list :language language | 2070 | (list :language language |
| @@ -2051,7 +2092,6 @@ CONTENTS is nil." | |||
| 2051 | (params (org-element-property :parameters src-block)) | 2092 | (params (org-element-property :parameters src-block)) |
| 2052 | (value (let ((val (org-element-property :value src-block))) | 2093 | (value (let ((val (org-element-property :value src-block))) |
| 2053 | (cond | 2094 | (cond |
| 2054 | |||
| 2055 | (org-src-preserve-indentation val) | 2095 | (org-src-preserve-indentation val) |
| 2056 | ((zerop org-edit-src-content-indentation) | 2096 | ((zerop org-edit-src-content-indentation) |
| 2057 | (org-remove-indentation val)) | 2097 | (org-remove-indentation val)) |
| @@ -2065,7 +2105,7 @@ CONTENTS is nil." | |||
| 2065 | (concat (and lang (concat " " lang)) | 2105 | (concat (and lang (concat " " lang)) |
| 2066 | (and switches (concat " " switches)) | 2106 | (and switches (concat " " switches)) |
| 2067 | (and params (concat " " params)))) | 2107 | (and params (concat " " params)))) |
| 2068 | value | 2108 | (org-escape-code-in-string value) |
| 2069 | "#+END_SRC"))) | 2109 | "#+END_SRC"))) |
| 2070 | 2110 | ||
| 2071 | 2111 | ||
| @@ -2087,7 +2127,10 @@ Assume point is at the beginning of the table." | |||
| 2087 | (type (if (org-at-table.el-p) 'table.el 'org)) | 2127 | (type (if (org-at-table.el-p) 'table.el 'org)) |
| 2088 | (keywords (org-element--collect-affiliated-keywords)) | 2128 | (keywords (org-element--collect-affiliated-keywords)) |
| 2089 | (begin (car keywords)) | 2129 | (begin (car keywords)) |
| 2090 | (table-end (goto-char (marker-position (org-table-end t)))) | 2130 | (table-end |
| 2131 | (if (re-search-forward org-table-any-border-regexp limit 'm) | ||
| 2132 | (goto-char (match-beginning 0)) | ||
| 2133 | (point))) | ||
| 2091 | (tblfm (let (acc) | 2134 | (tblfm (let (acc) |
| 2092 | (while (looking-at "[ \t]*#\\+TBLFM: +\\(.*\\)[ \t]*$") | 2135 | (while (looking-at "[ \t]*#\\+TBLFM: +\\(.*\\)[ \t]*$") |
| 2093 | (push (org-match-string-no-properties 1) acc) | 2136 | (push (org-match-string-no-properties 1) acc) |
| @@ -2095,7 +2138,8 @@ Assume point is at the beginning of the table." | |||
| 2095 | acc)) | 2138 | acc)) |
| 2096 | (pos-before-blank (point)) | 2139 | (pos-before-blank (point)) |
| 2097 | (end (progn (skip-chars-forward " \r\t\n" limit) | 2140 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 2098 | (if (eobp) (point) (point-at-bol))))) | 2141 | (skip-chars-backward " \t") |
| 2142 | (if (bolp) (point) (line-end-position))))) | ||
| 2099 | (list 'table | 2143 | (list 'table |
| 2100 | (nconc | 2144 | (nconc |
| 2101 | (list :begin begin | 2145 | (list :begin begin |
| @@ -2179,7 +2223,7 @@ containing `:begin', `:end', `:contents-begin', `:contents-end', | |||
| 2179 | Assume point is at beginning of the block." | 2223 | Assume point is at beginning of the block." |
| 2180 | (let ((case-fold-search t)) | 2224 | (let ((case-fold-search t)) |
| 2181 | (if (not (save-excursion | 2225 | (if (not (save-excursion |
| 2182 | (re-search-forward "^[ \t]*#\\+END_VERSE" limit t))) | 2226 | (re-search-forward "^[ \t]*#\\+END_VERSE[ \t]*$" limit t))) |
| 2183 | ;; Incomplete block: parse it as a paragraph. | 2227 | ;; Incomplete block: parse it as a paragraph. |
| 2184 | (org-element-paragraph-parser limit) | 2228 | (org-element-paragraph-parser limit) |
| 2185 | (let ((contents-end (match-beginning 0))) | 2229 | (let ((contents-end (match-beginning 0))) |
| @@ -2192,7 +2236,8 @@ Assume point is at beginning of the block." | |||
| 2192 | (forward-line) | 2236 | (forward-line) |
| 2193 | (point))) | 2237 | (point))) |
| 2194 | (end (progn (skip-chars-forward " \r\t\n" limit) | 2238 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 2195 | (if (eobp) (point) (point-at-bol))))) | 2239 | (skip-chars-backward " \t") |
| 2240 | (if (bolp) (point) (line-end-position))))) | ||
| 2196 | (list 'verse-block | 2241 | (list 'verse-block |
| 2197 | (nconc | 2242 | (nconc |
| 2198 | (list :begin begin | 2243 | (list :begin begin |
| @@ -2367,6 +2412,7 @@ LIMIT bounds the search. | |||
| 2367 | Return value is a cons cell whose CAR is `entity' or | 2412 | Return value is a cons cell whose CAR is `entity' or |
| 2368 | `latex-fragment' and CDR is beginning position." | 2413 | `latex-fragment' and CDR is beginning position." |
| 2369 | (save-excursion | 2414 | (save-excursion |
| 2415 | (unless (bolp) (backward-char)) | ||
| 2370 | (let ((matchers | 2416 | (let ((matchers |
| 2371 | (remove "begin" (plist-get org-format-latex-options :matchers))) | 2417 | (remove "begin" (plist-get org-format-latex-options :matchers))) |
| 2372 | ;; ENTITY-RE matches both LaTeX commands and Org entities. | 2418 | ;; ENTITY-RE matches both LaTeX commands and Org entities. |
| @@ -3044,6 +3090,7 @@ LIMIT bounds the search. | |||
| 3044 | Return value is a cons cell whose CAR is either `subscript' or | 3090 | Return value is a cons cell whose CAR is either `subscript' or |
| 3045 | `superscript' and CDR is beginning position." | 3091 | `superscript' and CDR is beginning position." |
| 3046 | (save-excursion | 3092 | (save-excursion |
| 3093 | (unless (bolp) (backward-char)) | ||
| 3047 | (when (re-search-forward org-match-substring-regexp limit t) | 3094 | (when (re-search-forward org-match-substring-regexp limit t) |
| 3048 | (cons (if (string= (match-string 2) "_") 'subscript 'superscript) | 3095 | (cons (if (string= (match-string 2) "_") 'subscript 'superscript) |
| 3049 | (match-beginning 2))))) | 3096 | (match-beginning 2))))) |
| @@ -3838,6 +3885,15 @@ Return value is an alist whose CAR is position and CDR the object | |||
| 3838 | type, as a symbol. | 3885 | type, as a symbol. |
| 3839 | 3886 | ||
| 3840 | OBJECTS is the previous candidates alist." | 3887 | OBJECTS is the previous candidates alist." |
| 3888 | ;; Filter out any object found but not belonging to RESTRICTION. | ||
| 3889 | (setq objects | ||
| 3890 | (org-remove-if-not | ||
| 3891 | (lambda (obj) | ||
| 3892 | (let ((type (car obj))) | ||
| 3893 | (memq (or (cdr (assq type org-element-object-successor-alist)) | ||
| 3894 | type) | ||
| 3895 | restriction))) | ||
| 3896 | objects)) | ||
| 3841 | (let (next-candidates types-to-search) | 3897 | (let (next-candidates types-to-search) |
| 3842 | ;; If no previous result, search every object type in RESTRICTION. | 3898 | ;; If no previous result, search every object type in RESTRICTION. |
| 3843 | ;; Otherwise, keep potential candidates (old objects located after | 3899 | ;; Otherwise, keep potential candidates (old objects located after |
| @@ -4235,7 +4291,7 @@ and :post-blank properties." | |||
| 4235 | (progn (beginning-of-line) | 4291 | (progn (beginning-of-line) |
| 4236 | (skip-chars-forward "* ") | 4292 | (skip-chars-forward "* ") |
| 4237 | (setq end (point-at-eol)))) | 4293 | (setq end (point-at-eol)))) |
| 4238 | (and (memq type '(paragraph table-cell verse-block)) | 4294 | (and (memq type '(paragraph table-row verse-block)) |
| 4239 | (let ((cbeg (org-element-property | 4295 | (let ((cbeg (org-element-property |
| 4240 | :contents-begin element)) | 4296 | :contents-begin element)) |
| 4241 | (cend (org-element-property | 4297 | (cend (org-element-property |
| @@ -4254,7 +4310,7 @@ and :post-blank properties." | |||
| 4254 | candidates))) | 4310 | candidates))) |
| 4255 | ;; If ORIGIN is before next object in element, there's | 4311 | ;; If ORIGIN is before next object in element, there's |
| 4256 | ;; no point in looking further. | 4312 | ;; no point in looking further. |
| 4257 | (if (> (cdr closest-cand) origin) (throw 'exit element) | 4313 | (if (> (cdr closest-cand) origin) (throw 'exit parent) |
| 4258 | (let* ((object | 4314 | (let* ((object |
| 4259 | (progn (goto-char (cdr closest-cand)) | 4315 | (progn (goto-char (cdr closest-cand)) |
| 4260 | (funcall (intern (format "org-element-%s-parser" | 4316 | (funcall (intern (format "org-element-%s-parser" |
| @@ -4274,7 +4330,9 @@ and :post-blank properties." | |||
| 4274 | ;; search to the end of its contents. | 4330 | ;; search to the end of its contents. |
| 4275 | (t (goto-char cbeg) | 4331 | (t (goto-char cbeg) |
| 4276 | (org-element-put-property object :parent parent) | 4332 | (org-element-put-property object :parent parent) |
| 4277 | (setq parent object end cend))))))) | 4333 | (setq parent object |
| 4334 | restriction (org-element-restriction object) | ||
| 4335 | end cend))))))) | ||
| 4278 | parent)))))) | 4336 | parent)))))) |
| 4279 | 4337 | ||
| 4280 | (defsubst org-element-nested-p (elem-A elem-B) | 4338 | (defsubst org-element-nested-p (elem-A elem-B) |
| @@ -4351,6 +4409,10 @@ end of ELEM-A." | |||
| 4351 | (cdr overlays))) | 4409 | (cdr overlays))) |
| 4352 | (goto-char (org-element-property :end elem-B))))) | 4410 | (goto-char (org-element-property :end elem-B))))) |
| 4353 | 4411 | ||
| 4354 | |||
| 4355 | (provide 'org-element) | 4412 | (provide 'org-element) |
| 4413 | |||
| 4414 | ;; Local variables: | ||
| 4415 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 4416 | ;; End: | ||
| 4417 | |||
| 4356 | ;;; org-element.el ends here | 4418 | ;;; org-element.el ends here |
diff --git a/lisp/org/org-exp.el b/lisp/org/org-exp.el index 6b506cd1275..a578fe70f07 100644 --- a/lisp/org/org-exp.el +++ b/lisp/org/org-exp.el | |||
| @@ -48,6 +48,7 @@ | |||
| 48 | (declare-function org-table-colgroup-line-p "org-table" (line)) | 48 | (declare-function org-table-colgroup-line-p "org-table" (line)) |
| 49 | (declare-function org-pop-to-buffer-same-window "org-compat" | 49 | (declare-function org-pop-to-buffer-same-window "org-compat" |
| 50 | (&optional buffer-or-name norecord label)) | 50 | (&optional buffer-or-name norecord label)) |
| 51 | (declare-function org-unescape-code-in-region "org-src" (beg end)) | ||
| 51 | 52 | ||
| 52 | (autoload 'org-export-generic "org-export-generic" "Export using the generic exporter" t) | 53 | (autoload 'org-export-generic "org-export-generic" "Export using the generic exporter" t) |
| 53 | 54 | ||
| @@ -1790,7 +1791,7 @@ from the buffer." | |||
| 1790 | beg-content end-content | 1791 | beg-content end-content |
| 1791 | `(org-protected t original-indentation ,ind org-native-text t)) | 1792 | `(org-protected t original-indentation ,ind org-native-text t)) |
| 1792 | ;; strip protective commas | 1793 | ;; strip protective commas |
| 1793 | (org-strip-protective-commas beg-content end-content) | 1794 | (org-unescape-code-in-region beg-content end-content) |
| 1794 | (delete-region (match-beginning 0) (match-end 0)) | 1795 | (delete-region (match-beginning 0) (match-end 0)) |
| 1795 | (save-excursion | 1796 | (save-excursion |
| 1796 | (goto-char beg) | 1797 | (goto-char beg) |
| @@ -3230,7 +3231,6 @@ Does include HTML export options as well as TODO and CATEGORY stuff." | |||
| 3230 | org-archive-location | 3231 | org-archive-location |
| 3231 | "org file:~/org/%s.org")) | 3232 | "org file:~/org/%s.org")) |
| 3232 | 3233 | ||
| 3233 | ;;;###autoload | ||
| 3234 | (defun org-insert-export-options-template () | 3234 | (defun org-insert-export-options-template () |
| 3235 | "Insert into the buffer a template with information for exporting." | 3235 | "Insert into the buffer a template with information for exporting." |
| 3236 | (interactive) | 3236 | (interactive) |
| @@ -3348,4 +3348,8 @@ The depends on the variable `org-export-copy-to-kill-ring'." | |||
| 3348 | 3348 | ||
| 3349 | (provide 'org-exp) | 3349 | (provide 'org-exp) |
| 3350 | 3350 | ||
| 3351 | ;; Local variables: | ||
| 3352 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 3353 | ;; End: | ||
| 3354 | |||
| 3351 | ;;; org-exp.el ends here | 3355 | ;;; org-exp.el ends here |
diff --git a/lisp/org/org-faces.el b/lisp/org/org-faces.el index 51aead1b8bb..58be52d9e28 100644 --- a/lisp/org/org-faces.el +++ b/lisp/org/org-faces.el | |||
| @@ -692,13 +692,13 @@ month and 365.24 days for a year)." | |||
| 692 | :group 'org-faces) | 692 | :group 'org-faces) |
| 693 | 693 | ||
| 694 | (defface org-agenda-filter-tags | 694 | (defface org-agenda-filter-tags |
| 695 | (org-compatible-face 'modeline | 695 | (org-compatible-face 'mode-line |
| 696 | nil) | 696 | nil) |
| 697 | "Face for tag(s) in the mode-line when filtering the agenda." | 697 | "Face for tag(s) in the mode-line when filtering the agenda." |
| 698 | :group 'org-faces) | 698 | :group 'org-faces) |
| 699 | 699 | ||
| 700 | (defface org-agenda-filter-category | 700 | (defface org-agenda-filter-category |
| 701 | (org-compatible-face 'modeline | 701 | (org-compatible-face 'mode-line |
| 702 | nil) | 702 | nil) |
| 703 | "Face for tag(s) in the mode-line when filtering the agenda." | 703 | "Face for tag(s) in the mode-line when filtering the agenda." |
| 704 | :group 'org-faces) | 704 | :group 'org-faces) |
| @@ -770,9 +770,9 @@ level org-n-level-faces" | |||
| 770 | "Face used to highlight math latex and other special exporter stuff." | 770 | "Face used to highlight math latex and other special exporter stuff." |
| 771 | :group 'org-faces) | 771 | :group 'org-faces) |
| 772 | 772 | ||
| 773 | (org-copy-face 'modeline 'org-mode-line-clock | 773 | (org-copy-face 'mode-line 'org-mode-line-clock |
| 774 | "Face used for clock display in mode line.") | 774 | "Face used for clock display in mode line.") |
| 775 | (org-copy-face 'modeline 'org-mode-line-clock-overrun | 775 | (org-copy-face 'mode-line 'org-mode-line-clock-overrun |
| 776 | "Face used for clock display for overrun tasks in mode line." | 776 | "Face used for clock display for overrun tasks in mode line." |
| 777 | :background "red") | 777 | :background "red") |
| 778 | 778 | ||
diff --git a/lisp/org/org-feed.el b/lisp/org/org-feed.el index 91bf3347953..7724578ae58 100644 --- a/lisp/org/org-feed.el +++ b/lisp/org/org-feed.el | |||
| @@ -695,4 +695,8 @@ formatted as a string, not the original XML data." | |||
| 695 | 695 | ||
| 696 | (provide 'org-feed) | 696 | (provide 'org-feed) |
| 697 | 697 | ||
| 698 | ;; Local variables: | ||
| 699 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 700 | ;; End: | ||
| 701 | |||
| 698 | ;;; org-feed.el ends here | 702 | ;;; org-feed.el ends here |
diff --git a/lisp/org/org-footnote.el b/lisp/org/org-footnote.el index 3aaa44b7ac3..c598965f4c7 100644 --- a/lisp/org/org-footnote.el +++ b/lisp/org/org-footnote.el | |||
| @@ -948,4 +948,8 @@ If LABEL is non-nil, delete that footnote instead." | |||
| 948 | 948 | ||
| 949 | (provide 'org-footnote) | 949 | (provide 'org-footnote) |
| 950 | 950 | ||
| 951 | ;; Local variables: | ||
| 952 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 953 | ;; End: | ||
| 954 | |||
| 951 | ;;; org-footnote.el ends here | 955 | ;;; org-footnote.el ends here |
diff --git a/lisp/org/org-freemind.el b/lisp/org/org-freemind.el index a05cb554d4b..afc925d5426 100644 --- a/lisp/org/org-freemind.el +++ b/lisp/org/org-freemind.el | |||
| @@ -1219,8 +1219,8 @@ PATH should be a list of steps, where each step has the form | |||
| 1219 | 1219 | ||
| 1220 | (provide 'org-freemind) | 1220 | (provide 'org-freemind) |
| 1221 | 1221 | ||
| 1222 | 1222 | ;; Local variables: | |
| 1223 | 1223 | ;; generated-autoload-file: "org-loaddefs.el" | |
| 1224 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1224 | ;; End: |
| 1225 | 1225 | ||
| 1226 | ;;; org-freemind.el ends here | 1226 | ;;; org-freemind.el ends here |
diff --git a/lisp/org/org-html.el b/lisp/org/org-html.el index 79b028638a1..a6ca2d2a03b 100644 --- a/lisp/org/org-html.el +++ b/lisp/org/org-html.el | |||
| @@ -210,6 +210,7 @@ not be modified. Use the variables `org-export-html-style' to add | |||
| 210 | your own style information." | 210 | your own style information." |
| 211 | :group 'org-export-html | 211 | :group 'org-export-html |
| 212 | :type 'boolean) | 212 | :type 'boolean) |
| 213 | |||
| 213 | ;;;###autoload | 214 | ;;;###autoload |
| 214 | (put 'org-export-html-style-include-default 'safe-local-variable 'booleanp) | 215 | (put 'org-export-html-style-include-default 'safe-local-variable 'booleanp) |
| 215 | 216 | ||
| @@ -2380,7 +2381,6 @@ the settings define in the org-... variables." | |||
| 2380 | (plist-get htmlize-buffer-places 'content-end))) | 2381 | (plist-get htmlize-buffer-places 'content-end))) |
| 2381 | (kill-buffer htmlbuf)))) | 2382 | (kill-buffer htmlbuf)))) |
| 2382 | 2383 | ||
| 2383 | ;;;###autoload | ||
| 2384 | (defun org-export-htmlize-generate-css () | 2384 | (defun org-export-htmlize-generate-css () |
| 2385 | "Create the CSS for all font definitions in the current Emacs session. | 2385 | "Create the CSS for all font definitions in the current Emacs session. |
| 2386 | Use this to create face definitions in your CSS style file that can then | 2386 | Use this to create face definitions in your CSS style file that can then |
| @@ -2749,4 +2749,8 @@ the alist of previous items." | |||
| 2749 | 2749 | ||
| 2750 | (provide 'org-html) | 2750 | (provide 'org-html) |
| 2751 | 2751 | ||
| 2752 | ;; Local variables: | ||
| 2753 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 2754 | ;; End: | ||
| 2755 | |||
| 2752 | ;;; org-html.el ends here | 2756 | ;;; org-html.el ends here |
diff --git a/lisp/org/org-icalendar.el b/lisp/org/org-icalendar.el index 8523b442583..a2d2117dcb4 100644 --- a/lisp/org/org-icalendar.el +++ b/lisp/org/org-icalendar.el | |||
| @@ -684,4 +684,8 @@ a time), or the day by one (if it does not contain a time)." | |||
| 684 | 684 | ||
| 685 | (provide 'org-icalendar) | 685 | (provide 'org-icalendar) |
| 686 | 686 | ||
| 687 | ;; Local variables: | ||
| 688 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 689 | ;; End: | ||
| 690 | |||
| 687 | ;;; org-icalendar.el ends here | 691 | ;;; org-icalendar.el ends here |
diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el index c156e240dbf..f870ccc5a52 100644 --- a/lisp/org/org-id.el +++ b/lisp/org/org-id.el | |||
| @@ -233,7 +233,6 @@ With optional argument FORCE, force the creation of a new ID." | |||
| 233 | (org-entry-put (point) "ID" nil)) | 233 | (org-entry-put (point) "ID" nil)) |
| 234 | (org-id-get (point) 'create)) | 234 | (org-id-get (point) 'create)) |
| 235 | 235 | ||
| 236 | ;;;###autoload | ||
| 237 | (defun org-id-copy () | 236 | (defun org-id-copy () |
| 238 | "Copy the ID of the entry at point to the kill ring. | 237 | "Copy the ID of the entry at point to the kill ring. |
| 239 | Create an ID if necessary." | 238 | Create an ID if necessary." |
| @@ -259,7 +258,6 @@ In any case, the ID of the entry is returned." | |||
| 259 | (org-id-add-location id (buffer-file-name (buffer-base-buffer))) | 258 | (org-id-add-location id (buffer-file-name (buffer-base-buffer))) |
| 260 | id))))) | 259 | id))))) |
| 261 | 260 | ||
| 262 | ;;;###autoload | ||
| 263 | (defun org-id-get-with-outline-path-completion (&optional targets) | 261 | (defun org-id-get-with-outline-path-completion (&optional targets) |
| 264 | "Use outline-path-completion to retrieve the ID of an entry. | 262 | "Use outline-path-completion to retrieve the ID of an entry. |
| 265 | TARGETS may be a setting for `org-refile-targets' to define the eligible | 263 | TARGETS may be a setting for `org-refile-targets' to define the eligible |
| @@ -276,7 +274,6 @@ It returns the ID of the entry. If necessary, the ID is created." | |||
| 276 | (prog1 (org-id-get pom 'create) | 274 | (prog1 (org-id-get pom 'create) |
| 277 | (move-marker pom nil)))) | 275 | (move-marker pom nil)))) |
| 278 | 276 | ||
| 279 | ;;;###autoload | ||
| 280 | (defun org-id-get-with-outline-drilling (&optional targets) | 277 | (defun org-id-get-with-outline-drilling (&optional targets) |
| 281 | "Use an outline-cycling interface to retrieve the ID of an entry. | 278 | "Use an outline-cycling interface to retrieve the ID of an entry. |
| 282 | This only finds entries in the current buffer, using `org-get-location'. | 279 | This only finds entries in the current buffer, using `org-get-location'. |
| @@ -681,4 +678,8 @@ optional argument MARKERP, return the position as a new marker." | |||
| 681 | 678 | ||
| 682 | (provide 'org-id) | 679 | (provide 'org-id) |
| 683 | 680 | ||
| 681 | ;; Local variables: | ||
| 682 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 683 | ;; End: | ||
| 684 | |||
| 684 | ;;; org-id.el ends here | 685 | ;;; org-id.el ends here |
diff --git a/lisp/org/org-indent.el b/lisp/org/org-indent.el index d006df86747..c4d74fbb2fa 100644 --- a/lisp/org/org-indent.el +++ b/lisp/org/org-indent.el | |||
| @@ -431,4 +431,8 @@ This function is meant to be called by `after-change-functions'." | |||
| 431 | 431 | ||
| 432 | (provide 'org-indent) | 432 | (provide 'org-indent) |
| 433 | 433 | ||
| 434 | ;; Local variables: | ||
| 435 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 436 | ;; End: | ||
| 437 | |||
| 434 | ;;; org-indent.el ends here | 438 | ;;; org-indent.el ends here |
diff --git a/lisp/org/org-install.el b/lisp/org/org-install.el index 8df78b6b68d..a31d8b79209 100644 --- a/lisp/org/org-install.el +++ b/lisp/org/org-install.el | |||
| @@ -1,37 +1,13 @@ | |||
| 1 | ;;; org-install.el --- Outline-based notes management and organizer | 1 | ;;; org-install.el --- autogenerated file, do not edit |
| 2 | ;; Carstens outline-mode for keeping track of everything. | ||
| 3 | ;; Copyright (C) 2004-2012 Free Software Foundation, Inc. | ||
| 4 | ;; | 2 | ;; |
| 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 3 | ;;; Code: |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 4 | (warn "The file org-install is obsolete. |
| 7 | ;; Homepage: http://orgmode.org | 5 | Please change your configuration to (require 'org) instead.") |
| 8 | ;; Version: 6.06b | 6 | |
| 9 | ;; | ||
| 10 | ;; This file is part of GNU Emacs. | ||
| 11 | ;; | ||
| 12 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 13 | ;; it under the terms of the GNU General Public License as published by | ||
| 14 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 15 | ;; (at your option) any later version. | ||
| 16 | |||
| 17 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 18 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 19 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 20 | ;; GNU General Public License for more details. | ||
| 21 | |||
| 22 | ;; You should have received a copy of the GNU General Public License | ||
| 23 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 24 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 25 | ;; | ||
| 26 | ;;; Commentary: | ||
| 27 | ;; | ||
| 28 | ;; When Org-mode is distributed with Emacs, this is just a dummy file. | ||
| 29 | ;; In an Org-mode distribution outside Emacs, this file would provide | ||
| 30 | ;; the autoloads. We include this dummy version in Emacs, so that people | ||
| 31 | ;; can leave a (require 'org-install) in .emacs, independently of | ||
| 32 | ;; which kind of distribution they use. | ||
| 33 | ;; | ||
| 34 | |||
| 35 | (provide 'org-install) | 7 | (provide 'org-install) |
| 36 | 8 | ||
| 9 | ;; Local Variables: | ||
| 10 | ;; no-byte-compile: t | ||
| 11 | ;; coding: utf-8 | ||
| 12 | ;; End: | ||
| 37 | ;;; org-install.el ends here | 13 | ;;; org-install.el ends here |
diff --git a/lisp/org/org-irc.el b/lisp/org/org-irc.el index 787eed7950f..d31b1828ddd 100644 --- a/lisp/org/org-irc.el +++ b/lisp/org/org-irc.el | |||
| @@ -252,4 +252,8 @@ default." | |||
| 252 | 252 | ||
| 253 | (provide 'org-irc) | 253 | (provide 'org-irc) |
| 254 | 254 | ||
| 255 | ;; Local variables: | ||
| 256 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 257 | ;; End: | ||
| 258 | |||
| 255 | ;;; org-irc.el ends here | 259 | ;;; org-irc.el ends here |
diff --git a/lisp/org/org-latex.el b/lisp/org/org-latex.el index 933fa56b8dd..9ce84f14e92 100644 --- a/lisp/org/org-latex.el +++ b/lisp/org/org-latex.el | |||
| @@ -787,14 +787,14 @@ emacs --batch | |||
| 787 | --load=$HOME/lib/emacs/org.el | 787 | --load=$HOME/lib/emacs/org.el |
| 788 | --eval \"(setq org-export-headline-levels 2)\" | 788 | --eval \"(setq org-export-headline-levels 2)\" |
| 789 | --visit=MyFile --funcall org-export-as-latex-batch" | 789 | --visit=MyFile --funcall org-export-as-latex-batch" |
| 790 | (org-export-as-latex org-export-headline-levels 'hidden)) | 790 | (org-export-as-latex org-export-headline-levels)) |
| 791 | 791 | ||
| 792 | ;;;###autoload | 792 | ;;;###autoload |
| 793 | (defun org-export-as-latex-to-buffer (arg) | 793 | (defun org-export-as-latex-to-buffer (arg) |
| 794 | "Call `org-export-as-latex` with output to a temporary buffer. | 794 | "Call `org-export-as-latex` with output to a temporary buffer. |
| 795 | No file is created. The prefix ARG is passed through to `org-export-as-latex'." | 795 | No file is created. The prefix ARG is passed through to `org-export-as-latex'." |
| 796 | (interactive "P") | 796 | (interactive "P") |
| 797 | (org-export-as-latex arg nil nil "*Org LaTeX Export*") | 797 | (org-export-as-latex arg nil "*Org LaTeX Export*") |
| 798 | (when org-export-show-temporary-export-buffer | 798 | (when org-export-show-temporary-export-buffer |
| 799 | (switch-to-buffer-other-window "*Org LaTeX Export*"))) | 799 | (switch-to-buffer-other-window "*Org LaTeX Export*"))) |
| 800 | 800 | ||
| @@ -848,7 +848,7 @@ in a window. A non-interactive call will only return the buffer." | |||
| 848 | (set-mark (point)) ;; to activate the region | 848 | (set-mark (point)) ;; to activate the region |
| 849 | (goto-char beg) | 849 | (goto-char beg) |
| 850 | (setq rtn (org-export-as-latex | 850 | (setq rtn (org-export-as-latex |
| 851 | nil nil ext-plist | 851 | nil ext-plist |
| 852 | buffer body-only)) | 852 | buffer body-only)) |
| 853 | (if (fboundp 'deactivate-mark) (deactivate-mark)) | 853 | (if (fboundp 'deactivate-mark) (deactivate-mark)) |
| 854 | (if (and (org-called-interactively-p 'any) (bufferp rtn)) | 854 | (if (and (org-called-interactively-p 'any) (bufferp rtn)) |
| @@ -856,21 +856,19 @@ in a window. A non-interactive call will only return the buffer." | |||
| 856 | rtn))) | 856 | rtn))) |
| 857 | 857 | ||
| 858 | ;;;###autoload | 858 | ;;;###autoload |
| 859 | (defun org-export-as-latex (arg &optional hidden ext-plist | 859 | (defun org-export-as-latex (arg &optional ext-plist to-buffer body-only pub-dir) |
| 860 | to-buffer body-only pub-dir) | ||
| 861 | "Export current buffer to a LaTeX file. | 860 | "Export current buffer to a LaTeX file. |
| 862 | If there is an active region, export only the region. The prefix | 861 | If there is an active region, export only the region. The prefix |
| 863 | ARG specifies how many levels of the outline should become | 862 | ARG specifies how many levels of the outline should become |
| 864 | headlines. The default is 3. Lower levels will be exported | 863 | headlines. The default is 3. Lower levels will be exported |
| 865 | depending on `org-export-latex-low-levels'. The default is to | 864 | depending on `org-export-latex-low-levels'. The default is to |
| 866 | convert them as description lists. | 865 | convert them as description lists. |
| 867 | HIDDEN is obsolete and does nothing. | 866 | EXT-PLIST is a property list with external parameters overriding |
| 868 | EXT-PLIST is a property list with | 867 | org-mode's default settings, but still inferior to file-local settings. |
| 869 | external parameters overriding org-mode's default settings, but | 868 | When TO-BUFFER is non-nil, create a buffer with that name and export |
| 870 | still inferior to file-local settings. When TO-BUFFER is | 869 | to that buffer. If TO-BUFFER is the symbol `string', don't leave any |
| 871 | non-nil, create a buffer with that name and export to that | 870 | buffer behind and just return the resulting LaTeX as a string, with |
| 872 | buffer. If TO-BUFFER is the symbol `string', don't leave any | 871 | no LaTeX header. |
| 873 | buffer behind but just return the resulting LaTeX as a string. | ||
| 874 | When BODY-ONLY is set, don't produce the file header and footer, | 872 | When BODY-ONLY is set, don't produce the file header and footer, |
| 875 | simply return the content of \\begin{document}...\\end{document}, | 873 | simply return the content of \\begin{document}...\\end{document}, |
| 876 | without even the \\begin{document} and \\end{document} commands. | 874 | without even the \\begin{document} and \\end{document} commands. |
| @@ -957,10 +955,9 @@ when PUB-DIR is set, use this as the publishing directory." | |||
| 957 | (auto-insert nil); Avoid any auto-insert stuff for the new file | 955 | (auto-insert nil); Avoid any auto-insert stuff for the new file |
| 958 | (TeX-master (boundp 'TeX-master)) | 956 | (TeX-master (boundp 'TeX-master)) |
| 959 | (buffer (if to-buffer | 957 | (buffer (if to-buffer |
| 960 | (cond | 958 | (if (eq to-buffer 'string) |
| 961 | ((eq to-buffer 'string) (get-buffer-create | 959 | (get-buffer-create "*Org LaTeX Export*") |
| 962 | "*Org LaTeX Export*")) | 960 | (get-buffer-create to-buffer)) |
| 963 | (t (get-buffer-create to-buffer))) | ||
| 964 | (find-file-noselect filename))) | 961 | (find-file-noselect filename))) |
| 965 | (odd org-odd-levels-only) | 962 | (odd org-odd-levels-only) |
| 966 | (header (org-export-latex-make-header title opt-plist)) | 963 | (header (org-export-latex-make-header title opt-plist)) |
| @@ -1120,8 +1117,7 @@ when PUB-DIR is set, use this as the publishing directory." | |||
| 1120 | (interactive "P") | 1117 | (interactive "P") |
| 1121 | (message "Exporting to PDF...") | 1118 | (message "Exporting to PDF...") |
| 1122 | (let* ((wconfig (current-window-configuration)) | 1119 | (let* ((wconfig (current-window-configuration)) |
| 1123 | (lbuf (org-export-as-latex arg hidden ext-plist | 1120 | (lbuf (org-export-as-latex arg ext-plist to-buffer body-only pub-dir)) |
| 1124 | to-buffer body-only pub-dir)) | ||
| 1125 | (file (buffer-file-name lbuf)) | 1121 | (file (buffer-file-name lbuf)) |
| 1126 | (base (file-name-sans-extension (buffer-file-name lbuf))) | 1122 | (base (file-name-sans-extension (buffer-file-name lbuf))) |
| 1127 | (pdffile (concat base ".pdf")) | 1123 | (pdffile (concat base ".pdf")) |
| @@ -2899,4 +2895,8 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." | |||
| 2899 | (provide 'org-export-latex) | 2895 | (provide 'org-export-latex) |
| 2900 | (provide 'org-latex) | 2896 | (provide 'org-latex) |
| 2901 | 2897 | ||
| 2898 | ;; Local variables: | ||
| 2899 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 2900 | ;; End: | ||
| 2901 | |||
| 2902 | ;;; org-latex.el ends here | 2902 | ;;; org-latex.el ends here |
diff --git a/lisp/org/org-lparse.el b/lisp/org/org-lparse.el index 7024912050a..c5ced3ef01c 100644 --- a/lisp/org/org-lparse.el +++ b/lisp/org/org-lparse.el | |||
| @@ -50,7 +50,6 @@ | |||
| 50 | (require 'org-list) | 50 | (require 'org-list) |
| 51 | (require 'format-spec) | 51 | (require 'format-spec) |
| 52 | 52 | ||
| 53 | ;;;###autoload | ||
| 54 | (defun org-lparse-and-open (target-backend native-backend arg | 53 | (defun org-lparse-and-open (target-backend native-backend arg |
| 55 | &optional file-or-buf) | 54 | &optional file-or-buf) |
| 56 | "Export outline to TARGET-BACKEND via NATIVE-BACKEND and open exported file. | 55 | "Export outline to TARGET-BACKEND via NATIVE-BACKEND and open exported file. |
| @@ -71,7 +70,6 @@ lists." | |||
| 71 | (when org-export-kill-product-buffer-when-displayed | 70 | (when org-export-kill-product-buffer-when-displayed |
| 72 | (kill-buffer (current-buffer)))))) | 71 | (kill-buffer (current-buffer)))))) |
| 73 | 72 | ||
| 74 | ;;;###autoload | ||
| 75 | (defun org-lparse-batch (target-backend &optional native-backend) | 73 | (defun org-lparse-batch (target-backend &optional native-backend) |
| 76 | "Call the function `org-lparse'. | 74 | "Call the function `org-lparse'. |
| 77 | This function can be used in batch processing as: | 75 | This function can be used in batch processing as: |
| @@ -83,7 +81,6 @@ emacs --batch | |||
| 83 | (org-lparse target-backend native-backend | 81 | (org-lparse target-backend native-backend |
| 84 | org-export-headline-levels 'hidden)) | 82 | org-export-headline-levels 'hidden)) |
| 85 | 83 | ||
| 86 | ;;;###autoload | ||
| 87 | (defun org-lparse-to-buffer (backend arg) | 84 | (defun org-lparse-to-buffer (backend arg) |
| 88 | "Call `org-lparse' with output to a temporary buffer. | 85 | "Call `org-lparse' with output to a temporary buffer. |
| 89 | No file is created. The prefix ARG is passed through to | 86 | No file is created. The prefix ARG is passed through to |
| @@ -93,7 +90,6 @@ No file is created. The prefix ARG is passed through to | |||
| 93 | (when org-export-show-temporary-export-buffer | 90 | (when org-export-show-temporary-export-buffer |
| 94 | (switch-to-buffer-other-window tempbuf)))) | 91 | (switch-to-buffer-other-window tempbuf)))) |
| 95 | 92 | ||
| 96 | ;;;###autoload | ||
| 97 | (defun org-replace-region-by (backend beg end) | 93 | (defun org-replace-region-by (backend beg end) |
| 98 | "Assume the current region has org-mode syntax, and convert it to HTML. | 94 | "Assume the current region has org-mode syntax, and convert it to HTML. |
| 99 | This can be used in any buffer. For example, you could write an | 95 | This can be used in any buffer. For example, you could write an |
| @@ -115,7 +111,6 @@ this command to convert it." | |||
| 115 | (delete-region beg end) | 111 | (delete-region beg end) |
| 116 | (insert backend-string))) | 112 | (insert backend-string))) |
| 117 | 113 | ||
| 118 | ;;;###autoload | ||
| 119 | (defun org-lparse-region (backend beg end &optional body-only buffer) | 114 | (defun org-lparse-region (backend beg end &optional body-only buffer) |
| 120 | "Convert region from BEG to END in org-mode buffer to HTML. | 115 | "Convert region from BEG to END in org-mode buffer to HTML. |
| 121 | If prefix arg BODY-ONLY is set, omit file header, footer, and table of | 116 | If prefix arg BODY-ONLY is set, omit file header, footer, and table of |
| @@ -447,11 +442,12 @@ PUB-DIR specifies the publishing directory." | |||
| 447 | (error "Don't know how to export to backend %s %s" target-backend | 442 | (error "Don't know how to export to backend %s %s" target-backend |
| 448 | (format "via %s" native-backend))) | 443 | (format "via %s" native-backend))) |
| 449 | (run-hooks 'org-export-first-hook) | 444 | (run-hooks 'org-export-first-hook) |
| 450 | (org-do-lparse arg hidden ext-plist to-buffer body-only pub-dir) | 445 | (prog1 |
| 451 | (remove-hook 'org-export-preprocess-hook | 446 | (org-do-lparse arg hidden ext-plist to-buffer body-only pub-dir) |
| 452 | 'org-lparse-strip-experimental-blocks-maybe) | 447 | (remove-hook 'org-export-preprocess-hook |
| 453 | (remove-hook 'org-export-preprocess-after-blockquote-hook | 448 | 'org-lparse-strip-experimental-blocks-maybe) |
| 454 | 'org-lparse-preprocess-after-blockquote))) | 449 | (remove-hook 'org-export-preprocess-after-blockquote-hook |
| 450 | 'org-lparse-preprocess-after-blockquote)))) | ||
| 455 | 451 | ||
| 456 | (defcustom org-lparse-use-flashy-warning nil | 452 | (defcustom org-lparse-use-flashy-warning nil |
| 457 | "Control flashing of messages logged with `org-lparse-warn'. | 453 | "Control flashing of messages logged with `org-lparse-warn'. |
| @@ -480,6 +476,8 @@ This is a helper routine for interactive use." | |||
| 480 | (eval-when-compile | 476 | (eval-when-compile |
| 481 | (require 'browse-url)) | 477 | (require 'browse-url)) |
| 482 | 478 | ||
| 479 | (declare-function browse-url-file-url "browse-url" (file)) | ||
| 480 | |||
| 483 | (defun org-lparse-do-convert (in-file out-fmt &optional prefix-arg) | 481 | (defun org-lparse-do-convert (in-file out-fmt &optional prefix-arg) |
| 484 | "Workhorse routine for `org-export-odt-convert'." | 482 | "Workhorse routine for `org-export-odt-convert'." |
| 485 | (require 'browse-url) | 483 | (require 'browse-url) |
| @@ -2298,4 +2296,8 @@ Replaces invalid characters with \"_\"." | |||
| 2298 | 2296 | ||
| 2299 | (provide 'org-lparse) | 2297 | (provide 'org-lparse) |
| 2300 | 2298 | ||
| 2299 | ;; Local variables: | ||
| 2300 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 2301 | ;; End: | ||
| 2302 | |||
| 2301 | ;;; org-lparse.el ends here | 2303 | ;;; org-lparse.el ends here |
diff --git a/lisp/org/org-mobile.el b/lisp/org/org-mobile.el index d2c9c17367f..ffdd66513be 100644 --- a/lisp/org/org-mobile.el +++ b/lisp/org/org-mobile.el | |||
| @@ -680,7 +680,6 @@ The table of checksums is written to the file mobile-checksums." | |||
| 680 | (let ((table '(?: ?/))) | 680 | (let ((table '(?: ?/))) |
| 681 | (org-link-escape s table))) | 681 | (org-link-escape s table))) |
| 682 | 682 | ||
| 683 | ;;;###autoload | ||
| 684 | (defun org-mobile-create-sumo-agenda () | 683 | (defun org-mobile-create-sumo-agenda () |
| 685 | "Create a file that contains all custom agenda views." | 684 | "Create a file that contains all custom agenda views." |
| 686 | (interactive) | 685 | (interactive) |
| @@ -1129,4 +1128,8 @@ A and B must be strings or nil." | |||
| 1129 | 1128 | ||
| 1130 | (provide 'org-mobile) | 1129 | (provide 'org-mobile) |
| 1131 | 1130 | ||
| 1131 | ;; Local variables: | ||
| 1132 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 1133 | ;; End: | ||
| 1134 | |||
| 1132 | ;;; org-mobile.el ends here | 1135 | ;;; org-mobile.el ends here |
diff --git a/lisp/org/org-odt.el b/lisp/org/org-odt.el index 7de4b5de853..2dc3af39b09 100644 --- a/lisp/org/org-odt.el +++ b/lisp/org/org-odt.el | |||
| @@ -2718,7 +2718,7 @@ Do this when translation to MathML fails." | |||
| 2718 | (defun org-export-odt-preprocess (parameters) | 2718 | (defun org-export-odt-preprocess (parameters) |
| 2719 | (org-export-odt-preprocess-label-references)) | 2719 | (org-export-odt-preprocess-label-references)) |
| 2720 | 2720 | ||
| 2721 | (declare-function archive-zip-extract "arc-mode.el" (archive name)) | 2721 | (declare-function archive-zip-extract "arc-mode" (archive name)) |
| 2722 | (defun org-odt-zip-extract-one (archive member &optional target) | 2722 | (defun org-odt-zip-extract-one (archive member &optional target) |
| 2723 | (require 'arc-mode) | 2723 | (require 'arc-mode) |
| 2724 | (let* ((target (or target default-directory)) | 2724 | (let* ((target (or target default-directory)) |
| @@ -2847,4 +2847,8 @@ formula file." | |||
| 2847 | 2847 | ||
| 2848 | (provide 'org-odt) | 2848 | (provide 'org-odt) |
| 2849 | 2849 | ||
| 2850 | ;; Local variables: | ||
| 2851 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 2852 | ;; End: | ||
| 2853 | |||
| 2850 | ;;; org-odt.el ends here | 2854 | ;;; org-odt.el ends here |
diff --git a/lisp/org/org-plot.el b/lisp/org/org-plot.el index 48d72ac2810..5dec304363f 100644 --- a/lisp/org/org-plot.el +++ b/lisp/org/org-plot.el | |||
| @@ -351,4 +351,8 @@ line directly before or after the table." | |||
| 351 | 351 | ||
| 352 | (provide 'org-plot) | 352 | (provide 'org-plot) |
| 353 | 353 | ||
| 354 | ;; Local variables: | ||
| 355 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 356 | ;; End: | ||
| 357 | |||
| 354 | ;;; org-plot.el ends here | 358 | ;;; org-plot.el ends here |
diff --git a/lisp/org/org-publish.el b/lisp/org/org-publish.el index 947d52b9200..d10514255b6 100644 --- a/lisp/org/org-publish.el +++ b/lisp/org/org-publish.el | |||
| @@ -916,7 +916,6 @@ directory and force publishing all files." | |||
| 916 | (if force nil org-publish-use-timestamps-flag))) | 916 | (if force nil org-publish-use-timestamps-flag))) |
| 917 | (org-publish-projects org-publish-project-alist)))) | 917 | (org-publish-projects org-publish-project-alist)))) |
| 918 | 918 | ||
| 919 | |||
| 920 | ;;;###autoload | 919 | ;;;###autoload |
| 921 | (defun org-publish-current-file (&optional force) | 920 | (defun org-publish-current-file (&optional force) |
| 922 | "Publish the current file. | 921 | "Publish the current file. |
| @@ -1192,4 +1191,8 @@ Returns value on success, else nil." | |||
| 1192 | 1191 | ||
| 1193 | (provide 'org-publish) | 1192 | (provide 'org-publish) |
| 1194 | 1193 | ||
| 1194 | ;; Local variables: | ||
| 1195 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 1196 | ;; End: | ||
| 1197 | |||
| 1195 | ;;; org-publish.el ends here | 1198 | ;;; org-publish.el ends here |
diff --git a/lisp/org/org-remember.el b/lisp/org/org-remember.el index dd493749295..d555ca65d21 100644 --- a/lisp/org/org-remember.el +++ b/lisp/org/org-remember.el | |||
| @@ -1149,4 +1149,8 @@ See also the variable `org-reverse-note-order'." | |||
| 1149 | 1149 | ||
| 1150 | (provide 'org-remember) | 1150 | (provide 'org-remember) |
| 1151 | 1151 | ||
| 1152 | ;; Local variables: | ||
| 1153 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 1154 | ;; End: | ||
| 1155 | |||
| 1152 | ;;; org-remember.el ends here | 1156 | ;;; org-remember.el ends here |
diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index 9d6bc1aa2c8..b4d4c0489a9 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el | |||
| @@ -41,10 +41,8 @@ | |||
| 41 | (declare-function org-at-table.el-p "org" ()) | 41 | (declare-function org-at-table.el-p "org" ()) |
| 42 | (declare-function org-get-indentation "org" (&optional line)) | 42 | (declare-function org-get-indentation "org" (&optional line)) |
| 43 | (declare-function org-switch-to-buffer-other-window "org" (&rest args)) | 43 | (declare-function org-switch-to-buffer-other-window "org" (&rest args)) |
| 44 | (declare-function org-strip-protective-commas "org" (beg end)) | ||
| 45 | (declare-function org-pop-to-buffer-same-window | 44 | (declare-function org-pop-to-buffer-same-window |
| 46 | "org-compat" (&optional buffer-or-name norecord label)) | 45 | "org-compat" (&optional buffer-or-name norecord label)) |
| 47 | (declare-function org-strip-protective-commas "org" (beg end)) | ||
| 48 | (declare-function org-base-buffer "org" (buffer)) | 46 | (declare-function org-base-buffer "org" (buffer)) |
| 49 | 47 | ||
| 50 | (defcustom org-edit-src-region-extra nil | 48 | (defcustom org-edit-src-region-extra nil |
| @@ -311,13 +309,8 @@ buffer." | |||
| 311 | (error "Language mode `%s' fails with: %S" lang-f (nth 1 e))))) | 309 | (error "Language mode `%s' fails with: %S" lang-f (nth 1 e))))) |
| 312 | (dolist (pair transmitted-variables) | 310 | (dolist (pair transmitted-variables) |
| 313 | (org-set-local (car pair) (cadr pair))) | 311 | (org-set-local (car pair) (cadr pair))) |
| 314 | (if (derived-mode-p 'org-mode) | 312 | ;; Remove protecting commas from visible part of buffer. |
| 315 | (progn | 313 | (org-unescape-code-in-region (point-min) (point-max)) |
| 316 | (goto-char (point-min)) | ||
| 317 | (while (re-search-forward "^," nil t) | ||
| 318 | (if (eq (org-current-line) line) (setq total-nindent (1+ total-nindent))) | ||
| 319 | (replace-match ""))) | ||
| 320 | (org-strip-protective-commas (point-min) (point-max))) | ||
| 321 | (when markline | 314 | (when markline |
| 322 | (org-goto-line (1+ (- markline begline))) | 315 | (org-goto-line (1+ (- markline begline))) |
| 323 | (org-move-to-column | 316 | (org-move-to-column |
| @@ -590,20 +583,38 @@ the language, a switch telling if the content should be in a single line." | |||
| 590 | (goto-char pos) | 583 | (goto-char pos) |
| 591 | (org-get-indentation))) | 584 | (org-get-indentation))) |
| 592 | 585 | ||
| 593 | (defun org-add-protective-commas (beg end &optional line) | 586 | (defun org-escape-code-in-region (beg end) |
| 594 | "Add protective commas in region. | 587 | "Escape lines between BEG and END. |
| 595 | Return the delta in size of the region." | 588 | Escaping happens when a line starts with \"*\", \"#+\", \",*\" or |
| 589 | \",#+\" by appending a comma to it." | ||
| 596 | (interactive "r") | 590 | (interactive "r") |
| 597 | (let ((org-re "^\\(.\\)") | 591 | (save-excursion |
| 598 | (other-re "^\\([*]\\|[ \t]*#\\+\\)") | 592 | (goto-char beg) |
| 599 | (delta 0)) | 593 | (while (re-search-forward "^[ \t]*,?\\(\\*\\|#\\+\\)" end t) |
| 600 | (save-excursion | 594 | (replace-match ",\\1" nil nil nil 1)))) |
| 601 | (goto-char beg) | 595 | |
| 602 | (while (re-search-forward (if (derived-mode-p 'org-mode) org-re other-re) | 596 | (defun org-escape-code-in-string (s) |
| 603 | end t) | 597 | "Escape lines in string S. |
| 604 | (if (and line (eq (org-current-line) line)) (setq delta (1+ delta))) | 598 | Escaping happens when a line starts with \"*\", \"#+\", \",*\" or |
| 605 | (replace-match ",\\1"))) | 599 | \",#+\" by appending a comma to it." |
| 606 | delta)) | 600 | (replace-regexp-in-string "^[ \t]*,?\\(\\*\\|#\\+\\)" ",\\1" s nil nil 1)) |
| 601 | |||
| 602 | (defun org-unescape-code-in-region (beg end) | ||
| 603 | "Un-escape lines between BEG and END. | ||
| 604 | Un-escaping happens by removing the first comma on lines starting | ||
| 605 | with \",*\", \",#+\", \",,*\" and \",,#+\"." | ||
| 606 | (interactive "r") | ||
| 607 | (save-excursion | ||
| 608 | (goto-char beg) | ||
| 609 | (while (re-search-forward "^[ \t]*,?\\(,\\)\\(?:\\*\\|#\\+\\)" end t) | ||
| 610 | (replace-match "" nil nil nil 1)))) | ||
| 611 | |||
| 612 | (defun org-unescape-code-in-string (s) | ||
| 613 | "Un-escape lines in string S. | ||
| 614 | Un-escaping happens by removing the first comma on lines starting | ||
| 615 | with \",*\", \",#+\", \",,*\" and \",,#+\"." | ||
| 616 | (replace-regexp-in-string | ||
| 617 | "^[ \t]*,?\\(,\\)\\(?:\\*\\|#\\+\\)" "" s nil nil 1)) | ||
| 607 | 618 | ||
| 608 | (defun org-edit-src-exit (&optional context) | 619 | (defun org-edit-src-exit (&optional context) |
| 609 | "Exit special edit and protect problematic lines." | 620 | "Exit special edit and protect problematic lines." |
| @@ -649,8 +660,12 @@ Return the delta in size of the region." | |||
| 649 | (goto-char (point-min)) | 660 | (goto-char (point-min)) |
| 650 | (if (looking-at "\\s-*") (replace-match " "))) | 661 | (if (looking-at "\\s-*") (replace-match " "))) |
| 651 | (when (org-bound-and-true-p org-edit-src-from-org-mode) | 662 | (when (org-bound-and-true-p org-edit-src-from-org-mode) |
| 652 | (setq delta (+ delta (org-add-protective-commas | 663 | (org-escape-code-in-region (point-min) (point-max)) |
| 653 | (point-min) (point-max) line)))) | 664 | (setq delta (+ delta |
| 665 | (save-excursion | ||
| 666 | (org-goto-line line) | ||
| 667 | (if (looking-at "[ \t]*\\(,,\\)?\\(\\*\\|#+\\)") 1 | ||
| 668 | 0))))) | ||
| 654 | (when (org-bound-and-true-p org-edit-src-picture) | 669 | (when (org-bound-and-true-p org-edit-src-picture) |
| 655 | (setq preserve-indentation nil) | 670 | (setq preserve-indentation nil) |
| 656 | (untabify (point-min) (point-max)) | 671 | (untabify (point-min) (point-max)) |
| @@ -674,9 +689,10 @@ Return the delta in size of the region." | |||
| 674 | (kill-buffer buffer)) | 689 | (kill-buffer buffer)) |
| 675 | (goto-char beg) | 690 | (goto-char beg) |
| 676 | (when allow-write-back-p | 691 | (when allow-write-back-p |
| 677 | (delete-region beg (1- end)) | 692 | (delete-region beg (max beg (1- end))) |
| 678 | (insert code) | 693 | (unless (string-match "^[ \t]*$" code) |
| 679 | (delete-char 1) | 694 | (insert code) |
| 695 | (delete-char 1)) | ||
| 680 | (goto-char beg) | 696 | (goto-char beg) |
| 681 | (if single (just-one-space))) | 697 | (if single (just-one-space))) |
| 682 | (if (memq t (mapcar (lambda (overlay) | 698 | (if (memq t (mapcar (lambda (overlay) |
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 3eb63b6e53c..0555041231b 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el | |||
| @@ -423,6 +423,7 @@ available parameters." | |||
| 423 | (concat "\\(" "@[-0-9I$]+" "\\|" "[a-zA-Z]\\{1,2\\}\\([0-9]+\\|&\\)" "\\)") | 423 | (concat "\\(" "@[-0-9I$]+" "\\|" "[a-zA-Z]\\{1,2\\}\\([0-9]+\\|&\\)" "\\)") |
| 424 | "Match a reference that needs translation, for reference display.") | 424 | "Match a reference that needs translation, for reference display.") |
| 425 | 425 | ||
| 426 | ;;;###autoload | ||
| 426 | (defun org-table-create-with-table.el () | 427 | (defun org-table-create-with-table.el () |
| 427 | "Use the table.el package to insert a new table. | 428 | "Use the table.el package to insert a new table. |
| 428 | If there is already a table at point, convert between Org-mode tables | 429 | If there is already a table at point, convert between Org-mode tables |
| @@ -439,6 +440,7 @@ and table.el tables." | |||
| 439 | (org-table-convert))) | 440 | (org-table-convert))) |
| 440 | (t (call-interactively 'table-insert)))) | 441 | (t (call-interactively 'table-insert)))) |
| 441 | 442 | ||
| 443 | ;;;###autoload | ||
| 442 | (defun org-table-create-or-convert-from-region (arg) | 444 | (defun org-table-create-or-convert-from-region (arg) |
| 443 | "Convert region to table, or create an empty table. | 445 | "Convert region to table, or create an empty table. |
| 444 | If there is an active region, convert it to a table, using the function | 446 | If there is an active region, convert it to a table, using the function |
| @@ -451,6 +453,7 @@ If there is no such region, create an empty table with `org-table-create'." | |||
| 451 | (org-table-convert-region (region-beginning) (region-end) arg) | 453 | (org-table-convert-region (region-beginning) (region-end) arg) |
| 452 | (org-table-create arg))) | 454 | (org-table-create arg))) |
| 453 | 455 | ||
| 456 | ;;;###autoload | ||
| 454 | (defun org-table-create (&optional size) | 457 | (defun org-table-create (&optional size) |
| 455 | "Query for a size and insert a table skeleton. | 458 | "Query for a size and insert a table skeleton. |
| 456 | SIZE is a string Columns x Rows like for example \"3x2\"." | 459 | SIZE is a string Columns x Rows like for example \"3x2\"." |
| @@ -483,6 +486,7 @@ SIZE is a string Columns x Rows like for example \"3x2\"." | |||
| 483 | (goto-char pos))) | 486 | (goto-char pos))) |
| 484 | (org-table-align))) | 487 | (org-table-align))) |
| 485 | 488 | ||
| 489 | ;;;###autoload | ||
| 486 | (defun org-table-convert-region (beg0 end0 &optional separator) | 490 | (defun org-table-convert-region (beg0 end0 &optional separator) |
| 487 | "Convert region to a table. | 491 | "Convert region to a table. |
| 488 | The region goes from BEG0 to END0, but these borders will be moved | 492 | The region goes from BEG0 to END0, but these borders will be moved |
| @@ -543,6 +547,7 @@ nil When nil, the command tries to be smart and figure out the | |||
| 543 | (goto-char beg) | 547 | (goto-char beg) |
| 544 | (org-table-align))) | 548 | (org-table-align))) |
| 545 | 549 | ||
| 550 | ;;;###autoload | ||
| 546 | (defun org-table-import (file arg) | 551 | (defun org-table-import (file arg) |
| 547 | "Import FILE as a table. | 552 | "Import FILE as a table. |
| 548 | The file is assumed to be tab-separated. Such files can be produced by most | 553 | The file is assumed to be tab-separated. Such files can be produced by most |
| @@ -558,6 +563,7 @@ are found, lines will be split on whitespace into fields." | |||
| 558 | 563 | ||
| 559 | (defvar org-table-last-alignment) | 564 | (defvar org-table-last-alignment) |
| 560 | (defvar org-table-last-column-widths) | 565 | (defvar org-table-last-column-widths) |
| 566 | ;;;###autoload | ||
| 561 | (defun org-table-export (&optional file format) | 567 | (defun org-table-export (&optional file format) |
| 562 | "Export table to a file, with configurable format. | 568 | "Export table to a file, with configurable format. |
| 563 | Such a file can be imported into usual spreadsheet programs. | 569 | Such a file can be imported into usual spreadsheet programs. |
| @@ -673,6 +679,7 @@ When nil, simply write \"#ERROR\" in corrupted fields.") | |||
| 673 | (defconst org-narrow-column-arrow "=>" | 679 | (defconst org-narrow-column-arrow "=>" |
| 674 | "Used as display property in narrowed table columns.") | 680 | "Used as display property in narrowed table columns.") |
| 675 | 681 | ||
| 682 | ;;;###autoload | ||
| 676 | (defun org-table-align () | 683 | (defun org-table-align () |
| 677 | "Align the table at point by aligning all vertical bars." | 684 | "Align the table at point by aligning all vertical bars." |
| 678 | (interactive) | 685 | (interactive) |
| @@ -884,6 +891,7 @@ With argument TABLE-TYPE, go to the end of a table.el-type table." | |||
| 884 | (goto-char (match-beginning 0))) | 891 | (goto-char (match-beginning 0))) |
| 885 | (point-marker))) | 892 | (point-marker))) |
| 886 | 893 | ||
| 894 | ;;;###autoload | ||
| 887 | (defun org-table-justify-field-maybe (&optional new) | 895 | (defun org-table-justify-field-maybe (&optional new) |
| 888 | "Justify the current field, text to left, number to right. | 896 | "Justify the current field, text to left, number to right. |
| 889 | Optional argument NEW may specify text to replace the current field content." | 897 | Optional argument NEW may specify text to replace the current field content." |
| @@ -924,6 +932,7 @@ Optional argument NEW may specify text to replace the current field content." | |||
| 924 | (setq org-table-may-need-update t)) | 932 | (setq org-table-may-need-update t)) |
| 925 | (goto-char pos)))))) | 933 | (goto-char pos)))))) |
| 926 | 934 | ||
| 935 | ;;;###autoload | ||
| 927 | (defun org-table-next-field () | 936 | (defun org-table-next-field () |
| 928 | "Go to the next field in the current table, creating new lines as needed. | 937 | "Go to the next field in the current table, creating new lines as needed. |
| 929 | Before doing so, re-align the table if necessary." | 938 | Before doing so, re-align the table if necessary." |
| @@ -953,6 +962,7 @@ Before doing so, re-align the table if necessary." | |||
| 953 | (error | 962 | (error |
| 954 | (org-table-insert-row 'below))))) | 963 | (org-table-insert-row 'below))))) |
| 955 | 964 | ||
| 965 | ;;;###autoload | ||
| 956 | (defun org-table-previous-field () | 966 | (defun org-table-previous-field () |
| 957 | "Go to the previous field in the table. | 967 | "Go to the previous field in the table. |
| 958 | Before doing so, re-align the table if necessary." | 968 | Before doing so, re-align the table if necessary." |
| @@ -1006,6 +1016,7 @@ With numeric argument N, move N-1 fields backward first." | |||
| 1006 | (forward-char 1))) | 1016 | (forward-char 1))) |
| 1007 | (if (<= (point) pos) (org-table-end-of-field 2)))) | 1017 | (if (<= (point) pos) (org-table-end-of-field 2)))) |
| 1008 | 1018 | ||
| 1019 | ;;;###autoload | ||
| 1009 | (defun org-table-next-row () | 1020 | (defun org-table-next-row () |
| 1010 | "Go to the next row (same column) in the current table. | 1021 | "Go to the next row (same column) in the current table. |
| 1011 | Before doing so, re-align the table if necessary." | 1022 | Before doing so, re-align the table if necessary." |
| @@ -1029,6 +1040,7 @@ Before doing so, re-align the table if necessary." | |||
| 1029 | (skip-chars-backward "^|\n\r") | 1040 | (skip-chars-backward "^|\n\r") |
| 1030 | (if (looking-at " ") (forward-char 1))))) | 1041 | (if (looking-at " ") (forward-char 1))))) |
| 1031 | 1042 | ||
| 1043 | ;;;###autoload | ||
| 1032 | (defun org-table-copy-down (n) | 1044 | (defun org-table-copy-down (n) |
| 1033 | "Copy a field down in the current column. | 1045 | "Copy a field down in the current column. |
| 1034 | If the field at the cursor is empty, copy into it the content of | 1046 | If the field at the cursor is empty, copy into it the content of |
| @@ -1173,6 +1185,7 @@ is always the old value." | |||
| 1173 | val) | 1185 | val) |
| 1174 | (forward-char 1) "")) | 1186 | (forward-char 1) "")) |
| 1175 | 1187 | ||
| 1188 | ;;;###autoload | ||
| 1176 | (defun org-table-field-info (arg) | 1189 | (defun org-table-field-info (arg) |
| 1177 | "Show info about the current field, and highlight any reference at point." | 1190 | "Show info about the current field, and highlight any reference at point." |
| 1178 | (interactive "P") | 1191 | (interactive "P") |
| @@ -1228,6 +1241,7 @@ is always the old value." | |||
| 1228 | (message "In table column %d" cnt)) | 1241 | (message "In table column %d" cnt)) |
| 1229 | cnt))) | 1242 | cnt))) |
| 1230 | 1243 | ||
| 1244 | ;;;###autoload | ||
| 1231 | (defun org-table-current-dline () | 1245 | (defun org-table-current-dline () |
| 1232 | "Find out what table data line we are in. | 1246 | "Find out what table data line we are in. |
| 1233 | Only data lines count for this." | 1247 | Only data lines count for this." |
| @@ -1244,6 +1258,7 @@ Only data lines count for this." | |||
| 1244 | (message "This is table line %d" cnt)) | 1258 | (message "This is table line %d" cnt)) |
| 1245 | cnt))) | 1259 | cnt))) |
| 1246 | 1260 | ||
| 1261 | ;;;###autoload | ||
| 1247 | (defun org-table-goto-column (n &optional on-delim force) | 1262 | (defun org-table-goto-column (n &optional on-delim force) |
| 1248 | "Move the cursor to the Nth column in the current table line. | 1263 | "Move the cursor to the Nth column in the current table line. |
| 1249 | With optional argument ON-DELIM, stop with point before the left delimiter | 1264 | With optional argument ON-DELIM, stop with point before the left delimiter |
| @@ -1266,6 +1281,7 @@ However, when FORCE is non-nil, create new columns if necessary." | |||
| 1266 | (backward-char 1) | 1281 | (backward-char 1) |
| 1267 | (if (looking-at " ") (forward-char 1))))) | 1282 | (if (looking-at " ") (forward-char 1))))) |
| 1268 | 1283 | ||
| 1284 | ;;;###autoload | ||
| 1269 | (defun org-table-insert-column () | 1285 | (defun org-table-insert-column () |
| 1270 | "Insert a new column into the table." | 1286 | "Insert a new column into the table." |
| 1271 | (interactive) | 1287 | (interactive) |
| @@ -1335,6 +1351,7 @@ first dline below it is used. When ABOVE is non-nil, the one above is used." | |||
| 1335 | (setq i (1+ i))))) | 1351 | (setq i (1+ i))))) |
| 1336 | nil)) | 1352 | nil)) |
| 1337 | 1353 | ||
| 1354 | ;;;###autoload | ||
| 1338 | (defun org-table-delete-column () | 1355 | (defun org-table-delete-column () |
| 1339 | "Delete a column from the table." | 1356 | "Delete a column from the table." |
| 1340 | (interactive) | 1357 | (interactive) |
| @@ -1367,15 +1384,18 @@ first dline below it is used. When ABOVE is non-nil, the one above is used." | |||
| 1367 | (org-table-fix-formulas "$LR" (list (cons (number-to-string col) "INVALID")) | 1384 | (org-table-fix-formulas "$LR" (list (cons (number-to-string col) "INVALID")) |
| 1368 | col -1 col)))) | 1385 | col -1 col)))) |
| 1369 | 1386 | ||
| 1387 | ;;;###autoload | ||
| 1370 | (defun org-table-move-column-right () | 1388 | (defun org-table-move-column-right () |
| 1371 | "Move column to the right." | 1389 | "Move column to the right." |
| 1372 | (interactive) | 1390 | (interactive) |
| 1373 | (org-table-move-column nil)) | 1391 | (org-table-move-column nil)) |
| 1392 | ;;;###autoload | ||
| 1374 | (defun org-table-move-column-left () | 1393 | (defun org-table-move-column-left () |
| 1375 | "Move column to the left." | 1394 | "Move column to the left." |
| 1376 | (interactive) | 1395 | (interactive) |
| 1377 | (org-table-move-column 'left)) | 1396 | (org-table-move-column 'left)) |
| 1378 | 1397 | ||
| 1398 | ;;;###autoload | ||
| 1379 | (defun org-table-move-column (&optional left) | 1399 | (defun org-table-move-column (&optional left) |
| 1380 | "Move the current column to the right. With arg LEFT, move to the left." | 1400 | "Move the current column to the right. With arg LEFT, move to the left." |
| 1381 | (interactive "P") | 1401 | (interactive "P") |
| @@ -1415,15 +1435,18 @@ first dline below it is used. When ABOVE is non-nil, the one above is used." | |||
| 1415 | "$LR" (list (cons (number-to-string col) (number-to-string colpos)) | 1435 | "$LR" (list (cons (number-to-string col) (number-to-string colpos)) |
| 1416 | (cons (number-to-string colpos) (number-to-string col))))))) | 1436 | (cons (number-to-string colpos) (number-to-string col))))))) |
| 1417 | 1437 | ||
| 1438 | ;;;###autoload | ||
| 1418 | (defun org-table-move-row-down () | 1439 | (defun org-table-move-row-down () |
| 1419 | "Move table row down." | 1440 | "Move table row down." |
| 1420 | (interactive) | 1441 | (interactive) |
| 1421 | (org-table-move-row nil)) | 1442 | (org-table-move-row nil)) |
| 1443 | ;;;###autoload | ||
| 1422 | (defun org-table-move-row-up () | 1444 | (defun org-table-move-row-up () |
| 1423 | "Move table row up." | 1445 | "Move table row up." |
| 1424 | (interactive) | 1446 | (interactive) |
| 1425 | (org-table-move-row 'up)) | 1447 | (org-table-move-row 'up)) |
| 1426 | 1448 | ||
| 1449 | ;;;###autoload | ||
| 1427 | (defun org-table-move-row (&optional up) | 1450 | (defun org-table-move-row (&optional up) |
| 1428 | "Move the current table line down. With arg UP, move it up." | 1451 | "Move the current table line down. With arg UP, move it up." |
| 1429 | (interactive "P") | 1452 | (interactive "P") |
| @@ -1457,6 +1480,7 @@ first dline below it is used. When ABOVE is non-nil, the one above is used." | |||
| 1457 | "@" (list (cons (number-to-string dline1) (number-to-string dline2)) | 1480 | "@" (list (cons (number-to-string dline1) (number-to-string dline2)) |
| 1458 | (cons (number-to-string dline2) (number-to-string dline1))))))) | 1481 | (cons (number-to-string dline2) (number-to-string dline1))))))) |
| 1459 | 1482 | ||
| 1483 | ;;;###autoload | ||
| 1460 | (defun org-table-insert-row (&optional arg) | 1484 | (defun org-table-insert-row (&optional arg) |
| 1461 | "Insert a new row above the current line into the table. | 1485 | "Insert a new row above the current line into the table. |
| 1462 | With prefix ARG, insert below the current line." | 1486 | With prefix ARG, insert below the current line." |
| @@ -1478,6 +1502,7 @@ With prefix ARG, insert below the current line." | |||
| 1478 | (funcall org-table-fix-formulas-confirm "Fix formulas? ")) | 1502 | (funcall org-table-fix-formulas-confirm "Fix formulas? ")) |
| 1479 | (org-table-fix-formulas "@" nil (1- (org-table-current-dline)) 1)))) | 1503 | (org-table-fix-formulas "@" nil (1- (org-table-current-dline)) 1)))) |
| 1480 | 1504 | ||
| 1505 | ;;;###autoload | ||
| 1481 | (defun org-table-insert-hline (&optional above) | 1506 | (defun org-table-insert-hline (&optional above) |
| 1482 | "Insert a horizontal-line below the current line into the table. | 1507 | "Insert a horizontal-line below the current line into the table. |
| 1483 | With prefix ABOVE, insert above the current line." | 1508 | With prefix ABOVE, insert above the current line." |
| @@ -1501,6 +1526,7 @@ With prefix ABOVE, insert above the current line." | |||
| 1501 | (org-move-to-column col) | 1526 | (org-move-to-column col) |
| 1502 | (and org-table-overlay-coordinates (org-table-align)))) | 1527 | (and org-table-overlay-coordinates (org-table-align)))) |
| 1503 | 1528 | ||
| 1529 | ;;;###autoload | ||
| 1504 | (defun org-table-hline-and-move (&optional same-column) | 1530 | (defun org-table-hline-and-move (&optional same-column) |
| 1505 | "Insert a hline and move to the row below that line." | 1531 | "Insert a hline and move to the row below that line." |
| 1506 | (interactive "P") | 1532 | (interactive "P") |
| @@ -1527,6 +1553,7 @@ In particular, this does handle wide and invisible characters." | |||
| 1527 | t t s))) | 1553 | t t s))) |
| 1528 | s)) | 1554 | s)) |
| 1529 | 1555 | ||
| 1556 | ;;;###autoload | ||
| 1530 | (defun org-table-kill-row () | 1557 | (defun org-table-kill-row () |
| 1531 | "Delete the current row or horizontal line from the table." | 1558 | "Delete the current row or horizontal line from the table." |
| 1532 | (interactive) | 1559 | (interactive) |
| @@ -1542,6 +1569,7 @@ In particular, this does handle wide and invisible characters." | |||
| 1542 | (org-table-fix-formulas "@" (list (cons (number-to-string dline) "INVALID")) | 1569 | (org-table-fix-formulas "@" (list (cons (number-to-string dline) "INVALID")) |
| 1543 | dline -1 dline)))) | 1570 | dline -1 dline)))) |
| 1544 | 1571 | ||
| 1572 | ;;;###autoload | ||
| 1545 | (defun org-table-sort-lines (with-case &optional sorting-type) | 1573 | (defun org-table-sort-lines (with-case &optional sorting-type) |
| 1546 | "Sort table lines according to the column at point. | 1574 | "Sort table lines according to the column at point. |
| 1547 | 1575 | ||
| @@ -1622,7 +1650,7 @@ should be done in reverse order." | |||
| 1622 | (org-table-goto-column thiscol) | 1650 | (org-table-goto-column thiscol) |
| 1623 | (message "%d lines sorted, based on column %d" (length lns) column))) | 1651 | (message "%d lines sorted, based on column %d" (length lns) column))) |
| 1624 | 1652 | ||
| 1625 | 1653 | ;;;###autoload | |
| 1626 | (defun org-table-cut-region (beg end) | 1654 | (defun org-table-cut-region (beg end) |
| 1627 | "Copy region in table to the clipboard and blank all relevant fields. | 1655 | "Copy region in table to the clipboard and blank all relevant fields. |
| 1628 | If there is no active region, use just the field at point." | 1656 | If there is no active region, use just the field at point." |
| @@ -1631,6 +1659,7 @@ If there is no active region, use just the field at point." | |||
| 1631 | (if (org-region-active-p) (region-end) (point)))) | 1659 | (if (org-region-active-p) (region-end) (point)))) |
| 1632 | (org-table-copy-region beg end 'cut)) | 1660 | (org-table-copy-region beg end 'cut)) |
| 1633 | 1661 | ||
| 1662 | ;;;###autoload | ||
| 1634 | (defun org-table-copy-region (beg end &optional cut) | 1663 | (defun org-table-copy-region (beg end &optional cut) |
| 1635 | "Copy rectangular region in table to clipboard. | 1664 | "Copy rectangular region in table to clipboard. |
| 1636 | A special clipboard is used which can only be accessed | 1665 | A special clipboard is used which can only be accessed |
| @@ -1668,6 +1697,7 @@ with `org-table-paste-rectangle'." | |||
| 1668 | (if cut (org-table-align)) | 1697 | (if cut (org-table-align)) |
| 1669 | org-table-clip)) | 1698 | org-table-clip)) |
| 1670 | 1699 | ||
| 1700 | ;;;###autoload | ||
| 1671 | (defun org-table-paste-rectangle () | 1701 | (defun org-table-paste-rectangle () |
| 1672 | "Paste a rectangular region into a table. | 1702 | "Paste a rectangular region into a table. |
| 1673 | The upper right corner ends up in the current field. All involved fields | 1703 | The upper right corner ends up in the current field. All involved fields |
| @@ -1698,6 +1728,7 @@ lines." | |||
| 1698 | (org-table-goto-column col) | 1728 | (org-table-goto-column col) |
| 1699 | (org-table-align))) | 1729 | (org-table-align))) |
| 1700 | 1730 | ||
| 1731 | ;;;###autoload | ||
| 1701 | (defun org-table-convert () | 1732 | (defun org-table-convert () |
| 1702 | "Convert from `org-mode' table to table.el and back. | 1733 | "Convert from `org-mode' table to table.el and back. |
| 1703 | Obviously, this only works within limits. When an Org-mode table is | 1734 | Obviously, this only works within limits. When an Org-mode table is |
| @@ -1771,6 +1802,7 @@ Note that horizontal lines disappeared." | |||
| 1771 | contents "")) | 1802 | contents "")) |
| 1772 | (org-table-align))) | 1803 | (org-table-align))) |
| 1773 | 1804 | ||
| 1805 | ;;;###autoload | ||
| 1774 | (defun org-table-wrap-region (arg) | 1806 | (defun org-table-wrap-region (arg) |
| 1775 | "Wrap several fields in a column like a paragraph. | 1807 | "Wrap several fields in a column like a paragraph. |
| 1776 | This is useful if you'd like to spread the contents of a field over several | 1808 | This is useful if you'd like to spread the contents of a field over several |
| @@ -1841,6 +1873,7 @@ blank, and the content is appended to the field above." | |||
| 1841 | 1873 | ||
| 1842 | (defvar org-field-marker nil) | 1874 | (defvar org-field-marker nil) |
| 1843 | 1875 | ||
| 1876 | ;;;###autoload | ||
| 1844 | (defun org-table-edit-field (arg) | 1877 | (defun org-table-edit-field (arg) |
| 1845 | "Edit table field in a different window. | 1878 | "Edit table field in a different window. |
| 1846 | This is mainly useful for fields that contain hidden parts. | 1879 | This is mainly useful for fields that contain hidden parts. |
| @@ -1944,6 +1977,7 @@ table (but see `org-table-exit-follow-field-mode-when-leaving-table')." | |||
| 1944 | 1977 | ||
| 1945 | (defvar org-timecnt) ; dynamically scoped parameter | 1978 | (defvar org-timecnt) ; dynamically scoped parameter |
| 1946 | 1979 | ||
| 1980 | ;;;###autoload | ||
| 1947 | (defun org-table-sum (&optional beg end nlast) | 1981 | (defun org-table-sum (&optional beg end nlast) |
| 1948 | "Sum numbers in region of current table column. | 1982 | "Sum numbers in region of current table column. |
| 1949 | The result will be displayed in the echo area, and will be available | 1983 | The result will be displayed in the echo area, and will be available |
| @@ -2144,9 +2178,10 @@ When NAMED is non-nil, look for a named equation." | |||
| 2144 | (bs (org-table-formula-make-cmp-string (car b)))) | 2178 | (bs (org-table-formula-make-cmp-string (car b)))) |
| 2145 | (and as bs (string< as bs)))) | 2179 | (and as bs (string< as bs)))) |
| 2146 | 2180 | ||
| 2181 | ;;;###autoload | ||
| 2147 | (defun org-table-get-stored-formulas (&optional noerror) | 2182 | (defun org-table-get-stored-formulas (&optional noerror) |
| 2148 | "Return an alist with the stored formulas directly after current table." | 2183 | "Return an alist with the stored formulas directly after current table." |
| 2149 | (interactive) | 2184 | (interactive) ;; FIXME interactive? |
| 2150 | (let ((case-fold-search t) scol eq eq-alist strings string seen) | 2185 | (let ((case-fold-search t) scol eq eq-alist strings string seen) |
| 2151 | (save-excursion | 2186 | (save-excursion |
| 2152 | (goto-char (org-table-end)) | 2187 | (goto-char (org-table-end)) |
| @@ -2283,6 +2318,7 @@ For all numbers larger than LIMIT, shift them by DELTA." | |||
| 2283 | (setq org-table-local-parameters | 2318 | (setq org-table-local-parameters |
| 2284 | (append org-table-local-parameters al2)))))) | 2319 | (append org-table-local-parameters al2)))))) |
| 2285 | 2320 | ||
| 2321 | ;;;###autoload | ||
| 2286 | (defun org-table-maybe-eval-formula () | 2322 | (defun org-table-maybe-eval-formula () |
| 2287 | "Check if the current field starts with \"=\" or \":=\". | 2323 | "Check if the current field starts with \"=\" or \":=\". |
| 2288 | If yes, store the formula and apply it." | 2324 | If yes, store the formula and apply it." |
| @@ -2313,6 +2349,7 @@ Will be filled automatically during use.") | |||
| 2313 | ("_" . "Names for values in row below this one.") | 2349 | ("_" . "Names for values in row below this one.") |
| 2314 | ("^" . "Names for values in row above this one."))) | 2350 | ("^" . "Names for values in row above this one."))) |
| 2315 | 2351 | ||
| 2352 | ;;;###autoload | ||
| 2316 | (defun org-table-rotate-recalc-marks (&optional newchar) | 2353 | (defun org-table-rotate-recalc-marks (&optional newchar) |
| 2317 | "Rotate the recalculation mark in the first column. | 2354 | "Rotate the recalculation mark in the first column. |
| 2318 | If in any row, the first field is not consistent with a mark, | 2355 | If in any row, the first field is not consistent with a mark, |
| @@ -2374,6 +2411,7 @@ of the new mark." | |||
| 2374 | (and (org-called-interactively-p 'interactive) | 2411 | (and (org-called-interactively-p 'interactive) |
| 2375 | (message "%s" (cdr (assoc new org-recalc-marks)))))) | 2412 | (message "%s" (cdr (assoc new org-recalc-marks)))))) |
| 2376 | 2413 | ||
| 2414 | ;;;###autoload | ||
| 2377 | (defun org-table-maybe-recalculate-line () | 2415 | (defun org-table-maybe-recalculate-line () |
| 2378 | "Recompute the current line if marked for it, and if we haven't just done it." | 2416 | "Recompute the current line if marked for it, and if we haven't just done it." |
| 2379 | (interactive) | 2417 | (interactive) |
| @@ -2397,6 +2435,7 @@ of the new mark." | |||
| 2397 | (cons var (cons value org-tbl-calc-modes))) | 2435 | (cons var (cons value org-tbl-calc-modes))) |
| 2398 | org-tbl-calc-modes) | 2436 | org-tbl-calc-modes) |
| 2399 | 2437 | ||
| 2438 | ;;;###autoload | ||
| 2400 | (defun org-table-eval-formula (&optional arg equation | 2439 | (defun org-table-eval-formula (&optional arg equation |
| 2401 | suppress-align suppress-const | 2440 | suppress-align suppress-const |
| 2402 | suppress-store suppress-analysis) | 2441 | suppress-store suppress-analysis) |
| @@ -2823,6 +2862,7 @@ LISPP means to return something appropriate for a Lisp list." | |||
| 2823 | elements | 2862 | elements |
| 2824 | ",") "]")))) | 2863 | ",") "]")))) |
| 2825 | 2864 | ||
| 2865 | ;;;###autoload | ||
| 2826 | (defun org-table-recalculate (&optional all noalign) | 2866 | (defun org-table-recalculate (&optional all noalign) |
| 2827 | "Recalculate the current table line by applying all stored formulas. | 2867 | "Recalculate the current table line by applying all stored formulas. |
| 2828 | With prefix arg ALL, do this for all lines in the table. | 2868 | With prefix arg ALL, do this for all lines in the table. |
| @@ -2961,6 +3001,7 @@ known that the table will be realigned a little later anyway." | |||
| 2961 | (or noalign (and org-table-may-need-update (org-table-align)) | 3001 | (or noalign (and org-table-may-need-update (org-table-align)) |
| 2962 | (and all (message "Re-applying formulas...done")))))) | 3002 | (and all (message "Re-applying formulas...done")))))) |
| 2963 | 3003 | ||
| 3004 | ;;;###autoload | ||
| 2964 | (defun org-table-iterate (&optional arg) | 3005 | (defun org-table-iterate (&optional arg) |
| 2965 | "Recalculate the table until it does not change anymore. | 3006 | "Recalculate the table until it does not change anymore. |
| 2966 | The maximum number of iterations is 10, but you can choose a different value | 3007 | The maximum number of iterations is 10, but you can choose a different value |
| @@ -2997,10 +3038,9 @@ with the prefix ARG." | |||
| 2997 | "Iterate all tables in the buffer, to converge inter-table dependencies." | 3038 | "Iterate all tables in the buffer, to converge inter-table dependencies." |
| 2998 | (interactive) | 3039 | (interactive) |
| 2999 | (let* ((imax 10) | 3040 | (let* ((imax 10) |
| 3041 | (i imax) | ||
| 3000 | (checksum (md5 (buffer-string))) | 3042 | (checksum (md5 (buffer-string))) |
| 3001 | 3043 | c1) | |
| 3002 | c1 | ||
| 3003 | (i imax)) | ||
| 3004 | (save-excursion | 3044 | (save-excursion |
| 3005 | (save-restriction | 3045 | (save-restriction |
| 3006 | (widen) | 3046 | (widen) |
| @@ -3164,6 +3204,7 @@ Parameters get priority." | |||
| 3164 | 3204 | ||
| 3165 | (defvar org-pos) | 3205 | (defvar org-pos) |
| 3166 | 3206 | ||
| 3207 | ;;;###autoload | ||
| 3167 | (defun org-table-edit-formulas () | 3208 | (defun org-table-edit-formulas () |
| 3168 | "Edit the formulas of the current table in a separate buffer." | 3209 | "Edit the formulas of the current table in a separate buffer." |
| 3169 | (interactive) | 3210 | (interactive) |
| @@ -3801,6 +3842,7 @@ Use COMMAND to do the motion, repeat if necessary to end up in a data line." | |||
| 3801 | (org-overlay-display ov str 'org-special-keyword 'evaporate))) | 3842 | (org-overlay-display ov str 'org-special-keyword 'evaporate))) |
| 3802 | (beginning-of-line 2))))) | 3843 | (beginning-of-line 2))))) |
| 3803 | 3844 | ||
| 3845 | ;;;###autoload | ||
| 3804 | (defun org-table-toggle-coordinate-overlays () | 3846 | (defun org-table-toggle-coordinate-overlays () |
| 3805 | "Toggle the display of Row/Column numbers in tables." | 3847 | "Toggle the display of Row/Column numbers in tables." |
| 3806 | (interactive) | 3848 | (interactive) |
| @@ -3813,6 +3855,7 @@ Use COMMAND to do the motion, repeat if necessary to end up in a data line." | |||
| 3813 | (mapc 'delete-overlay org-table-coordinate-overlays) | 3855 | (mapc 'delete-overlay org-table-coordinate-overlays) |
| 3814 | (setq org-table-coordinate-overlays nil))) | 3856 | (setq org-table-coordinate-overlays nil))) |
| 3815 | 3857 | ||
| 3858 | ;;;###autoload | ||
| 3816 | (defun org-table-toggle-formula-debugger () | 3859 | (defun org-table-toggle-formula-debugger () |
| 3817 | "Toggle the formula debugger in tables." | 3860 | "Toggle the formula debugger in tables." |
| 3818 | (interactive) | 3861 | (interactive) |
| @@ -3852,11 +3895,6 @@ Use COMMAND to do the motion, repeat if necessary to end up in a data line." | |||
| 3852 | (defvar orgtbl-mode-map (make-keymap) | 3895 | (defvar orgtbl-mode-map (make-keymap) |
| 3853 | "Keymap for `orgtbl-mode'.") | 3896 | "Keymap for `orgtbl-mode'.") |
| 3854 | 3897 | ||
| 3855 | ;;;###autoload | ||
| 3856 | (defun turn-on-orgtbl () | ||
| 3857 | "Unconditionally turn on `orgtbl-mode'." | ||
| 3858 | (orgtbl-mode 1)) | ||
| 3859 | |||
| 3860 | (defvar org-old-auto-fill-inhibit-regexp nil | 3898 | (defvar org-old-auto-fill-inhibit-regexp nil |
| 3861 | "Local variable used by `orgtbl-mode'.") | 3899 | "Local variable used by `orgtbl-mode'.") |
| 3862 | 3900 | ||
| @@ -4480,6 +4518,7 @@ First element has index 0, or I0 if given." | |||
| 4480 | (*orgtbl-lfmt* *orgtbl-llfmt*)) | 4518 | (*orgtbl-lfmt* *orgtbl-llfmt*)) |
| 4481 | (orgtbl-format-line prevline)))))) | 4519 | (orgtbl-format-line prevline)))))) |
| 4482 | 4520 | ||
| 4521 | ;;;###autoload | ||
| 4483 | (defun orgtbl-to-generic (table params) | 4522 | (defun orgtbl-to-generic (table params) |
| 4484 | "Convert the orgtbl-mode TABLE to some other format. | 4523 | "Convert the orgtbl-mode TABLE to some other format. |
| 4485 | This generic routine can be used for many standard cases. | 4524 | This generic routine can be used for many standard cases. |
| @@ -4606,9 +4645,11 @@ directly by `orgtbl-send-table'. See manual." | |||
| 4606 | (remq nil *orgtbl-rtn*) | 4645 | (remq nil *orgtbl-rtn*) |
| 4607 | *orgtbl-rtn*)) "\n"))) | 4646 | *orgtbl-rtn*)) "\n"))) |
| 4608 | 4647 | ||
| 4648 | ;;;###autoload | ||
| 4609 | (defun orgtbl-to-tsv (table params) | 4649 | (defun orgtbl-to-tsv (table params) |
| 4610 | "Convert the orgtbl-mode table to TAB separated material." | 4650 | "Convert the orgtbl-mode table to TAB separated material." |
| 4611 | (orgtbl-to-generic table (org-combine-plists '(:sep "\t") params))) | 4651 | (orgtbl-to-generic table (org-combine-plists '(:sep "\t") params))) |
| 4652 | ;;;###autoload | ||
| 4612 | (defun orgtbl-to-csv (table params) | 4653 | (defun orgtbl-to-csv (table params) |
| 4613 | "Convert the orgtbl-mode table to CSV material. | 4654 | "Convert the orgtbl-mode table to CSV material. |
| 4614 | This does take care of the proper quoting of fields with comma or quotes." | 4655 | This does take care of the proper quoting of fields with comma or quotes." |
| @@ -4616,6 +4657,7 @@ This does take care of the proper quoting of fields with comma or quotes." | |||
| 4616 | '(:sep "," :fmt org-quote-csv-field) | 4657 | '(:sep "," :fmt org-quote-csv-field) |
| 4617 | params))) | 4658 | params))) |
| 4618 | 4659 | ||
| 4660 | ;;;###autoload | ||
| 4619 | (defun orgtbl-to-latex (table params) | 4661 | (defun orgtbl-to-latex (table params) |
| 4620 | "Convert the orgtbl-mode TABLE to LaTeX. | 4662 | "Convert the orgtbl-mode TABLE to LaTeX. |
| 4621 | TABLE is a list, each entry either the symbol `hline' for a horizontal | 4663 | TABLE is a list, each entry either the symbol `hline' for a horizontal |
| @@ -4654,6 +4696,7 @@ this function is called." | |||
| 4654 | :efmt "%s\\,(%s)" :hline "\\hline"))) | 4696 | :efmt "%s\\,(%s)" :hline "\\hline"))) |
| 4655 | (orgtbl-to-generic table (org-combine-plists params2 params)))) | 4697 | (orgtbl-to-generic table (org-combine-plists params2 params)))) |
| 4656 | 4698 | ||
| 4699 | ;;;###autoload | ||
| 4657 | (defun orgtbl-to-html (table params) | 4700 | (defun orgtbl-to-html (table params) |
| 4658 | "Convert the orgtbl-mode TABLE to HTML. | 4701 | "Convert the orgtbl-mode TABLE to HTML. |
| 4659 | TABLE is a list, each entry either the symbol `hline' for a horizontal | 4702 | TABLE is a list, each entry either the symbol `hline' for a horizontal |
| @@ -4684,6 +4727,7 @@ so you cannot specify parameters for it." | |||
| 4684 | (setq html (replace-match "" t t html))) | 4727 | (setq html (replace-match "" t t html))) |
| 4685 | html)) | 4728 | html)) |
| 4686 | 4729 | ||
| 4730 | ;;;###autoload | ||
| 4687 | (defun orgtbl-to-texinfo (table params) | 4731 | (defun orgtbl-to-texinfo (table params) |
| 4688 | "Convert the orgtbl-mode TABLE to TeXInfo. | 4732 | "Convert the orgtbl-mode TABLE to TeXInfo. |
| 4689 | TABLE is a list, each entry either the symbol `hline' for a horizontal | 4733 | TABLE is a list, each entry either the symbol `hline' for a horizontal |
| @@ -4722,6 +4766,7 @@ this function is called." | |||
| 4722 | :hlstart "@headitem "))) | 4766 | :hlstart "@headitem "))) |
| 4723 | (orgtbl-to-generic table (org-combine-plists params2 params)))) | 4767 | (orgtbl-to-generic table (org-combine-plists params2 params)))) |
| 4724 | 4768 | ||
| 4769 | ;;;###autoload | ||
| 4725 | (defun orgtbl-to-orgtbl (table params) | 4770 | (defun orgtbl-to-orgtbl (table params) |
| 4726 | "Convert the orgtbl-mode TABLE into another orgtbl-mode table. | 4771 | "Convert the orgtbl-mode TABLE into another orgtbl-mode table. |
| 4727 | Useful when slicing one table into many. The :hline, :sep, | 4772 | Useful when slicing one table into many. The :hline, :sep, |
| @@ -4832,4 +4877,8 @@ list of the fields in the rectangle ." | |||
| 4832 | 4877 | ||
| 4833 | (provide 'org-table) | 4878 | (provide 'org-table) |
| 4834 | 4879 | ||
| 4880 | ;; Local variables: | ||
| 4881 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 4882 | ;; End: | ||
| 4883 | |||
| 4835 | ;;; org-table.el ends here | 4884 | ;;; org-table.el ends here |
diff --git a/lisp/org/org-taskjuggler.el b/lisp/org/org-taskjuggler.el index aa645d296e8..a3de6e41239 100644 --- a/lisp/org/org-taskjuggler.el +++ b/lisp/org/org-taskjuggler.el | |||
| @@ -692,4 +692,8 @@ org-mode priority string." | |||
| 692 | 692 | ||
| 693 | (provide 'org-taskjuggler) | 693 | (provide 'org-taskjuggler) |
| 694 | 694 | ||
| 695 | ;; Local variables: | ||
| 696 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 697 | ;; End: | ||
| 698 | |||
| 695 | ;;; org-taskjuggler.el ends here | 699 | ;;; org-taskjuggler.el ends here |
diff --git a/lisp/org/org-timer.el b/lisp/org/org-timer.el index 92aaf1c7bb8..a314564b94a 100644 --- a/lisp/org/org-timer.el +++ b/lisp/org/org-timer.el | |||
| @@ -130,7 +130,6 @@ the region 0:00:00." | |||
| 130 | (org-timer-secs-to-hms (or delta 0))) | 130 | (org-timer-secs-to-hms (or delta 0))) |
| 131 | (run-hooks 'org-timer-start-hook)))) | 131 | (run-hooks 'org-timer-start-hook)))) |
| 132 | 132 | ||
| 133 | ;;;###autoload | ||
| 134 | (defun org-timer-pause-or-continue (&optional stop) | 133 | (defun org-timer-pause-or-continue (&optional stop) |
| 135 | "Pause or continue the relative timer. | 134 | "Pause or continue the relative timer. |
| 136 | With prefix arg STOP, stop it entirely." | 135 | With prefix arg STOP, stop it entirely." |
| @@ -157,7 +156,6 @@ With prefix arg STOP, stop it entirely." | |||
| 157 | (org-timer-set-mode-line 'pause) | 156 | (org-timer-set-mode-line 'pause) |
| 158 | (message "Timer paused at %s" (org-timer-value-string))))) | 157 | (message "Timer paused at %s" (org-timer-value-string))))) |
| 159 | 158 | ||
| 160 | ;;;###autoload | ||
| 161 | (defun org-timer-stop () | 159 | (defun org-timer-stop () |
| 162 | "Stop the relative timer." | 160 | "Stop the relative timer." |
| 163 | (interactive) | 161 | (interactive) |
| @@ -443,4 +441,8 @@ replace any running timer." | |||
| 443 | 441 | ||
| 444 | (provide 'org-timer) | 442 | (provide 'org-timer) |
| 445 | 443 | ||
| 444 | ;; Local variables: | ||
| 445 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 446 | ;; End: | ||
| 447 | |||
| 446 | ;;; org-timer.el ends here | 448 | ;;; org-timer.el ends here |
diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el index 688947def52..9fcea6725e3 100644 --- a/lisp/org/org-version.el +++ b/lisp/org/org-version.el | |||
| @@ -11,10 +11,10 @@ | |||
| 11 | (defun org-git-version () | 11 | (defun org-git-version () |
| 12 | "The Git version of org-mode. | 12 | "The Git version of org-mode. |
| 13 | Inserted by installing org-mode or when a release is made." | 13 | Inserted by installing org-mode or when a release is made." |
| 14 | (let ((org-git-version "7.9.2-GNU-Emacs-24-3")) | 14 | (let ((org-git-version "release_7.9.2-68-g7a9d34")) |
| 15 | org-git-version)) | 15 | org-git-version)) |
| 16 | ;;;###autoload | 16 | ;;;###autoload |
| 17 | (defconst org-odt-data-dir "/usr/share/emacs/etc/org" | 17 | (defvar org-odt-data-dir "/usr/share/emacs/etc/org" |
| 18 | "The location of ODT styles.") | 18 | "The location of ODT styles.") |
| 19 | 19 | ||
| 20 | (provide 'org-version) | 20 | (provide 'org-version) |
diff --git a/lisp/org/org-xoxo.el b/lisp/org/org-xoxo.el index ee549627a85..6ff78b56839 100644 --- a/lisp/org/org-xoxo.el +++ b/lisp/org/org-xoxo.el | |||
| @@ -122,4 +122,8 @@ The XOXO buffer is named *xoxo-<source buffer name>*" | |||
| 122 | 122 | ||
| 123 | (provide 'org-xoxo) | 123 | (provide 'org-xoxo) |
| 124 | 124 | ||
| 125 | ;; Local variables: | ||
| 126 | ;; generated-autoload-file: "org-loaddefs.el" | ||
| 127 | ;; End: | ||
| 128 | |||
| 125 | ;;; org-xoxo.el ends here | 129 | ;;; org-xoxo.el ends here |
diff --git a/lisp/org/org.el b/lisp/org/org.el index cfd86513fbc..45dbe2754e8 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -78,6 +78,8 @@ | |||
| 78 | (require 'find-func) | 78 | (require 'find-func) |
| 79 | (require 'format-spec) | 79 | (require 'format-spec) |
| 80 | 80 | ||
| 81 | (load "org-loaddefs.el" t t) | ||
| 82 | |||
| 81 | ;; `org-outline-regexp' ought to be a defconst but is let-binding in | 83 | ;; `org-outline-regexp' ought to be a defconst but is let-binding in |
| 82 | ;; some places -- e.g. see the macro org-with-limited-levels. | 84 | ;; some places -- e.g. see the macro org-with-limited-levels. |
| 83 | ;; | 85 | ;; |
| @@ -117,8 +119,23 @@ Stars are put in group 1 and the trimmed body in group 2.") | |||
| 117 | (declare-function org-clock-timestamps-down "org-clock" ()) | 119 | (declare-function org-clock-timestamps-down "org-clock" ()) |
| 118 | (declare-function org-clock-sum-current-item "org-clock" (&optional tstart)) | 120 | (declare-function org-clock-sum-current-item "org-clock" (&optional tstart)) |
| 119 | 121 | ||
| 122 | (declare-function orgtbl-mode "org-table" (&optional arg)) | ||
| 123 | (declare-function org-clock-out "org-clock" (&optional switch-to-state fail-quietly at-time)) | ||
| 124 | (declare-function org-beamer-mode "org-beamer" ()) | ||
| 125 | (declare-function org-table-edit-field "org-table" (arg)) | ||
| 126 | (declare-function org-table-justify-field-maybe "org-table" (&optional new)) | ||
| 127 | (declare-function org-id-get-create "org-id" (&optional force)) | ||
| 128 | (declare-function org-id-find-id-file "org-id" (id)) | ||
| 129 | (declare-function org-tags-view "org-agenda" (&optional todo-only match)) | ||
| 130 | (declare-function org-agenda-list "org-agenda" (&optional arg start-day span)) | ||
| 131 | (declare-function org-table-align "org-table" ()) | ||
| 132 | (declare-function org-table-paste-rectangle "org-table" ()) | ||
| 133 | (declare-function org-table-maybe-eval-formula "org-table" ()) | ||
| 134 | (declare-function org-table-maybe-recalculate-line "org-table" ()) | ||
| 135 | |||
| 120 | ;; load languages based on value of `org-babel-load-languages' | 136 | ;; load languages based on value of `org-babel-load-languages' |
| 121 | (defvar org-babel-load-languages) | 137 | (defvar org-babel-load-languages) |
| 138 | |||
| 122 | ;;;###autoload | 139 | ;;;###autoload |
| 123 | (defun org-babel-do-load-languages (sym value) | 140 | (defun org-babel-do-load-languages (sym value) |
| 124 | "Load the languages defined in `org-babel-load-languages'." | 141 | "Load the languages defined in `org-babel-load-languages'." |
| @@ -206,6 +223,7 @@ identifier." | |||
| 206 | ;;; Version | 223 | ;;; Version |
| 207 | (require 'org-compat) | 224 | (require 'org-compat) |
| 208 | (org-check-version) | 225 | (org-check-version) |
| 226 | |||
| 209 | ;;;###autoload | 227 | ;;;###autoload |
| 210 | (defun org-version (&optional here full message) | 228 | (defun org-version (&optional here full message) |
| 211 | "Show the org-mode version in the echo area. | 229 | "Show the org-mode version in the echo area. |
| @@ -214,7 +232,7 @@ When FULL is non-nil, use a verbose version string. | |||
| 214 | When MESSAGE is non-nil, display a message with the version." | 232 | When MESSAGE is non-nil, display a message with the version." |
| 215 | (interactive "P") | 233 | (interactive "P") |
| 216 | (let* ((org-dir (ignore-errors (org-find-library-dir "org"))) | 234 | (let* ((org-dir (ignore-errors (org-find-library-dir "org"))) |
| 217 | (org-install-dir (ignore-errors (org-find-library-dir "org-install.el"))) | 235 | (org-install-dir (ignore-errors (org-find-library-dir "org-loaddefs.el"))) |
| 218 | (org-trash (or | 236 | (org-trash (or |
| 219 | (and (fboundp 'org-release) (fboundp 'org-git-version)) | 237 | (and (fboundp 'org-release) (fboundp 'org-git-version)) |
| 220 | (load (concat org-dir "org-version.el") | 238 | (load (concat org-dir "org-version.el") |
| @@ -228,7 +246,7 @@ When MESSAGE is non-nil, display a message with the version." | |||
| 228 | (if (string= org-dir org-install-dir) | 246 | (if (string= org-dir org-install-dir) |
| 229 | org-install-dir | 247 | org-install-dir |
| 230 | (concat "mixed installation! " org-install-dir " and " org-dir)) | 248 | (concat "mixed installation! " org-install-dir " and " org-dir)) |
| 231 | "org-install.el can not be found!"))) | 249 | "org-loaddefs.el can not be found!"))) |
| 232 | (_version (if full version org-version))) | 250 | (_version (if full version org-version))) |
| 233 | (if (org-called-interactively-p 'interactive) | 251 | (if (org-called-interactively-p 'interactive) |
| 234 | (if here | 252 | (if here |
| @@ -3264,13 +3282,6 @@ forth between agenda and calendar." | |||
| 3264 | :group 'org-agenda | 3282 | :group 'org-agenda |
| 3265 | :type 'sexp) | 3283 | :type 'sexp) |
| 3266 | 3284 | ||
| 3267 | (defcustom org-calendar-agenda-action-key [?k] | ||
| 3268 | "The key to be installed in `calendar-mode-map' for agenda-action. | ||
| 3269 | The command `org-agenda-action' will be bound to this key. The | ||
| 3270 | default is the character `k' because we use the same key in the agenda." | ||
| 3271 | :group 'org-agenda | ||
| 3272 | :type 'sexp) | ||
| 3273 | |||
| 3274 | (defcustom org-calendar-insert-diary-entry-key [?i] | 3285 | (defcustom org-calendar-insert-diary-entry-key [?i] |
| 3275 | "The key to be installed in `calendar-mode-map' for adding diary entries. | 3286 | "The key to be installed in `calendar-mode-map' for adding diary entries. |
| 3276 | This option is irrelevant until `org-agenda-diary-file' has been configured | 3287 | This option is irrelevant until `org-agenda-diary-file' has been configured |
| @@ -3296,8 +3307,6 @@ points to a file, `org-agenda-diary-entry' will be used instead." | |||
| 3296 | '(progn | 3307 | '(progn |
| 3297 | (org-defkey calendar-mode-map org-calendar-to-agenda-key | 3308 | (org-defkey calendar-mode-map org-calendar-to-agenda-key |
| 3298 | 'org-calendar-goto-agenda) | 3309 | 'org-calendar-goto-agenda) |
| 3299 | (org-defkey calendar-mode-map org-calendar-agenda-action-key | ||
| 3300 | 'org-agenda-action) | ||
| 3301 | (add-hook 'calendar-mode-hook | 3310 | (add-hook 'calendar-mode-hook |
| 3302 | (lambda () | 3311 | (lambda () |
| 3303 | (unless (eq org-agenda-diary-file 'diary-file) | 3312 | (unless (eq org-agenda-diary-file 'diary-file) |
| @@ -3869,30 +3878,13 @@ This works for both table types.") | |||
| 3869 | 3878 | ||
| 3870 | (eval-and-compile | 3879 | (eval-and-compile |
| 3871 | (org-autoload "org-table" | 3880 | (org-autoload "org-table" |
| 3872 | '(org-table-align org-table-begin org-table-blank-field | 3881 | '(org-table-begin org-table-blank-field org-table-end))) |
| 3873 | org-table-convert org-table-convert-region org-table-copy-down | 3882 | |
| 3874 | org-table-copy-region org-table-create | 3883 | ;;;###autoload |
| 3875 | org-table-create-or-convert-from-region | 3884 | (defun turn-on-orgtbl () |
| 3876 | org-table-create-with-table.el org-table-current-dline | 3885 | "Unconditionally turn on `orgtbl-mode'." |
| 3877 | org-table-cut-region org-table-delete-column org-table-edit-field | 3886 | (require 'org-table) |
| 3878 | org-table-edit-formulas org-table-end org-table-eval-formula | 3887 | (orgtbl-mode 1)) |
| 3879 | org-table-export org-table-field-info | ||
| 3880 | org-table-get-stored-formulas org-table-goto-column | ||
| 3881 | org-table-hline-and-move org-table-import org-table-insert-column | ||
| 3882 | org-table-insert-hline org-table-insert-row org-table-iterate | ||
| 3883 | org-table-justify-field-maybe org-table-kill-row | ||
| 3884 | org-table-maybe-eval-formula org-table-maybe-recalculate-line | ||
| 3885 | org-table-move-column org-table-move-column-left | ||
| 3886 | org-table-move-column-right org-table-move-row | ||
| 3887 | org-table-move-row-down org-table-move-row-up | ||
| 3888 | org-table-next-field org-table-next-row org-table-paste-rectangle | ||
| 3889 | org-table-previous-field org-table-recalculate | ||
| 3890 | org-table-rotate-recalc-marks org-table-sort-lines org-table-sum | ||
| 3891 | org-table-toggle-coordinate-overlays | ||
| 3892 | org-table-toggle-formula-debugger org-table-wrap-region | ||
| 3893 | orgtbl-mode turn-on-orgtbl org-table-to-lisp | ||
| 3894 | orgtbl-to-generic orgtbl-to-tsv orgtbl-to-csv orgtbl-to-latex | ||
| 3895 | orgtbl-to-orgtbl orgtbl-to-html orgtbl-to-texinfo))) | ||
| 3896 | 3888 | ||
| 3897 | (defun org-at-table-p (&optional table-type) | 3889 | (defun org-at-table-p (&optional table-type) |
| 3898 | "Return t if the cursor is inside an org-type table. | 3890 | "Return t if the cursor is inside an org-type table. |
| @@ -3971,62 +3963,14 @@ If TABLE-TYPE is non-nil, also check for table.el-type tables." | |||
| 3971 | (declare-function org-default-export-plist "org-exp") | 3963 | (declare-function org-default-export-plist "org-exp") |
| 3972 | (declare-function org-infile-export-plist "org-exp") | 3964 | (declare-function org-infile-export-plist "org-exp") |
| 3973 | (declare-function org-get-current-options "org-exp") | 3965 | (declare-function org-get-current-options "org-exp") |
| 3974 | (eval-and-compile | ||
| 3975 | (org-autoload "org-exp" | ||
| 3976 | '(org-export org-export-visible | ||
| 3977 | org-insert-export-options-template | ||
| 3978 | org-table-clean-before-export)) | ||
| 3979 | (org-autoload "org-ascii" | ||
| 3980 | '(org-export-as-ascii org-export-ascii-preprocess | ||
| 3981 | org-export-as-ascii-to-buffer org-replace-region-by-ascii | ||
| 3982 | org-export-region-as-ascii)) | ||
| 3983 | (org-autoload "org-latex" | ||
| 3984 | '(org-export-as-latex-batch org-export-as-latex-to-buffer | ||
| 3985 | org-replace-region-by-latex org-export-region-as-latex | ||
| 3986 | org-export-as-latex org-export-as-pdf | ||
| 3987 | org-export-as-pdf-and-open)) | ||
| 3988 | (org-autoload "org-html" | ||
| 3989 | '(org-export-as-html-and-open | ||
| 3990 | org-export-as-html-batch org-export-as-html-to-buffer | ||
| 3991 | org-replace-region-by-html org-export-region-as-html | ||
| 3992 | org-export-as-html)) | ||
| 3993 | (org-autoload "org-docbook" | ||
| 3994 | '(org-export-as-docbook-batch org-export-as-docbook-to-buffer | ||
| 3995 | org-replace-region-by-docbook org-export-region-as-docbook | ||
| 3996 | org-export-as-docbook-pdf org-export-as-docbook-pdf-and-open | ||
| 3997 | org-export-as-docbook)) | ||
| 3998 | (org-autoload "org-icalendar" | ||
| 3999 | '(org-export-icalendar-this-file | ||
| 4000 | org-export-icalendar-all-agenda-files | ||
| 4001 | org-export-icalendar-combine-agenda-files)) | ||
| 4002 | (org-autoload "org-xoxo" '(org-export-as-xoxo)) | ||
| 4003 | (org-autoload "org-beamer" '(org-beamer-mode org-beamer-sectioning))) | ||
| 4004 | 3966 | ||
| 4005 | ;; Declare and autoload functions from org-agenda.el | 3967 | ;; Declare and autoload functions from org-agenda.el |
| 4006 | 3968 | ||
| 4007 | (eval-and-compile | 3969 | (eval-and-compile |
| 4008 | (org-autoload "org-agenda" | 3970 | (org-autoload "org-agenda" |
| 4009 | '(org-agenda org-agenda-list org-search-view | 3971 | '(org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item))) |
| 4010 | org-todo-list org-tags-view org-agenda-list-stuck-projects | ||
| 4011 | org-diary org-agenda-to-appt | ||
| 4012 | org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item))) | ||
| 4013 | |||
| 4014 | ;; Autoload org-remember | ||
| 4015 | 3972 | ||
| 4016 | (eval-and-compile | 3973 | (declare-function org-clock-save-markers-for-cut-and-paste "org-clock" (beg end)) |
| 4017 | (org-autoload "org-remember" | ||
| 4018 | '(org-remember-insinuate org-remember-annotation | ||
| 4019 | org-remember-apply-template org-remember org-remember-handler))) | ||
| 4020 | |||
| 4021 | (eval-and-compile | ||
| 4022 | (org-autoload "org-capture" | ||
| 4023 | '(org-capture org-capture-insert-template-here | ||
| 4024 | org-capture-import-remember-templates))) | ||
| 4025 | |||
| 4026 | ;; Autoload org-clock.el | ||
| 4027 | |||
| 4028 | (declare-function org-clock-save-markers-for-cut-and-paste "org-clock" | ||
| 4029 | (beg end)) | ||
| 4030 | (declare-function org-clock-update-mode-line "org-clock" ()) | 3974 | (declare-function org-clock-update-mode-line "org-clock" ()) |
| 4031 | (declare-function org-resolve-clocks "org-clock" | 3975 | (declare-function org-resolve-clocks "org-clock" |
| 4032 | (&optional also-non-dangling-p prompt last-valid)) | 3976 | (&optional also-non-dangling-p prompt last-valid)) |
| @@ -4043,55 +3987,9 @@ The return value is actually the clock marker." | |||
| 4043 | (marker-buffer org-clock-marker)) | 3987 | (marker-buffer org-clock-marker)) |
| 4044 | 3988 | ||
| 4045 | (eval-and-compile | 3989 | (eval-and-compile |
| 4046 | (org-autoload | 3990 | (org-autoload "org-clock" '(org-clock-remove-overlays |
| 4047 | "org-clock" | 3991 | org-clock-update-time-maybe |
| 4048 | '(org-clock-in org-clock-out org-clock-cancel | 3992 | org-clocktable-shift))) |
| 4049 | org-clock-goto org-clock-sum org-clock-display | ||
| 4050 | org-clock-remove-overlays org-clock-report | ||
| 4051 | org-clocktable-shift org-dblock-write:clocktable | ||
| 4052 | org-get-clocktable org-resolve-clocks))) | ||
| 4053 | |||
| 4054 | (defun org-clock-update-time-maybe () | ||
| 4055 | "If this is a CLOCK line, update it and return t. | ||
| 4056 | Otherwise, return nil." | ||
| 4057 | (interactive) | ||
| 4058 | (save-excursion | ||
| 4059 | (beginning-of-line 1) | ||
| 4060 | (skip-chars-forward " \t") | ||
| 4061 | (when (looking-at org-clock-string) | ||
| 4062 | (let ((re (concat "[ \t]*" org-clock-string | ||
| 4063 | " *[[<]\\([^]>]+\\)[]>]\\(-+[[<]\\([^]>]+\\)[]>]" | ||
| 4064 | "\\([ \t]*=>.*\\)?\\)?")) | ||
| 4065 | ts te h m s neg) | ||
| 4066 | (cond | ||
| 4067 | ((not (looking-at re)) | ||
| 4068 | nil) | ||
| 4069 | ((not (match-end 2)) | ||
| 4070 | (when (and (equal (marker-buffer org-clock-marker) (current-buffer)) | ||
| 4071 | (> org-clock-marker (point)) | ||
| 4072 | (<= org-clock-marker (point-at-eol))) | ||
| 4073 | ;; The clock is running here | ||
| 4074 | (setq org-clock-start-time | ||
| 4075 | (apply 'encode-time | ||
| 4076 | (org-parse-time-string (match-string 1)))) | ||
| 4077 | (org-clock-update-mode-line))) | ||
| 4078 | (t | ||
| 4079 | (and (match-end 4) (delete-region (match-beginning 4) (match-end 4))) | ||
| 4080 | (end-of-line 1) | ||
| 4081 | (setq ts (match-string 1) | ||
| 4082 | te (match-string 3)) | ||
| 4083 | (setq s (- (org-float-time | ||
| 4084 | (apply 'encode-time (org-parse-time-string te))) | ||
| 4085 | (org-float-time | ||
| 4086 | (apply 'encode-time (org-parse-time-string ts)))) | ||
| 4087 | neg (< s 0) | ||
| 4088 | s (abs s) | ||
| 4089 | h (floor (/ s 3600)) | ||
| 4090 | s (- s (* 3600 h)) | ||
| 4091 | m (floor (/ s 60)) | ||
| 4092 | s (- s (* 60 s))) | ||
| 4093 | (insert " => " (format (if neg "-%d:%02d" "%2d:%02d") h m)) | ||
| 4094 | t)))))) | ||
| 4095 | 3993 | ||
| 4096 | (defun org-check-running-clock () | 3994 | (defun org-check-running-clock () |
| 4097 | "Check if the current buffer contains the running clock. | 3995 | "Check if the current buffer contains the running clock. |
| @@ -4108,44 +4006,18 @@ If yes, offer to stop it and to save the buffer with the changes." | |||
| 4108 | (when (org-match-line "^[ \t]*#\\+BEGIN:[ \t]+clocktable\\>") | 4006 | (when (org-match-line "^[ \t]*#\\+BEGIN:[ \t]+clocktable\\>") |
| 4109 | (org-clocktable-shift dir n))) | 4007 | (org-clocktable-shift dir n))) |
| 4110 | 4008 | ||
| 4111 | ;; Autoload org-timer.el | 4009 | ;;;###autoload |
| 4112 | 4010 | (defun org-clock-persistence-insinuate () | |
| 4113 | (eval-and-compile | 4011 | "Set up hooks for clock persistence." |
| 4114 | (org-autoload | 4012 | (require 'org-clock) |
| 4115 | "org-timer" | 4013 | (add-hook 'org-mode-hook 'org-clock-load) |
| 4116 | '(org-timer-start org-timer org-timer-item | 4014 | (add-hook 'kill-emacs-hook 'org-clock-save)) |
| 4117 | org-timer-change-times-in-region | ||
| 4118 | org-timer-set-timer | ||
| 4119 | org-timer-reset-timers | ||
| 4120 | org-timer-show-remaining-time))) | ||
| 4121 | |||
| 4122 | ;; Autoload org-feed.el | ||
| 4123 | |||
| 4124 | (eval-and-compile | ||
| 4125 | (org-autoload | ||
| 4126 | "org-feed" | ||
| 4127 | '(org-feed-update org-feed-update-all org-feed-goto-inbox))) | ||
| 4128 | |||
| 4129 | |||
| 4130 | ;; Autoload org-indent.el | ||
| 4131 | 4015 | ||
| 4132 | ;; Define the variable already here, to make sure we have it. | 4016 | ;; Define the variable already here, to make sure we have it. |
| 4133 | (defvar org-indent-mode nil | 4017 | (defvar org-indent-mode nil |
| 4134 | "Non-nil if Org-Indent mode is enabled. | 4018 | "Non-nil if Org-Indent mode is enabled. |
| 4135 | Use the command `org-indent-mode' to change this variable.") | 4019 | Use the command `org-indent-mode' to change this variable.") |
| 4136 | 4020 | ||
| 4137 | (eval-and-compile | ||
| 4138 | (org-autoload | ||
| 4139 | "org-indent" | ||
| 4140 | '(org-indent-mode))) | ||
| 4141 | |||
| 4142 | ;; Autoload org-mobile.el | ||
| 4143 | |||
| 4144 | (eval-and-compile | ||
| 4145 | (org-autoload | ||
| 4146 | "org-mobile" | ||
| 4147 | '(org-mobile-push org-mobile-pull org-mobile-create-sumo-agenda))) | ||
| 4148 | |||
| 4149 | ;; Autoload archiving code | 4021 | ;; Autoload archiving code |
| 4150 | ;; The stuff that is needed for cycling and tags has to be defined here. | 4022 | ;; The stuff that is needed for cycling and tags has to be defined here. |
| 4151 | 4023 | ||
| @@ -4319,10 +4191,7 @@ Otherwise, these types are allowed: | |||
| 4319 | 4191 | ||
| 4320 | (eval-and-compile | 4192 | (eval-and-compile |
| 4321 | (org-autoload "org-archive" | 4193 | (org-autoload "org-archive" |
| 4322 | '(org-add-archive-files org-archive-subtree | 4194 | '(org-add-archive-files))) |
| 4323 | org-archive-to-archive-sibling org-toggle-archive-tag | ||
| 4324 | org-archive-subtree-default | ||
| 4325 | org-archive-subtree-default-with-confirmation))) | ||
| 4326 | 4195 | ||
| 4327 | ;; Autoload Column View Code | 4196 | ;; Autoload Column View Code |
| 4328 | 4197 | ||
| @@ -4331,9 +4200,10 @@ Otherwise, these types are allowed: | |||
| 4331 | (declare-function org-columns-compute "org-colview" (property)) | 4200 | (declare-function org-columns-compute "org-colview" (property)) |
| 4332 | 4201 | ||
| 4333 | (org-autoload (if (featurep 'xemacs) "org-colview-xemacs" "org-colview") | 4202 | (org-autoload (if (featurep 'xemacs) "org-colview-xemacs" "org-colview") |
| 4334 | '(org-columns-number-to-string org-columns-get-format-and-top-level | 4203 | '(org-columns-number-to-string |
| 4335 | org-columns-compute org-agenda-columns org-columns-remove-overlays | 4204 | org-columns-get-format-and-top-level |
| 4336 | org-columns org-insert-columns-dblock org-dblock-write:columnview)) | 4205 | org-columns-compute |
| 4206 | org-columns-remove-overlays)) | ||
| 4337 | 4207 | ||
| 4338 | ;; Autoload ID code | 4208 | ;; Autoload ID code |
| 4339 | 4209 | ||
| @@ -4342,15 +4212,10 @@ Otherwise, these types are allowed: | |||
| 4342 | (declare-function org-id-locations-save "org-id") | 4212 | (declare-function org-id-locations-save "org-id") |
| 4343 | (defvar org-id-track-globally) | 4213 | (defvar org-id-track-globally) |
| 4344 | (org-autoload "org-id" | 4214 | (org-autoload "org-id" |
| 4345 | '(org-id-get-create org-id-new org-id-copy org-id-get | 4215 | '(org-id-new |
| 4346 | org-id-get-with-outline-path-completion | 4216 | org-id-copy |
| 4347 | org-id-get-with-outline-drilling org-id-store-link | 4217 | org-id-get-with-outline-path-completion |
| 4348 | org-id-goto org-id-find org-id-store-link)) | 4218 | org-id-get-with-outline-drilling)) |
| 4349 | |||
| 4350 | ;; Autoload Plotting Code | ||
| 4351 | |||
| 4352 | (org-autoload "org-plot" | ||
| 4353 | '(org-plot/gnuplot)) | ||
| 4354 | 4219 | ||
| 4355 | ;;; Variables for pre-computed regular expressions, all buffer local | 4220 | ;;; Variables for pre-computed regular expressions, all buffer local |
| 4356 | 4221 | ||
| @@ -5096,7 +4961,7 @@ The following commands are available: | |||
| 5096 | (lambda (&rest ignore) (org-show-context 'isearch)))) | 4961 | (lambda (&rest ignore) (org-show-context 'isearch)))) |
| 5097 | 4962 | ||
| 5098 | ;; Turn on org-beamer-mode? | 4963 | ;; Turn on org-beamer-mode? |
| 5099 | (and org-startup-with-beamer-mode (org-beamer-mode 1)) | 4964 | (and org-startup-with-beamer-mode (org-beamer-mode)) |
| 5100 | 4965 | ||
| 5101 | ;; Setup the pcomplete hooks | 4966 | ;; Setup the pcomplete hooks |
| 5102 | (set (make-local-variable 'pcomplete-command-completion-function) | 4967 | (set (make-local-variable 'pcomplete-command-completion-function) |
| @@ -5569,22 +5434,6 @@ by a #." | |||
| 5569 | t) | 5434 | t) |
| 5570 | (t nil)))))) | 5435 | (t nil)))))) |
| 5571 | 5436 | ||
| 5572 | (defun org-strip-protective-commas (beg end) | ||
| 5573 | "Strip protective commas between BEG and END in the current buffer." | ||
| 5574 | (interactive "r") | ||
| 5575 | (save-excursion | ||
| 5576 | (save-match-data | ||
| 5577 | (goto-char beg) | ||
| 5578 | (let ((front-line (save-excursion | ||
| 5579 | (re-search-forward | ||
| 5580 | "[^[:space:]]" end t) | ||
| 5581 | (goto-char (match-beginning 0)) | ||
| 5582 | (current-column)))) | ||
| 5583 | (while (re-search-forward "^[ \t]*\\(,\\)\\([*]\\|#\\)" end t) | ||
| 5584 | (goto-char (match-beginning 1)) | ||
| 5585 | (when (= (current-column) front-line) | ||
| 5586 | (replace-match "" nil nil nil 1))))))) | ||
| 5587 | |||
| 5588 | (defun org-activate-angle-links (limit) | 5437 | (defun org-activate-angle-links (limit) |
| 5589 | "Run through the buffer and add overlays to links." | 5438 | "Run through the buffer and add overlays to links." |
| 5590 | (if (re-search-forward org-angle-link-re limit t) | 5439 | (if (re-search-forward org-angle-link-re limit t) |
| @@ -6188,10 +6037,9 @@ and subscripts." | |||
| 6188 | (defvar org-cycle-subtree-status nil) | 6037 | (defvar org-cycle-subtree-status nil) |
| 6189 | (make-variable-buffer-local 'org-cycle-subtree-status) | 6038 | (make-variable-buffer-local 'org-cycle-subtree-status) |
| 6190 | 6039 | ||
| 6191 | ;;;###autoload | ||
| 6192 | |||
| 6193 | (defvar org-inlinetask-min-level) | 6040 | (defvar org-inlinetask-min-level) |
| 6194 | 6041 | ||
| 6042 | ;;;###autoload | ||
| 6195 | (defun org-cycle (&optional arg) | 6043 | (defun org-cycle (&optional arg) |
| 6196 | "TAB-action and visibility cycling for Org-mode. | 6044 | "TAB-action and visibility cycling for Org-mode. |
| 6197 | 6045 | ||
| @@ -9205,7 +9053,7 @@ If optional argument MERGE is set, merge TABLE into | |||
| 9205 | 9053 | ||
| 9206 | (defun org-link-unescape (str) | 9054 | (defun org-link-unescape (str) |
| 9207 | "Unhex hexified Unicode strings as returned from the JavaScript function | 9055 | "Unhex hexified Unicode strings as returned from the JavaScript function |
| 9208 | encodeURIComponent. E.g. `%C3%B6' is the german Umlaut `ö'." | 9056 | encodeURIComponent. E.g. `%C3%B6' is the german o-Umlaut." |
| 9209 | (unless (and (null str) (string= "" str)) | 9057 | (unless (and (null str) (string= "" str)) |
| 9210 | (let ((pos 0) (case-fold-search t) unhexed) | 9058 | (let ((pos 0) (case-fold-search t) unhexed) |
| 9211 | (while (setq pos (string-match "\\(%[0-9a-f][0-9a-f]\\)+" str pos)) | 9059 | (while (setq pos (string-match "\\(%[0-9a-f][0-9a-f]\\)+" str pos)) |
| @@ -9215,9 +9063,9 @@ encodeURIComponent. E.g. `%C3%B6' is the german Umlaut `ö'." | |||
| 9215 | str) | 9063 | str) |
| 9216 | 9064 | ||
| 9217 | (defun org-link-unescape-compound (hex) | 9065 | (defun org-link-unescape-compound (hex) |
| 9218 | "Unhexify Unicode hex-chars. E.g. `%C3%B6' is the German Umlaut `ö'. | 9066 | "Unhexify Unicode hex-chars. E.g. `%C3%B6' is the German o-Umlaut. |
| 9219 | Note: this function also decodes single byte encodings like | 9067 | Note: this function also decodes single byte encodings like |
| 9220 | `%E1' (\"á\") if not followed by another `%[A-F0-9]{2}' group." | 9068 | `%E1' (a-acute) if not followed by another `%[A-F0-9]{2}' group." |
| 9221 | (save-match-data | 9069 | (save-match-data |
| 9222 | (let* ((bytes (cdr (split-string hex "%"))) | 9070 | (let* ((bytes (cdr (split-string hex "%"))) |
| 9223 | (ret "") | 9071 | (ret "") |
| @@ -11028,11 +10876,13 @@ prefix argument (`C-u C-u C-u C-c C-w')." | |||
| 11028 | (and org-auto-align-tags | 10876 | (and org-auto-align-tags |
| 11029 | (let ((org-loop-over-headlines-in-active-region nil)) | 10877 | (let ((org-loop-over-headlines-in-active-region nil)) |
| 11030 | (org-set-tags nil t))) | 10878 | (org-set-tags nil t))) |
| 11031 | (bookmark-set "org-refile-last-stored") | 10879 | (with-demoted-errors |
| 10880 | (bookmark-set "org-refile-last-stored")) | ||
| 11032 | ;; If we are refiling for capture, make sure that the | 10881 | ;; If we are refiling for capture, make sure that the |
| 11033 | ;; last-capture pointers point here | 10882 | ;; last-capture pointers point here |
| 11034 | (when (org-bound-and-true-p org-refile-for-capture) | 10883 | (when (org-bound-and-true-p org-refile-for-capture) |
| 11035 | (bookmark-set "org-capture-last-stored-marker") | 10884 | (with-demoted-errors |
| 10885 | (bookmark-set "org-capture-last-stored-marker")) | ||
| 11036 | (move-marker org-capture-last-stored-marker (point))) | 10886 | (move-marker org-capture-last-stored-marker (point))) |
| 11037 | (if (fboundp 'deactivate-mark) (deactivate-mark)) | 10887 | (if (fboundp 'deactivate-mark) (deactivate-mark)) |
| 11038 | (run-hooks 'org-after-refile-insert-hook)))) | 10888 | (run-hooks 'org-after-refile-insert-hook)))) |
| @@ -11128,26 +10978,28 @@ this is used for the GOTO interface." | |||
| 11128 | (org-refile-new-child parent-target child))) | 10978 | (org-refile-new-child parent-target child))) |
| 11129 | (error "Invalid target location"))))) | 10979 | (error "Invalid target location"))))) |
| 11130 | 10980 | ||
| 11131 | (declare-function org-string-nw-p "org-macs.el" (s)) | 10981 | (declare-function org-string-nw-p "org-macs" (s)) |
| 11132 | (defun org-refile-check-position (refile-pointer) | 10982 | (defun org-refile-check-position (refile-pointer) |
| 11133 | "Check if the refile pointer matches the readline to which it points." | 10983 | "Check if the refile pointer matches the headline to which it points." |
| 11134 | (let* ((file (nth 1 refile-pointer)) | 10984 | (let* ((file (nth 1 refile-pointer)) |
| 11135 | (re (nth 2 refile-pointer)) | 10985 | (re (nth 2 refile-pointer)) |
| 11136 | (pos (nth 3 refile-pointer)) | 10986 | (pos (nth 3 refile-pointer)) |
| 11137 | buffer) | 10987 | buffer) |
| 11138 | (when (org-string-nw-p re) | 10988 | (if (and (not (markerp pos)) (not file)) |
| 11139 | (setq buffer (if (markerp pos) | 10989 | (error "Please save the buffer to a file before refiling") |
| 11140 | (marker-buffer pos) | 10990 | (when (org-string-nw-p re) |
| 11141 | (or (find-buffer-visiting file) | 10991 | (setq buffer (if (markerp pos) |
| 11142 | (find-file-noselect file)))) | 10992 | (marker-buffer pos) |
| 11143 | (with-current-buffer buffer | 10993 | (or (find-buffer-visiting file) |
| 11144 | (save-excursion | 10994 | (find-file-noselect file)))) |
| 11145 | (save-restriction | 10995 | (with-current-buffer buffer |
| 11146 | (widen) | 10996 | (save-excursion |
| 11147 | (goto-char pos) | 10997 | (save-restriction |
| 11148 | (beginning-of-line 1) | 10998 | (widen) |
| 11149 | (unless (org-looking-at-p re) | 10999 | (goto-char pos) |
| 11150 | (error "Invalid refile position, please clear the cache with `C-0 C-c C-w' before refiling")))))))) | 11000 | (beginning-of-line 1) |
| 11001 | (unless (org-looking-at-p re) | ||
| 11002 | (error "Invalid refile position, please clear the cache with `C-0 C-c C-w' before refiling"))))))))) | ||
| 11151 | 11003 | ||
| 11152 | (defun org-refile-new-child (parent-target child) | 11004 | (defun org-refile-new-child (parent-target child) |
| 11153 | "Use refile target PARENT-TARGET to add new CHILD below it." | 11005 | "Use refile target PARENT-TARGET to add new CHILD below it." |
| @@ -11337,7 +11189,6 @@ Error if there is no such block at point." | |||
| 11337 | (goto-char pos) | 11189 | (goto-char pos) |
| 11338 | (error "Not in a dynamic block")))) | 11190 | (error "Not in a dynamic block")))) |
| 11339 | 11191 | ||
| 11340 | ;;;###autoload | ||
| 11341 | (defun org-update-all-dblocks () | 11192 | (defun org-update-all-dblocks () |
| 11342 | "Update all dynamic blocks in the buffer. | 11193 | "Update all dynamic blocks in the buffer. |
| 11343 | This function can be used in a hook." | 11194 | This function can be used in a hook." |
| @@ -12821,7 +12672,7 @@ D Show deadlines and scheduled items between a date range." | |||
| 12821 | ((equal ans ?D) | 12672 | ((equal ans ?D) |
| 12822 | (call-interactively 'org-check-dates-range)) | 12673 | (call-interactively 'org-check-dates-range)) |
| 12823 | ((equal ans ?t) | 12674 | ((equal ans ?t) |
| 12824 | (org-show-todo-tree nil)) | 12675 | (call-interactively 'org-show-todo-tree)) |
| 12825 | ((equal ans ?T) | 12676 | ((equal ans ?T) |
| 12826 | (org-show-todo-tree '(4))) | 12677 | (org-show-todo-tree '(4))) |
| 12827 | ((member ans '(?T ?m)) | 12678 | ((member ans '(?T ?m)) |
| @@ -14157,7 +14008,6 @@ Returns the new tags string, or nil to not change the current settings." | |||
| 14157 | 14008 | ||
| 14158 | ;;;; The mapping API | 14009 | ;;;; The mapping API |
| 14159 | 14010 | ||
| 14160 | ;;;###autoload | ||
| 14161 | (defun org-map-entries (func &optional match scope &rest skip) | 14011 | (defun org-map-entries (func &optional match scope &rest skip) |
| 14162 | "Call FUNC at each headline selected by MATCH in SCOPE. | 14012 | "Call FUNC at each headline selected by MATCH in SCOPE. |
| 14163 | 14013 | ||
| @@ -15656,14 +15506,13 @@ user." | |||
| 15656 | 15506 | ||
| 15657 | ;; Help matching dotted european dates | 15507 | ;; Help matching dotted european dates |
| 15658 | (when (string-match | 15508 | (when (string-match |
| 15659 | "^ *\\(3[01]\\|0?[1-9]\\|[12][0-9]\\)\\. ?\\(0?[1-9]\\|1[012]\\)\\. ?\\([1-9][0-9][0-9][0-9]\\)?" ans) | 15509 | "^ *\\(3[01]\\|0?[1-9]\\|[12][0-9]\\)\\. ?\\(0?[1-9]\\|1[012]\\)\\.\\( ?[1-9][0-9]\\{3\\}\\)?" ans) |
| 15660 | (setq year (if (match-end 3) | 15510 | (setq year (if (match-end 3) (string-to-number (match-string 3 ans)) |
| 15661 | (string-to-number (match-string 3 ans)) | 15511 | (setq kill-year t) |
| 15662 | (progn (setq kill-year t) | 15512 | (string-to-number (format-time-string "%Y"))) |
| 15663 | (string-to-number (format-time-string "%Y")))) | ||
| 15664 | day (string-to-number (match-string 1 ans)) | 15513 | day (string-to-number (match-string 1 ans)) |
| 15665 | month (string-to-number (match-string 2 ans)) | 15514 | month (string-to-number (match-string 2 ans)) |
| 15666 | ans (replace-match (format "%04d-%02d-%02d\\5" year month day) | 15515 | ans (replace-match (format "%04d-%02d-%02d" year month day) |
| 15667 | t nil ans))) | 15516 | t nil ans))) |
| 15668 | 15517 | ||
| 15669 | ;; Help matching american dates, like 5/30 or 5/30/7 | 15518 | ;; Help matching american dates, like 5/30 or 5/30/7 |
| @@ -16311,7 +16160,12 @@ When PREFER is `future', return a date that is either CURRENT or future. | |||
| 16311 | When SHOW-ALL is nil, only return the current occurrence of a time stamp." | 16160 | When SHOW-ALL is nil, only return the current occurrence of a time stamp." |
| 16312 | ;; Make the proper lists from the dates | 16161 | ;; Make the proper lists from the dates |
| 16313 | (catch 'exit | 16162 | (catch 'exit |
| 16314 | (let ((a1 '(("d" . day) ("w" . week) ("m" . month) ("y" . year))) | 16163 | (let ((a1 '(("h" . hour) |
| 16164 | ("d" . day) | ||
| 16165 | ("w" . week) | ||
| 16166 | ("m" . month) | ||
| 16167 | ("y" . year))) | ||
| 16168 | (shour (nth 2 (org-parse-time-string start))) | ||
| 16315 | dn dw sday cday n1 n2 n0 | 16169 | dn dw sday cday n1 n2 n0 |
| 16316 | d m y y1 y2 date1 date2 nmonths nm ny m2) | 16170 | d m y y1 y2 date1 date2 nmonths nm ny m2) |
| 16317 | 16171 | ||
| @@ -16331,6 +16185,13 @@ When SHOW-ALL is nil, only return the current occurrence of a time stamp." | |||
| 16331 | (error "Invalid change specifier: %s" change)) | 16185 | (error "Invalid change specifier: %s" change)) |
| 16332 | (if (eq dw 'week) (setq dw 'day dn (* 7 dn))) | 16186 | (if (eq dw 'week) (setq dw 'day dn (* 7 dn))) |
| 16333 | (cond | 16187 | (cond |
| 16188 | ((eq dw 'hour) | ||
| 16189 | (let ((missing-hours | ||
| 16190 | (mod (+ (- (* 24 (- cday sday)) shour) org-extend-today-until) | ||
| 16191 | dn))) | ||
| 16192 | (setq n1 (if (zerop missing-hours) cday | ||
| 16193 | (- cday (1+ (floor (/ missing-hours 24))))) | ||
| 16194 | n2 (+ cday (floor (/ (- dn missing-hours) 24)))))) | ||
| 16334 | ((eq dw 'day) | 16195 | ((eq dw 'day) |
| 16335 | (setq n1 (+ sday (* dn (floor (/ (- cday sday) dn)))) | 16196 | (setq n1 (+ sday (* dn (floor (/ (- cday sday) dn)))) |
| 16336 | n2 (+ n1 dn))) | 16197 | n2 (+ n1 dn))) |
| @@ -16993,7 +16854,9 @@ end of the list." | |||
| 16993 | (file-alist (mapcar (lambda (x) | 16854 | (file-alist (mapcar (lambda (x) |
| 16994 | (cons (file-truename x) x)) | 16855 | (cons (file-truename x) x)) |
| 16995 | (org-agenda-files t))) | 16856 | (org-agenda-files t))) |
| 16996 | (ctf (file-truename buffer-file-name)) | 16857 | (ctf (file-truename |
| 16858 | (or buffer-file-name | ||
| 16859 | (error "Please save the current buffer to a file")))) | ||
| 16997 | x had) | 16860 | x had) |
| 16998 | (setq x (assoc ctf file-alist) had x) | 16861 | (setq x (assoc ctf file-alist) had x) |
| 16999 | 16862 | ||
| @@ -17012,7 +16875,8 @@ These are the files which are being checked for agenda entries. | |||
| 17012 | Optional argument FILE means use this file instead of the current." | 16875 | Optional argument FILE means use this file instead of the current." |
| 17013 | (interactive) | 16876 | (interactive) |
| 17014 | (let* ((org-agenda-skip-unavailable-files nil) | 16877 | (let* ((org-agenda-skip-unavailable-files nil) |
| 17015 | (file (or file buffer-file-name)) | 16878 | (file (or file buffer-file-name |
| 16879 | (error "Current buffer does not visit a file"))) | ||
| 17016 | (true-file (file-truename file)) | 16880 | (true-file (file-truename file)) |
| 17017 | (afile (abbreviate-file-name file)) | 16881 | (afile (abbreviate-file-name file)) |
| 17018 | (files (delq nil (mapcar | 16882 | (files (delq nil (mapcar |
| @@ -17034,7 +16898,7 @@ Optional argument FILE means use this file instead of the current." | |||
| 17034 | (defun org-check-agenda-file (file) | 16898 | (defun org-check-agenda-file (file) |
| 17035 | "Make sure FILE exists. If not, ask user what to do." | 16899 | "Make sure FILE exists. If not, ask user what to do." |
| 17036 | (when (not (file-exists-p file)) | 16900 | (when (not (file-exists-p file)) |
| 17037 | (message "non-existent agenda file %s. [R]emove from list or [A]bort?" | 16901 | (message "Non-existent agenda file %s. [R]emove from list or [A]bort?" |
| 17038 | (abbreviate-file-name file)) | 16902 | (abbreviate-file-name file)) |
| 17039 | (let ((r (downcase (read-char-exclusive)))) | 16903 | (let ((r (downcase (read-char-exclusive)))) |
| 17040 | (cond | 16904 | (cond |
| @@ -18113,7 +17977,6 @@ BEG and END default to the buffer boundaries." | |||
| 18113 | (org-defkey org-mode-map [?\C-c (control ?*)] 'org-list-make-subtree) | 17977 | (org-defkey org-mode-map [?\C-c (control ?*)] 'org-list-make-subtree) |
| 18114 | ;;(org-defkey org-mode-map [?\C-c (control ?-)] 'org-list-make-list-from-subtree) | 17978 | ;;(org-defkey org-mode-map [?\C-c (control ?-)] 'org-list-make-list-from-subtree) |
| 18115 | 17979 | ||
| 18116 | (org-defkey org-mode-map "\C-c\C-x\C-k" 'org-mark-entry-for-agenda-action) | ||
| 18117 | (org-defkey org-mode-map "\C-c\C-x\C-w" 'org-cut-special) | 17980 | (org-defkey org-mode-map "\C-c\C-x\C-w" 'org-cut-special) |
| 18118 | (org-defkey org-mode-map "\C-c\C-x\M-w" 'org-copy-special) | 17981 | (org-defkey org-mode-map "\C-c\C-x\M-w" 'org-copy-special) |
| 18119 | (org-defkey org-mode-map "\C-c\C-x\C-y" 'org-paste-special) | 17982 | (org-defkey org-mode-map "\C-c\C-x\C-y" 'org-paste-special) |
| @@ -18801,13 +18664,12 @@ this function returns t, nil otherwise." | |||
| 18801 | nil)))) | 18664 | nil)))) |
| 18802 | 18665 | ||
| 18803 | (autoload 'org-element-at-point "org-element") | 18666 | (autoload 'org-element-at-point "org-element") |
| 18667 | (autoload 'org-element-type "org-element") | ||
| 18804 | 18668 | ||
| 18805 | (declare-function org-element-at-point "org-element" (&optional keep-trail)) | 18669 | (declare-function org-element-at-point "org-element" (&optional keep-trail)) |
| 18806 | (declare-function org-element-type "org-element" (element)) | 18670 | (declare-function org-element-type "org-element" (element)) |
| 18807 | (declare-function org-element-context "org-element" ()) | ||
| 18808 | (declare-function org-element-contents "org-element" (element)) | 18671 | (declare-function org-element-contents "org-element" (element)) |
| 18809 | (declare-function org-element-property "org-element" (property element)) | 18672 | (declare-function org-element-property "org-element" (property element)) |
| 18810 | (declare-function org-element-paragraph-parser "org-element" (limit)) | ||
| 18811 | (declare-function org-element-map "org-element" (data types fun &optional info first-match no-recursion)) | 18673 | (declare-function org-element-map "org-element" (data types fun &optional info first-match no-recursion)) |
| 18812 | (declare-function org-element-nested-p "org-element" (elem-a elem-b)) | 18674 | (declare-function org-element-nested-p "org-element" (elem-a elem-b)) |
| 18813 | (declare-function org-element-swap-A-B "org-element" (elem-a elem-b)) | 18675 | (declare-function org-element-swap-A-B "org-element" (elem-a elem-b)) |
| @@ -19985,7 +19847,6 @@ Your bug report will be posted to the Org-mode mailing list. | |||
| 19985 | 19847 | ||
| 19986 | ;;;; Documentation | 19848 | ;;;; Documentation |
| 19987 | 19849 | ||
| 19988 | ;;;###autoload | ||
| 19989 | (defun org-require-autoloaded-modules () | 19850 | (defun org-require-autoloaded-modules () |
| 19990 | (interactive) | 19851 | (interactive) |
| 19991 | (mapc 'require | 19852 | (mapc 'require |
| @@ -20813,20 +20674,6 @@ returns the current time." | |||
| 20813 | (nth 2 date)))))) | 20674 | (nth 2 date)))))) |
| 20814 | (or defd (current-time)))) | 20675 | (or defd (current-time)))) |
| 20815 | 20676 | ||
| 20816 | (defvar org-agenda-action-marker (make-marker) | ||
| 20817 | "Marker pointing to the entry for the next agenda action.") | ||
| 20818 | |||
| 20819 | (defun org-mark-entry-for-agenda-action () | ||
| 20820 | "Mark the current entry as target of an agenda action. | ||
| 20821 | Agenda actions are actions executed from the agenda with the key `k', | ||
| 20822 | which make use of the date at the cursor." | ||
| 20823 | (interactive) | ||
| 20824 | (move-marker org-agenda-action-marker | ||
| 20825 | (save-excursion (org-back-to-heading t) (point)) | ||
| 20826 | (current-buffer)) | ||
| 20827 | (message | ||
| 20828 | "Entry marked for action; press `k' at desired date in agenda or calendar")) | ||
| 20829 | |||
| 20830 | (defun org-mark-subtree (&optional up) | 20677 | (defun org-mark-subtree (&optional up) |
| 20831 | "Mark the current subtree. | 20678 | "Mark the current subtree. |
| 20832 | This puts point at the start of the current subtree, and mark at | 20679 | This puts point at the start of the current subtree, and mark at |
| @@ -21224,7 +21071,10 @@ a footnote definition, try to fill the first paragraph within." | |||
| 21224 | ;; Check if auto-filling is meaningful. | 21071 | ;; Check if auto-filling is meaningful. |
| 21225 | (let ((fc (current-fill-column))) | 21072 | (let ((fc (current-fill-column))) |
| 21226 | (when (and fc (> (current-column) fc)) | 21073 | (when (and fc (> (current-column) fc)) |
| 21227 | (let ((fill-prefix (org-adaptive-fill-function))) | 21074 | (let* ((fill-prefix (org-adaptive-fill-function)) |
| 21075 | ;; Enforce empty fill prefix, if required. Otherwise, it | ||
| 21076 | ;; will be computed again. | ||
| 21077 | (adaptive-fill-mode (not (equal fill-prefix "")))) | ||
| 21228 | (when fill-prefix (do-auto-fill)))))) | 21078 | (when fill-prefix (do-auto-fill)))))) |
| 21229 | 21079 | ||
| 21230 | (defun org-comment-line-break-function (&optional soft) | 21080 | (defun org-comment-line-break-function (&optional soft) |
| @@ -21475,45 +21325,43 @@ beyond the end of the headline." | |||
| 21475 | 21325 | ||
| 21476 | (defun org-end-of-line (&optional arg) | 21326 | (defun org-end-of-line (&optional arg) |
| 21477 | "Go to the end of the line. | 21327 | "Go to the end of the line. |
| 21478 | If this is a headline, and `org-special-ctrl-a/e' is set, ignore tags on the | 21328 | If this is a headline, and `org-special-ctrl-a/e' is set, ignore |
| 21479 | first attempt, and only move to after the tags when the cursor is already | 21329 | tags on the first attempt, and only move to after the tags when |
| 21480 | beyond the end of the headline." | 21330 | the cursor is already beyond the end of the headline." |
| 21481 | (interactive "P") | 21331 | (interactive "P") |
| 21482 | (let ((special (if (consp org-special-ctrl-a/e) | 21332 | (let ((special (if (consp org-special-ctrl-a/e) (cdr org-special-ctrl-a/e) |
| 21483 | (cdr org-special-ctrl-a/e) | 21333 | org-special-ctrl-a/e)) |
| 21484 | org-special-ctrl-a/e))) | 21334 | (type (org-element-type |
| 21335 | (save-excursion (beginning-of-line) (org-element-at-point))))) | ||
| 21485 | (cond | 21336 | (cond |
| 21486 | ((or (not special) arg | 21337 | ((or (not special) arg) |
| 21487 | (not (or (org-at-heading-p) (org-at-item-p) (org-at-drawer-p)))) | ||
| 21488 | (call-interactively | 21338 | (call-interactively |
| 21489 | (cond ((org-bound-and-true-p line-move-visual) 'end-of-visual-line) | 21339 | (if (fboundp 'move-end-of-line) 'move-end-of-line 'end-of-line))) |
| 21490 | ((fboundp 'move-end-of-line) 'move-end-of-line) | 21340 | ((memq type '(headline inlinetask)) |
| 21491 | (t 'end-of-line)))) | ||
| 21492 | ((org-at-heading-p) | ||
| 21493 | (let ((pos (point))) | 21341 | (let ((pos (point))) |
| 21494 | (beginning-of-line 1) | 21342 | (beginning-of-line 1) |
| 21495 | (if (looking-at (org-re ".*?\\(?:\\([ \t]*\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*\\)?$")) | 21343 | (if (looking-at (org-re ".*?\\(?:\\([ \t]*\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*\\)?$")) |
| 21496 | (if (eq special t) | 21344 | (if (eq special t) |
| 21497 | (if (or (< pos (match-beginning 1)) | 21345 | (if (or (< pos (match-beginning 1)) (= pos (match-end 0))) |
| 21498 | (= pos (match-end 0))) | 21346 | (goto-char (match-beginning 1)) |
| 21499 | (goto-char (match-beginning 1)) | 21347 | (goto-char (match-end 0))) |
| 21500 | (goto-char (match-end 0))) | 21348 | (if (or (< pos (match-end 0)) |
| 21501 | (if (or (< pos (match-end 0)) (not (eq this-command last-command))) | 21349 | (not (eq this-command last-command))) |
| 21502 | (goto-char (match-end 0)) | 21350 | (goto-char (match-end 0)) |
| 21503 | (goto-char (match-beginning 1)))) | 21351 | (goto-char (match-beginning 1)))) |
| 21504 | (call-interactively (if (fboundp 'move-end-of-line) | 21352 | (call-interactively |
| 21505 | 'move-end-of-line | 21353 | (if (fboundp 'move-end-of-line) 'move-end-of-line 'end-of-line))))) |
| 21506 | 'end-of-line))))) | 21354 | ((memq type |
| 21507 | ((org-at-drawer-p) | 21355 | '(center-block comment-block drawer dynamic-block example-block |
| 21508 | (move-end-of-line 1) | 21356 | export-block item plain-list property-drawer |
| 21509 | (when (overlays-at (1- (point))) (backward-char 1))) | 21357 | quote-block special-block src-block verse-block)) |
| 21510 | ;; At an item: Move before any hidden text. | 21358 | ;; Never move past the ellipsis. |
| 21511 | (t (call-interactively | 21359 | (or (eolp) (move-end-of-line 1)) |
| 21512 | (cond ((org-bound-and-true-p line-move-visual) 'end-of-visual-line) | 21360 | (when (org-invisible-p2) (backward-char))) |
| 21513 | ((fboundp 'move-end-of-line) 'move-end-of-line) | 21361 | (t |
| 21514 | (t 'end-of-line))))) | 21362 | (call-interactively |
| 21515 | (org-no-warnings | 21363 | (if (fboundp 'move-end-of-line) 'move-end-of-line 'end-of-line)))) |
| 21516 | (and (featurep 'xemacs) (setq zmacs-region-stays t))))) | 21364 | (org-no-warnings (and (featurep 'xemacs) (setq zmacs-region-stays t))))) |
| 21517 | 21365 | ||
| 21518 | (define-key org-mode-map "\C-a" 'org-beginning-of-line) | 21366 | (define-key org-mode-map "\C-a" 'org-beginning-of-line) |
| 21519 | (define-key org-mode-map "\C-e" 'org-end-of-line) | 21367 | (define-key org-mode-map "\C-e" 'org-end-of-line) |
| @@ -21966,7 +21814,6 @@ Stop at the first and last subheadings of a superior heading." | |||
| 21966 | (if (< l level) (setq arg 1))) | 21814 | (if (< l level) (setq arg 1))) |
| 21967 | (setq arg (1- arg))))) | 21815 | (setq arg (1- arg))))) |
| 21968 | 21816 | ||
| 21969 | ;;;###autoload | ||
| 21970 | (defun org-forward-element () | 21817 | (defun org-forward-element () |
| 21971 | "Move forward by one element. | 21818 | "Move forward by one element. |
| 21972 | Move to the next element at the same level, when possible." | 21819 | Move to the next element at the same level, when possible." |
| @@ -21986,7 +21833,6 @@ Move to the next element at the same level, when possible." | |||
| 21986 | (goto-char (org-element-property :end parent)) | 21833 | (goto-char (org-element-property :end parent)) |
| 21987 | (goto-char end)))))) | 21834 | (goto-char end)))))) |
| 21988 | 21835 | ||
| 21989 | ;;;###autoload | ||
| 21990 | (defun org-backward-element () | 21836 | (defun org-backward-element () |
| 21991 | "Move backward by one element. | 21837 | "Move backward by one element. |
| 21992 | Move to the previous element at the same level, when possible." | 21838 | Move to the previous element at the same level, when possible." |
| @@ -22013,7 +21859,6 @@ Move to the previous element at the same level, when possible." | |||
| 22013 | ((org-before-first-heading-p) (goto-char (point-min))) | 21859 | ((org-before-first-heading-p) (goto-char (point-min))) |
| 22014 | (t (org-back-to-heading))))))) | 21860 | (t (org-back-to-heading))))))) |
| 22015 | 21861 | ||
| 22016 | ;;;###autoload | ||
| 22017 | (defun org-up-element () | 21862 | (defun org-up-element () |
| 22018 | "Move to upper element." | 21863 | "Move to upper element." |
| 22019 | (interactive) | 21864 | (interactive) |
| @@ -22026,7 +21871,6 @@ Move to the previous element at the same level, when possible." | |||
| 22026 | (error "No surrounding element") | 21871 | (error "No surrounding element") |
| 22027 | (org-with-limited-levels (org-back-to-heading))))))) | 21872 | (org-with-limited-levels (org-back-to-heading))))))) |
| 22028 | 21873 | ||
| 22029 | ;;;###autoload | ||
| 22030 | (defvar org-element-greater-elements) | 21874 | (defvar org-element-greater-elements) |
| 22031 | (defun org-down-element () | 21875 | (defun org-down-element () |
| 22032 | "Move to inner element." | 21876 | "Move to inner element." |
| @@ -22043,7 +21887,6 @@ Move to the previous element at the same level, when possible." | |||
| 22043 | (error "No content for this element")))) | 21887 | (error "No content for this element")))) |
| 22044 | (t (error "No inner element"))))) | 21888 | (t (error "No inner element"))))) |
| 22045 | 21889 | ||
| 22046 | ;;;###autoload | ||
| 22047 | (defun org-drag-element-backward () | 21890 | (defun org-drag-element-backward () |
| 22048 | "Move backward element at point." | 21891 | "Move backward element at point." |
| 22049 | (interactive) | 21892 | (interactive) |
| @@ -22060,7 +21903,6 @@ Move to the previous element at the same level, when possible." | |||
| 22060 | (goto-char (+ (org-element-property :begin prev-elem) | 21903 | (goto-char (+ (org-element-property :begin prev-elem) |
| 22061 | (- pos (org-element-property :begin elem))))))))) | 21904 | (- pos (org-element-property :begin elem))))))))) |
| 22062 | 21905 | ||
| 22063 | ;;;###autoload | ||
| 22064 | (defun org-drag-element-forward () | 21906 | (defun org-drag-element-forward () |
| 22065 | "Move forward element at point." | 21907 | "Move forward element at point." |
| 22066 | (interactive) | 21908 | (interactive) |
| @@ -22095,7 +21937,6 @@ Move to the previous element at the same level, when possible." | |||
| 22095 | (org-element-swap-A-B elem next-elem) | 21937 | (org-element-swap-A-B elem next-elem) |
| 22096 | (goto-char (+ pos size-next size-blank)))))) | 21938 | (goto-char (+ pos size-next size-blank)))))) |
| 22097 | 21939 | ||
| 22098 | ;;;###autoload | ||
| 22099 | (defun org-mark-element () | 21940 | (defun org-mark-element () |
| 22100 | "Put point at beginning of this element, mark at end. | 21941 | "Put point at beginning of this element, mark at end. |
| 22101 | 21942 | ||
| @@ -22116,7 +21957,6 @@ ones already marked." | |||
| 22116 | (push-mark (org-element-property :end element) t t) | 21957 | (push-mark (org-element-property :end element) t t) |
| 22117 | (goto-char (org-element-property :begin element)))))) | 21958 | (goto-char (org-element-property :begin element)))))) |
| 22118 | 21959 | ||
| 22119 | ;;;###autoload | ||
| 22120 | (defun org-narrow-to-element () | 21960 | (defun org-narrow-to-element () |
| 22121 | "Narrow buffer to current element." | 21961 | "Narrow buffer to current element." |
| 22122 | (interactive) | 21962 | (interactive) |
| @@ -22135,7 +21975,6 @@ ones already marked." | |||
| 22135 | (org-element-property :begin elem) | 21975 | (org-element-property :begin elem) |
| 22136 | (org-element-property :end elem)))))) | 21976 | (org-element-property :end elem)))))) |
| 22137 | 21977 | ||
| 22138 | ;;;###autoload | ||
| 22139 | (defun org-transpose-element () | 21978 | (defun org-transpose-element () |
| 22140 | "Transpose current and previous elements, keeping blank lines between. | 21979 | "Transpose current and previous elements, keeping blank lines between. |
| 22141 | Point is moved after both elements." | 21980 | Point is moved after both elements." |
| @@ -22145,7 +21984,6 @@ Point is moved after both elements." | |||
| 22145 | (org-drag-element-backward) | 21984 | (org-drag-element-backward) |
| 22146 | (goto-char end))) | 21985 | (goto-char end))) |
| 22147 | 21986 | ||
| 22148 | ;;;###autoload | ||
| 22149 | (defun org-unindent-buffer () | 21987 | (defun org-unindent-buffer () |
| 22150 | "Un-indent the visible part of the buffer. | 21988 | "Un-indent the visible part of the buffer. |
| 22151 | Relative indentation (between items, inside blocks, etc.) isn't | 21989 | Relative indentation (between items, inside blocks, etc.) isn't |