diff options
| author | Bastien Guerry | 2012-12-12 17:47:07 +0100 |
|---|---|---|
| committer | Bastien Guerry | 2012-12-12 17:47:07 +0100 |
| commit | 63aa098259339e924d8a7d40c59a34e579132af6 (patch) | |
| tree | a23b00ff5e7fd931aadc58f1cffdd00f1f27db5f | |
| parent | 14b8c3d926ef813f621f95b0dcd059192d3d898c (diff) | |
| download | emacs-63aa098259339e924d8a7d40c59a34e579132af6.tar.gz emacs-63aa098259339e924d8a7d40c59a34e579132af6.zip | |
Merge upstream Org (from commit 488eea)
| -rw-r--r-- | doc/misc/ChangeLog | 18 | ||||
| -rw-r--r-- | doc/misc/org.texi | 65 | ||||
| -rw-r--r-- | lisp/org/ChangeLog | 87 | ||||
| -rw-r--r-- | lisp/org/org-agenda.el | 13 | ||||
| -rw-r--r-- | lisp/org/org-bibtex.el | 2 | ||||
| -rw-r--r-- | lisp/org/org-clock.el | 2 | ||||
| -rw-r--r-- | lisp/org/org-element.el | 18 | ||||
| -rw-r--r-- | lisp/org/org-latex.el | 9 | ||||
| -rw-r--r-- | lisp/org/org-list.el | 4 | ||||
| -rw-r--r-- | lisp/org/org-remember.el | 16 | ||||
| -rw-r--r-- | lisp/org/org-src.el | 23 | ||||
| -rw-r--r-- | lisp/org/org-table.el | 4 | ||||
| -rw-r--r-- | lisp/org/org-timer.el | 3 | ||||
| -rw-r--r-- | lisp/org/org-version.el | 2 | ||||
| -rw-r--r-- | lisp/org/org.el | 90 |
15 files changed, 253 insertions, 103 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index ae9f099de50..b96345ba135 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,21 @@ | |||
| 1 | 2012-12-12 Bastien Guerry <bzg@gnu.org> | ||
| 2 | |||
| 3 | * org.texi (Summary, Code block specific header arguments) | ||
| 4 | (Code block specific header arguments) | ||
| 5 | (Header arguments in function calls, var, noweb) | ||
| 6 | (Results of evaluation, Code evaluation security): Small | ||
| 7 | reformatting: add a blank line before some example. | ||
| 8 | |||
| 9 | * org.texi (System-wide header arguments) | ||
| 10 | (Header arguments in Org mode properties, Conflicts) | ||
| 11 | (Dynamic blocks, Using the mapping API): Fix indendation of | ||
| 12 | Elisp code examples. | ||
| 13 | |||
| 14 | * org.texi (Comment lines): Fix description of the comment syntax. | ||
| 15 | |||
| 16 | * org.texi (Installation): Mention "make test" in the correct | ||
| 17 | section. | ||
| 18 | |||
| 1 | 2012-12-02 Michael Albinus <michael.albinus@gmx.de> | 19 | 2012-12-02 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 20 | ||
| 3 | * tramp.texi (Top, Obtaining Tramp): Replace CVS by Git. | 21 | * tramp.texi (Top, Obtaining Tramp): Replace CVS by Git. |
diff --git a/doc/misc/org.texi b/doc/misc/org.texi index 700dffd26bf..b8c385fab29 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi | |||
| @@ -834,7 +834,6 @@ ends, for example: | |||
| 834 | @r{@bullet{} an environment for literate programming} | 834 | @r{@bullet{} an environment for literate programming} |
| 835 | @end example | 835 | @end example |
| 836 | 836 | ||
| 837 | |||
| 838 | @cindex FAQ | 837 | @cindex FAQ |
| 839 | There is a website for Org which provides links to the newest | 838 | There is a website for Org which provides links to the newest |
| 840 | version of Org, as well as additional information, frequently asked | 839 | version of Org, as well as additional information, frequently asked |
| @@ -879,8 +878,6 @@ Lisp and Info files will be installed. If the Emacs binary is not in your | |||
| 879 | path, give the full path to the executable. Avoid spaces in any path names. | 878 | path, give the full path to the executable. Avoid spaces in any path names. |
| 880 | @item Run @code{make config} | 879 | @item Run @code{make config} |
| 881 | again to check the configuration. | 880 | again to check the configuration. |
| 882 | @item Optionally run @code{make test} | ||
| 883 | to build Org mode and then run the full testsuite. | ||
| 884 | @item Run @code{make install} or @code{sudo make install} | 881 | @item Run @code{make install} or @code{sudo make install} |
| 885 | to build and install Org mode on your system. | 882 | to build and install Org mode on your system. |
| 886 | @end itemize | 883 | @end itemize |
| @@ -903,6 +900,8 @@ Emacs binary is not in your path, you must give the full path to the | |||
| 903 | executable. Avoid spaces in any path names. | 900 | executable. Avoid spaces in any path names. |
| 904 | @item Run @code{make config} | 901 | @item Run @code{make config} |
| 905 | to check the configuration. | 902 | to check the configuration. |
| 903 | @item Optionally run @code{make test} | ||
| 904 | to build Org mode and then run the full testsuite. | ||
| 906 | @item Run @code{make update2} or @code{make up2} | 905 | @item Run @code{make update2} or @code{make up2} |
| 907 | to update the Git repository and build and install Org mode. The latter | 906 | to update the Git repository and build and install Org mode. The latter |
| 908 | invocation runs the complete test suite before installation and installs only | 907 | invocation runs the complete test suite before installation and installs only |
| @@ -947,7 +946,7 @@ description on Worg}. | |||
| 947 | Installing Info files is system dependent, because of differences in the | 946 | Installing Info files is system dependent, because of differences in the |
| 948 | @file{install-info} program. The Info documentation is installed together | 947 | @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 | 948 | 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 | 949 | install the Info documentation seperately (you need to have |
| 951 | install-info@footnote{The output from install-info (if any) is system | 950 | install-info@footnote{The output from install-info (if any) is system |
| 952 | dependent. In particular Debian and its derivatives use two different | 951 | dependent. In particular Debian and its derivatives use two different |
| 953 | versions of install-info and you may see the message: | 952 | versions of install-info and you may see the message: |
| @@ -9222,11 +9221,11 @@ a horizontal line (@samp{<hr/>} in HTML and @code{\hrule} in @LaTeX{}). | |||
| 9222 | @cindex exporting, not | 9221 | @cindex exporting, not |
| 9223 | @cindex #+BEGIN_COMMENT | 9222 | @cindex #+BEGIN_COMMENT |
| 9224 | 9223 | ||
| 9225 | Lines starting with zero or more whitespace characters followed by @samp{#} | 9224 | Lines starting with zero or more whitespace characters followed by one |
| 9226 | are treated as comments and will never be exported. Also entire subtrees | 9225 | @samp{#} and a whitespace are treated as comments and will never be exported. |
| 9227 | starting with the word @samp{COMMENT} will never be exported. Finally, | 9226 | Also entire subtrees starting with the word @samp{COMMENT} will never be |
| 9228 | regions surrounded by @samp{#+BEGIN_COMMENT} ... @samp{#+END_COMMENT} will | 9227 | exported. Finally, regions surrounded by @samp{#+BEGIN_COMMENT} |
| 9229 | not be exported. | 9228 | ... @samp{#+END_COMMENT} will not be exported. |
| 9230 | 9229 | ||
| 9231 | @table @kbd | 9230 | @table @kbd |
| 9232 | @kindex C-c ; | 9231 | @kindex C-c ; |
| @@ -13155,8 +13154,8 @@ blocks. | |||
| 13155 | 13154 | ||
| 13156 | @lisp | 13155 | @lisp |
| 13157 | (setq org-babel-default-header-args | 13156 | (setq org-babel-default-header-args |
| 13158 | (cons '(:noweb . "yes") | 13157 | (cons '(:noweb . "yes") |
| 13159 | (assq-delete-all :noweb org-babel-default-header-args))) | 13158 | (assq-delete-all :noweb org-babel-default-header-args))) |
| 13160 | @end lisp | 13159 | @end lisp |
| 13161 | 13160 | ||
| 13162 | @node Language-specific header arguments, Buffer-wide header arguments, System-wide header arguments, Using header arguments | 13161 | @node Language-specific header arguments, Buffer-wide header arguments, System-wide header arguments, Using header arguments |
| @@ -13201,9 +13200,9 @@ blocks in the subtree rooted at the following heading: | |||
| 13201 | 13200 | ||
| 13202 | @example | 13201 | @example |
| 13203 | * outline header | 13202 | * outline header |
| 13204 | :PROPERTIES: | 13203 | :PROPERTIES: |
| 13205 | :cache: yes | 13204 | :cache: yes |
| 13206 | :END: | 13205 | :END: |
| 13207 | @end example | 13206 | @end example |
| 13208 | 13207 | ||
| 13209 | @kindex C-c C-x p | 13208 | @kindex C-c C-x p |
| @@ -13247,6 +13246,7 @@ Code block header arguments can span multiple lines using @code{#+HEADER:} or | |||
| 13247 | @cindex #+HEADERS: | 13246 | @cindex #+HEADERS: |
| 13248 | 13247 | ||
| 13249 | Multi-line header arguments on an un-named code block: | 13248 | Multi-line header arguments on an un-named code block: |
| 13249 | |||
| 13250 | @example | 13250 | @example |
| 13251 | #+HEADERS: :var data1=1 | 13251 | #+HEADERS: :var data1=1 |
| 13252 | #+BEGIN_SRC emacs-lisp :var data2=2 | 13252 | #+BEGIN_SRC emacs-lisp :var data2=2 |
| @@ -13258,6 +13258,7 @@ Multi-line header arguments on an un-named code block: | |||
| 13258 | @end example | 13258 | @end example |
| 13259 | 13259 | ||
| 13260 | Multi-line header arguments on a named code block: | 13260 | Multi-line header arguments on a named code block: |
| 13261 | |||
| 13261 | @example | 13262 | @example |
| 13262 | #+NAME: named-block | 13263 | #+NAME: named-block |
| 13263 | #+HEADER: :var data=2 | 13264 | #+HEADER: :var data=2 |
| @@ -13280,12 +13281,14 @@ blocks}. | |||
| 13280 | 13281 | ||
| 13281 | The following will apply the @code{:exports results} header argument to the | 13282 | The following will apply the @code{:exports results} header argument to the |
| 13282 | evaluation of the @code{#+CALL:} line. | 13283 | evaluation of the @code{#+CALL:} line. |
| 13284 | |||
| 13283 | @example | 13285 | @example |
| 13284 | #+CALL: factorial(n=5) :exports results | 13286 | #+CALL: factorial(n=5) :exports results |
| 13285 | @end example | 13287 | @end example |
| 13286 | 13288 | ||
| 13287 | The following will apply the @code{:session special} header argument to the | 13289 | The following will apply the @code{:session special} header argument to the |
| 13288 | evaluation of the @code{factorial} code block. | 13290 | evaluation of the @code{factorial} code block. |
| 13291 | |||
| 13289 | @example | 13292 | @example |
| 13290 | #+CALL: factorial[:session special](n=5) | 13293 | #+CALL: factorial[:session special](n=5) |
| 13291 | @end example | 13294 | @end example |
| @@ -13366,6 +13369,7 @@ Here are examples of passing values by reference: | |||
| 13366 | 13369 | ||
| 13367 | @item table | 13370 | @item table |
| 13368 | an Org mode table named with either a @code{#+NAME:} or @code{#+TBLNAME:} line | 13371 | an Org mode table named with either a @code{#+NAME:} or @code{#+TBLNAME:} line |
| 13372 | |||
| 13369 | @example | 13373 | @example |
| 13370 | #+TBLNAME: example-table | 13374 | #+TBLNAME: example-table |
| 13371 | | 1 | | 13375 | | 1 | |
| @@ -13948,7 +13952,6 @@ This code block: | |||
| 13948 | -- <<example>> | 13952 | -- <<example>> |
| 13949 | @end example | 13953 | @end example |
| 13950 | 13954 | ||
| 13951 | |||
| 13952 | expands to: | 13955 | expands to: |
| 13953 | 13956 | ||
| 13954 | @example | 13957 | @example |
| @@ -14331,6 +14334,7 @@ process. For example, compare the following two blocks: | |||
| 14331 | @end example | 14334 | @end example |
| 14332 | 14335 | ||
| 14333 | In non-session mode, the `2' is not printed and does not appear. | 14336 | In non-session mode, the `2' is not printed and does not appear. |
| 14337 | |||
| 14334 | @example | 14338 | @example |
| 14335 | #+BEGIN_SRC python :results output :session | 14339 | #+BEGIN_SRC python :results output :session |
| 14336 | print "hello" | 14340 | print "hello" |
| @@ -14705,6 +14709,7 @@ ask and nil not to ask. | |||
| 14705 | 14709 | ||
| 14706 | For example, here is how to execute "ditaa" code (which is considered safe) | 14710 | For example, here is how to execute "ditaa" code (which is considered safe) |
| 14707 | without asking: | 14711 | without asking: |
| 14712 | |||
| 14708 | @example | 14713 | @example |
| 14709 | (defun my-org-confirm-babel-evaluate (lang body) | 14714 | (defun my-org-confirm-babel-evaluate (lang body) |
| 14710 | (not (string= lang "ditaa"))) ; don't ask for ditaa | 14715 | (not (string= lang "ditaa"))) ; don't ask for ditaa |
| @@ -14806,7 +14811,7 @@ buffer, most useful for specifying the allowed values of a property. | |||
| 14806 | @item #+SETUPFILE: file | 14811 | @item #+SETUPFILE: file |
| 14807 | This line defines a file that holds more in-buffer setup. Normally this is | 14812 | This line defines a file that holds more in-buffer setup. Normally this is |
| 14808 | entirely ignored. Only when the buffer is parsed for option-setting lines | 14813 | entirely ignored. Only when the buffer is parsed for option-setting lines |
| 14809 | (i.e., when starting Org mode for a file, when pressing @kbd{C-c C-c} in a | 14814 | (i.e.@: when starting Org mode for a file, when pressing @kbd{C-c C-c} in a |
| 14810 | settings line, or when exporting), then the contents of this file are parsed | 14815 | settings line, or when exporting), then the contents of this file are parsed |
| 14811 | as if they had been included in the buffer. In particular, the file can be | 14816 | as if they had been included in the buffer. In particular, the file can be |
| 14812 | any other Org mode file with internal setup. You can visit the file the | 14817 | any other Org mode file with internal setup. You can visit the file the |
| @@ -15168,7 +15173,7 @@ example using the color @code{grey90} on a white background. | |||
| 15168 | Things become cleaner still if you skip all the even levels and use only odd | 15173 | Things become cleaner still if you skip all the even levels and use only odd |
| 15169 | levels 1, 3, 5..., effectively adding two stars to go from one outline level | 15174 | levels 1, 3, 5..., effectively adding two stars to go from one outline level |
| 15170 | to the next@footnote{When you need to specify a level for a property search | 15175 | to the next@footnote{When you need to specify a level for a property search |
| 15171 | or refile targets, @samp{LEVEL=2} will correspond to 3 stars, etc.}. In this | 15176 | or refile targets, @samp{LEVEL=2} will correspond to 3 stars, etc@.}. In this |
| 15172 | way we get the outline view shown at the beginning of this section. In order | 15177 | way we get the outline view shown at the beginning of this section. In order |
| 15173 | to make the structure editing and export commands handle this convention | 15178 | to make the structure editing and export commands handle this convention |
| 15174 | correctly, configure the variable @code{org-odd-levels-only}, or set this on | 15179 | correctly, configure the variable @code{org-odd-levels-only}, or set this on |
| @@ -15259,7 +15264,7 @@ names for natural constants or units. Instead of defining your own | |||
| 15259 | constants in the variable @code{org-table-formula-constants}, install | 15264 | constants in the variable @code{org-table-formula-constants}, install |
| 15260 | the @file{constants} package which defines a large number of constants | 15265 | the @file{constants} package which defines a large number of constants |
| 15261 | and units, and lets you use unit prefixes like @samp{M} for | 15266 | and units, and lets you use unit prefixes like @samp{M} for |
| 15262 | @samp{Mega}, etc. You will need version 2.0 of this package, available | 15267 | @samp{Mega}, etc@. You will need version 2.0 of this package, available |
| 15263 | at @url{http://www.astro.uva.nl/~dominik/Tools}. Org checks for | 15268 | at @url{http://www.astro.uva.nl/~dominik/Tools}. Org checks for |
| 15264 | the function @code{constants-get}, which has to be autoloaded in your | 15269 | the function @code{constants-get}, which has to be autoloaded in your |
| 15265 | setup. See the installation instructions in the file | 15270 | setup. See the installation instructions in the file |
| @@ -15401,7 +15406,7 @@ function: | |||
| 15401 | 15406 | ||
| 15402 | @lisp | 15407 | @lisp |
| 15403 | (defun yas/org-very-safe-expand () | 15408 | (defun yas/org-very-safe-expand () |
| 15404 | (let ((yas/fallback-behavior 'return-nil)) (yas/expand))) | 15409 | (let ((yas/fallback-behavior 'return-nil)) (yas/expand))) |
| 15405 | @end lisp | 15410 | @end lisp |
| 15406 | 15411 | ||
| 15407 | Then, tell Org mode what to do with the new function: | 15412 | Then, tell Org mode what to do with the new function: |
| @@ -15409,10 +15414,10 @@ Then, tell Org mode what to do with the new function: | |||
| 15409 | @lisp | 15414 | @lisp |
| 15410 | (add-hook 'org-mode-hook | 15415 | (add-hook 'org-mode-hook |
| 15411 | (lambda () | 15416 | (lambda () |
| 15412 | (make-variable-buffer-local 'yas/trigger-key) | 15417 | (make-variable-buffer-local 'yas/trigger-key) |
| 15413 | (setq yas/trigger-key [tab]) | 15418 | (setq yas/trigger-key [tab]) |
| 15414 | (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand) | 15419 | (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand) |
| 15415 | (define-key yas/keymap [tab] 'yas/next-field))) | 15420 | (define-key yas/keymap [tab] 'yas/next-field))) |
| 15416 | @end lisp | 15421 | @end lisp |
| 15417 | 15422 | ||
| 15418 | @item @file{windmove.el} by Hovav Shacham | 15423 | @item @file{windmove.el} by Hovav Shacham |
| @@ -16053,9 +16058,9 @@ The corresponding block writer function could look like this: | |||
| 16053 | 16058 | ||
| 16054 | @lisp | 16059 | @lisp |
| 16055 | (defun org-dblock-write:block-update-time (params) | 16060 | (defun org-dblock-write:block-update-time (params) |
| 16056 | (let ((fmt (or (plist-get params :format) "%d. %m. %Y"))) | 16061 | (let ((fmt (or (plist-get params :format) "%d. %m. %Y"))) |
| 16057 | (insert "Last block update at: " | 16062 | (insert "Last block update at: " |
| 16058 | (format-time-string fmt (current-time))))) | 16063 | (format-time-string fmt (current-time))))) |
| 16059 | @end lisp | 16064 | @end lisp |
| 16060 | 16065 | ||
| 16061 | If you want to make sure that all dynamic blocks are always up-to-date, | 16066 | If you want to make sure that all dynamic blocks are always up-to-date, |
| @@ -16450,8 +16455,8 @@ Entries in comment trees and in archive trees will be ignored. | |||
| 16450 | 16455 | ||
| 16451 | @lisp | 16456 | @lisp |
| 16452 | (org-map-entries | 16457 | (org-map-entries |
| 16453 | '(org-todo "UPCOMING") | 16458 | '(org-todo "UPCOMING") |
| 16454 | "+TOMORROW" 'file 'archive 'comment) | 16459 | "+TOMORROW" 'file 'archive 'comment) |
| 16455 | @end lisp | 16460 | @end lisp |
| 16456 | 16461 | ||
| 16457 | The following example counts the number of entries with TODO keyword | 16462 | The following example counts the number of entries with TODO keyword |
| @@ -16693,7 +16698,7 @@ on @file{org-element.el} and @file{org-export.el} has been outstanding, and | |||
| 16693 | opened the doors for many new ideas and features. | 16698 | opened the doors for many new ideas and features. |
| 16694 | 16699 | ||
| 16695 | @item Jambunathan K | 16700 | @item Jambunathan K |
| 16696 | Jambunathan contributed the ODT exporter, definitely a killer feature of | 16701 | Jambunathan contributed the ODT exporter, definitly a killer feature of |
| 16697 | Org mode. He also contributed the new HTML exporter, which is another core | 16702 | Org mode. He also contributed the new HTML exporter, which is another core |
| 16698 | feature of Org. Here too, I knew I could rely on him to fix bugs in these | 16703 | feature of Org. Here too, I knew I could rely on him to fix bugs in these |
| 16699 | areas and to patiently explain the users what was the problems and solutions. | 16704 | areas and to patiently explain the users what was the problems and solutions. |
| @@ -16701,7 +16706,7 @@ areas and to patiently explain the users what was the problems and solutions. | |||
| 16701 | @item Achim Gratz | 16706 | @item Achim Gratz |
| 16702 | Achim rewrote the building process of Org, turning some @emph{ad hoc} tools | 16707 | Achim rewrote the building process of Org, turning some @emph{ad hoc} tools |
| 16703 | into a flexible and conceptually clean process. He patiently coped with the | 16708 | into a flexible and conceptually clean process. He patiently coped with the |
| 16704 | many hiccups that such a change can create for users. | 16709 | many hicups that such a change can create for users. |
| 16705 | 16710 | ||
| 16706 | @item Nick Dokos | 16711 | @item Nick Dokos |
| 16707 | The Org mode mailing list would not be such a nice place without Nick, who | 16712 | The Org mode mailing list would not be such a nice place without Nick, who |
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 9bf731fb6b2..c146488991b 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1,3 +1,90 @@ | |||
| 1 | 2012-12-12 Bastien Guerry <bzg@gnu.org> | ||
| 2 | |||
| 3 | * org-latex.el (org-export-latex-links): Escape raw path when | ||
| 4 | exporting links to files. | ||
| 5 | |||
| 6 | * org-src.el (org-src-native-tab-command-maybe): Fix bug: the | ||
| 7 | S-TAB key should not trigger a native TAB command. | ||
| 8 | |||
| 9 | * org.el (org-open-at-point): Allow to open any link within | ||
| 10 | footnotes definition, not only bracket links. | ||
| 11 | |||
| 12 | * org.el (org-sort-entries): Bugfix: keep track of the clock | ||
| 13 | marker when sorting entries. Enhance the docstring. | ||
| 14 | |||
| 15 | * org-clock.el (org-clock-out): Use `user-error' when the user | ||
| 16 | tries to clock out while there is no running clock. | ||
| 17 | |||
| 18 | * org-table.el (org-table-sort-lines): Ensure coordinates are | ||
| 19 | correctly displayed when sorting. | ||
| 20 | |||
| 21 | * org.el (org-do-sort): Enhance prompt. | ||
| 22 | |||
| 23 | * org-agenda.el (org-agenda-finalize): Also activate plain links. | ||
| 24 | |||
| 25 | * org-timer.el (org-timer-stop): Add message. | ||
| 26 | |||
| 27 | * org-agenda.el (org-agenda-schedule, org-agenda-deadline): Fix | ||
| 28 | redundant messages. | ||
| 29 | |||
| 30 | * org-agenda.el (org-agenda-finalize): Fix clock highlighting. | ||
| 31 | |||
| 32 | * org.el (org-additional-option-like-keywords): Add "INDEX:". | ||
| 33 | |||
| 34 | * org-install.el: Enhance warning. | ||
| 35 | |||
| 36 | 2012-12-12 Erik Hetzner <egh@e6h.org> (tiny change) | ||
| 37 | |||
| 38 | * org.el (org-log-into-drawer): Honor the nil value for the | ||
| 39 | :LOG_INTO_DRAWER: property. | ||
| 40 | |||
| 41 | 2012-12-12 Le Wang <l26wang@gmail.com> (tiny change) | ||
| 42 | |||
| 43 | * org-src.el (org-edit-src-exit): Fix editing source section with | ||
| 44 | blank lines. | ||
| 45 | |||
| 46 | 2012-12-12 Le Wang <le.wang@agworld.com.au> | ||
| 47 | |||
| 48 | * org-src.el (org-edit-src-code): Use marker with insertion type | ||
| 49 | t to track end and remove hack requiring delete from beg to (1- end). | ||
| 50 | |||
| 51 | 2012-12-12 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 52 | |||
| 53 | * org-element.el (org-element-context): When point is between two | ||
| 54 | objects, be sure to return the second one. | ||
| 55 | |||
| 56 | * org-list.el (org-list-separating-blank-lines-number): When | ||
| 57 | computing number of blank lines separating items, also count those | ||
| 58 | in unparsed blocks, like example blocks. | ||
| 59 | |||
| 60 | * org.el (org-end-of-line): When visual line mode is on, really | ||
| 61 | move by visual lines. Small refactoring. | ||
| 62 | |||
| 63 | * org.el (org-end-of-line): On a hidden block make sure to | ||
| 64 | delegate motion to `end-of-line' instead of `move-end-of-line' in | ||
| 65 | order to stay on the current line. | ||
| 66 | |||
| 67 | 2012-12-12 Rafael Laboissiere <rafael@laboissiere.net> (tiny change) | ||
| 68 | |||
| 69 | * org-bibtex.el: In the documentation section of the file, fix the | ||
| 70 | broken URL to Andrew Roberts' document on BibTeX entries. | ||
| 71 | |||
| 72 | * org-remember.el (org-remember-handler): Correctly strip the | ||
| 73 | comment lines in the temporary buffer *Remember* when handling a | ||
| 74 | remember note. | ||
| 75 | |||
| 76 | * org-remember.el (org-remember-apply-template): Start the | ||
| 77 | commented lines in the Remember temporary buffer with the | ||
| 78 | appropriate characters. | ||
| 79 | |||
| 80 | 2012-12-12 Toby S. Cubitt <tsc25@cantab.net> | ||
| 81 | |||
| 82 | * org.el (org-beginning-of-line): Check `visual-line-mode' instead | ||
| 83 | of `line-visual-mode' to determine whether to move by visual | ||
| 84 | lines. | ||
| 85 | |||
| 86 | * org.el (org-kill-line): Use the `org-bound-and-true-p' macro. | ||
| 87 | |||
| 1 | 2012-10-26 Achim Gratz <stromeko@stromeko.de> | 88 | 2012-10-26 Achim Gratz <stromeko@stromeko.de> |
| 2 | 89 | ||
| 3 | * ob-ditaa.el: Needs to (require 'org-compat) for | 90 | * ob-ditaa.el: Needs to (require 'org-compat) for |
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 36f3fcb9974..a2e919f5944 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el | |||
| @@ -3517,6 +3517,9 @@ generating a new one." | |||
| 3517 | (while (org-activate-bracket-links (point-max)) | 3517 | (while (org-activate-bracket-links (point-max)) |
| 3518 | (add-text-properties (match-beginning 0) (match-end 0) | 3518 | (add-text-properties (match-beginning 0) (match-end 0) |
| 3519 | '(face org-link))) | 3519 | '(face org-link))) |
| 3520 | (while (org-activate-plain-links (point-max)) | ||
| 3521 | (add-text-properties (match-beginning 0) (match-end 0) | ||
| 3522 | '(face org-link))) | ||
| 3520 | (org-agenda-align-tags) | 3523 | (org-agenda-align-tags) |
| 3521 | (unless org-agenda-with-colors | 3524 | (unless org-agenda-with-colors |
| 3522 | (remove-text-properties (point-min) (point-max) '(face nil)))) | 3525 | (remove-text-properties (point-min) (point-max) '(face nil)))) |
| @@ -3531,7 +3534,11 @@ generating a new one." | |||
| 3531 | (org-agenda-fontify-priorities)) | 3534 | (org-agenda-fontify-priorities)) |
| 3532 | (when (and org-agenda-dim-blocked-tasks org-blocker-hook) | 3535 | (when (and org-agenda-dim-blocked-tasks org-blocker-hook) |
| 3533 | (org-agenda-dim-blocked-tasks)) | 3536 | (org-agenda-dim-blocked-tasks)) |
| 3534 | (org-agenda-mark-clocking-task) | 3537 | ;; We need to widen when `org-agenda-finalize' is called from |
| 3538 | ;; `org-agenda-change-all-lines' (e.g. in `org-agenda-clock-in') | ||
| 3539 | (save-restriction | ||
| 3540 | (widen) | ||
| 3541 | (org-agenda-mark-clocking-task)) | ||
| 3535 | (when org-agenda-entry-text-mode | 3542 | (when org-agenda-entry-text-mode |
| 3536 | (org-agenda-entry-text-hide) | 3543 | (org-agenda-entry-text-hide) |
| 3537 | (org-agenda-entry-text-show)) | 3544 | (org-agenda-entry-text-show)) |
| @@ -8602,7 +8609,7 @@ ARG is passed through to `org-schedule'." | |||
| 8602 | (goto-char pos) | 8609 | (goto-char pos) |
| 8603 | (setq ts (org-schedule arg time))) | 8610 | (setq ts (org-schedule arg time))) |
| 8604 | (org-agenda-show-new-time marker ts "S")) | 8611 | (org-agenda-show-new-time marker ts "S")) |
| 8605 | (message "Item scheduled for %s" ts))) | 8612 | (message "%s" ts))) |
| 8606 | 8613 | ||
| 8607 | (defun org-agenda-deadline (arg &optional time) | 8614 | (defun org-agenda-deadline (arg &optional time) |
| 8608 | "Schedule the item at point. | 8615 | "Schedule the item at point. |
| @@ -8622,7 +8629,7 @@ ARG is passed through to `org-deadline'." | |||
| 8622 | (goto-char pos) | 8629 | (goto-char pos) |
| 8623 | (setq ts (org-deadline arg time))) | 8630 | (setq ts (org-deadline arg time))) |
| 8624 | (org-agenda-show-new-time marker ts "D")) | 8631 | (org-agenda-show-new-time marker ts "D")) |
| 8625 | (message "Deadline for this item set to %s" ts))) | 8632 | (message "%s" ts))) |
| 8626 | 8633 | ||
| 8627 | (defun org-agenda-clock-in (&optional arg) | 8634 | (defun org-agenda-clock-in (&optional arg) |
| 8628 | "Start the clock on the currently selected item." | 8635 | "Start the clock on the currently selected item." |
diff --git a/lisp/org/org-bibtex.el b/lisp/org/org-bibtex.el index f8e07adcd8a..cafd3bb4ad7 100644 --- a/lisp/org/org-bibtex.el +++ b/lisp/org/org-bibtex.el | |||
| @@ -88,7 +88,7 @@ | |||
| 88 | ;; | 88 | ;; |
| 89 | ;; - All Bibtex information is taken from the document compiled by | 89 | ;; - All Bibtex information is taken from the document compiled by |
| 90 | ;; Andrew Roberts from the Bibtex manual, available at | 90 | ;; Andrew Roberts from the Bibtex manual, available at |
| 91 | ;; http://www.andy-roberts.net/misc/latex/sessions/bibtex/bibentries.pdf | 91 | ;; http://www.andy-roberts.net/res/writing/latex/bibentries.pdf |
| 92 | ;; | 92 | ;; |
| 93 | ;;; History: | 93 | ;;; History: |
| 94 | ;; | 94 | ;; |
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 3f252fd8c32..e8ced67e694 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el | |||
| @@ -1447,7 +1447,7 @@ to, overriding the existing value of `org-clock-out-switch-to-state'." | |||
| 1447 | (delq 'org-mode-line-string global-mode-string)) | 1447 | (delq 'org-mode-line-string global-mode-string)) |
| 1448 | (setq frame-title-format org-frame-title-format-backup) | 1448 | (setq frame-title-format org-frame-title-format-backup) |
| 1449 | (force-mode-line-update) | 1449 | (force-mode-line-update) |
| 1450 | (if fail-quietly (throw 'exit t) (error "No active clock"))) | 1450 | (if fail-quietly (throw 'exit t) (user-error "No active clock"))) |
| 1451 | (let ((org-clock-out-switch-to-state | 1451 | (let ((org-clock-out-switch-to-state |
| 1452 | (if switch-to-state | 1452 | (if switch-to-state |
| 1453 | (completing-read "Switch to state: " | 1453 | (completing-read "Switch to state: " |
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index 5da2dec3fb3..51b89585010 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el | |||
| @@ -4316,18 +4316,22 @@ and :post-blank properties." | |||
| 4316 | (funcall (intern (format "org-element-%s-parser" | 4316 | (funcall (intern (format "org-element-%s-parser" |
| 4317 | (car closest-cand)))))) | 4317 | (car closest-cand)))))) |
| 4318 | (cbeg (org-element-property :contents-begin object)) | 4318 | (cbeg (org-element-property :contents-begin object)) |
| 4319 | (cend (org-element-property :contents-end object))) | 4319 | (cend (org-element-property :contents-end object)) |
| 4320 | (obj-end (org-element-property :end object))) | ||
| 4320 | (cond | 4321 | (cond |
| 4321 | ;; ORIGIN is after OBJECT, so skip it. | 4322 | ;; ORIGIN is after OBJECT, so skip it. |
| 4322 | ((< (org-element-property :end object) origin) | 4323 | ((<= obj-end origin) |
| 4323 | (goto-char (org-element-property :end object))) | 4324 | (if (/= obj-end end) (goto-char obj-end) |
| 4324 | ;; ORIGIN is within a non-recursive object or at an | 4325 | (throw 'exit |
| 4325 | ;; object boundaries: Return that object. | 4326 | (org-element-put-property |
| 4327 | object :parent parent)))) | ||
| 4328 | ;; ORIGIN is within a non-recursive object or at | ||
| 4329 | ;; an object boundaries: Return that object. | ||
| 4326 | ((or (not cbeg) (> cbeg origin) (< cend origin)) | 4330 | ((or (not cbeg) (> cbeg origin) (< cend origin)) |
| 4327 | (throw 'exit | 4331 | (throw 'exit |
| 4328 | (org-element-put-property object :parent parent))) | 4332 | (org-element-put-property object :parent parent))) |
| 4329 | ;; Otherwise, move within current object and restrict | 4333 | ;; Otherwise, move within current object and |
| 4330 | ;; search to the end of its contents. | 4334 | ;; restrict search to the end of its contents. |
| 4331 | (t (goto-char cbeg) | 4335 | (t (goto-char cbeg) |
| 4332 | (org-element-put-property object :parent parent) | 4336 | (org-element-put-property object :parent parent) |
| 4333 | (setq parent object | 4337 | (setq parent object |
diff --git a/lisp/org/org-latex.el b/lisp/org/org-latex.el index 9ce84f14e92..a53470df8be 100644 --- a/lisp/org/org-latex.el +++ b/lisp/org/org-latex.el | |||
| @@ -2291,14 +2291,13 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." | |||
| 2291 | (concat type ":" raw-path)) | 2291 | (concat type ":" raw-path)) |
| 2292 | ((equal type "file") | 2292 | ((equal type "file") |
| 2293 | (if (and (org-file-image-p | 2293 | (if (and (org-file-image-p |
| 2294 | (expand-file-name | 2294 | (expand-file-name (org-link-unescape raw-path)) |
| 2295 | raw-path) | ||
| 2296 | org-export-latex-inline-image-extensions) | 2295 | org-export-latex-inline-image-extensions) |
| 2297 | (or (get-text-property 0 'org-no-description | 2296 | (or (get-text-property 0 'org-no-description raw-path) |
| 2298 | raw-path) | ||
| 2299 | (equal desc full-raw-path))) | 2297 | (equal desc full-raw-path))) |
| 2300 | (setq imgp t) | 2298 | (setq imgp t) |
| 2301 | (progn (when (string-match "\\(.+\\)::.+" raw-path) | 2299 | (progn (setq raw-path (org-link-unescape raw-path)) |
| 2300 | (when (string-match "\\(.+\\)::.+" raw-path) | ||
| 2302 | (setq raw-path (match-string 1 raw-path))) | 2301 | (setq raw-path (match-string 1 raw-path))) |
| 2303 | (if (file-exists-p raw-path) | 2302 | (if (file-exists-p raw-path) |
| 2304 | (concat type "://" (expand-file-name raw-path)) | 2303 | (concat type "://" (expand-file-name raw-path)) |
diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el index 10f5e6ec6a9..993272aeb98 100644 --- a/lisp/org/org-list.el +++ b/lisp/org/org-list.el | |||
| @@ -1230,7 +1230,9 @@ some heuristics to guess the result." | |||
| 1230 | ;; Are there blank lines inside the list so far? | 1230 | ;; Are there blank lines inside the list so far? |
| 1231 | ((save-excursion | 1231 | ((save-excursion |
| 1232 | (goto-char (org-list-get-top-point struct)) | 1232 | (goto-char (org-list-get-top-point struct)) |
| 1233 | (org-list-search-forward | 1233 | ;; Do not use `org-list-search-forward' so blank lines |
| 1234 | ;; in blocks can be counted in. | ||
| 1235 | (re-search-forward | ||
| 1234 | "^[ \t]*$" (org-list-get-item-end-before-blank item struct) t)) | 1236 | "^[ \t]*$" (org-list-get-item-end-before-blank item struct) t)) |
| 1235 | 1) | 1237 | 1) |
| 1236 | ;; Default choice: no blank line. | 1238 | ;; Default choice: no blank line. |
diff --git a/lisp/org/org-remember.el b/lisp/org/org-remember.el index d555ca65d21..5cfe70f7af6 100644 --- a/lisp/org/org-remember.el +++ b/lisp/org/org-remember.el | |||
| @@ -472,12 +472,12 @@ to be run from that hook to function properly." | |||
| 472 | (erase-buffer) | 472 | (erase-buffer) |
| 473 | (insert (substitute-command-keys | 473 | (insert (substitute-command-keys |
| 474 | (format | 474 | (format |
| 475 | "## %s \"%s\" -> \"* %s\" | 475 | "# %s \"%s\" -> \"* %s\" |
| 476 | ## C-u C-c C-c like C-c C-c, and immediately visit note at target location | 476 | # C-u C-c C-c like C-c C-c, and immediately visit note at target location |
| 477 | ## C-0 C-c C-c \"%s\" -> \"* %s\" | 477 | # C-0 C-c C-c \"%s\" -> \"* %s\" |
| 478 | ## %s to select file and header location interactively. | 478 | # %s to select file and header location interactively. |
| 479 | ## C-2 C-c C-c as child (C-3: as sibling) of the currently clocked item | 479 | # C-2 C-c C-c as child (C-3: as sibling) of the currently clocked item |
| 480 | ## To switch templates, use `\\[org-remember]'. To abort use `C-c C-k'.\n\n" | 480 | # To switch templates, use `\\[org-remember]'. To abort use `C-c C-k'.\n\n" |
| 481 | (if org-remember-store-without-prompt " C-c C-c" " C-1 C-c C-c") | 481 | (if org-remember-store-without-prompt " C-c C-c" " C-1 C-c C-c") |
| 482 | (abbreviate-file-name (or file org-default-notes-file)) | 482 | (abbreviate-file-name (or file org-default-notes-file)) |
| 483 | (or headline "") | 483 | (or headline "") |
| @@ -840,12 +840,12 @@ See also the variable `org-reverse-note-order'." | |||
| 840 | (if (= end beg) (setq beg (1- beg))) | 840 | (if (= end beg) (setq beg (1- beg))) |
| 841 | (put-text-property beg end 'org-position-cursor t))) | 841 | (put-text-property beg end 'org-position-cursor t))) |
| 842 | (goto-char (point-min)) | 842 | (goto-char (point-min)) |
| 843 | (while (looking-at "^[ \t]*\n\\|^##.*\n") | 843 | (while (looking-at "^[ \t]*\n\\|^# .*\n") |
| 844 | (replace-match "")) | 844 | (replace-match "")) |
| 845 | (when org-remember-delete-empty-lines-at-end | 845 | (when org-remember-delete-empty-lines-at-end |
| 846 | (goto-char (point-max)) | 846 | (goto-char (point-max)) |
| 847 | (beginning-of-line 1) | 847 | (beginning-of-line 1) |
| 848 | (while (and (looking-at "[ \t]*$\\|##.*") (> (point) 1)) | 848 | (while (and (looking-at "[ \t]*$\\|[ \t]*# .*") (> (point) 1)) |
| 849 | (delete-region (1- (point)) (point-max)) | 849 | (delete-region (1- (point)) (point-max)) |
| 850 | (beginning-of-line 1))) | 850 | (beginning-of-line 1))) |
| 851 | (catch 'quit | 851 | (catch 'quit |
diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index b4d4c0489a9..f91da19ec32 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el | |||
| @@ -215,11 +215,22 @@ buffer." | |||
| 215 | (setq org-edit-src-saved-temp-window-config (current-window-configuration))) | 215 | (setq org-edit-src-saved-temp-window-config (current-window-configuration))) |
| 216 | (let* ((mark (and (org-region-active-p) (mark))) | 216 | (let* ((mark (and (org-region-active-p) (mark))) |
| 217 | (case-fold-search t) | 217 | (case-fold-search t) |
| 218 | (info (org-edit-src-find-region-and-lang)) | 218 | (info |
| 219 | ;; If the src region consists in no lines, we insert a blank | ||
| 220 | ;; line. | ||
| 221 | (let* ((temp (org-edit-src-find-region-and-lang)) | ||
| 222 | (beg (nth 0 temp)) | ||
| 223 | (end (nth 1 temp))) | ||
| 224 | (if (>= end beg) temp | ||
| 225 | (goto-char beg) | ||
| 226 | (insert "\n") | ||
| 227 | (org-edit-src-find-region-and-lang)))) | ||
| 219 | (full-info (org-babel-get-src-block-info 'light)) | 228 | (full-info (org-babel-get-src-block-info 'light)) |
| 220 | (org-mode-p (derived-mode-p 'org-mode)) ;; derived-mode-p is reflexive | 229 | (org-mode-p (derived-mode-p 'org-mode)) ;; derived-mode-p is reflexive |
| 221 | (beg (make-marker)) | 230 | (beg (make-marker)) |
| 222 | (end (make-marker)) | 231 | ;; Move marker with inserted text for case when src block is |
| 232 | ;; just one empty line, i.e. beg == end. | ||
| 233 | (end (copy-marker nil t)) | ||
| 223 | (allow-write-back-p (null code)) | 234 | (allow-write-back-p (null code)) |
| 224 | block-nindent total-nindent ovl lang lang-f single lfmt buffer msg | 235 | block-nindent total-nindent ovl lang lang-f single lfmt buffer msg |
| 225 | begline markline markcol line col transmitted-variables) | 236 | begline markline markcol line col transmitted-variables) |
| @@ -689,10 +700,9 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"." | |||
| 689 | (kill-buffer buffer)) | 700 | (kill-buffer buffer)) |
| 690 | (goto-char beg) | 701 | (goto-char beg) |
| 691 | (when allow-write-back-p | 702 | (when allow-write-back-p |
| 692 | (delete-region beg (max beg (1- end))) | 703 | (delete-region beg (max beg end)) |
| 693 | (unless (string-match "^[ \t]*$" code) | 704 | (unless (string-match "\\`[ \t]*\\'" code) |
| 694 | (insert code) | 705 | (insert code)) |
| 695 | (delete-char 1)) | ||
| 696 | (goto-char beg) | 706 | (goto-char beg) |
| 697 | (if single (just-one-space))) | 707 | (if single (just-one-space))) |
| 698 | (if (memq t (mapcar (lambda (overlay) | 708 | (if (memq t (mapcar (lambda (overlay) |
| @@ -820,6 +830,7 @@ issued in the language major mode buffer." | |||
| 820 | Alter code block according to effect of TAB in the language major | 830 | Alter code block according to effect of TAB in the language major |
| 821 | mode." | 831 | mode." |
| 822 | (and org-src-tab-acts-natively | 832 | (and org-src-tab-acts-natively |
| 833 | (not (equal this-command 'org-shifttab)) | ||
| 823 | (let ((org-src-strip-leading-and-trailing-blank-lines nil)) | 834 | (let ((org-src-strip-leading-and-trailing-blank-lines nil)) |
| 824 | (org-babel-do-key-sequence-in-edit-buffer (kbd "TAB"))))) | 835 | (org-babel-do-key-sequence-in-edit-buffer (kbd "TAB"))))) |
| 825 | 836 | ||
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 0555041231b..f7cae3c8bf2 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el | |||
| @@ -1594,6 +1594,7 @@ should be done in reverse order." | |||
| 1594 | (interactive "P") | 1594 | (interactive "P") |
| 1595 | (let* ((thisline (org-current-line)) | 1595 | (let* ((thisline (org-current-line)) |
| 1596 | (thiscol (org-table-current-column)) | 1596 | (thiscol (org-table-current-column)) |
| 1597 | (otc org-table-overlay-coordinates) | ||
| 1597 | beg end bcol ecol tend tbeg column lns pos) | 1598 | beg end bcol ecol tend tbeg column lns pos) |
| 1598 | (when (equal thiscol 0) | 1599 | (when (equal thiscol 0) |
| 1599 | (if (org-called-interactively-p 'any) | 1600 | (if (org-called-interactively-p 'any) |
| @@ -1642,12 +1643,15 @@ should be done in reverse order." | |||
| 1642 | x)) | 1643 | x)) |
| 1643 | (org-split-string (buffer-substring beg end) "\n"))) | 1644 | (org-split-string (buffer-substring beg end) "\n"))) |
| 1644 | (setq lns (org-do-sort lns "Table" with-case sorting-type)) | 1645 | (setq lns (org-do-sort lns "Table" with-case sorting-type)) |
| 1646 | (when org-table-overlay-coordinates | ||
| 1647 | (org-table-toggle-coordinate-overlays)) | ||
| 1645 | (delete-region beg end) | 1648 | (delete-region beg end) |
| 1646 | (move-marker beg nil) | 1649 | (move-marker beg nil) |
| 1647 | (move-marker end nil) | 1650 | (move-marker end nil) |
| 1648 | (insert (mapconcat 'cdr lns "\n") "\n") | 1651 | (insert (mapconcat 'cdr lns "\n") "\n") |
| 1649 | (org-goto-line thisline) | 1652 | (org-goto-line thisline) |
| 1650 | (org-table-goto-column thiscol) | 1653 | (org-table-goto-column thiscol) |
| 1654 | (when otc (org-table-toggle-coordinate-overlays)) | ||
| 1651 | (message "%d lines sorted, based on column %d" (length lns) column))) | 1655 | (message "%d lines sorted, based on column %d" (length lns) column))) |
| 1652 | 1656 | ||
| 1653 | ;;;###autoload | 1657 | ;;;###autoload |
diff --git a/lisp/org/org-timer.el b/lisp/org/org-timer.el index a314564b94a..8a5b599eca2 100644 --- a/lisp/org/org-timer.el +++ b/lisp/org/org-timer.el | |||
| @@ -162,7 +162,8 @@ With prefix arg STOP, stop it entirely." | |||
| 162 | (run-hooks 'org-timer-stop-hook) | 162 | (run-hooks 'org-timer-stop-hook) |
| 163 | (setq org-timer-start-time nil | 163 | (setq org-timer-start-time nil |
| 164 | org-timer-pause-time nil) | 164 | org-timer-pause-time nil) |
| 165 | (org-timer-set-mode-line 'off)) | 165 | (org-timer-set-mode-line 'off) |
| 166 | (message "Timer stopped")) | ||
| 166 | 167 | ||
| 167 | ;;;###autoload | 168 | ;;;###autoload |
| 168 | (defun org-timer (&optional restart no-insert-p) | 169 | (defun org-timer (&optional restart no-insert-p) |
diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el index 564b49a5cea..de434885b12 100644 --- a/lisp/org/org-version.el +++ b/lisp/org/org-version.el | |||
| @@ -11,7 +11,7 @@ | |||
| 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 "7.9.2+-GNU-Emacs-24-3 (commit 488eea)")) |
| 15 | org-git-version)) | 15 | org-git-version)) |
| 16 | ;;;###autoload | 16 | ;;;###autoload |
| 17 | (defvar org-odt-data-dir "/usr/share/emacs/etc/org" | 17 | (defvar org-odt-data-dir "/usr/share/emacs/etc/org" |
diff --git a/lisp/org/org.el b/lisp/org/org.el index 45dbe2754e8..60e2a8be550 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -2498,9 +2498,10 @@ a subtree." | |||
| 2498 | "Return the value of `org-log-into-drawer', but let properties overrule. | 2498 | "Return the value of `org-log-into-drawer', but let properties overrule. |
| 2499 | If the current entry has or inherits a LOG_INTO_DRAWER property, it will be | 2499 | If the current entry has or inherits a LOG_INTO_DRAWER property, it will be |
| 2500 | used instead of the default value." | 2500 | used instead of the default value." |
| 2501 | (let ((p (org-entry-get nil "LOG_INTO_DRAWER" 'inherit))) | 2501 | (let ((p (org-entry-get nil "LOG_INTO_DRAWER" 'inherit t))) |
| 2502 | (cond | 2502 | (cond |
| 2503 | ((or (not p) (equal p "nil")) org-log-into-drawer) | 2503 | ((not p) org-log-into-drawer) |
| 2504 | ((equal p "nil") nil) | ||
| 2504 | ((equal p "t") "LOGBOOK") | 2505 | ((equal p "t") "LOGBOOK") |
| 2505 | (t p)))) | 2506 | (t p)))) |
| 2506 | 2507 | ||
| @@ -8016,11 +8017,12 @@ a time stamp, by a property or by priority. | |||
| 8016 | 8017 | ||
| 8017 | The command prompts for the sorting type unless it has been given to the | 8018 | The command prompts for the sorting type unless it has been given to the |
| 8018 | function through the SORTING-TYPE argument, which needs to be a character, | 8019 | function through the SORTING-TYPE argument, which needs to be a character, |
| 8019 | \(?n ?N ?a ?A ?t ?T ?s ?S ?d ?D ?p ?P ?r ?R ?f ?F). Here is the | 8020 | \(?n ?N ?a ?A ?t ?T ?s ?S ?d ?D ?p ?P ?o ?O ?r ?R ?f ?F). Here is the |
| 8020 | precise meaning of each character: | 8021 | precise meaning of each character: |
| 8021 | 8022 | ||
| 8022 | n Numerically, by converting the beginning of the entry/item to a number. | 8023 | n Numerically, by converting the beginning of the entry/item to a number. |
| 8023 | a Alphabetically, ignoring the TODO keyword and the priority, if any. | 8024 | a Alphabetically, ignoring the TODO keyword and the priority, if any. |
| 8025 | o By order of TODO keywords. | ||
| 8024 | t By date/time, either the first active time stamp in the entry, or, if | 8026 | t By date/time, either the first active time stamp in the entry, or, if |
| 8025 | none exist, by the first inactive one. | 8027 | none exist, by the first inactive one. |
| 8026 | s By the scheduled date/time. | 8028 | s By the scheduled date/time. |
| @@ -8040,6 +8042,13 @@ Comparing entries ignores case by default. However, with an optional argument | |||
| 8040 | WITH-CASE, the sorting considers case as well." | 8042 | WITH-CASE, the sorting considers case as well." |
| 8041 | (interactive "P") | 8043 | (interactive "P") |
| 8042 | (let ((case-func (if with-case 'identity 'downcase)) | 8044 | (let ((case-func (if with-case 'identity 'downcase)) |
| 8045 | (cmstr | ||
| 8046 | ;; The clock marker is lost when using `sort-subr', let's | ||
| 8047 | ;; store the clocking string. | ||
| 8048 | (when (equal (marker-buffer org-clock-marker) (current-buffer)) | ||
| 8049 | (save-excursion | ||
| 8050 | (goto-char org-clock-marker) | ||
| 8051 | (looking-back "^.*") (match-string-no-properties 0)))) | ||
| 8043 | start beg end stars re re2 | 8052 | start beg end stars re re2 |
| 8044 | txt what tmp) | 8053 | txt what tmp) |
| 8045 | ;; Find beginning and end of region to sort | 8054 | ;; Find beginning and end of region to sort |
| @@ -8096,7 +8105,7 @@ WITH-CASE, the sorting considers case as well." | |||
| 8096 | (message | 8105 | (message |
| 8097 | "Sort %s: [a]lpha [n]umeric [p]riority p[r]operty todo[o]rder [f]unc | 8106 | "Sort %s: [a]lpha [n]umeric [p]riority p[r]operty todo[o]rder [f]unc |
| 8098 | [t]ime [s]cheduled [d]eadline [c]reated | 8107 | [t]ime [s]cheduled [d]eadline [c]reated |
| 8099 | A/N/T/S/D/C/P/O/F means reversed:" | 8108 | A/N/P/R/O/F/T/S/D/C means reversed:" |
| 8100 | what) | 8109 | what) |
| 8101 | (setq sorting-type (read-char-exclusive)) | 8110 | (setq sorting-type (read-char-exclusive)) |
| 8102 | 8111 | ||
| @@ -8193,6 +8202,12 @@ WITH-CASE, the sorting considers case as well." | |||
| 8193 | ((= dcst ?f) compare-func) | 8202 | ((= dcst ?f) compare-func) |
| 8194 | ((member dcst '(?p ?t ?s ?d ?c)) '<))))) | 8203 | ((member dcst '(?p ?t ?s ?d ?c)) '<))))) |
| 8195 | (run-hooks 'org-after-sorting-entries-or-items-hook) | 8204 | (run-hooks 'org-after-sorting-entries-or-items-hook) |
| 8205 | ;; Reset the clock marker if needed | ||
| 8206 | (when cmstr | ||
| 8207 | (save-excursion | ||
| 8208 | (goto-char start) | ||
| 8209 | (search-forward cmstr nil t) | ||
| 8210 | (move-marker org-clock-marker (point)))) | ||
| 8196 | (message "Sorting entries...done"))) | 8211 | (message "Sorting entries...done"))) |
| 8197 | 8212 | ||
| 8198 | (defun org-do-sort (table what &optional with-case sorting-type) | 8213 | (defun org-do-sort (table what &optional with-case sorting-type) |
| @@ -8204,7 +8219,7 @@ the car of the elements of the table. | |||
| 8204 | If WITH-CASE is non-nil, the sorting will be case-sensitive." | 8219 | If WITH-CASE is non-nil, the sorting will be case-sensitive." |
| 8205 | (unless sorting-type | 8220 | (unless sorting-type |
| 8206 | (message | 8221 | (message |
| 8207 | "Sort %s: [a]lphabetic. [n]umeric. [t]ime. A/N/T means reversed:" | 8222 | "Sort %s: [a]lphabetic, [n]umeric, [t]ime. A/N/T means reversed:" |
| 8208 | what) | 8223 | what) |
| 8209 | (setq sorting-type (read-char-exclusive))) | 8224 | (setq sorting-type (read-char-exclusive))) |
| 8210 | (let ((dcst (downcase sorting-type)) | 8225 | (let ((dcst (downcase sorting-type)) |
| @@ -9644,7 +9659,7 @@ application the system uses for this file type." | |||
| 9644 | (not (org-in-regexp org-bracket-link-regexp))) | 9659 | (not (org-in-regexp org-bracket-link-regexp))) |
| 9645 | (org-follow-timestamp-link)) | 9660 | (org-follow-timestamp-link)) |
| 9646 | ((and (or (org-footnote-at-reference-p) (org-footnote-at-definition-p)) | 9661 | ((and (or (org-footnote-at-reference-p) (org-footnote-at-definition-p)) |
| 9647 | (not (org-in-regexp org-bracket-link-regexp))) | 9662 | (not (org-in-regexp org-any-link-re))) |
| 9648 | (org-footnote-action)) | 9663 | (org-footnote-action)) |
| 9649 | (t | 9664 | (t |
| 9650 | (let (type path link line search (pos (point))) | 9665 | (let (type path link line search (pos (point))) |
| @@ -11219,7 +11234,7 @@ This function can be used in a hook." | |||
| 11219 | "COLUMNS:" "PROPERTY:" | 11234 | "COLUMNS:" "PROPERTY:" |
| 11220 | "CAPTION:" "LABEL:" | 11235 | "CAPTION:" "LABEL:" |
| 11221 | "SETUPFILE:" | 11236 | "SETUPFILE:" |
| 11222 | "INCLUDE:" | 11237 | "INCLUDE:" "INDEX:" |
| 11223 | "BIND:" | 11238 | "BIND:" |
| 11224 | "MACRO:")) | 11239 | "MACRO:")) |
| 11225 | 11240 | ||
| @@ -21270,7 +21285,7 @@ beyond the end of the headline." | |||
| 21270 | (car org-special-ctrl-a/e) | 21285 | (car org-special-ctrl-a/e) |
| 21271 | org-special-ctrl-a/e)) | 21286 | org-special-ctrl-a/e)) |
| 21272 | refpos) | 21287 | refpos) |
| 21273 | (if (org-bound-and-true-p line-move-visual) | 21288 | (if (org-bound-and-true-p visual-line-mode) |
| 21274 | (beginning-of-visual-line 1) | 21289 | (beginning-of-visual-line 1) |
| 21275 | (beginning-of-line 1)) | 21290 | (beginning-of-line 1)) |
| 21276 | (if (and arg (fboundp 'move-beginning-of-line)) | 21291 | (if (and arg (fboundp 'move-beginning-of-line)) |
| @@ -21331,36 +21346,33 @@ the cursor is already beyond the end of the headline." | |||
| 21331 | (interactive "P") | 21346 | (interactive "P") |
| 21332 | (let ((special (if (consp org-special-ctrl-a/e) (cdr org-special-ctrl-a/e) | 21347 | (let ((special (if (consp org-special-ctrl-a/e) (cdr org-special-ctrl-a/e) |
| 21333 | org-special-ctrl-a/e)) | 21348 | org-special-ctrl-a/e)) |
| 21334 | (type (org-element-type | 21349 | (move-fun (cond ((org-bound-and-true-p visual-line-mode) |
| 21335 | (save-excursion (beginning-of-line) (org-element-at-point))))) | 21350 | 'end-of-visual-line) |
| 21336 | (cond | 21351 | ((fboundp 'move-end-of-line) 'move-end-of-line) |
| 21337 | ((or (not special) arg) | 21352 | (t 'end-of-line)))) |
| 21338 | (call-interactively | 21353 | (if (or (not special) arg) (call-interactively move-fun) |
| 21339 | (if (fboundp 'move-end-of-line) 'move-end-of-line 'end-of-line))) | 21354 | (let* ((element (save-excursion (beginning-of-line) |
| 21340 | ((memq type '(headline inlinetask)) | 21355 | (org-element-at-point))) |
| 21341 | (let ((pos (point))) | 21356 | (type (org-element-type element))) |
| 21342 | (beginning-of-line 1) | 21357 | (cond |
| 21343 | (if (looking-at (org-re ".*?\\(?:\\([ \t]*\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*\\)?$")) | 21358 | ((memq type '(headline inlinetask)) |
| 21344 | (if (eq special t) | 21359 | (let ((pos (point))) |
| 21345 | (if (or (< pos (match-beginning 1)) (= pos (match-end 0))) | 21360 | (beginning-of-line 1) |
| 21346 | (goto-char (match-beginning 1)) | 21361 | (if (looking-at (org-re ".*?\\(?:\\([ \t]*\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*\\)?$")) |
| 21347 | (goto-char (match-end 0))) | 21362 | (if (eq special t) |
| 21348 | (if (or (< pos (match-end 0)) | 21363 | (if (or (< pos (match-beginning 1)) (= pos (match-end 0))) |
| 21349 | (not (eq this-command last-command))) | 21364 | (goto-char (match-beginning 1)) |
| 21350 | (goto-char (match-end 0)) | 21365 | (goto-char (match-end 0))) |
| 21351 | (goto-char (match-beginning 1)))) | 21366 | (if (or (< pos (match-end 0)) |
| 21352 | (call-interactively | 21367 | (not (eq this-command last-command))) |
| 21353 | (if (fboundp 'move-end-of-line) 'move-end-of-line 'end-of-line))))) | 21368 | (goto-char (match-end 0)) |
| 21354 | ((memq type | 21369 | (goto-char (match-beginning 1)))) |
| 21355 | '(center-block comment-block drawer dynamic-block example-block | 21370 | (call-interactively move-fun)))) |
| 21356 | export-block item plain-list property-drawer | 21371 | ((org-element-property :hiddenp element) |
| 21357 | quote-block special-block src-block verse-block)) | 21372 | ;; If element is hidden, `move-end-of-line' would put point |
| 21358 | ;; Never move past the ellipsis. | 21373 | ;; after it. Use `end-of-line' to stay on current line. |
| 21359 | (or (eolp) (move-end-of-line 1)) | 21374 | (call-interactively 'end-of-line)) |
| 21360 | (when (org-invisible-p2) (backward-char))) | 21375 | (t (call-interactively move-fun))))) |
| 21361 | (t | ||
| 21362 | (call-interactively | ||
| 21363 | (if (fboundp 'move-end-of-line) 'move-end-of-line 'end-of-line)))) | ||
| 21364 | (org-no-warnings (and (featurep 'xemacs) (setq zmacs-region-stays t))))) | 21376 | (org-no-warnings (and (featurep 'xemacs) (setq zmacs-region-stays t))))) |
| 21365 | 21377 | ||
| 21366 | (define-key org-mode-map "\C-a" 'org-beginning-of-line) | 21378 | (define-key org-mode-map "\C-a" 'org-beginning-of-line) |
| @@ -21400,7 +21412,7 @@ depending on context." | |||
| 21400 | (not (y-or-n-p "Kill hidden subtree along with headline? "))) | 21412 | (not (y-or-n-p "Kill hidden subtree along with headline? "))) |
| 21401 | (error "C-k aborted - would kill hidden subtree"))) | 21413 | (error "C-k aborted - would kill hidden subtree"))) |
| 21402 | (call-interactively | 21414 | (call-interactively |
| 21403 | (if (and (boundp 'visual-line-mode) visual-line-mode) 'kill-visual-line 'kill-line))) | 21415 | (if (org-bound-and-true-p visual-line-mode) 'kill-visual-line 'kill-line))) |
| 21404 | ((looking-at (org-re ".*?\\S-\\([ \t]+\\(:[[:alnum:]_@#%:]+:\\)\\)[ \t]*$")) | 21416 | ((looking-at (org-re ".*?\\S-\\([ \t]+\\(:[[:alnum:]_@#%:]+:\\)\\)[ \t]*$")) |
| 21405 | (kill-region (point) (match-beginning 1)) | 21417 | (kill-region (point) (match-beginning 1)) |
| 21406 | (org-set-tags nil t)) | 21418 | (org-set-tags nil t)) |