diff options
| author | Glenn Morris | 2013-01-09 00:30:21 -0800 |
|---|---|---|
| committer | Glenn Morris | 2013-01-09 00:30:21 -0800 |
| commit | fb9f7146677ca0d6f03ca88dd8cd39bc3733682d (patch) | |
| tree | b143c50ce4497c0a4b518ce859fc7b93eadf3f88 | |
| parent | 454fa9b7ea69d459d65643e7bae84b3a95dce44e (diff) | |
| parent | ebb965fcf860516c7ec8de351cda8d18811283c1 (diff) | |
| download | emacs-fb9f7146677ca0d6f03ca88dd8cd39bc3733682d.tar.gz emacs-fb9f7146677ca0d6f03ca88dd8cd39bc3733682d.zip | |
Merge from emacs-24; up to 2012-12-08T12:11:29Z!eliz@gnu.org
42 files changed, 1332 insertions, 656 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 91a328198a2..fba163a84ac 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2013-01-09 Bastien Guerry <bzg@gnu.org> | ||
| 2 | |||
| 3 | * org.texi (Pushing to MobileOrg): Add footnote about using | ||
| 4 | symbolic links in `org-directory'. | ||
| 5 | (Timestamps, Deadlines and scheduling): Use `diary-float' instead | ||
| 6 | of the now obsolete alias `org-float'. | ||
| 7 | (TODO basics): Add `org-use-fast-todo-selection' to the variable | ||
| 8 | index. Fix description of TODO keywords cycling. | ||
| 9 | (Advanced features): Add missing argument for @item. | ||
| 10 | (Storing searches): Add index entries and a note about | ||
| 11 | *-tree agenda views. | ||
| 12 | (Structure editing): Document `org-mark-element' and | ||
| 13 | `org-mark-subtree'. | ||
| 14 | (Tag inheritance): Document `org-agenda-use-tag-inheritance'. | ||
| 15 | |||
| 1 | 2013-01-08 Juri Linkov <juri@jurta.org> | 16 | 2013-01-08 Juri Linkov <juri@jurta.org> |
| 2 | 17 | ||
| 3 | * info.texi (Go to node): Mention the abbreviated format | 18 | * info.texi (Go to node): Mention the abbreviated format |
diff --git a/doc/misc/org.texi b/doc/misc/org.texi index 47ee0954671..75298db29fe 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | @c %**start of header | 2 | @c %**start of header |
| 3 | @setfilename ../../info/org | 3 | @setfilename ../../info/org |
| 4 | @settitle The Org Manual | 4 | @settitle The Org Manual |
| 5 | @set VERSION 7.9.2 (GNU Emacs 24.3) | 5 | @set VERSION 7.9.3+ (GNU Emacs 24.3) |
| 6 | 6 | ||
| 7 | @c Use proper quote and backtick for code sections in PDF output | 7 | @c Use proper quote and backtick for code sections in PDF output |
| 8 | @c Cf. Texinfo manual 14.2 | 8 | @c Cf. Texinfo manual 14.2 |
| @@ -1470,6 +1470,13 @@ Move subtree up (swap with previous subtree of same | |||
| 1470 | level). | 1470 | level). |
| 1471 | @orgcmd{M-S-@key{down},org-move-subtree-down} | 1471 | @orgcmd{M-S-@key{down},org-move-subtree-down} |
| 1472 | Move subtree down (swap with next subtree of same level). | 1472 | Move subtree down (swap with next subtree of same level). |
| 1473 | @orgcmd{M-h,org-mark-element} | ||
| 1474 | Mark the element at point. Hitting repeatedly will mark subsequent elements | ||
| 1475 | of the one just marked. E.g. hitting @key{M-h} on a paragraph will mark it, | ||
| 1476 | hitting @key{M-h} immediately again will mark the next one. | ||
| 1477 | @orgcmd{C-c @@,org-mark-subtree} | ||
| 1478 | Mark the subtree at point. Hitting repeatedly will mark subsequent subtrees | ||
| 1479 | of the same level than the marked subtree. | ||
| 1473 | @orgcmd{C-c C-x C-w,org-cut-subtree} | 1480 | @orgcmd{C-c C-x C-w,org-cut-subtree} |
| 1474 | Kill subtree, i.e., remove it from buffer but save in kill ring. | 1481 | Kill subtree, i.e., remove it from buffer but save in kill ring. |
| 1475 | With a numeric prefix argument N, kill N sequential subtrees. | 1482 | With a numeric prefix argument N, kill N sequential subtrees. |
| @@ -3747,6 +3754,8 @@ The most important commands to work with TODO entries are: | |||
| 3747 | @table @kbd | 3754 | @table @kbd |
| 3748 | @orgcmd{C-c C-t,org-todo} | 3755 | @orgcmd{C-c C-t,org-todo} |
| 3749 | @cindex cycling, of TODO states | 3756 | @cindex cycling, of TODO states |
| 3757 | @vindex org-use-fast-todo-selection | ||
| 3758 | |||
| 3750 | Rotate the TODO state of the current item among | 3759 | Rotate the TODO state of the current item among |
| 3751 | 3760 | ||
| 3752 | @example | 3761 | @example |
| @@ -3754,14 +3763,19 @@ Rotate the TODO state of the current item among | |||
| 3754 | '--------------------------------' | 3763 | '--------------------------------' |
| 3755 | @end example | 3764 | @end example |
| 3756 | 3765 | ||
| 3757 | The same rotation can also be done ``remotely'' from the timeline and | 3766 | If TODO keywords have fast access keys (see @ref{Fast access to TODO |
| 3758 | agenda buffers with the @kbd{t} command key (@pxref{Agenda commands}). | 3767 | states}), you will be prompted for a TODO keyword through the fast selection |
| 3768 | interface; this is the default behavior when | ||
| 3769 | @var{org-use-fast-todo-selection} is @code{non-nil}. | ||
| 3770 | |||
| 3771 | The same rotation can also be done ``remotely'' from the timeline and agenda | ||
| 3772 | buffers with the @kbd{t} command key (@pxref{Agenda commands}). | ||
| 3759 | 3773 | ||
| 3760 | @orgkey{C-u C-c C-t} | 3774 | @orgkey{C-u C-c C-t} |
| 3761 | Select a specific keyword using completion or (if it has been set up) | 3775 | When TODO keywords have no selection keys, select a specific keyword using |
| 3762 | the fast selection interface. For the latter, you need to assign keys | 3776 | completion; otherwise force cycling through TODO states with no prompt. When |
| 3763 | to TODO states, see @ref{Per-file keywords}, and @ref{Setting tags}, for | 3777 | @var{org-use-fast-todo-selection} is set to @code{prefix}, use the fast |
| 3764 | more information. | 3778 | selection interface. |
| 3765 | 3779 | ||
| 3766 | @kindex S-@key{right} | 3780 | @kindex S-@key{right} |
| 3767 | @kindex S-@key{left} | 3781 | @kindex S-@key{left} |
| @@ -4617,9 +4631,8 @@ changes in the line.}: | |||
| 4617 | @noindent | 4631 | @noindent |
| 4618 | @vindex org-use-tag-inheritance | 4632 | @vindex org-use-tag-inheritance |
| 4619 | @vindex org-tags-exclude-from-inheritance | 4633 | @vindex org-tags-exclude-from-inheritance |
| 4620 | To limit tag inheritance to specific tags, or to turn it off entirely, use | 4634 | To limit tag inheritance to specific tags, use @code{org-tags-exclude-from-inheritance}. |
| 4621 | the variables @code{org-use-tag-inheritance} and | 4635 | To turn it off entirely, use @code{org-use-tag-inheritance}. |
| 4622 | @code{org-tags-exclude-from-inheritance}. | ||
| 4623 | 4636 | ||
| 4624 | @vindex org-tags-match-list-sublevels | 4637 | @vindex org-tags-match-list-sublevels |
| 4625 | When a headline matches during a tags search while tag inheritance is turned | 4638 | When a headline matches during a tags search while tag inheritance is turned |
| @@ -4630,6 +4643,15 @@ of matches may then become very long. If you only want to see the first tags | |||
| 4630 | match in a subtree, configure the variable | 4643 | match in a subtree, configure the variable |
| 4631 | @code{org-tags-match-list-sublevels} (not recommended). | 4644 | @code{org-tags-match-list-sublevels} (not recommended). |
| 4632 | 4645 | ||
| 4646 | @vindex org-agenda-use-tag-inheritance | ||
| 4647 | Tag inheritance is relevant when the agenda search tries to match a tag, | ||
| 4648 | either in the @code{tags} or @code{tags-todo} agenda types. In other agenda | ||
| 4649 | types, @code{org-use-tag-inheritance} has no effect. Still, you may want to | ||
| 4650 | have your tags correctly set in the agenda, so that tag filtering works fine, | ||
| 4651 | with inherited tags. Set @code{org-agenda-use-tag-inheritance} to control | ||
| 4652 | this: the default value includes all agenda types, but setting this to nil | ||
| 4653 | can really speed up agenda generation. | ||
| 4654 | |||
| 4633 | @node Setting tags, Tag searches, Tag inheritance, Tags | 4655 | @node Setting tags, Tag searches, Tag inheritance, Tags |
| 4634 | @section Setting tags | 4656 | @section Setting tags |
| 4635 | @cindex setting tags | 4657 | @cindex setting tags |
| @@ -5512,7 +5534,7 @@ example with optional time | |||
| 5512 | 5534 | ||
| 5513 | @example | 5535 | @example |
| 5514 | * 22:00-23:00 The nerd meeting on every 2nd Thursday of the month | 5536 | * 22:00-23:00 The nerd meeting on every 2nd Thursday of the month |
| 5515 | <%%(org-float t 4 2)> | 5537 | <%%(diary-float t 4 2)> |
| 5516 | @end example | 5538 | @end example |
| 5517 | 5539 | ||
| 5518 | @item Time/Date range | 5540 | @item Time/Date range |
| @@ -5850,7 +5872,7 @@ entries. Org mode will issue early and late warnings based on the | |||
| 5850 | assumption that the timestamp represents the @i{nearest instance} of | 5872 | assumption that the timestamp represents the @i{nearest instance} of |
| 5851 | the repeater. However, the use of diary sexp entries like | 5873 | the repeater. However, the use of diary sexp entries like |
| 5852 | @c | 5874 | @c |
| 5853 | @code{<%%(org-float t 42)>} | 5875 | @code{<%%(diary-float t 42)>} |
| 5854 | @c | 5876 | @c |
| 5855 | in scheduling and deadline timestamps is limited. Org mode does not | 5877 | in scheduling and deadline timestamps is limited. Org mode does not |
| 5856 | know enough about the internals of each sexp function to issue early and | 5878 | know enough about the internals of each sexp function to issue early and |
| @@ -6539,7 +6561,7 @@ suggestion.} for capturing new material. | |||
| 6539 | @table @kbd | 6561 | @table @kbd |
| 6540 | @orgcmd{C-c c,org-capture} | 6562 | @orgcmd{C-c c,org-capture} |
| 6541 | Call the command @code{org-capture}. Note that this keybinding is global and | 6563 | Call the command @code{org-capture}. Note that this keybinding is global and |
| 6542 | not active by default; you need to install it. If you have templates | 6564 | not active by default: you need to install it. If you have templates |
| 6543 | @cindex date tree | 6565 | @cindex date tree |
| 6544 | defined @pxref{Capture templates}, it will offer these templates for | 6566 | defined @pxref{Capture templates}, it will offer these templates for |
| 6545 | selection or use a new Org outline node as the default template. It will | 6567 | selection or use a new Org outline node as the default template. It will |
| @@ -8621,6 +8643,13 @@ buffer, or a sparse tree (the latter covering of course only the current | |||
| 8621 | buffer). | 8643 | buffer). |
| 8622 | @kindex C-c a C | 8644 | @kindex C-c a C |
| 8623 | @vindex org-agenda-custom-commands | 8645 | @vindex org-agenda-custom-commands |
| 8646 | @cindex agenda views, main example | ||
| 8647 | @cindex tags, as an agenda view | ||
| 8648 | @cindex todo, as an agenda view | ||
| 8649 | @cindex tags-todo | ||
| 8650 | @cindex todo-tree | ||
| 8651 | @cindex occur-tree | ||
| 8652 | @cindex tags-tree | ||
| 8624 | 8653 | ||
| 8625 | Custom commands are configured in the variable | 8654 | Custom commands are configured in the variable |
| 8626 | @code{org-agenda-custom-commands}. You can customize this variable, for | 8655 | @code{org-agenda-custom-commands}. You can customize this variable, for |
| @@ -8681,6 +8710,9 @@ additional key (@kbd{l}, @kbd{p} or @kbd{k}) to select a name (Lisa, | |||
| 8681 | Peter, or Kim) as additional tag to match. | 8710 | Peter, or Kim) as additional tag to match. |
| 8682 | @end table | 8711 | @end table |
| 8683 | 8712 | ||
| 8713 | Note that the @code{*-tree} agenda views need to be called from an | ||
| 8714 | Org buffer as they operate on the current buffer only. | ||
| 8715 | |||
| 8684 | @node Block agenda, Setting Options, Storing searches, Custom agenda views | 8716 | @node Block agenda, Setting Options, Storing searches, Custom agenda views |
| 8685 | @subsection Block agenda | 8717 | @subsection Block agenda |
| 8686 | @cindex block agenda | 8718 | @cindex block agenda |
| @@ -16537,14 +16569,18 @@ to the directory @code{org-mobile-directory}. By default this list contains | |||
| 16537 | all agenda files (as listed in @code{org-agenda-files}), but additional files | 16569 | all agenda files (as listed in @code{org-agenda-files}), but additional files |
| 16538 | can be included by customizing @code{org-mobile-files}. File names will be | 16570 | can be included by customizing @code{org-mobile-files}. File names will be |
| 16539 | staged with paths relative to @code{org-directory}, so all files should be | 16571 | staged with paths relative to @code{org-directory}, so all files should be |
| 16540 | inside this directory. The push operation also creates a special Org file | 16572 | inside this directory@footnote{Symbolic links in @code{org-directory} need to |
| 16541 | @file{agendas.org} with all custom agenda view defined by the | 16573 | have the same name than their targets.}. |
| 16542 | user@footnote{While creating the agendas, Org mode will force ID properties | 16574 | |
| 16543 | on all referenced entries, so that these entries can be uniquely identified | 16575 | The push operation also creates a special Org file @file{agendas.org} with |
| 16544 | if @i{MobileOrg} flags them for further action. If you do not want to get | 16576 | all custom agenda view defined by the user@footnote{While creating the |
| 16545 | these properties in so many entries, you can set the variable | 16577 | agendas, Org mode will force ID properties on all referenced entries, so that |
| 16546 | @code{org-mobile-force-id-on-agenda-items} to @code{nil}. Org mode will then | 16578 | these entries can be uniquely identified if @i{MobileOrg} flags them for |
| 16547 | rely on outline paths, in the hope that these will be unique enough.}. | 16579 | further action. If you do not want to get these properties in so many |
| 16580 | entries, you can set the variable @code{org-mobile-force-id-on-agenda-items} | ||
| 16581 | to @code{nil}. Org mode will then rely on outline paths, in the hope that | ||
| 16582 | these will be unique enough.}. | ||
| 16583 | |||
| 16548 | Finally, Org writes the file @file{index.org}, containing links to all other | 16584 | Finally, Org writes the file @file{index.org}, containing links to all other |
| 16549 | files. @i{MobileOrg} first reads this file from the server, and then | 16585 | files. @i{MobileOrg} first reads this file from the server, and then |
| 16550 | downloads all agendas and Org files listed in it. To speed up the download, | 16586 | downloads all agendas and Org files listed in it. To speed up the download, |
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index a84165a0f74..4d16d1925eb 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS | |||
| @@ -1,10 +1,54 @@ | |||
| 1 | ORG NEWS -- history of user-visible changes. -*- org -*- | 1 | ORG NEWS -- history of user-visible changes. -*- org -*- |
| 2 | 2 | ||
| 3 | #+LINK: doc http://orgmode.org/worg/doc.html#%s | ||
| 4 | |||
| 3 | Copyright (C) 2012-2013 Free Software Foundation, Inc. | 5 | Copyright (C) 2012-2013 Free Software Foundation, Inc. |
| 4 | See the end of the file for license conditions. | 6 | See the end of the file for license conditions. |
| 5 | 7 | ||
| 6 | Please send Org bug reports to emacs-orgmode@gnu.org. | 8 | Please send Org bug reports to emacs-orgmode@gnu.org. |
| 7 | 9 | ||
| 10 | * Version 7.9.3 | ||
| 11 | |||
| 12 | ** New option [[doc::org-agenda-use-tag-inheritance][org-agenda-use-tag-inheritance]] | ||
| 13 | |||
| 14 | [[doc::org-use-tag-inheritance][org-use-tag-inheritance]] controls whether tags are inherited when | ||
| 15 | org-tags-view is called (either in =tags=, =tags-tree= or =tags-todo= | ||
| 16 | agenda views.) | ||
| 17 | |||
| 18 | When generating other agenda types such as =agenda=, =todo= and | ||
| 19 | =todo-tree=, tags inheritance is not used when selecting the entries | ||
| 20 | to display. Still, you might want to have all tag information correct | ||
| 21 | in the agenda buffer, e.g. for tag filtering. In that case, add the | ||
| 22 | agenda type to this variable. | ||
| 23 | |||
| 24 | Setting this variable to nil should considerably speeds up the agenda | ||
| 25 | generation. | ||
| 26 | |||
| 27 | Note that the default was to display inherited tags in the agenda | ||
| 28 | lines even if `org-use-tag-inheritance' was nil. The default is now | ||
| 29 | to *never* display inherited tags in agenda lines, but to /know/ about | ||
| 30 | them when the agenda type is listed in [[doc::org-agenda-use-tag-inheritance][org-agenda-use-tag-inheritance]]. | ||
| 31 | |||
| 32 | ** New default value nil for [[doc::org-agenda-dim-blocked-tasks][org-agenda-dim-blocked-tasks]] | ||
| 33 | |||
| 34 | Using `nil' as the default value speeds up the agenda generation. You | ||
| 35 | can hit `#' (or `C-u #') in agenda buffers to temporarily dim (or turn | ||
| 36 | invisible) blocked tasks. | ||
| 37 | |||
| 38 | ** New speedy keys for [[doc::org-speed-commands-default][org-speed-commands-default]] | ||
| 39 | |||
| 40 | You can now use `:' (instead of `;') for setting tags---this is | ||
| 41 | consistent with using the `:' key in agenda view. | ||
| 42 | |||
| 43 | You can now use `=' for [[doc::org-columns][org-columns]]. | ||
| 44 | |||
| 45 | ** =org-float= is now obsolete, use =diary-float= instead | ||
| 46 | ** Enhanced compatibility with Emacs 22 and XEmacs | ||
| 47 | |||
| 48 | Thanks to Achim for his work on enhancing Org's compatibility with | ||
| 49 | various Emacsen. Things may not be perfect, but Org should work okay | ||
| 50 | in most environments. | ||
| 51 | |||
| 8 | * Version 7.9.2 | 52 | * Version 7.9.2 |
| 9 | 53 | ||
| 10 | ** New ELPA repository for Org packages | 54 | ** New ELPA repository for Org packages |
diff --git a/etc/refcards/orgcard.pdf b/etc/refcards/orgcard.pdf index ccc02ae7968..8fc57d9c6d8 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 487b72be464..651d7dd08eb 100644 --- a/etc/refcards/orgcard.tex +++ b/etc/refcards/orgcard.tex | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | % Reference Card for Org Mode | 1 | % Reference Card for Org Mode |
| 2 | \def\orgversionnumber{7.9.2} | 2 | \def\orgversionnumber{7.9.3} |
| 3 | \def\versionyear{2012} % latest update | 3 | \def\versionyear{2013} % latest update |
| 4 | \input emacsver.tex | 4 | \input emacsver.tex |
| 5 | 5 | ||
| 6 | %**start of header | 6 | %**start of header |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3f6244b5c91..e60321744bb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,27 @@ | |||
| 1 | 2013-01-09 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * emacs-lisp/trace.el (trace-function-foreground) | ||
| 4 | (trace-function-background): Doc fix. | ||
| 5 | |||
| 6 | 2013-01-09 Juri Linkov <juri@jurta.org> | ||
| 7 | |||
| 8 | * international/mule-cmds.el (read-char-by-name): Move let-binding | ||
| 9 | of completion-ignore-case around completing-read to fix regression | ||
| 10 | exhibited by the test case `C-x 8 RET *acc TAB' and caused by | ||
| 11 | `string-match-p' using the nil value of `case-fold-search' and | ||
| 12 | `completion-ignore-case' in `completion-pcm--all-completions'. | ||
| 13 | (Bug#12615). | ||
| 14 | |||
| 15 | 2013-01-09 Glenn Morris <rgm@gnu.org> | ||
| 16 | |||
| 17 | * progmodes/compile.el (compilation-parse-errors): | ||
| 18 | Fix typo. (Bug#13369) | ||
| 19 | |||
| 20 | 2013-01-09 Vitalie Spinu <spinuvit@gmail.com> (tiny change) | ||
| 21 | |||
| 22 | * comint.el (comint-send-input): Check size of buffer before | ||
| 23 | waiting for process output, in case already accepted. (Bug#13290) | ||
| 24 | |||
| 1 | 2013-01-09 Paul Eggert <eggert@cs.ucla.edu> | 25 | 2013-01-09 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 26 | ||
| 3 | Spelling fixes. | 27 | Spelling fixes. |
diff --git a/lisp/comint.el b/lisp/comint.el index e797fe841d3..42ac08a9ecc 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -1847,9 +1847,9 @@ Similarly for Soar, Scheme, etc." | |||
| 1847 | (let ((echo-len (- comint-last-input-end | 1847 | (let ((echo-len (- comint-last-input-end |
| 1848 | comint-last-input-start))) | 1848 | comint-last-input-start))) |
| 1849 | ;; Wait for all input to be echoed: | 1849 | ;; Wait for all input to be echoed: |
| 1850 | (while (and (accept-process-output proc) | 1850 | (while (and (> (+ comint-last-input-end echo-len) |
| 1851 | (> (+ comint-last-input-end echo-len) | ||
| 1852 | (point-max)) | 1851 | (point-max)) |
| 1852 | (accept-process-output proc) | ||
| 1853 | (zerop | 1853 | (zerop |
| 1854 | (compare-buffer-substrings | 1854 | (compare-buffer-substrings |
| 1855 | nil comint-last-input-start | 1855 | nil comint-last-input-start |
diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el index dc876ba0f07..7a9eb3e1b28 100644 --- a/lisp/emacs-lisp/trace.el +++ b/lisp/emacs-lisp/trace.el | |||
| @@ -266,7 +266,9 @@ and return values will be inserted into BUFFER. This function generates the | |||
| 266 | trace advice for FUNCTION and activates it together with any other advice | 266 | trace advice for FUNCTION and activates it together with any other advice |
| 267 | there might be!! The trace BUFFER will popup whenever FUNCTION is called. | 267 | there might be!! The trace BUFFER will popup whenever FUNCTION is called. |
| 268 | Do not use this to trace functions that switch buffers or do any other | 268 | Do not use this to trace functions that switch buffers or do any other |
| 269 | display oriented stuff, use `trace-function-background' instead." | 269 | display oriented stuff, use `trace-function-background' instead. |
| 270 | |||
| 271 | To untrace a function, use `untrace-function' or `untrace-all'." | ||
| 270 | (interactive (trace--read-args "Trace function: ")) | 272 | (interactive (trace--read-args "Trace function: ")) |
| 271 | (trace-function-internal function buffer nil context)) | 273 | (trace-function-internal function buffer nil context)) |
| 272 | 274 | ||
| @@ -280,7 +282,9 @@ and activates it together with any other advice there might be. | |||
| 280 | The trace output goes to BUFFER quietly, without changing | 282 | The trace output goes to BUFFER quietly, without changing |
| 281 | the window or buffer configuration. | 283 | the window or buffer configuration. |
| 282 | 284 | ||
| 283 | BUFFER defaults to `trace-buffer'." | 285 | BUFFER defaults to `trace-buffer'. |
| 286 | |||
| 287 | To untrace a function, use `untrace-function' or `untrace-all'." | ||
| 284 | (interactive (trace--read-args "Trace function in background: ")) | 288 | (interactive (trace--read-args "Trace function in background: ")) |
| 285 | (trace-function-internal function buffer t context)) | 289 | (trace-function-internal function buffer t context)) |
| 286 | 290 | ||
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 03b88038dd7..35c303f0ea8 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el | |||
| @@ -2946,14 +2946,14 @@ This function also accepts a hexadecimal number of Unicode code | |||
| 2946 | point or a number in hash notation, e.g. #o21430 for octal, | 2946 | point or a number in hash notation, e.g. #o21430 for octal, |
| 2947 | #x2318 for hex, or #10r8984 for decimal." | 2947 | #x2318 for hex, or #10r8984 for decimal." |
| 2948 | (let* ((enable-recursive-minibuffers t) | 2948 | (let* ((enable-recursive-minibuffers t) |
| 2949 | (completion-ignore-case t) | ||
| 2949 | (input | 2950 | (input |
| 2950 | (completing-read | 2951 | (completing-read |
| 2951 | prompt | 2952 | prompt |
| 2952 | (lambda (string pred action) | 2953 | (lambda (string pred action) |
| 2953 | (let ((completion-ignore-case t)) | 2954 | (if (eq action 'metadata) |
| 2954 | (if (eq action 'metadata) | 2955 | '(metadata (category . unicode-name)) |
| 2955 | '(metadata (category . unicode-name)) | 2956 | (complete-with-action action (ucs-names) string pred))))) |
| 2956 | (complete-with-action action (ucs-names) string pred)))))) | ||
| 2957 | (char | 2957 | (char |
| 2958 | (cond | 2958 | (cond |
| 2959 | ((string-match-p "\\`[0-9a-fA-F]+\\'" input) | 2959 | ((string-match-p "\\`[0-9a-fA-F]+\\'" input) |
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index b348d22d6de..3a575f60414 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1,3 +1,357 @@ | |||
| 1 | 2013-01-09 Achim Gratz <Stromeko@Stromeko.de> | ||
| 2 | |||
| 3 | * org-compat.el (org-define-obsolete-function-alias) | ||
| 4 | (org-define-obsolete-variable-alias): Introduce new compatibility | ||
| 5 | macros to obsolete functions and variables. | ||
| 6 | |||
| 7 | * org-agenda.el, org-clock.el, org-id.el, org-lparse.el: | ||
| 8 | * org-protocol.el, org.el: | ||
| 9 | Use `org-define-obsolete-{function,variable}-alias' instead | ||
| 10 | of `define-obsolate{function,variable}-alias'. | ||
| 11 | |||
| 12 | * org-faces.el: Define face alias mode-line for XEmacs (it's | ||
| 13 | called modeline there). | ||
| 14 | |||
| 15 | * org-compat.el (org-condition-case-unless-debug): Do not use | ||
| 16 | defalias for special forms, the Emacs 22 byte-compiler does not | ||
| 17 | recognize them correctly when compiling macros. Use a macro | ||
| 18 | instead and rely on macro expansion. That however makes the | ||
| 19 | decision at compile time, which should be acceptable in this case | ||
| 20 | since it only affects debugging. | ||
| 21 | |||
| 22 | * org-compat.el (org-no-popups): New wrapper macro which let-binds | ||
| 23 | the correct variables to suppress popup windows depending on the | ||
| 24 | Emacs version in use. This is a compile-time decision when | ||
| 25 | byte-compiling. | ||
| 26 | |||
| 27 | * org.el (org-get-location, org-switch-to-buffer-other-window): | ||
| 28 | Use the wrapper `org-no-popups' to let-bind the correct variables | ||
| 29 | for suppression of popup windows. | ||
| 30 | |||
| 31 | * org-compat.el (user-error): Defalias to `error' for Emacsen that | ||
| 32 | don't have it. | ||
| 33 | |||
| 34 | * org-agenda.el (org-agenda-write): Use org-called-interactively-p | ||
| 35 | instead of called-interactively-p. | ||
| 36 | |||
| 37 | * org.el (org-find-invisible-foreground): Do not use the value of | ||
| 38 | variables `default-frame-alist', `initial-frame-alist' and | ||
| 39 | `window-system-default-frame-alist' when their symbol is not bound. | ||
| 40 | |||
| 41 | 2013-01-09 Bastien Guerry <bzg@gnu.org> | ||
| 42 | |||
| 43 | * org-src.el (org-edit-src-code): Fix bug when trying to edit a | ||
| 44 | table.el table. | ||
| 45 | |||
| 46 | * org-agenda.el (org-agenda-finalize): Inhibit readonly for the | ||
| 47 | whole function. | ||
| 48 | |||
| 49 | * org.el (org-entry-get): Speed up by let-binding some variables | ||
| 50 | only if needed. Also fix a bug: consider an empty drawer as no drawer. | ||
| 51 | |||
| 52 | * org-agenda.el (org-search-view, org-agenda-get-todos) | ||
| 53 | (org-agenda-get-timestamps, org-agenda-get-sexps) | ||
| 54 | (org-agenda-get-progress, org-agenda-get-deadlines) | ||
| 55 | (org-agenda-get-scheduled, org-agenda-get-blocks) | ||
| 56 | (org-agenda-change-all-lines): Get local tags only. | ||
| 57 | (org-agenda-use-tag-inheritance): New option. | ||
| 58 | (org-agenda-finalize): When `org-agenda-use-tag-inheritance' | ||
| 59 | is non-nil, possibly reset tags in the agenda buffer. | ||
| 60 | (org-agenda-check-type): Enhance docstring. | ||
| 61 | |||
| 62 | * org.el (org-use-tag-inheritance): Fix typo in docstring. | ||
| 63 | |||
| 64 | * org-agenda.el (org-float): Don't alias `org-float'. | ||
| 65 | |||
| 66 | * org.el (org-scan-tags): The skipper already checks for archived | ||
| 67 | entries. | ||
| 68 | |||
| 69 | * org.el (org-refresh-properties): Rename from | ||
| 70 | `org-refresh-effort-properties' and use two new parameters. | ||
| 71 | (org-agenda-prepare-buffers): Use `org-refresh-properties'. | ||
| 72 | Also refresh the 'org-appt-warntime text property. | ||
| 73 | |||
| 74 | * org-clock.el (org-clock-in): Use the renamed defun. | ||
| 75 | |||
| 76 | * org-icalendar.el (org-icalendar-print-entries): | ||
| 77 | Refresh the 'org-appt-warntime property. | ||
| 78 | (org-icalendar-print-entries): | ||
| 79 | * org-agenda.el (org-agenda-get-timestamps) | ||
| 80 | (org-agenda-get-sexps, org-agenda-get-deadlines) | ||
| 81 | (org-agenda-get-scheduled): Do not use `org-entry-get' to get the | ||
| 82 | "APPT_WARNTIME" property value. | ||
| 83 | |||
| 84 | * org.el (org-id-link-to-org-use-id): Fix compiler warning. | ||
| 85 | |||
| 86 | * org-agenda.el (org-agenda-format-item): Do not use | ||
| 87 | `org-get-effort' to get the effort text property. | ||
| 88 | (org-agenda-get-sexps): Use `org-back-to-heading' when setting tags. | ||
| 89 | |||
| 90 | * org-clock.el (org-clock-in): Refresh effort properties. | ||
| 91 | |||
| 92 | * org.el (org-refresh-effort-properties): New defun. | ||
| 93 | (org-get-effort): Delete. | ||
| 94 | (org-set-effort): | ||
| 95 | (org-property-next-allowed-value): Set the 'org-effort text property. | ||
| 96 | (org-agenda-prepare-buffers): Refresh effort properties. | ||
| 97 | |||
| 98 | * org.el (org-read-date): Let-bind `mouse-autoselect-window' to | ||
| 99 | nil so that the mouse doesn't jump when the option is set to t globally. | ||
| 100 | |||
| 101 | * org-agenda.el (org-agenda-dim-blocked-tasks): Default to nil. | ||
| 102 | (org-agenda-dim-blocked-tasks): Make interactive and allow an | ||
| 103 | optional parameter 'invisible to hide blocked tasks instead of | ||
| 104 | just dimming them. | ||
| 105 | (org-agenda-mode-map): Bind `org-agenda-dim-blocked-tasks' to "#". | ||
| 106 | |||
| 107 | * org-agenda.el (org-agenda-finalize): Don't try to align tags | ||
| 108 | when there are no tags. Only try to draw the habit consistency | ||
| 109 | graph when there is a habit in the buffer. Only mark clocking | ||
| 110 | task when there is one. | ||
| 111 | |||
| 112 | * org.el (org-adaptive-fill-function): DTRT in `message-mode'. | ||
| 113 | |||
| 114 | * org.el (org-get-priority): Save match data even when using | ||
| 115 | `org-get-priority-function'. | ||
| 116 | |||
| 117 | * org-mobile.el (org-mobile-create-index-file): | ||
| 118 | Possibly normalize `org-todo-keywords'. | ||
| 119 | |||
| 120 | * org-mobile.el (org-mobile-push): Use the correct agenda buffer names. | ||
| 121 | |||
| 122 | * org.el (org-store-link): Use `org-id-link-to-org-use-id' instead | ||
| 123 | of the obsolete variable name. | ||
| 124 | |||
| 125 | * org.el (org-fontify-meta-lines-and-blocks-1): | ||
| 126 | Fix bug when fontifying keywords with no value. | ||
| 127 | |||
| 128 | * org.el (org-goto-auto-isearch): Enhance docstring. | ||
| 129 | (org-goto-map): Make a defun, so that the customized value of | ||
| 130 | org-goto-auto-isearch is correctly initialized. | ||
| 131 | (org-goto): Initialize the keymap with `org-goto-map'. | ||
| 132 | (org-get-location): Use *Org Help* as a temporary buffer. | ||
| 133 | Tell whether auto-isearch is on or off. | ||
| 134 | |||
| 135 | * org-exp.el (org-export-as-org): Remove useless argument. | ||
| 136 | |||
| 137 | * org-docbook.el (org-export-as-docbook-batch) | ||
| 138 | (org-export-region-as-docbook, org-export-as-docbook-pdf): | ||
| 139 | Fix the number of arguments. | ||
| 140 | (org-export-as-docbook): Remove useless argument. | ||
| 141 | |||
| 142 | * org.el (org-speed-commands-default): Use ":" instead of ";" for | ||
| 143 | `org-set-tags-command', which is consistent with ":" in agenda | ||
| 144 | view. Use "=" for `org-columns". | ||
| 145 | |||
| 146 | * org.el (org-sparse-tree): Fix redundant information in prompt. | ||
| 147 | |||
| 148 | * org-exp.el (org-export-string): Fix number of arguments passed | ||
| 149 | to the org-export-as-* functions. | ||
| 150 | |||
| 151 | * org-latex.el (org-export-as-latex): Fix typo in docstring. | ||
| 152 | |||
| 153 | * org-list.el (org-cycle-include-plain-lists): Docstring enhancement. | ||
| 154 | |||
| 155 | * org.el (org-fontify-meta-lines-and-blocks-1): Fix fontification | ||
| 156 | bug when fontifying a keyword with no associated value. | ||
| 157 | (org-cycle-internal-local): Don't run hooks when cycling a plain | ||
| 158 | list before first headline. | ||
| 159 | (org-ctrl-c-ctrl-c): Throw a user error when trying to toggle a | ||
| 160 | blocked checkbox. | ||
| 161 | (org-indent-line): Fix table formulas indenting. | ||
| 162 | |||
| 163 | * org-agenda.el (org-agenda-open-link): Fix bug when no link is | ||
| 164 | matched. Return a message instead of an error. | ||
| 165 | (org-agenda-priority): Remove useless parameter and fix showing | ||
| 166 | priority in agenda buffers. | ||
| 167 | |||
| 168 | * org-macs.el (org-with-buffer-modified-unmodified): New macro. | ||
| 169 | |||
| 170 | * org.el (org-entry-blocked-p): Use the new macro. | ||
| 171 | |||
| 172 | * org-src.el (org-edit-src-exit): Don't comma-escape the content | ||
| 173 | of a fixed width region. | ||
| 174 | |||
| 175 | * org.el (org-blocker-hook): Update the docstring to mention that | ||
| 176 | functions in this hook should not modify the buffer. | ||
| 177 | (org-trigger-hook): Small docstring fix. | ||
| 178 | (org-entry-blocked-p): Use `with-buffer-modified-unmodified' | ||
| 179 | so that the function never modifies the buffer. | ||
| 180 | |||
| 181 | * org-agenda.el (org-agenda-open-link): Allow to open an internal | ||
| 182 | link by using the new `org-offer-links-in-entry' function. | ||
| 183 | |||
| 184 | * org.el (org-offer-links-in-entry): Do not open the link directly | ||
| 185 | through `org-open-link-from-string', only offer to select a link | ||
| 186 | and return a cons with the link (as a string) and the end of entry. | ||
| 187 | (org-open-at-point): Use `org-offer-links-in-entry' correctly. | ||
| 188 | |||
| 189 | * org.el (org-cycle-internal-local): | ||
| 190 | Fix bug: allow headings with leading blank characters. | ||
| 191 | |||
| 192 | * org-clock.el (org-clock-persist): | ||
| 193 | Docstring fix: document the 'history value. | ||
| 194 | |||
| 195 | * org.el (org-insert-link): Fix bug when inserting links to | ||
| 196 | headlines containing the ">" character. | ||
| 197 | |||
| 198 | * org-crypt.el (org-at-encrypted-entry-p): Fix search boundary. | ||
| 199 | |||
| 200 | * org-compat.el (org-delete-directory): New compatibility function | ||
| 201 | for Emacs 22, where `delete-directory' does not support recursive | ||
| 202 | deletion. | ||
| 203 | |||
| 204 | * org-odt.el (org-odt-cleanup-xml-buffers): | ||
| 205 | Use the new compatibility function. | ||
| 206 | |||
| 207 | * org.el (org-table-map-tables): Fix allowed blocks. | ||
| 208 | |||
| 209 | * org.el (org-edit-special): | ||
| 210 | * org-src.el (org-edit-src-code): Fix regression: allow editing | ||
| 211 | HTML and LaTeX source blocks again. | ||
| 212 | |||
| 213 | * org.el (org-nonsticky-props): Add `htmlize-link'. | ||
| 214 | (org-nonsticky-props): Add `htmlize-link'. | ||
| 215 | |||
| 216 | * org.el (org-edit-special): | ||
| 217 | * org-src.el (org-edit-src-code): Don't edit in verbatim blocks. | ||
| 218 | |||
| 219 | * org-table.el (org-table-fedit-lisp-indent) | ||
| 220 | (orgtbl-self-insert-command): Use `org-delete-backward-char' | ||
| 221 | instead of `backward-delete-char'. | ||
| 222 | |||
| 223 | * org-src.el (org-edit-src-code): Fix another bug about editing | ||
| 224 | special blocks "example" and "verbatim". | ||
| 225 | |||
| 226 | * org.el (org-structure-template-alist): Add verbatim. | ||
| 227 | (org-edit-special): Fix bug about editing special blocks | ||
| 228 | "example" and "verbatim". | ||
| 229 | |||
| 230 | * org.el (org-delete-backward-char, org-delete-char): | ||
| 231 | Save match data, `delete-backward-char' and `delete-char' don't. | ||
| 232 | |||
| 233 | * org.el (org-enable-table-editor, org-insert-heading) | ||
| 234 | (org-remove-timestamp-with-keyword, org-self-insert-command): | ||
| 235 | * org-table.el (org-table-fedit-lisp-indent) | ||
| 236 | (orgtbl-self-insert-command): | ||
| 237 | * org-latex.el (org-export-latex-subcontent): | ||
| 238 | * org-clock.el (org-clocktable-write-default): | ||
| 239 | * org-ascii.el (org-export-ascii-preprocess): | ||
| 240 | Use `delete-backward-char' instead of `backward-delete-char'. | ||
| 241 | |||
| 242 | * org.el (org-todo): Ignore the comment string when changing the | ||
| 243 | TODO state of a headline. | ||
| 244 | (org-edit-special): Fix docstring. | ||
| 245 | (org-in-src-block-p): Small enhancement. | ||
| 246 | |||
| 247 | * org-publish.el (org-publish-org-to): Call `org-export-as-*' | ||
| 248 | functions with the correct list of arguments. | ||
| 249 | |||
| 250 | * org-html.el (org-export-as-html): Delete obsolete arg `hidden'. | ||
| 251 | (org-export-as-html-and-open, org-export-as-html-batch) | ||
| 252 | (org-export-region-as-html): Don't use obsolete arg. | ||
| 253 | |||
| 254 | * org-ascii.el (org-export-as-ascii): Delete obsolete arg `hidden'. | ||
| 255 | (org-export-as-ascii-to-buffer): Don't use obsolete arg. | ||
| 256 | |||
| 257 | * org.el (org-in-fixed-width-region-p): Save match data. | ||
| 258 | (org-in-src-block-p): Use case-folding for searching the block | ||
| 259 | boundaries. | ||
| 260 | (org-activate-plain-links, org-activate-angle-links) | ||
| 261 | (org-activate-bracket-links): Prevent link activation in | ||
| 262 | source code blocks. | ||
| 263 | |||
| 264 | * org-odt.el (org-odt-cleanup-xml-buffers): Fix Emacs Bug#13197 by | ||
| 265 | setting the correct buffer before marking it unmodified to | ||
| 266 | silently kill him. | ||
| 267 | |||
| 268 | * org.el (org-set-font-lock-defaults): Don't activate links in | ||
| 269 | source code blocks and fixed-width regions. | ||
| 270 | |||
| 271 | * org-agenda.el (org-agenda-finalize): Fix links activation. | ||
| 272 | |||
| 273 | * org.el (org-open-at-point): Throw the correct error on | ||
| 274 | non-links. Use `user-error' instead of `error'. | ||
| 275 | |||
| 276 | * org.el (org-in-fixed-width-region-p): Define before use. | ||
| 277 | |||
| 278 | * org-src.el (org-in-src-block-p): Declare function. | ||
| 279 | |||
| 280 | * org-compat.el: Fix bug: don't use `eval-when-compile' when | ||
| 281 | aliasing `user-error'. | ||
| 282 | |||
| 283 | * org-agenda.el (org-agenda-skip): Only check if point is | ||
| 284 | inside a code block, not at a code block. | ||
| 285 | |||
| 286 | * org.el (org-in-fixed-width-region-p): | ||
| 287 | Rewrite using org-element.el. | ||
| 288 | |||
| 289 | * org.el (org-fill-paragraph): Fill correctly in source code block. | ||
| 290 | |||
| 291 | * org.el (org-in-fixed-width-region-p): New function. | ||
| 292 | (org-edit-special): Fix bug: make sure to DTRT in every | ||
| 293 | special environment. Also use the new function to check | ||
| 294 | against fixed-width environment. | ||
| 295 | |||
| 296 | * org-src.el (org-edit-src-code): Check if we are in a source code | ||
| 297 | block with `org-in-src-block-p'. Slightly reformat the docstring. | ||
| 298 | |||
| 299 | * org.el (org-in-src-block-p): Return t when point is at the | ||
| 300 | #+BEGIN_SRC/#+END_SRC lines unless the new optional parameter | ||
| 301 | 'inside is set to t. | ||
| 302 | |||
| 303 | * ob-exp.el (obe-marker): Delete useless var. | ||
| 304 | |||
| 305 | * org-src.el (org-edit-src-code): Fix bug triggered by the sexp | ||
| 306 | (copy-marker nil) on Emacs <24.1. | ||
| 307 | |||
| 308 | 2013-01-09 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 309 | |||
| 310 | * org-agenda.el (org-agenda-get-restriction-and-command): | ||
| 311 | * org-capture.el (org-capture-place-template): | ||
| 312 | * org-colview.el (org-dblock-write:columnview): | ||
| 313 | * org-mobile.el (org-mobile-locate-entry): | ||
| 314 | * org-table.el (org-table-convert-region): | ||
| 315 | * org.el (org-update-statistics-cookies): Use `point-marker'. | ||
| 316 | |||
| 317 | 2013-01-09 Eric Schulte <eric.schulte@gmx.com> | ||
| 318 | |||
| 319 | * org-exp.el (org-export-string): Pass the dir option on through | ||
| 320 | to any subsequent export functions. | ||
| 321 | |||
| 322 | 2013-01-09 Henning Weiss <hdweiss@gmail.com> (tiny change) | ||
| 323 | |||
| 324 | * org-mobile.el (org-mobile-sumo-agenda-command): Remove match | ||
| 325 | description from block agendas when they have a title. | ||
| 326 | |||
| 327 | 2013-01-09 Jambunathan K <kjambunathan@gmail.com> | ||
| 328 | |||
| 329 | * org-odt.el (org-export-as-odt-batch): Init `org-odt-zip-dir'. | ||
| 330 | Fix Emacs Bug#13254. | ||
| 331 | |||
| 332 | * org-odt.el (org-odt-format-org-link): Add check for presence of | ||
| 333 | description in headline links. | ||
| 334 | |||
| 335 | 2013-01-09 Michael Gauland <mike_gauland@stanfordalumni.org> (tiny change) | ||
| 336 | |||
| 337 | * org-src.el: Create a marker to pass to copy-marker. | ||
| 338 | |||
| 339 | 2013-01-09 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 340 | |||
| 341 | * org.el (org-setup-filling): Set `auto-fill-inhibit-regexp' to | ||
| 342 | nil because `org-adaptive-fill-function' already determines which | ||
| 343 | lines should be filled. | ||
| 344 | |||
| 345 | * org.el (org-fill-paragraph): Small refactoring. | ||
| 346 | |||
| 347 | * org-element.el (org-element--parse-elements) | ||
| 348 | (org-element-at-point): Fix parsing of a list in a block in a list. | ||
| 349 | |||
| 350 | 2013-01-09 Sebastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> | ||
| 351 | |||
| 352 | * org.el (org-copy-subtree, org-paste-subtree): | ||
| 353 | Fix whitespace handling when copying/pasting a subtree. | ||
| 354 | |||
| 1 | 2012-12-20 Michael Albinus <michael.albinus@gmx.de> | 355 | 2012-12-20 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 356 | ||
| 3 | * ob.el (org-babel-temp-file): Fix setting of | 357 | * ob.el (org-babel-temp-file): Fix setting of |
| @@ -129,9 +483,8 @@ | |||
| 129 | * ob-haskell.el (org-export-as-latex): Don't use the obsoleted | 483 | * ob-haskell.el (org-export-as-latex): Don't use the obsoleted |
| 130 | argument `hidden'. | 484 | argument `hidden'. |
| 131 | 485 | ||
| 132 | * org.el (org-refile): Run within `with-demoted-errors' so | 486 | * org.el (org-refile): Run within `with-demoted-errors' so that a |
| 133 | that a corrupted bookmark file does not stop the refile | 487 | corrupted bookmark file does not stop the refile process. |
| 134 | process. | ||
| 135 | 488 | ||
| 136 | * org-capture.el (org-capture-bookmark-last-stored-position): | 489 | * org-capture.el (org-capture-bookmark-last-stored-position): |
| 137 | Ditto for the capture process. | 490 | Ditto for the capture process. |
diff --git a/lisp/org/ob-eval.el b/lisp/org/ob-eval.el index afa880bd90c..5884d33d786 100644 --- a/lisp/org/ob-eval.el +++ b/lisp/org/ob-eval.el | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | (eval-when-compile (require 'cl)) | 30 | (eval-when-compile (require 'cl)) |
| 31 | 31 | ||
| 32 | (defvar org-babel-error-buffer-name "*Org-Babel Error Output*") | 32 | (defvar org-babel-error-buffer-name "*Org-Babel Error Output*") |
| 33 | (declare-function org-babel-temp-file "ob-core" (prefix &optional suffix)) | ||
| 33 | 34 | ||
| 34 | (defun org-babel-eval-error-notify (exit-code stderr) | 35 | (defun org-babel-eval-error-notify (exit-code stderr) |
| 35 | "Open a buffer to display STDERR and a message with the value of EXIT-CODE." | 36 | "Open a buffer to display STDERR and a message with the value of EXIT-CODE." |
| @@ -142,6 +143,11 @@ specifies the value of ERROR-BUFFER." | |||
| 142 | shell-file-name | 143 | shell-file-name |
| 143 | "/bin/sh")) | 144 | "/bin/sh")) |
| 144 | exit-status) | 145 | exit-status) |
| 146 | ;; There is an error in `process-file' when `error-file' exists. | ||
| 147 | ;; This is fixed in Emacs trunk as of 2012-12-21; let's use this | ||
| 148 | ;; workaround for now. | ||
| 149 | (unless (file-remote-p default-directory) | ||
| 150 | (delete-file error-file)) | ||
| 145 | (if (or replace | 151 | (if (or replace |
| 146 | (and output-buffer | 152 | (and output-buffer |
| 147 | (not (or (bufferp output-buffer) (stringp output-buffer))))) | 153 | (not (or (bufferp output-buffer) (stringp output-buffer))))) |
diff --git a/lisp/org/ob-exp.el b/lisp/org/ob-exp.el index c62a6a8211d..37a9f71cf59 100644 --- a/lisp/org/ob-exp.el +++ b/lisp/org/ob-exp.el | |||
| @@ -28,7 +28,6 @@ | |||
| 28 | (eval-when-compile | 28 | (eval-when-compile |
| 29 | (require 'cl)) | 29 | (require 'cl)) |
| 30 | 30 | ||
| 31 | (defvar obe-marker nil) | ||
| 32 | (defvar org-current-export-file) | 31 | (defvar org-current-export-file) |
| 33 | (defvar org-babel-lob-one-liner-regexp) | 32 | (defvar org-babel-lob-one-liner-regexp) |
| 34 | (defvar org-babel-ref-split-regexp) | 33 | (defvar org-babel-ref-split-regexp) |
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index e6e6166ffe2..2eb96c2510b 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el | |||
| @@ -840,7 +840,7 @@ entry, the rest of the entry will not be searched." | |||
| 840 | :group 'org-agenda-daily/weekly | 840 | :group 'org-agenda-daily/weekly |
| 841 | :type 'boolean) | 841 | :type 'boolean) |
| 842 | 842 | ||
| 843 | (defcustom org-agenda-dim-blocked-tasks t | 843 | (defcustom org-agenda-dim-blocked-tasks nil |
| 844 | "Non-nil means dim blocked tasks in the agenda display. | 844 | "Non-nil means dim blocked tasks in the agenda display. |
| 845 | This causes some overhead during agenda construction, but if you | 845 | This causes some overhead during agenda construction, but if you |
| 846 | have turned on `org-enforce-todo-dependencies', | 846 | have turned on `org-enforce-todo-dependencies', |
| @@ -857,6 +857,7 @@ that is blocked because of checkboxes will never be made invisible, it | |||
| 857 | will only be dimmed." | 857 | will only be dimmed." |
| 858 | :group 'org-agenda-daily/weekly | 858 | :group 'org-agenda-daily/weekly |
| 859 | :group 'org-agenda-todo-list | 859 | :group 'org-agenda-todo-list |
| 860 | :version "24.3" | ||
| 860 | :type '(choice | 861 | :type '(choice |
| 861 | (const :tag "Do not dim" nil) | 862 | (const :tag "Do not dim" nil) |
| 862 | (const :tag "Dim to a gray face" t) | 863 | (const :tag "Dim to a gray face" t) |
| @@ -889,7 +890,7 @@ you want to use two-columns display (see `org-agenda-menu-two-columns')." | |||
| 889 | :version "24.1" | 890 | :version "24.1" |
| 890 | :type 'boolean) | 891 | :type 'boolean) |
| 891 | 892 | ||
| 892 | (define-obsolete-variable-alias 'org-agenda-menu-two-column 'org-agenda-menu-two-columns "24.3") | 893 | (org-define-obsolete-variable-alias 'org-agenda-menu-two-column 'org-agenda-menu-two-columns "24.3") |
| 893 | 894 | ||
| 894 | (defcustom org-agenda-menu-two-columns nil | 895 | (defcustom org-agenda-menu-two-columns nil |
| 895 | "Non-nil means, use two columns to show custom commands in the dispatcher. | 896 | "Non-nil means, use two columns to show custom commands in the dispatcher. |
| @@ -899,7 +900,7 @@ to nil." | |||
| 899 | :version "24.1" | 900 | :version "24.1" |
| 900 | :type 'boolean) | 901 | :type 'boolean) |
| 901 | 902 | ||
| 902 | (define-obsolete-variable-alias 'org-finalize-agenda-hook 'org-agenda-finalize-hook "24.3") | 903 | (org-define-obsolete-variable-alias 'org-finalize-agenda-hook 'org-agenda-finalize-hook "24.3") |
| 903 | (defcustom org-agenda-finalize-hook nil | 904 | (defcustom org-agenda-finalize-hook nil |
| 904 | "Hook run just before displaying an agenda buffer. | 905 | "Hook run just before displaying an agenda buffer. |
| 905 | The buffer is still writable when the hook is called. | 906 | The buffer is still writable when the hook is called. |
| @@ -1651,6 +1652,23 @@ When non-nil, this must be the number of minutes, e.g. 60 for one hour." | |||
| 1651 | :group 'org-agenda-line-format | 1652 | :group 'org-agenda-line-format |
| 1652 | :type 'boolean) | 1653 | :type 'boolean) |
| 1653 | 1654 | ||
| 1655 | (defcustom org-agenda-use-tag-inheritance '(todo search timeline agenda) | ||
| 1656 | "List of agenda view types where to use tag inheritance. | ||
| 1657 | |||
| 1658 | In tags/tags-todo/tags-tree agenda views, tag inheritance is | ||
| 1659 | controlled by `org-use-tag-inheritance'. In other agenda types, | ||
| 1660 | `org-use-tag-inheritance' is not used when selecting the agenda | ||
| 1661 | entries, but you may want the agenda to use the inherited tags | ||
| 1662 | anyway, e.g. for later tag filtering. | ||
| 1663 | |||
| 1664 | The default value reset tags in every agenda type. Setting this | ||
| 1665 | option to nil will speed up non-tags agenda view a lot. | ||
| 1666 | |||
| 1667 | Allowed value are 'todo, 'search, 'timeline and 'agenda." | ||
| 1668 | :version "24.3" | ||
| 1669 | :group 'org-agenda | ||
| 1670 | :type '(repeat (symbol :tag "Agenda type"))) | ||
| 1671 | |||
| 1654 | (defcustom org-agenda-hide-tags-regexp nil | 1672 | (defcustom org-agenda-hide-tags-regexp nil |
| 1655 | "Regular expression used to filter away specific tags in agenda views. | 1673 | "Regular expression used to filter away specific tags in agenda views. |
| 1656 | This means that these tags will be present, but not be shown in the agenda | 1674 | This means that these tags will be present, but not be shown in the agenda |
| @@ -2012,6 +2030,7 @@ The following commands are available: | |||
| 2012 | (org-defkey org-agenda-mode-map "\C-c\C-w" 'org-agenda-refile) | 2030 | (org-defkey org-agenda-mode-map "\C-c\C-w" 'org-agenda-refile) |
| 2013 | (org-defkey org-agenda-mode-map "m" 'org-agenda-bulk-mark) | 2031 | (org-defkey org-agenda-mode-map "m" 'org-agenda-bulk-mark) |
| 2014 | (org-defkey org-agenda-mode-map "*" 'org-agenda-bulk-mark-all) | 2032 | (org-defkey org-agenda-mode-map "*" 'org-agenda-bulk-mark-all) |
| 2033 | (org-defkey org-agenda-mode-map "#" 'org-agenda-dim-blocked-tasks) | ||
| 2015 | (org-defkey org-agenda-mode-map "%" 'org-agenda-bulk-mark-regexp) | 2034 | (org-defkey org-agenda-mode-map "%" 'org-agenda-bulk-mark-regexp) |
| 2016 | (org-defkey org-agenda-mode-map "u" 'org-agenda-bulk-unmark) | 2035 | (org-defkey org-agenda-mode-map "u" 'org-agenda-bulk-unmark) |
| 2017 | (org-defkey org-agenda-mode-map "U" 'org-agenda-bulk-unmark-all) | 2036 | (org-defkey org-agenda-mode-map "U" 'org-agenda-bulk-unmark-all) |
| @@ -2664,7 +2683,7 @@ L Timeline for current buffer # List stuck projects (!=configure) | |||
| 2664 | (add-text-properties (match-beginning 2) (match-end 2) | 2683 | (add-text-properties (match-beginning 2) (match-end 2) |
| 2665 | '(face bold) header)) | 2684 | '(face bold) header)) |
| 2666 | header))) | 2685 | header))) |
| 2667 | (setq header-end (move-marker (make-marker) (point))) | 2686 | (setq header-end (point-marker)) |
| 2668 | (while t | 2687 | (while t |
| 2669 | (setq custom1 custom) | 2688 | (setq custom1 custom) |
| 2670 | (when (eq rmheader t) | 2689 | (when (eq rmheader t) |
| @@ -3194,7 +3213,7 @@ If AGENDA-BUFFER-NAME, use this as the buffer name for the agenda to write." | |||
| 3194 | (kill-buffer (current-buffer)) | 3213 | (kill-buffer (current-buffer)) |
| 3195 | (message "Plain text written to %s" file)))))))) | 3214 | (message "Plain text written to %s" file)))))))) |
| 3196 | (set-buffer (or agenda-bufname | 3215 | (set-buffer (or agenda-bufname |
| 3197 | (and (called-interactively-p 'any) (buffer-name)) | 3216 | (and (org-called-interactively-p 'any) (buffer-name)) |
| 3198 | org-agenda-buffer-name))) | 3217 | org-agenda-buffer-name))) |
| 3199 | (when open (org-open-file file))) | 3218 | (when open (org-open-file file))) |
| 3200 | 3219 | ||
| @@ -3514,44 +3533,60 @@ generating a new one." | |||
| 3514 | (save-excursion | 3533 | (save-excursion |
| 3515 | (let ((inhibit-read-only t)) | 3534 | (let ((inhibit-read-only t)) |
| 3516 | (goto-char (point-min)) | 3535 | (goto-char (point-min)) |
| 3517 | (while (org-activate-bracket-links (point-max)) | 3536 | (save-excursion |
| 3518 | (add-text-properties (match-beginning 0) (match-end 0) | 3537 | (while (org-activate-bracket-links (point-max)) |
| 3519 | '(face org-link))) | 3538 | (add-text-properties (match-beginning 0) (match-end 0) |
| 3520 | (while (org-activate-plain-links (point-max)) | 3539 | '(face org-link)))) |
| 3521 | (add-text-properties (match-beginning 0) (match-end 0) | 3540 | (save-excursion |
| 3522 | '(face org-link))) | 3541 | (while (org-activate-plain-links (point-max)) |
| 3523 | (org-agenda-align-tags) | 3542 | (add-text-properties (match-beginning 0) (match-end 0) |
| 3543 | '(face org-link)))) | ||
| 3544 | (unless (eq org-agenda-remove-tags t) | ||
| 3545 | (org-agenda-align-tags)) | ||
| 3524 | (unless org-agenda-with-colors | 3546 | (unless org-agenda-with-colors |
| 3525 | (remove-text-properties (point-min) (point-max) '(face nil)))) | 3547 | (remove-text-properties (point-min) (point-max) '(face nil))) |
| 3526 | (if (and (boundp 'org-agenda-overriding-columns-format) | 3548 | (if (and (boundp 'org-agenda-overriding-columns-format) |
| 3527 | org-agenda-overriding-columns-format) | 3549 | org-agenda-overriding-columns-format) |
| 3528 | (org-set-local 'org-agenda-overriding-columns-format | 3550 | (org-set-local 'org-agenda-overriding-columns-format |
| 3529 | org-agenda-overriding-columns-format)) | 3551 | org-agenda-overriding-columns-format)) |
| 3530 | (if (and (boundp 'org-agenda-view-columns-initially) | 3552 | (if (and (boundp 'org-agenda-view-columns-initially) |
| 3531 | org-agenda-view-columns-initially) | 3553 | org-agenda-view-columns-initially) |
| 3532 | (org-agenda-columns)) | 3554 | (org-agenda-columns)) |
| 3533 | (when org-agenda-fontify-priorities | 3555 | (when org-agenda-fontify-priorities |
| 3534 | (org-agenda-fontify-priorities)) | 3556 | (org-agenda-fontify-priorities)) |
| 3535 | (when (and org-agenda-dim-blocked-tasks org-blocker-hook) | 3557 | (when (and org-agenda-dim-blocked-tasks org-blocker-hook) |
| 3536 | (org-agenda-dim-blocked-tasks)) | 3558 | (org-agenda-dim-blocked-tasks)) |
| 3537 | ;; We need to widen when `org-agenda-finalize' is called from | 3559 | ;; We need to widen when `org-agenda-finalize' is called from |
| 3538 | ;; `org-agenda-change-all-lines' (e.g. in `org-agenda-clock-in') | 3560 | ;; `org-agenda-change-all-lines' (e.g. in `org-agenda-clock-in') |
| 3539 | (save-restriction | 3561 | (when org-clock-current-task |
| 3540 | (widen) | 3562 | (save-restriction |
| 3541 | (org-agenda-mark-clocking-task)) | 3563 | (widen) |
| 3542 | (when org-agenda-entry-text-mode | 3564 | (org-agenda-mark-clocking-task))) |
| 3543 | (org-agenda-entry-text-hide) | 3565 | (when org-agenda-entry-text-mode |
| 3544 | (org-agenda-entry-text-show)) | 3566 | (org-agenda-entry-text-hide) |
| 3545 | (if (functionp 'org-habit-insert-consistency-graphs) | 3567 | (org-agenda-entry-text-show)) |
| 3546 | (org-habit-insert-consistency-graphs)) | 3568 | (if (and (functionp 'org-habit-insert-consistency-graphs) |
| 3547 | (let ((inhibit-read-only t)) | 3569 | (save-excursion (next-single-property-change (point-min) 'org-habit-p))) |
| 3548 | (run-hooks 'org-agenda-finalize-hook)) | 3570 | (org-habit-insert-consistency-graphs)) |
| 3549 | (setq org-agenda-type (org-get-at-bol 'org-agenda-type)) | 3571 | (setq org-agenda-type (org-get-at-bol 'org-agenda-type)) |
| 3550 | (when (or org-agenda-tag-filter (get 'org-agenda-tag-filter :preset-filter)) | 3572 | (when (delq nil (mapcar (lambda (tp) (org-agenda-check-type nil tp)) |
| 3551 | (org-agenda-filter-apply org-agenda-tag-filter 'tag)) | 3573 | org-agenda-use-tag-inheritance)) |
| 3552 | (when (or org-agenda-category-filter (get 'org-agenda-category-filter :preset-filter)) | 3574 | (let (mrk) |
| 3553 | (org-agenda-filter-apply org-agenda-category-filter 'category)) | 3575 | (save-excursion |
| 3554 | (org-add-hook 'kill-buffer-hook 'org-agenda-reset-markers 'append 'local)))) | 3576 | (goto-char (point-min)) |
| 3577 | (while (equal (forward-line) 0) | ||
| 3578 | (when (setq mrk (or (get-text-property (point) 'org-hd-marker) | ||
| 3579 | (get-text-property (point) 'org-hd-marker))) | ||
| 3580 | (put-text-property (point-at-bol) (point-at-eol) | ||
| 3581 | 'tags (org-with-point-at mrk | ||
| 3582 | (delete-dups | ||
| 3583 | (mapcar 'downcase (org-get-tags-at)))))))))) | ||
| 3584 | (run-hooks 'org-agenda-finalize-hook) | ||
| 3585 | (when (or org-agenda-tag-filter (get 'org-agenda-tag-filter :preset-filter)) | ||
| 3586 | (org-agenda-filter-apply org-agenda-tag-filter 'tag)) | ||
| 3587 | (when (or org-agenda-category-filter (get 'org-agenda-category-filter :preset-filter)) | ||
| 3588 | (org-agenda-filter-apply org-agenda-category-filter 'category)) | ||
| 3589 | (org-add-hook 'kill-buffer-hook 'org-agenda-reset-markers 'append 'local))))) | ||
| 3555 | 3590 | ||
| 3556 | (defun org-agenda-mark-clocking-task () | 3591 | (defun org-agenda-mark-clocking-task () |
| 3557 | "Mark the current clock entry in the agenda if it is present." | 3592 | "Mark the current clock entry in the agenda if it is present." |
| @@ -3607,15 +3642,18 @@ generating a new one." | |||
| 3607 | ((equal p h) 'bold))) | 3642 | ((equal p h) 'bold))) |
| 3608 | (overlay-put ov 'org-type 'org-priority))))) | 3643 | (overlay-put ov 'org-type 'org-priority))))) |
| 3609 | 3644 | ||
| 3610 | (defun org-agenda-dim-blocked-tasks () | 3645 | (defun org-agenda-dim-blocked-tasks (&optional invisible) |
| 3646 | (interactive "P") | ||
| 3611 | "Dim currently blocked TODO's in the agenda display." | 3647 | "Dim currently blocked TODO's in the agenda display." |
| 3648 | (message "Dim or hide blocked tasks...") | ||
| 3612 | (mapc (lambda (o) (if (eq (overlay-get o 'org-type) 'org-blocked-todo) | 3649 | (mapc (lambda (o) (if (eq (overlay-get o 'org-type) 'org-blocked-todo) |
| 3613 | (delete-overlay o))) | 3650 | (delete-overlay o))) |
| 3614 | (overlays-in (point-min) (point-max))) | 3651 | (overlays-in (point-min) (point-max))) |
| 3615 | (save-excursion | 3652 | (save-excursion |
| 3616 | (let ((inhibit-read-only t) | 3653 | (let ((inhibit-read-only t) |
| 3617 | (org-depend-tag-blocked nil) | 3654 | (org-depend-tag-blocked nil) |
| 3618 | (invis (eq org-agenda-dim-blocked-tasks 'invisible)) | 3655 | (invis (or (not (null invisible)) |
| 3656 | (eq org-agenda-dim-blocked-tasks 'invisible))) | ||
| 3619 | org-blocked-by-checkboxes | 3657 | org-blocked-by-checkboxes |
| 3620 | invis1 b e p ov h l) | 3658 | invis1 b e p ov h l) |
| 3621 | (goto-char (point-min)) | 3659 | (goto-char (point-min)) |
| @@ -3636,7 +3674,8 @@ generating a new one." | |||
| 3636 | (if invis1 | 3674 | (if invis1 |
| 3637 | (overlay-put ov 'invisible t) | 3675 | (overlay-put ov 'invisible t) |
| 3638 | (overlay-put ov 'face 'org-agenda-dimmed-todo-face)) | 3676 | (overlay-put ov 'face 'org-agenda-dimmed-todo-face)) |
| 3639 | (overlay-put ov 'org-type 'org-blocked-todo))))))) | 3677 | (overlay-put ov 'org-type 'org-blocked-todo)))))) |
| 3678 | (message "Dim or hide blocked tasks...done")) | ||
| 3640 | 3679 | ||
| 3641 | (defvar org-agenda-skip-function nil | 3680 | (defvar org-agenda-skip-function nil |
| 3642 | "Function to be called at each match during agenda construction. | 3681 | "Function to be called at each match during agenda construction. |
| @@ -3656,7 +3695,7 @@ A good way to set it is through options in `org-agenda-custom-commands'.") | |||
| 3656 | Also moves point to the end of the skipped region, so that search can | 3695 | Also moves point to the end of the skipped region, so that search can |
| 3657 | continue from there." | 3696 | continue from there." |
| 3658 | (let ((p (point-at-bol)) to) | 3697 | (let ((p (point-at-bol)) to) |
| 3659 | (when (org-in-src-block-p) (throw :skip t)) | 3698 | (when (org-in-src-block-p t) (throw :skip t)) |
| 3660 | (and org-agenda-skip-archived-trees (not org-agenda-archives-mode) | 3699 | (and org-agenda-skip-archived-trees (not org-agenda-archives-mode) |
| 3661 | (get-text-property p :org-archived) | 3700 | (get-text-property p :org-archived) |
| 3662 | (org-end-of-subtree t) | 3701 | (org-end-of-subtree t) |
| @@ -4405,7 +4444,7 @@ in `org-agenda-text-search-extra-files'." | |||
| 4405 | (setq marker (org-agenda-new-marker (point)) | 4444 | (setq marker (org-agenda-new-marker (point)) |
| 4406 | category (org-get-category) | 4445 | category (org-get-category) |
| 4407 | category-pos (get-text-property (point) 'org-category-position) | 4446 | category-pos (get-text-property (point) 'org-category-position) |
| 4408 | tags (org-get-tags-at (point)) | 4447 | tags (org-get-tags-at nil t) |
| 4409 | txt (org-agenda-format-item | 4448 | txt (org-agenda-format-item |
| 4410 | "" | 4449 | "" |
| 4411 | (buffer-substring-no-properties | 4450 | (buffer-substring-no-properties |
| @@ -5229,7 +5268,7 @@ the documentation of `org-diary'." | |||
| 5229 | category-pos (get-text-property (point) 'org-category-position) | 5268 | category-pos (get-text-property (point) 'org-category-position) |
| 5230 | txt (org-trim | 5269 | txt (org-trim |
| 5231 | (buffer-substring (match-beginning 2) (match-end 0))) | 5270 | (buffer-substring (match-beginning 2) (match-end 0))) |
| 5232 | tags (org-get-tags-at (point)) | 5271 | tags (org-get-tags-at nil t) |
| 5233 | txt (org-agenda-format-item "" txt category tags t) | 5272 | txt (org-agenda-format-item "" txt category tags t) |
| 5234 | priority (1+ (org-get-priority txt)) | 5273 | priority (1+ (org-get-priority txt)) |
| 5235 | todo-state (org-get-todo-state)) | 5274 | todo-state (org-get-todo-state)) |
| @@ -5389,7 +5428,7 @@ Do we have a reason to ignore this TODO entry because it has a time stamp? | |||
| 5389 | clockp (and org-agenda-include-inactive-timestamps | 5428 | clockp (and org-agenda-include-inactive-timestamps |
| 5390 | (or (string-match org-clock-string tmp) | 5429 | (or (string-match org-clock-string tmp) |
| 5391 | (string-match "]-+\\'" tmp))) | 5430 | (string-match "]-+\\'" tmp))) |
| 5392 | warntime (org-entry-get (point) "APPT_WARNTIME") | 5431 | warntime (get-text-property (point) 'org-appt-warntime) |
| 5393 | donep (member todo-state org-done-keywords)) | 5432 | donep (member todo-state org-done-keywords)) |
| 5394 | (if (or scheduledp deadlinep closedp clockp | 5433 | (if (or scheduledp deadlinep closedp clockp |
| 5395 | (and donep org-agenda-skip-timestamp-if-done)) | 5434 | (and donep org-agenda-skip-timestamp-if-done)) |
| @@ -5408,7 +5447,7 @@ Do we have a reason to ignore this TODO entry because it has a time stamp? | |||
| 5408 | (assoc (point) deadline-position-alist)) | 5447 | (assoc (point) deadline-position-alist)) |
| 5409 | (throw :skip nil)) | 5448 | (throw :skip nil)) |
| 5410 | (setq hdmarker (org-agenda-new-marker) | 5449 | (setq hdmarker (org-agenda-new-marker) |
| 5411 | tags (org-get-tags-at)) | 5450 | tags (org-get-tags-at nil t)) |
| 5412 | (looking-at "\\*+[ \t]+\\([^\r\n]+\\)") | 5451 | (looking-at "\\*+[ \t]+\\([^\r\n]+\\)") |
| 5413 | (setq head (or (match-string 1) "")) | 5452 | (setq head (or (match-string 1) "")) |
| 5414 | (setq txt (org-agenda-format-item | 5453 | (setq txt (org-agenda-format-item |
| @@ -5458,10 +5497,9 @@ Do we have a reason to ignore this TODO entry because it has a time stamp? | |||
| 5458 | (setq marker (org-agenda-new-marker beg) | 5497 | (setq marker (org-agenda-new-marker beg) |
| 5459 | category (org-get-category beg) | 5498 | category (org-get-category beg) |
| 5460 | category-pos (get-text-property beg 'org-category-position) | 5499 | category-pos (get-text-property beg 'org-category-position) |
| 5461 | tags (save-excursion (org-backward-heading-same-level 0) | 5500 | tags (save-excursion (org-back-to-heading t) (org-get-tags-at nil t)) |
| 5462 | (org-get-tags-at)) | ||
| 5463 | todo-state (org-get-todo-state) | 5501 | todo-state (org-get-todo-state) |
| 5464 | warntime (org-entry-get (point) "APPT_WARNTIME") | 5502 | warntime (get-text-property (point) 'org-appt-warntime) |
| 5465 | extra nil) | 5503 | extra nil) |
| 5466 | 5504 | ||
| 5467 | (dolist (r (if (stringp result) | 5505 | (dolist (r (if (stringp result) |
| @@ -5510,7 +5548,6 @@ Do we have a reason to ignore this TODO entry because it has a time stamp? | |||
| 5510 | (org-no-warnings | 5548 | (org-no-warnings |
| 5511 | (let ((calendar-date-style 'european) (european-calendar-style t)) | 5549 | (let ((calendar-date-style 'european) (european-calendar-style t)) |
| 5512 | (diary-date day month year mark)))) | 5550 | (diary-date day month year mark)))) |
| 5513 | (defalias 'org-float 'diary-float) | ||
| 5514 | 5551 | ||
| 5515 | ;; Define the` org-class' function | 5552 | ;; Define the` org-class' function |
| 5516 | (defun org-class (y1 m1 d1 y2 m2 d2 dayname &rest skip-weeks) | 5553 | (defun org-class (y1 m1 d1 y2 m2 d2 dayname &rest skip-weeks) |
| @@ -5629,7 +5666,7 @@ please use `org-class' instead." | |||
| 5629 | (setq txt org-agenda-no-heading-message) | 5666 | (setq txt org-agenda-no-heading-message) |
| 5630 | (goto-char (match-beginning 0)) | 5667 | (goto-char (match-beginning 0)) |
| 5631 | (setq hdmarker (org-agenda-new-marker) | 5668 | (setq hdmarker (org-agenda-new-marker) |
| 5632 | tags (org-get-tags-at)) | 5669 | tags (org-get-tags-at nil t)) |
| 5633 | (looking-at "\\*+[ \t]+\\([^\r\n]+\\)") | 5670 | (looking-at "\\*+[ \t]+\\([^\r\n]+\\)") |
| 5634 | (setq txt (match-string 1)) | 5671 | (setq txt (match-string 1)) |
| 5635 | (when extra | 5672 | (when extra |
| @@ -5833,13 +5870,13 @@ See also the user option `org-agenda-clock-consistency-checks'." | |||
| 5833 | (not (= diff 0)))) | 5870 | (not (= diff 0)))) |
| 5834 | (setq txt nil) | 5871 | (setq txt nil) |
| 5835 | (setq category (org-get-category) | 5872 | (setq category (org-get-category) |
| 5836 | warntime (org-entry-get (point) "APPT_WARNTIME") | 5873 | warntime (get-text-property (point) 'org-appt-warntime) |
| 5837 | category-pos (get-text-property (point) 'org-category-position)) | 5874 | category-pos (get-text-property (point) 'org-category-position)) |
| 5838 | (if (not (re-search-backward "^\\*+[ \t]+" nil t)) | 5875 | (if (not (re-search-backward "^\\*+[ \t]+" nil t)) |
| 5839 | (setq txt org-agenda-no-heading-message) | 5876 | (setq txt org-agenda-no-heading-message) |
| 5840 | (goto-char (match-end 0)) | 5877 | (goto-char (match-end 0)) |
| 5841 | (setq pos1 (match-beginning 0)) | 5878 | (setq pos1 (match-beginning 0)) |
| 5842 | (setq tags (org-get-tags-at pos1)) | 5879 | (setq tags (org-get-tags-at pos1 t)) |
| 5843 | (setq head (buffer-substring-no-properties | 5880 | (setq head (buffer-substring-no-properties |
| 5844 | (point) | 5881 | (point) |
| 5845 | (progn (skip-chars-forward "^\r\n") | 5882 | (progn (skip-chars-forward "^\r\n") |
| @@ -5923,7 +5960,7 @@ FRACTION is what fraction of the head-warning time has passed." | |||
| 5923 | (match-string 1) d1 'past show-all | 5960 | (match-string 1) d1 'past show-all |
| 5924 | (current-buffer) pos) | 5961 | (current-buffer) pos) |
| 5925 | diff (- d2 d1) | 5962 | diff (- d2 d1) |
| 5926 | warntime (org-entry-get (point) "APPT_WARNTIME")) | 5963 | warntime (get-text-property (point) 'org-appt-warntime)) |
| 5927 | (setq pastschedp (and todayp (< diff 0))) | 5964 | (setq pastschedp (and todayp (< diff 0))) |
| 5928 | (setq did-habit-check-p nil) | 5965 | (setq did-habit-check-p nil) |
| 5929 | ;; When to show a scheduled item in the calendar: | 5966 | ;; When to show a scheduled item in the calendar: |
| @@ -5969,7 +6006,7 @@ FRACTION is what fraction of the head-warning time has passed." | |||
| 5969 | pastschedp)) | 6006 | pastschedp)) |
| 5970 | (setq mm (assoc pos1 deadline-position-alist))) | 6007 | (setq mm (assoc pos1 deadline-position-alist))) |
| 5971 | (throw :skip nil))) | 6008 | (throw :skip nil))) |
| 5972 | (setq tags (org-get-tags-at)) | 6009 | (setq tags (org-get-tags-at nil t)) |
| 5973 | (setq head (buffer-substring-no-properties | 6010 | (setq head (buffer-substring-no-properties |
| 5974 | (point) | 6011 | (point) |
| 5975 | (progn (skip-chars-forward "^\r\n") (point)))) | 6012 | (progn (skip-chars-forward "^\r\n") (point)))) |
| @@ -6051,7 +6088,7 @@ FRACTION is what fraction of the head-warning time has passed." | |||
| 6051 | (setq txt org-agenda-no-heading-message) | 6088 | (setq txt org-agenda-no-heading-message) |
| 6052 | (goto-char (match-beginning 0)) | 6089 | (goto-char (match-beginning 0)) |
| 6053 | (setq hdmarker (org-agenda-new-marker (point))) | 6090 | (setq hdmarker (org-agenda-new-marker (point))) |
| 6054 | (setq tags (org-get-tags-at)) | 6091 | (setq tags (org-get-tags-at nil t)) |
| 6055 | (looking-at "\\*+[ \t]+\\([^\r\n]+\\)") | 6092 | (looking-at "\\*+[ \t]+\\([^\r\n]+\\)") |
| 6056 | (setq head (match-string 1)) | 6093 | (setq head (match-string 1)) |
| 6057 | (let ((remove-re | 6094 | (let ((remove-re |
| @@ -6212,12 +6249,7 @@ Any match of REMOVE-RE will be removed from TXT." | |||
| 6212 | (match-string 2 txt)) | 6249 | (match-string 2 txt)) |
| 6213 | t t txt)))) | 6250 | t t txt)))) |
| 6214 | (when (derived-mode-p 'org-mode) | 6251 | (when (derived-mode-p 'org-mode) |
| 6215 | (setq effort | 6252 | (setq effort (ignore-errors (get-text-property 0 'org-effort txt))) |
| 6216 | (condition-case nil | ||
| 6217 | (org-get-effort | ||
| 6218 | (or (get-text-property 0 'org-hd-marker txt) | ||
| 6219 | (get-text-property 0 'org-marker txt))) | ||
| 6220 | (error nil))) | ||
| 6221 | (when effort | 6253 | (when effort |
| 6222 | (setq neffort (org-duration-string-to-minutes effort) | 6254 | (setq neffort (org-duration-string-to-minutes effort) |
| 6223 | effort (setq effort (concat "[" effort "]"))))) | 6255 | effort (setq effort (concat "[" effort "]"))))) |
| @@ -6735,7 +6767,8 @@ in the file. Otherwise, restriction will be to the current subtree." | |||
| 6735 | 6767 | ||
| 6736 | (defun org-agenda-check-type (error &rest types) | 6768 | (defun org-agenda-check-type (error &rest types) |
| 6737 | "Check if agenda buffer is of allowed type. | 6769 | "Check if agenda buffer is of allowed type. |
| 6738 | If ERROR is non-nil, throw an error, otherwise just return nil." | 6770 | If ERROR is non-nil, throw an error, otherwise just return nil. |
| 6771 | Allowed types are 'agenda 'timeline 'todo 'tags 'search." | ||
| 6739 | (if (not org-agenda-type) | 6772 | (if (not org-agenda-type) |
| 6740 | (error "No Org agenda currently displayed") | 6773 | (error "No Org agenda currently displayed") |
| 6741 | (if (memq org-agenda-type types) | 6774 | (if (memq org-agenda-type types) |
| @@ -7669,7 +7702,7 @@ When called with a prefix argument, include all archive files as well." | |||
| 7669 | ""))) | 7702 | ""))) |
| 7670 | (force-mode-line-update)) | 7703 | (force-mode-line-update)) |
| 7671 | 7704 | ||
| 7672 | (define-obsolete-function-alias | 7705 | (org-define-obsolete-function-alias |
| 7673 | 'org-agenda-post-command-hook 'org-agenda-update-agenda-type "24.3") | 7706 | 'org-agenda-post-command-hook 'org-agenda-update-agenda-type "24.3") |
| 7674 | 7707 | ||
| 7675 | (defun org-agenda-update-agenda-type () | 7708 | (defun org-agenda-update-agenda-type () |
| @@ -7890,29 +7923,45 @@ If this information is not given, the function uses the tree at point." | |||
| 7890 | (unless no-update (org-agenda-redo)))) | 7923 | (unless no-update (org-agenda-redo)))) |
| 7891 | 7924 | ||
| 7892 | (defun org-agenda-open-link (&optional arg) | 7925 | (defun org-agenda-open-link (&optional arg) |
| 7893 | "Follow the link in the current line, if any. | 7926 | "Open the link(s) in the current entry, if any. |
| 7894 | This looks for a link in the displayed line in the agenda. It also looks | 7927 | This looks for a link in the displayed line in the agenda. |
| 7895 | at the text of the entry itself." | 7928 | It also looks at the text of the entry itself." |
| 7896 | (interactive "P") | 7929 | (interactive "P") |
| 7897 | (let* ((marker (or (org-get-at-bol 'org-hd-marker) | 7930 | (let* ((marker (or (org-get-at-bol 'org-hd-marker) |
| 7898 | (org-get-at-bol 'org-marker))) | 7931 | (org-get-at-bol 'org-marker))) |
| 7899 | (buffer (and marker (marker-buffer marker))) | 7932 | (buffer (and marker (marker-buffer marker))) |
| 7900 | (prefix (buffer-substring | 7933 | (prefix (buffer-substring |
| 7901 | (point-at-bol) (point-at-eol)))) | 7934 | (point-at-bol) (point-at-eol))) |
| 7935 | (lkall (org-offer-links-in-entry buffer marker arg prefix)) | ||
| 7936 | (lk (car lkall)) | ||
| 7937 | (lkend (cdr lkall)) | ||
| 7938 | trg) | ||
| 7902 | (cond | 7939 | (cond |
| 7903 | (buffer | 7940 | ((and buffer (stringp lk)) |
| 7904 | (with-current-buffer buffer | 7941 | (with-current-buffer buffer |
| 7905 | (save-excursion | 7942 | (setq trg (and (string-match org-bracket-link-regexp lk) |
| 7906 | (save-restriction | 7943 | (match-string 1 lk))) |
| 7907 | (widen) | 7944 | (if (or (not trg) (string-match org-any-link-re trg)) |
| 7908 | (goto-char marker) | 7945 | (save-excursion |
| 7909 | (org-offer-links-in-entry arg prefix))))) | 7946 | (save-restriction |
| 7947 | (widen) | ||
| 7948 | (goto-char marker) | ||
| 7949 | (when (search-forward lk nil lkend) | ||
| 7950 | (goto-char (match-beginning 0)) | ||
| 7951 | (org-open-at-point)))) | ||
| 7952 | ;; This is an internal link, widen the buffer | ||
| 7953 | (switch-to-buffer-other-window buffer) | ||
| 7954 | (widen) | ||
| 7955 | (goto-char marker) | ||
| 7956 | (when (search-forward lk nil lkend) | ||
| 7957 | (goto-char (match-beginning 0)) | ||
| 7958 | (org-open-at-point))))) | ||
| 7910 | ((or (org-in-regexp (concat "\\(" org-bracket-link-regexp "\\)")) | 7959 | ((or (org-in-regexp (concat "\\(" org-bracket-link-regexp "\\)")) |
| 7911 | (save-excursion | 7960 | (save-excursion |
| 7912 | (beginning-of-line 1) | 7961 | (beginning-of-line 1) |
| 7913 | (looking-at (concat ".*?\\(" org-bracket-link-regexp "\\)")))) | 7962 | (looking-at (concat ".*?\\(" org-bracket-link-regexp "\\)")))) |
| 7914 | (org-open-link-from-string (match-string 1))) | 7963 | (org-open-link-from-string (match-string 1))) |
| 7915 | (t (error "No link to open here"))))) | 7964 | (t (message "No link to open here"))))) |
| 7916 | 7965 | ||
| 7917 | (defun org-agenda-copy-local-variable (var) | 7966 | (defun org-agenda-copy-local-variable (var) |
| 7918 | "Get a variable from a referenced buffer and install it here." | 7967 | "Get a variable from a referenced buffer and install it here." |
| @@ -8313,35 +8362,37 @@ If FORCE-TAGS is non nil, the car of it returns the new tags." | |||
| 8313 | (interactive) | 8362 | (interactive) |
| 8314 | (org-agenda-priority 'down)) | 8363 | (org-agenda-priority 'down)) |
| 8315 | 8364 | ||
| 8316 | (defun org-agenda-priority (&optional force-direction show) | 8365 | (defun org-agenda-priority (&optional force-direction) |
| 8317 | "Set the priority of line at point, also in Org-mode file. | 8366 | "Set the priority of line at point, also in Org-mode file. |
| 8318 | This changes the line at point, all other lines in the agenda referring to | 8367 | This changes the line at point, all other lines in the agenda referring to |
| 8319 | the same tree node, and the headline of the tree node in the Org-mode file." | 8368 | the same tree node, and the headline of the tree node in the Org-mode file. |
| 8369 | Called with a universal prefix arg, show the priority instead of setting it." | ||
| 8320 | (interactive "P") | 8370 | (interactive "P") |
| 8321 | (if (equal force-direction '(4)) (setq show t)) | 8371 | (if (equal force-direction '(4)) |
| 8322 | (unless org-enable-priority-commands | 8372 | (org-show-priority) |
| 8323 | (error "Priority commands are disabled")) | 8373 | (unless org-enable-priority-commands |
| 8324 | (org-agenda-check-no-diary) | 8374 | (error "Priority commands are disabled")) |
| 8325 | (let* ((marker (or (org-get-at-bol 'org-marker) | 8375 | (org-agenda-check-no-diary) |
| 8326 | (org-agenda-error))) | 8376 | (let* ((marker (or (org-get-at-bol 'org-marker) |
| 8327 | (hdmarker (org-get-at-bol 'org-hd-marker)) | 8377 | (org-agenda-error))) |
| 8328 | (buffer (marker-buffer hdmarker)) | 8378 | (hdmarker (org-get-at-bol 'org-hd-marker)) |
| 8329 | (pos (marker-position hdmarker)) | 8379 | (buffer (marker-buffer hdmarker)) |
| 8330 | (inhibit-read-only t) | 8380 | (pos (marker-position hdmarker)) |
| 8331 | newhead) | 8381 | (inhibit-read-only t) |
| 8332 | (org-with-remote-undo buffer | 8382 | newhead) |
| 8333 | (with-current-buffer buffer | 8383 | (org-with-remote-undo buffer |
| 8334 | (widen) | 8384 | (with-current-buffer buffer |
| 8335 | (goto-char pos) | 8385 | (widen) |
| 8336 | (org-show-context 'agenda) | 8386 | (goto-char pos) |
| 8337 | (save-excursion | 8387 | (org-show-context 'agenda) |
| 8338 | (and (outline-next-heading) | 8388 | (save-excursion |
| 8339 | (org-flag-heading nil))) ; show the next heading | 8389 | (and (outline-next-heading) |
| 8340 | (funcall 'org-priority force-direction show) | 8390 | (org-flag-heading nil))) ; show the next heading |
| 8341 | (end-of-line 1) | 8391 | (funcall 'org-priority force-direction) |
| 8342 | (setq newhead (org-get-heading))) | 8392 | (end-of-line 1) |
| 8343 | (org-agenda-change-all-lines newhead hdmarker) | 8393 | (setq newhead (org-get-heading))) |
| 8344 | (beginning-of-line 1)))) | 8394 | (org-agenda-change-all-lines newhead hdmarker) |
| 8395 | (beginning-of-line 1))))) | ||
| 8345 | 8396 | ||
| 8346 | ;; FIXME: should fix the tags property of the agenda line. | 8397 | ;; FIXME: should fix the tags property of the agenda line. |
| 8347 | (defun org-agenda-set-tags (&optional tag onoff) | 8398 | (defun org-agenda-set-tags (&optional tag onoff) |
diff --git a/lisp/org/org-ascii.el b/lisp/org/org-ascii.el index cf3f2d14d1d..c5a4b3775e8 100644 --- a/lisp/org/org-ascii.el +++ b/lisp/org/org-ascii.el | |||
| @@ -131,7 +131,7 @@ utf8 Use all UTF-8 characters") | |||
| 131 | "Call `org-export-as-ascii` with output to a temporary buffer. | 131 | "Call `org-export-as-ascii` with output to a temporary buffer. |
| 132 | No file is created. The prefix ARG is passed through to `org-export-as-ascii'." | 132 | No file is created. The prefix ARG is passed through to `org-export-as-ascii'." |
| 133 | (interactive "P") | 133 | (interactive "P") |
| 134 | (org-export-as-ascii arg nil nil "*Org ASCII Export*") | 134 | (org-export-as-ascii arg nil "*Org ASCII Export*") |
| 135 | (when org-export-show-temporary-export-buffer | 135 | (when org-export-show-temporary-export-buffer |
| 136 | (switch-to-buffer-other-window "*Org ASCII Export*"))) | 136 | (switch-to-buffer-other-window "*Org ASCII Export*"))) |
| 137 | 137 | ||
| @@ -183,23 +183,19 @@ in a window. A non-interactive call will only return the buffer." | |||
| 183 | (goto-char end) | 183 | (goto-char end) |
| 184 | (set-mark (point)) ;; to activate the region | 184 | (set-mark (point)) ;; to activate the region |
| 185 | (goto-char beg) | 185 | (goto-char beg) |
| 186 | (setq rtn (org-export-as-ascii | 186 | (setq rtn (org-export-as-ascii nil ext-plist buffer body-only)) |
| 187 | nil nil ext-plist | ||
| 188 | buffer body-only)) | ||
| 189 | (if (fboundp 'deactivate-mark) (deactivate-mark)) | 187 | (if (fboundp 'deactivate-mark) (deactivate-mark)) |
| 190 | (if (and (org-called-interactively-p 'any) (bufferp rtn)) | 188 | (if (and (org-called-interactively-p 'any) (bufferp rtn)) |
| 191 | (switch-to-buffer-other-window rtn) | 189 | (switch-to-buffer-other-window rtn) |
| 192 | rtn))) | 190 | rtn))) |
| 193 | 191 | ||
| 194 | ;;;###autoload | 192 | ;;;###autoload |
| 195 | (defun org-export-as-ascii (arg &optional hidden ext-plist | 193 | (defun org-export-as-ascii (arg &optional ext-plist to-buffer body-only pub-dir) |
| 196 | to-buffer body-only pub-dir) | ||
| 197 | "Export the outline as a pretty ASCII file. | 194 | "Export the outline as a pretty ASCII file. |
| 198 | If there is an active region, export only the region. | 195 | If there is an active region, export only the region. |
| 199 | The prefix ARG specifies how many levels of the outline should become | 196 | The prefix ARG specifies how many levels of the outline should become |
| 200 | underlined headlines, default is 3. Lower levels will become bulleted | 197 | underlined headlines, default is 3. Lower levels will become bulleted |
| 201 | lists. When HIDDEN is non-nil, don't display the ASCII buffer. | 198 | lists. EXT-PLIST is a property list with external parameters overriding |
| 202 | EXT-PLIST is a property list with external parameters overriding | ||
| 203 | org-mode's default settings, but still inferior to file-local | 199 | org-mode's default settings, but still inferior to file-local |
| 204 | settings. When TO-BUFFER is non-nil, create a buffer with that | 200 | settings. When TO-BUFFER is non-nil, create a buffer with that |
| 205 | name and export to that buffer. If TO-BUFFER is the symbol | 201 | name and export to that buffer. If TO-BUFFER is the symbol |
diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el index 366dced717c..c888536b385 100644 --- a/lisp/org/org-capture.el +++ b/lisp/org/org-capture.el | |||
| @@ -979,7 +979,7 @@ it. When it is a variable, retrieve the value. Return whatever we get." | |||
| 979 | (show-all) | 979 | (show-all) |
| 980 | (goto-char (org-capture-get :pos)) | 980 | (goto-char (org-capture-get :pos)) |
| 981 | (org-set-local 'org-capture-target-marker | 981 | (org-set-local 'org-capture-target-marker |
| 982 | (move-marker (make-marker) (point))) | 982 | (point-marker)) |
| 983 | (org-set-local 'outline-level 'org-outline-level) | 983 | (org-set-local 'outline-level 'org-outline-level) |
| 984 | (let* ((template (org-capture-get :template)) | 984 | (let* ((template (org-capture-get :template)) |
| 985 | (type (org-capture-get :type))) | 985 | (type (org-capture-get :type))) |
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 9ff0ff3e6de..32cfa9ae913 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | (declare-function calendar-absolute-from-iso "cal-iso" (&optional date)) | 35 | (declare-function calendar-absolute-from-iso "cal-iso" (&optional date)) |
| 36 | (declare-function notifications-notify "notifications" (&rest params)) | 36 | (declare-function notifications-notify "notifications" (&rest params)) |
| 37 | (declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label)) | 37 | (declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label)) |
| 38 | (declare-function org-refresh-properties "org" (dprop tprop)) | ||
| 38 | (defvar org-time-stamp-formats) | 39 | (defvar org-time-stamp-formats) |
| 39 | (defvar org-ts-what) | 40 | (defvar org-ts-what) |
| 40 | (defvar org-frame-title-format-backup frame-title-format) | 41 | (defvar org-frame-title-format-backup frame-title-format) |
| @@ -159,12 +160,15 @@ the clock can be resumed from that point." | |||
| 159 | The clock is resumed when Emacs restarts. | 160 | The clock is resumed when Emacs restarts. |
| 160 | When this is t, both the running clock, and the entire clock | 161 | When this is t, both the running clock, and the entire clock |
| 161 | history are saved. When this is the symbol `clock', only the | 162 | history are saved. When this is the symbol `clock', only the |
| 162 | running clock is saved. | 163 | running clock is saved. When this is the symbol `history', only |
| 164 | the clock history is saved. | ||
| 163 | 165 | ||
| 164 | When Emacs restarts with saved clock information, the file containing the | 166 | When Emacs restarts with saved clock information, the file containing |
| 165 | running clock as well as all files mentioned in the clock history will | 167 | the running clock as well as all files mentioned in the clock history |
| 166 | be visited. | 168 | will be visited. |
| 167 | All this depends on running `org-clock-persistence-insinuate' in .emacs" | 169 | |
| 170 | All this depends on running `org-clock-persistence-insinuate' in your | ||
| 171 | Emacs initialization file." | ||
| 168 | :group 'org-clock | 172 | :group 'org-clock |
| 169 | :type '(choice | 173 | :type '(choice |
| 170 | (const :tag "Just the running clock" clock) | 174 | (const :tag "Just the running clock" clock) |
| @@ -201,7 +205,7 @@ file name play this sound file. If not possible, fall back to beep" | |||
| 201 | (const :tag "Standard beep" t) | 205 | (const :tag "Standard beep" t) |
| 202 | (file :tag "Play sound file"))) | 206 | (file :tag "Play sound file"))) |
| 203 | 207 | ||
| 204 | (define-obsolete-variable-alias 'org-clock-modeline-total | 208 | (org-define-obsolete-variable-alias 'org-clock-modeline-total |
| 205 | 'org-clock-mode-line-total "24.3") | 209 | 'org-clock-mode-line-total "24.3") |
| 206 | 210 | ||
| 207 | (defcustom org-clock-mode-line-total 'auto | 211 | (defcustom org-clock-mode-line-total 'auto |
| @@ -1078,6 +1082,7 @@ time as the start time \(see `org-clock-continuously' to | |||
| 1078 | make this the default behavior.)" | 1082 | make this the default behavior.)" |
| 1079 | (interactive "P") | 1083 | (interactive "P") |
| 1080 | (setq org-clock-notification-was-shown nil) | 1084 | (setq org-clock-notification-was-shown nil) |
| 1085 | (org-refresh-properties org-effort-property 'org-effort) | ||
| 1081 | (catch 'abort | 1086 | (catch 'abort |
| 1082 | (let ((interrupting (and (not org-clock-resolving-clocks-due-to-idleness) | 1087 | (let ((interrupting (and (not org-clock-resolving-clocks-due-to-idleness) |
| 1083 | (org-clocking-p))) | 1088 | (org-clocking-p))) |
| @@ -1199,7 +1204,7 @@ make this the default behavior.)" | |||
| 1199 | (setq org-clock-start-time | 1204 | (setq org-clock-start-time |
| 1200 | (apply 'encode-time | 1205 | (apply 'encode-time |
| 1201 | (org-parse-time-string (match-string 1)))) | 1206 | (org-parse-time-string (match-string 1)))) |
| 1202 | (setq org-clock-effort (org-get-effort)) | 1207 | (setq org-clock-effort (get-text-property (point) 'org-effort)) |
| 1203 | (setq org-clock-total-time (org-clock-sum-current-item | 1208 | (setq org-clock-total-time (org-clock-sum-current-item |
| 1204 | (org-clock-get-sum-start)))) | 1209 | (org-clock-get-sum-start)))) |
| 1205 | ((eq org-clock-in-resume 'auto-restart) | 1210 | ((eq org-clock-in-resume 'auto-restart) |
| @@ -1219,7 +1224,7 @@ make this the default behavior.)" | |||
| 1219 | (beginning-of-line 1) | 1224 | (beginning-of-line 1) |
| 1220 | (org-indent-line-to (- (org-get-indentation) 2))) | 1225 | (org-indent-line-to (- (org-get-indentation) 2))) |
| 1221 | (insert org-clock-string " ") | 1226 | (insert org-clock-string " ") |
| 1222 | (setq org-clock-effort (org-get-effort)) | 1227 | (setq org-clock-effort (get-text-property (point) 'org-effort)) |
| 1223 | (setq org-clock-total-time (org-clock-sum-current-item | 1228 | (setq org-clock-total-time (org-clock-sum-current-item |
| 1224 | (org-clock-get-sum-start))) | 1229 | (org-clock-get-sum-start))) |
| 1225 | (setq org-clock-start-time | 1230 | (setq org-clock-start-time |
diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el index 30adf6a3f72..5a59196baa1 100644 --- a/lisp/org/org-colview.el +++ b/lisp/org/org-colview.el | |||
| @@ -1243,7 +1243,7 @@ PARAMS is a property list of parameters: | |||
| 1243 | :skip-empty-rows | 1243 | :skip-empty-rows |
| 1244 | When t, skip rows where all specifiers other than ITEM are empty. | 1244 | When t, skip rows where all specifiers other than ITEM are empty. |
| 1245 | :format When non-nil, specify the column view format to use." | 1245 | :format When non-nil, specify the column view format to use." |
| 1246 | (let ((pos (move-marker (make-marker) (point))) | 1246 | (let ((pos (point-marker)) |
| 1247 | (hlines (plist-get params :hlines)) | 1247 | (hlines (plist-get params :hlines)) |
| 1248 | (vlines (plist-get params :vlines)) | 1248 | (vlines (plist-get params :vlines)) |
| 1249 | (maxlevel (plist-get params :maxlevel)) | 1249 | (maxlevel (plist-get params :maxlevel)) |
diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index bc13fa2c737..687b81fd882 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el | |||
| @@ -169,6 +169,24 @@ If DELETE is non-nil, delete all those overlays." | |||
| 169 | (set-buffer-modified-p modified-p)) | 169 | (set-buffer-modified-p modified-p)) |
| 170 | (decompose-region beg end))) | 170 | (decompose-region beg end))) |
| 171 | 171 | ||
| 172 | (defmacro org-define-obsolete-function-alias (o-name c-name when &optional doc) | ||
| 173 | "Reconcile the two-argument form of | ||
| 174 | `define-obsolete-function-alias' in XEmacs/Emacs 22 with the 3-4 | ||
| 175 | argument form in Emacs 23 and later." | ||
| 176 | (if (or (featurep 'xemacs) | ||
| 177 | (< emacs-major-version 23)) | ||
| 178 | `(define-obsolete-function-alias ,o-name ,c-name) | ||
| 179 | `(define-obsolete-function-alias ,o-name ,c-name ,when ,doc))) | ||
| 180 | |||
| 181 | (defmacro org-define-obsolete-variable-alias (o-name c-name when &optional doc) | ||
| 182 | "Reconcile the two-argument form of | ||
| 183 | `define-obsolete-variable-alias' in XEmacs/Emacs 22 with the 3-4 | ||
| 184 | argument form in Emacs 23 and later." | ||
| 185 | (if (or (featurep 'xemacs) | ||
| 186 | (< emacs-major-version 23)) | ||
| 187 | `(define-obsolete-variable-alias ,o-name ,c-name) | ||
| 188 | `(define-obsolete-variable-alias ,o-name ,c-name ,when ,doc))) | ||
| 189 | |||
| 172 | ;; Miscellaneous functions | 190 | ;; Miscellaneous functions |
| 173 | 191 | ||
| 174 | (defun org-add-hook (hook function &optional append local) | 192 | (defun org-add-hook (hook function &optional append local) |
| @@ -195,9 +213,8 @@ passed through to `fit-window-to-buffer'. If SHRINK-ONLY is set, call | |||
| 195 | ignored in this case." | 213 | ignored in this case." |
| 196 | (cond ((if (fboundp 'window-full-width-p) | 214 | (cond ((if (fboundp 'window-full-width-p) |
| 197 | (not (window-full-width-p window)) | 215 | (not (window-full-width-p window)) |
| 198 | (> (frame-width) (window-width window))) | 216 | ;; do nothing if another window would suffer |
| 199 | ;; do nothing if another window would suffer | 217 | (> (frame-width) (window-width window)))) |
| 200 | ) | ||
| 201 | ((and (fboundp 'fit-window-to-buffer) (not shrink-only)) | 218 | ((and (fboundp 'fit-window-to-buffer) (not shrink-only)) |
| 202 | (fit-window-to-buffer window max-height min-height)) | 219 | (fit-window-to-buffer window max-height min-height)) |
| 203 | ((fboundp 'shrink-window-if-larger-than-buffer) | 220 | ((fboundp 'shrink-window-if-larger-than-buffer) |
| @@ -257,7 +274,6 @@ Works on both Emacs and XEmacs." | |||
| 257 | (when (boundp 'zmacs-regions) | 274 | (when (boundp 'zmacs-regions) |
| 258 | (setq zmacs-regions t))))) | 275 | (setq zmacs-regions t))))) |
| 259 | 276 | ||
| 260 | |||
| 261 | ;; Invisibility compatibility | 277 | ;; Invisibility compatibility |
| 262 | 278 | ||
| 263 | (defun org-remove-from-invisibility-spec (arg) | 279 | (defun org-remove-from-invisibility-spec (arg) |
| @@ -372,6 +388,20 @@ TIME defaults to the current time." | |||
| 372 | (time-to-seconds (or time (current-time))) | 388 | (time-to-seconds (or time (current-time))) |
| 373 | (float-time time))) | 389 | (float-time time))) |
| 374 | 390 | ||
| 391 | ;; `user-error' is only available from 24.2.50 on | ||
| 392 | (unless (fboundp 'user-error) | ||
| 393 | (defalias 'user-error 'error)) | ||
| 394 | |||
| 395 | (defmacro org-no-popups (&rest body) | ||
| 396 | "Suppress popup windows. | ||
| 397 | Let-bind some variables to nil around BODY to achieve the desired | ||
| 398 | effect, which variables to use depends on the Emacs version." | ||
| 399 | (if (org-version-check "24.2.50" "" :predicate) | ||
| 400 | `(let (pop-up-frames display-buffer-alist) | ||
| 401 | ,@body) | ||
| 402 | `(let (pop-up-frames special-display-buffer-names special-display-regexps special-display-function) | ||
| 403 | ,@body))) | ||
| 404 | |||
| 375 | (if (fboundp 'string-match-p) | 405 | (if (fboundp 'string-match-p) |
| 376 | (defalias 'org-string-match-p 'string-match-p) | 406 | (defalias 'org-string-match-p 'string-match-p) |
| 377 | (defun org-string-match-p (regexp string &optional start) | 407 | (defun org-string-match-p (regexp string &optional start) |
| @@ -384,7 +414,7 @@ TIME defaults to the current time." | |||
| 384 | (save-match-data | 414 | (save-match-data |
| 385 | (apply 'looking-at args)))) | 415 | (apply 'looking-at args)))) |
| 386 | 416 | ||
| 387 | ; XEmacs does not have `looking-back'. | 417 | ;; XEmacs does not have `looking-back'. |
| 388 | (if (fboundp 'looking-back) | 418 | (if (fboundp 'looking-back) |
| 389 | (defalias 'org-looking-back 'looking-back) | 419 | (defalias 'org-looking-back 'looking-back) |
| 390 | (defun org-looking-back (regexp &optional limit greedy) | 420 | (defun org-looking-back (regexp &optional limit greedy) |
| @@ -435,12 +465,34 @@ With two arguments, return floor and remainder of their quotient." | |||
| 435 | 465 | ||
| 436 | ;; `condition-case-unless-debug' has been introduced in Emacs 24.1 | 466 | ;; `condition-case-unless-debug' has been introduced in Emacs 24.1 |
| 437 | ;; `condition-case-no-debug' has been introduced in Emacs 23.1 | 467 | ;; `condition-case-no-debug' has been introduced in Emacs 23.1 |
| 438 | (defalias 'org-condition-case-unless-debug | 468 | (defmacro org-condition-case-unless-debug (var bodyform &rest handlers) |
| 469 | (declare (debug condition-case) (indent 2)) | ||
| 439 | (or (and (fboundp 'condition-case-unless-debug) | 470 | (or (and (fboundp 'condition-case-unless-debug) |
| 440 | 'condition-case-unless-debug) | 471 | `(condition-case-unless-debug ,var ,bodyform ,@handlers)) |
| 441 | (and (fboundp 'condition-case-no-debug) | 472 | (and (fboundp 'condition-case-no-debug) |
| 442 | 'condition-case-no-debug) | 473 | `(condition-case-no-debug ,var ,bodyform ,@handlers)) |
| 443 | 'condition-case)) | 474 | `(condition-case ,var ,bodyform ,@handlers))) |
| 475 | |||
| 476 | ;; RECURSIVE has been introduced with Emacs 23.2. | ||
| 477 | ;; This is copying and adapted from `tramp-compat-delete-directory' | ||
| 478 | (defun org-delete-directory (directory &optional recursive) | ||
| 479 | "Compatibility function for `delete-directory'." | ||
| 480 | (if (null recursive) | ||
| 481 | (delete-directory directory) | ||
| 482 | (condition-case nil | ||
| 483 | (funcall 'delete-directory directory recursive) | ||
| 484 | ;; This Emacs version does not support the RECURSIVE flag. We | ||
| 485 | ;; use the implementation from Emacs 23.2. | ||
| 486 | (wrong-number-of-arguments | ||
| 487 | (setq directory (directory-file-name (expand-file-name directory))) | ||
| 488 | (if (not (file-symlink-p directory)) | ||
| 489 | (mapc (lambda (file) | ||
| 490 | (if (eq t (car (file-attributes file))) | ||
| 491 | (org-delete-directory file recursive) | ||
| 492 | (delete-file file))) | ||
| 493 | (directory-files | ||
| 494 | directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*"))) | ||
| 495 | (delete-directory directory))))) | ||
| 444 | 496 | ||
| 445 | ;;;###autoload | 497 | ;;;###autoload |
| 446 | (defmacro org-check-version () | 498 | (defmacro org-check-version () |
diff --git a/lisp/org/org-crypt.el b/lisp/org/org-crypt.el index fdfd1d326da..2dfc4addcc2 100644 --- a/lisp/org/org-crypt.el +++ b/lisp/org/org-crypt.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; org-crypt.el --- Public key encryption for org-mode entries | 1 | ;;; org-crypt.el --- Public key encryption for org-mode entries |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2007-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Emacs Lisp Archive Entry | 5 | ;; Emacs Lisp Archive Entry |
| 6 | ;; Filename: org-crypt.el | 6 | ;; Filename: org-crypt.el |
| @@ -258,7 +258,7 @@ See `org-crypt-disable-auto-save'." | |||
| 258 | (save-excursion | 258 | (save-excursion |
| 259 | (org-back-to-heading t) | 259 | (org-back-to-heading t) |
| 260 | (search-forward "-----BEGIN PGP MESSAGE-----" | 260 | (search-forward "-----BEGIN PGP MESSAGE-----" |
| 261 | (save-excursion (org-end-of-subtree t)) t)))) | 261 | (save-excursion (outline-next-heading)) t)))) |
| 262 | 262 | ||
| 263 | (defun org-crypt-use-before-save-magic () | 263 | (defun org-crypt-use-before-save-magic () |
| 264 | "Add a hook to automatically encrypt entries before a file is saved to disk." | 264 | "Add a hook to automatically encrypt entries before a file is saved to disk." |
diff --git a/lisp/org/org-docbook.el b/lisp/org/org-docbook.el index ba03e3160b1..5253d9100a5 100644 --- a/lisp/org/org-docbook.el +++ b/lisp/org/org-docbook.el | |||
| @@ -274,14 +274,14 @@ For example: | |||
| 274 | $ emacs --batch | 274 | $ emacs --batch |
| 275 | --load=$HOME/lib/emacs/org.el | 275 | --load=$HOME/lib/emacs/org.el |
| 276 | --visit=MyOrgFile.org --funcall org-export-as-docbook-batch" | 276 | --visit=MyOrgFile.org --funcall org-export-as-docbook-batch" |
| 277 | (org-export-as-docbook 'hidden)) | 277 | (org-export-as-docbook)) |
| 278 | 278 | ||
| 279 | ;;;###autoload | 279 | ;;;###autoload |
| 280 | (defun org-export-as-docbook-to-buffer () | 280 | (defun org-export-as-docbook-to-buffer () |
| 281 | "Call `org-export-as-docbook' with output to a temporary buffer. | 281 | "Call `org-export-as-docbook' with output to a temporary buffer. |
| 282 | No file is created." | 282 | No file is created." |
| 283 | (interactive) | 283 | (interactive) |
| 284 | (org-export-as-docbook nil nil "*Org DocBook Export*") | 284 | (org-export-as-docbook nil "*Org DocBook Export*") |
| 285 | (when org-export-show-temporary-export-buffer | 285 | (when org-export-show-temporary-export-buffer |
| 286 | (switch-to-buffer-other-window "*Org DocBook Export*"))) | 286 | (switch-to-buffer-other-window "*Org DocBook Export*"))) |
| 287 | 287 | ||
| @@ -334,17 +334,14 @@ in a window. A non-interactive call will only return the buffer." | |||
| 334 | (goto-char end) | 334 | (goto-char end) |
| 335 | (set-mark (point)) ;; To activate the region | 335 | (set-mark (point)) ;; To activate the region |
| 336 | (goto-char beg) | 336 | (goto-char beg) |
| 337 | (setq rtn (org-export-as-docbook | 337 | (setq rtn (org-export-as-docbook nil buffer body-only)) |
| 338 | nil nil | ||
| 339 | buffer body-only)) | ||
| 340 | (if (fboundp 'deactivate-mark) (deactivate-mark)) | 338 | (if (fboundp 'deactivate-mark) (deactivate-mark)) |
| 341 | (if (and (org-called-interactively-p 'any) (bufferp rtn)) | 339 | (if (and (org-called-interactively-p 'any) (bufferp rtn)) |
| 342 | (switch-to-buffer-other-window rtn) | 340 | (switch-to-buffer-other-window rtn) |
| 343 | rtn))) | 341 | rtn))) |
| 344 | 342 | ||
| 345 | ;;;###autoload | 343 | ;;;###autoload |
| 346 | (defun org-export-as-docbook-pdf (&optional hidden ext-plist | 344 | (defun org-export-as-docbook-pdf (&optional ext-plist to-buffer body-only pub-dir) |
| 347 | to-buffer body-only pub-dir) | ||
| 348 | "Export as DocBook XML file, and generate PDF file." | 345 | "Export as DocBook XML file, and generate PDF file." |
| 349 | (interactive "P") | 346 | (interactive "P") |
| 350 | (if (or (not org-export-docbook-xslt-proc-command) | 347 | (if (or (not org-export-docbook-xslt-proc-command) |
| @@ -360,8 +357,7 @@ in a window. A non-interactive call will only return the buffer." | |||
| 360 | (org-combine-plists (org-default-export-plist) | 357 | (org-combine-plists (org-default-export-plist) |
| 361 | ext-plist | 358 | ext-plist |
| 362 | (org-infile-export-plist)))) | 359 | (org-infile-export-plist)))) |
| 363 | (docbook-buf (org-export-as-docbook hidden ext-plist | 360 | (docbook-buf (org-export-as-docbook ext-plist to-buffer body-only pub-dir)) |
| 364 | to-buffer body-only pub-dir)) | ||
| 365 | (filename (buffer-file-name docbook-buf)) | 361 | (filename (buffer-file-name docbook-buf)) |
| 366 | (base (file-name-sans-extension filename)) | 362 | (base (file-name-sans-extension filename)) |
| 367 | (fofile (concat base ".fo")) | 363 | (fofile (concat base ".fo")) |
| @@ -398,8 +394,7 @@ in a window. A non-interactive call will only return the buffer." | |||
| 398 | (defvar org-heading-keyword-regexp-format) ; defined in org.el | 394 | (defvar org-heading-keyword-regexp-format) ; defined in org.el |
| 399 | 395 | ||
| 400 | ;;;###autoload | 396 | ;;;###autoload |
| 401 | (defun org-export-as-docbook (&optional hidden ext-plist | 397 | (defun org-export-as-docbook (&optional ext-plist to-buffer body-only pub-dir) |
| 402 | to-buffer body-only pub-dir) | ||
| 403 | "Export the current buffer as a DocBook file. | 398 | "Export the current buffer as a DocBook file. |
| 404 | If there is an active region, export only the region. When | 399 | If there is an active region, export only the region. When |
| 405 | HIDDEN is obsolete and does nothing. EXT-PLIST is a | 400 | HIDDEN is obsolete and does nothing. EXT-PLIST is a |
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index 6b2a83de8bd..c8096aa3963 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el | |||
| @@ -3808,7 +3808,8 @@ Elements are accumulated into ACC." | |||
| 3808 | 'section)) | 3808 | 'section)) |
| 3809 | (plain-list 'item) | 3809 | (plain-list 'item) |
| 3810 | (table 'table-row)) | 3810 | (table 'table-row)) |
| 3811 | (org-element-property :structure element) | 3811 | (and (memq type '(item plain-list)) |
| 3812 | (org-element-property :structure element)) | ||
| 3812 | granularity visible-only element)) | 3813 | granularity visible-only element)) |
| 3813 | ;; ELEMENT has contents. Parse objects inside, if | 3814 | ;; ELEMENT has contents. Parse objects inside, if |
| 3814 | ;; GRANULARITY allows it. | 3815 | ;; GRANULARITY allows it. |
| @@ -4249,8 +4250,11 @@ first element of current section." | |||
| 4249 | (plain-list | 4250 | (plain-list |
| 4250 | (setq special-flag 'item | 4251 | (setq special-flag 'item |
| 4251 | struct (org-element-property :structure element))) | 4252 | struct (org-element-property :structure element))) |
| 4252 | (table (setq special-flag 'table-row)) | 4253 | (item (setq special-flag nil)) |
| 4253 | (otherwise (setq special-flag nil))) | 4254 | (property-drawer |
| 4255 | (setq special-flag 'node-property struct nil)) | ||
| 4256 | (table (setq special-flag 'table-row struct nil)) | ||
| 4257 | (otherwise (setq special-flag nil struct nil))) | ||
| 4254 | (setq end cend) | 4258 | (setq end cend) |
| 4255 | (goto-char cbeg))))))))))) | 4259 | (goto-char cbeg))))))))))) |
| 4256 | 4260 | ||
diff --git a/lisp/org/org-exp.el b/lisp/org/org-exp.el index 1cf4cb5e054..82b9003e4fd 100644 --- a/lisp/org/org-exp.el +++ b/lisp/org/org-exp.el | |||
| @@ -3047,12 +3047,11 @@ to the value of `temporary-file-directory'." | |||
| 3047 | (eval ;; convert to fmt -- mimicking `org-run-like-in-org-mode' | 3047 | (eval ;; convert to fmt -- mimicking `org-run-like-in-org-mode' |
| 3048 | (list 'let org-local-vars | 3048 | (list 'let org-local-vars |
| 3049 | (list (intern (format "org-export-as-%s" fmt)) | 3049 | (list (intern (format "org-export-as-%s" fmt)) |
| 3050 | nil nil nil ''string t)))) | 3050 | nil nil ''string t dir)))) |
| 3051 | (delete-file tmp-file)))) | 3051 | (delete-file tmp-file)))) |
| 3052 | 3052 | ||
| 3053 | ;;;###autoload | 3053 | ;;;###autoload |
| 3054 | (defun org-export-as-org (arg &optional hidden ext-plist | 3054 | (defun org-export-as-org (arg &optional ext-plist to-buffer body-only pub-dir) |
| 3055 | to-buffer body-only pub-dir) | ||
| 3056 | "Make a copy with not-exporting stuff removed. | 3055 | "Make a copy with not-exporting stuff removed. |
| 3057 | The purpose of this function is to provide a way to export the source | 3056 | The purpose of this function is to provide a way to export the source |
| 3058 | Org file of a webpage in Org format, but with sensitive and/or irrelevant | 3057 | Org file of a webpage in Org format, but with sensitive and/or irrelevant |
diff --git a/lisp/org/org-faces.el b/lisp/org/org-faces.el index 80e81349f6a..606db0814c2 100644 --- a/lisp/org/org-faces.el +++ b/lisp/org/org-faces.el | |||
| @@ -44,6 +44,9 @@ | |||
| 44 | (set-face-doc-string new-face docstring))))) | 44 | (set-face-doc-string new-face docstring))))) |
| 45 | (put 'org-copy-face 'lisp-indent-function 2) | 45 | (put 'org-copy-face 'lisp-indent-function 2) |
| 46 | 46 | ||
| 47 | (when (featurep 'xemacs) | ||
| 48 | (put 'mode-line 'face-alias 'modeline)) | ||
| 49 | |||
| 47 | (defgroup org-faces nil | 50 | (defgroup org-faces nil |
| 48 | "Faces in Org-mode." | 51 | "Faces in Org-mode." |
| 49 | :tag "Org Faces" | 52 | :tag "Org Faces" |
diff --git a/lisp/org/org-html.el b/lisp/org/org-html.el index 91df2ebcc4e..493d8a28afb 100644 --- a/lisp/org/org-html.el +++ b/lisp/org/org-html.el | |||
| @@ -328,7 +328,7 @@ You can also customize this for each buffer, using something like | |||
| 328 | * @licstart The following is the entire license notice for the | 328 | * @licstart The following is the entire license notice for the |
| 329 | * JavaScript code in %PATH. | 329 | * JavaScript code in %PATH. |
| 330 | * | 330 | * |
| 331 | * Copyright (C) 2012 MathJax | 331 | * Copyright (C) 2012-2013 MathJax |
| 332 | * | 332 | * |
| 333 | * Licensed under the Apache License, Version 2.0 (the \"License\"); | 333 | * Licensed under the Apache License, Version 2.0 (the \"License\"); |
| 334 | * you may not use this file except in compliance with the License. | 334 | * you may not use this file except in compliance with the License. |
| @@ -793,7 +793,7 @@ If there is an active region, export only the region. | |||
| 793 | The prefix ARG specifies how many levels of the outline should become | 793 | The prefix ARG specifies how many levels of the outline should become |
| 794 | headlines. The default is 3. Lower levels will become bulleted lists." | 794 | headlines. The default is 3. Lower levels will become bulleted lists." |
| 795 | (interactive "P") | 795 | (interactive "P") |
| 796 | (org-export-as-html arg 'hidden) | 796 | (org-export-as-html arg) |
| 797 | (org-open-file buffer-file-name) | 797 | (org-open-file buffer-file-name) |
| 798 | (when org-export-kill-product-buffer-when-displayed | 798 | (when org-export-kill-product-buffer-when-displayed |
| 799 | (kill-buffer (current-buffer)))) | 799 | (kill-buffer (current-buffer)))) |
| @@ -806,14 +806,14 @@ emacs --batch | |||
| 806 | --load=$HOME/lib/emacs/org.el | 806 | --load=$HOME/lib/emacs/org.el |
| 807 | --eval \"(setq org-export-headline-levels 2)\" | 807 | --eval \"(setq org-export-headline-levels 2)\" |
| 808 | --visit=MyFile --funcall org-export-as-html-batch" | 808 | --visit=MyFile --funcall org-export-as-html-batch" |
| 809 | (org-export-as-html org-export-headline-levels 'hidden)) | 809 | (org-export-as-html org-export-headline-levels)) |
| 810 | 810 | ||
| 811 | ;;;###autoload | 811 | ;;;###autoload |
| 812 | (defun org-export-as-html-to-buffer (arg) | 812 | (defun org-export-as-html-to-buffer (arg) |
| 813 | "Call `org-export-as-html` with output to a temporary buffer. | 813 | "Call `org-export-as-html` with output to a temporary buffer. |
| 814 | No file is created. The prefix ARG is passed through to `org-export-as-html'." | 814 | No file is created. The prefix ARG is passed through to `org-export-as-html'." |
| 815 | (interactive "P") | 815 | (interactive "P") |
| 816 | (org-export-as-html arg nil nil "*Org HTML Export*") | 816 | (org-export-as-html arg nil "*Org HTML Export*") |
| 817 | (when org-export-show-temporary-export-buffer | 817 | (when org-export-show-temporary-export-buffer |
| 818 | (switch-to-buffer-other-window "*Org HTML Export*"))) | 818 | (switch-to-buffer-other-window "*Org HTML Export*"))) |
| 819 | 819 | ||
| @@ -865,9 +865,7 @@ in a window. A non-interactive call will only return the buffer." | |||
| 865 | (goto-char end) | 865 | (goto-char end) |
| 866 | (set-mark (point)) ;; to activate the region | 866 | (set-mark (point)) ;; to activate the region |
| 867 | (goto-char beg) | 867 | (goto-char beg) |
| 868 | (setq rtn (org-export-as-html | 868 | (setq rtn (org-export-as-html nil ext-plist buffer body-only)) |
| 869 | nil nil ext-plist | ||
| 870 | buffer body-only)) | ||
| 871 | (if (fboundp 'deactivate-mark) (deactivate-mark)) | 869 | (if (fboundp 'deactivate-mark) (deactivate-mark)) |
| 872 | (if (and (org-called-interactively-p 'any) (bufferp rtn)) | 870 | (if (and (org-called-interactively-p 'any) (bufferp rtn)) |
| 873 | (switch-to-buffer-other-window rtn) | 871 | (switch-to-buffer-other-window rtn) |
| @@ -1171,14 +1169,12 @@ OPT-PLIST is the export options list." | |||
| 1171 | (defvar org-heading-keyword-regexp-format) ; defined in org.el | 1169 | (defvar org-heading-keyword-regexp-format) ; defined in org.el |
| 1172 | 1170 | ||
| 1173 | ;;;###autoload | 1171 | ;;;###autoload |
| 1174 | (defun org-export-as-html (arg &optional hidden ext-plist | 1172 | (defun org-export-as-html (arg &optional ext-plist to-buffer body-only pub-dir) |
| 1175 | to-buffer body-only pub-dir) | ||
| 1176 | "Export the outline as a pretty HTML file. | 1173 | "Export the outline as a pretty HTML file. |
| 1177 | If there is an active region, export only the region. The prefix | 1174 | If there is an active region, export only the region. The prefix |
| 1178 | ARG specifies how many levels of the outline should become | 1175 | ARG specifies how many levels of the outline should become |
| 1179 | headlines. The default is 3. Lower levels will become bulleted | 1176 | headlines. The default is 3. Lower levels will become bulleted |
| 1180 | lists. HIDDEN is obsolete and does nothing. | 1177 | lists. EXT-PLIST is a property list with external parameters overriding |
| 1181 | EXT-PLIST is a property list with external parameters overriding | ||
| 1182 | org-mode's default settings, but still inferior to file-local | 1178 | org-mode's default settings, but still inferior to file-local |
| 1183 | settings. When TO-BUFFER is non-nil, create a buffer with that | 1179 | settings. When TO-BUFFER is non-nil, create a buffer with that |
| 1184 | name and export to that buffer. If TO-BUFFER is the symbol | 1180 | name and export to that buffer. If TO-BUFFER is the symbol |
diff --git a/lisp/org/org-icalendar.el b/lisp/org/org-icalendar.el index f13f46d68b9..12cd0584fa0 100644 --- a/lisp/org/org-icalendar.el +++ b/lisp/org/org-icalendar.el | |||
| @@ -327,6 +327,7 @@ When COMBINE is non nil, add the category to each line." | |||
| 327 | tmp pri categories location summary desc uid alarm alarm-time | 327 | tmp pri categories location summary desc uid alarm alarm-time |
| 328 | (sexp-buffer (get-buffer-create "*ical-tmp*"))) | 328 | (sexp-buffer (get-buffer-create "*ical-tmp*"))) |
| 329 | (org-refresh-category-properties) | 329 | (org-refresh-category-properties) |
| 330 | (org-refresh-properties "APPT_WARNTIME" 'org-appt-warntime) | ||
| 330 | (save-excursion | 331 | (save-excursion |
| 331 | (goto-char (point-min)) | 332 | (goto-char (point-min)) |
| 332 | (while (re-search-forward re1 nil t) | 333 | (while (re-search-forward re1 nil t) |
| @@ -357,7 +358,7 @@ When COMBINE is non nil, add the category to each line." | |||
| 357 | (org-id-get-create) | 358 | (org-id-get-create) |
| 358 | (or (org-id-get) (org-id-new))) | 359 | (or (org-id-get) (org-id-new))) |
| 359 | categories (org-export-get-categories) | 360 | categories (org-export-get-categories) |
| 360 | alarm-time (org-entry-get nil "APPT_WARNTIME") | 361 | alarm-time (get-text-property (point) 'org-appt-warntime) |
| 361 | alarm-time (if alarm-time (string-to-number alarm-time) 0) | 362 | alarm-time (if alarm-time (string-to-number alarm-time) 0) |
| 362 | alarm "" | 363 | alarm "" |
| 363 | deadlinep nil scheduledp nil) | 364 | deadlinep nil scheduledp nil) |
| @@ -676,7 +677,7 @@ a time), or the day by one (if it does not contain a time)." | |||
| 676 | (setq fmt (if have-time | 677 | (setq fmt (if have-time |
| 677 | (replace-regexp-in-string "%Z" | 678 | (replace-regexp-in-string "%Z" |
| 678 | org-icalendar-timezone | 679 | org-icalendar-timezone |
| 679 | org-icalendar-date-time-format) | 680 | org-icalendar-date-time-format t) |
| 680 | ";VALUE=DATE:%Y%m%d")) | 681 | ";VALUE=DATE:%Y%m%d")) |
| 681 | (concat keyword (format-time-string fmt time | 682 | (concat keyword (format-time-string fmt time |
| 682 | (and (org-icalendar-use-UTC-date-timep) | 683 | (and (org-icalendar-use-UTC-date-timep) |
diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el index 6e865b50c2c..5d8e5b0dcf9 100644 --- a/lisp/org/org-id.el +++ b/lisp/org/org-id.el | |||
| @@ -83,7 +83,7 @@ | |||
| 83 | :tag "Org ID" | 83 | :tag "Org ID" |
| 84 | :group 'org) | 84 | :group 'org) |
| 85 | 85 | ||
| 86 | (define-obsolete-variable-alias | 86 | (org-define-obsolete-variable-alias |
| 87 | 'org-link-to-org-use-id 'org-id-link-to-org-use-id "24.3") | 87 | 'org-link-to-org-use-id 'org-id-link-to-org-use-id "24.3") |
| 88 | (defcustom org-id-link-to-org-use-id nil | 88 | (defcustom org-id-link-to-org-use-id nil |
| 89 | "Non-nil means storing a link to an Org file will use entry IDs. | 89 | "Non-nil means storing a link to an Org file will use entry IDs. |
diff --git a/lisp/org/org-inlinetask.el b/lisp/org/org-inlinetask.el index 3748d392b38..43913acacde 100644 --- a/lisp/org/org-inlinetask.el +++ b/lisp/org/org-inlinetask.el | |||
| @@ -75,6 +75,9 @@ | |||
| 75 | ;; Also, if you want to use refiling and archiving for inline tasks, | 75 | ;; Also, if you want to use refiling and archiving for inline tasks, |
| 76 | ;; The END line must be present to make things work properly. | 76 | ;; The END line must be present to make things work properly. |
| 77 | ;; | 77 | ;; |
| 78 | ;; Note that you should not try to use inline tasks within plain list, | ||
| 79 | ;; visibility cycling is known to be problematic when doing so. | ||
| 80 | ;; | ||
| 78 | ;; This package installs one new command: | 81 | ;; This package installs one new command: |
| 79 | ;; | 82 | ;; |
| 80 | ;; C-c C-x t Insert a new inline task with END line | 83 | ;; C-c C-x t Insert a new inline task with END line |
diff --git a/lisp/org/org-install.el b/lisp/org/org-install.el index a31d8b79209..aca019fb823 100644 --- a/lisp/org/org-install.el +++ b/lisp/org/org-install.el | |||
| @@ -1,8 +1,10 @@ | |||
| 1 | ;;; org-install.el --- autogenerated file, do not edit | 1 | ;;; org-install.el --- backward compatibility file for obsolete configuration |
| 2 | ;; | 2 | ;; |
| 3 | ;;; Code: | 3 | ;;; Code: |
| 4 | (warn "The file org-install is obsolete. | 4 | (warn "The file org-install is obsolete. |
| 5 | Please change your configuration to (require 'org) instead.") | 5 | It is provided here so that (require 'org-install) does not |
| 6 | trigger an error for users with obsolete Emacs configuration. | ||
| 7 | You can safely remove (require 'org-install) from your config.") | ||
| 6 | 8 | ||
| 7 | (provide 'org-install) | 9 | (provide 'org-install) |
| 8 | 10 | ||
diff --git a/lisp/org/org-jsinfo.el b/lisp/org/org-jsinfo.el index 9a4046fff8b..08c01108b98 100644 --- a/lisp/org/org-jsinfo.el +++ b/lisp/org/org-jsinfo.el | |||
| @@ -112,7 +112,7 @@ means to use the maximum value consistent with other options." | |||
| 112 | * @licstart The following is the entire license notice for the | 112 | * @licstart The following is the entire license notice for the |
| 113 | * JavaScript code in %SCRIPT_PATH. | 113 | * JavaScript code in %SCRIPT_PATH. |
| 114 | * | 114 | * |
| 115 | * Copyright (C) 2012 Sebastian Rose | 115 | * Copyright (C) 2012-2013 Sebastian Rose |
| 116 | * | 116 | * |
| 117 | * | 117 | * |
| 118 | * The JavaScript code in this tag is free software: you can | 118 | * The JavaScript code in this tag is free software: you can |
diff --git a/lisp/org/org-latex.el b/lisp/org/org-latex.el index 490a49d06e0..609bcbee103 100644 --- a/lisp/org/org-latex.el +++ b/lisp/org/org-latex.el | |||
| @@ -872,7 +872,7 @@ no LaTeX header. | |||
| 872 | 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, |
| 873 | simply return the content of \\begin{document}...\\end{document}, | 873 | simply return the content of \\begin{document}...\\end{document}, |
| 874 | without even the \\begin{document} and \\end{document} commands. | 874 | without even the \\begin{document} and \\end{document} commands. |
| 875 | when PUB-DIR is set, use this as the publishing directory." | 875 | When PUB-DIR is set, use this as the publishing directory." |
| 876 | (interactive "P") | 876 | (interactive "P") |
| 877 | (when (and (not body-only) arg (listp arg)) (setq body-only t)) | 877 | (when (and (not body-only) arg (listp arg)) (setq body-only t)) |
| 878 | (run-hooks 'org-export-first-hook) | 878 | (run-hooks 'org-export-first-hook) |
diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el index d80e1717ce0..78cb2a621c7 100644 --- a/lisp/org/org-list.el +++ b/lisp/org/org-list.el | |||
| @@ -144,15 +144,15 @@ item. When the cursor is on an outline heading, plain lists are | |||
| 144 | treated as text. This is the most stable way of handling this, | 144 | treated as text. This is the most stable way of handling this, |
| 145 | which is why it is the default. | 145 | which is why it is the default. |
| 146 | 146 | ||
| 147 | When this is the symbol `integrate', then during cycling, plain | 147 | When this is the symbol `integrate', then integrate plain list |
| 148 | list items will *temporarily* be interpreted as outline headlines | 148 | items when cycling, as if they were children of outline headings. |
| 149 | with a level given by 1000+i where i is the indentation of the | 149 | |
| 150 | bullet. This setting can lead to strange effects when switching | 150 | This setting can lead to strange effects when switching visibility |
| 151 | visibility to `children', because the first \"child\" in a | 151 | to `children', because the first \"child\" in a subtree decides |
| 152 | subtree decides what children should be listed. If that first | 152 | what children should be listed. If that first \"child\" is a |
| 153 | \"child\" is a plain list item with an implied large level | 153 | plain list item with an implied large level number, all true |
| 154 | number, all true children and grand children of the outline | 154 | children and grand children of the outline heading will be |
| 155 | heading will be exposed in a children' view." | 155 | exposed in a children' view." |
| 156 | :group 'org-plain-lists | 156 | :group 'org-plain-lists |
| 157 | :type '(choice | 157 | :type '(choice |
| 158 | (const :tag "Never" nil) | 158 | (const :tag "Never" nil) |
diff --git a/lisp/org/org-lparse.el b/lisp/org/org-lparse.el index 11711353ff7..e9fbbea586e 100644 --- a/lisp/org/org-lparse.el +++ b/lisp/org/org-lparse.el | |||
| @@ -1718,7 +1718,7 @@ information." | |||
| 1718 | (org-lparse-end-paragraph) | 1718 | (org-lparse-end-paragraph) |
| 1719 | (org-lparse-end-list-item (or type "u"))) | 1719 | (org-lparse-end-list-item (or type "u"))) |
| 1720 | 1720 | ||
| 1721 | (define-obsolete-function-alias | 1721 | (org-define-obsolete-function-alias |
| 1722 | 'org-lparse-preprocess-after-blockquote-hook | 1722 | 'org-lparse-preprocess-after-blockquote-hook |
| 1723 | 'org-lparse-preprocess-after-blockquote | 1723 | 'org-lparse-preprocess-after-blockquote |
| 1724 | "24.3") | 1724 | "24.3") |
| @@ -1736,7 +1736,7 @@ information." | |||
| 1736 | (format "ORG-%s-END %s" (upcase (match-string 2)) | 1736 | (format "ORG-%s-END %s" (upcase (match-string 2)) |
| 1737 | (match-string 3))) t t)))) | 1737 | (match-string 3))) t t)))) |
| 1738 | 1738 | ||
| 1739 | (define-obsolete-function-alias | 1739 | (org-define-obsolete-function-alias |
| 1740 | 'org-lparse-strip-experimental-blocks-maybe-hook | 1740 | 'org-lparse-strip-experimental-blocks-maybe-hook |
| 1741 | 'org-lparse-strip-experimental-blocks-maybe | 1741 | 'org-lparse-strip-experimental-blocks-maybe |
| 1742 | "24.3") | 1742 | "24.3") |
diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index 04e26708d69..a44bdbe30fd 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el | |||
| @@ -126,6 +126,15 @@ Also, do not record undo information." | |||
| 126 | (org-move-to-column ,col))))) | 126 | (org-move-to-column ,col))))) |
| 127 | (def-edebug-spec org-preserve-lc (body)) | 127 | (def-edebug-spec org-preserve-lc (body)) |
| 128 | 128 | ||
| 129 | ;; Copied from bookmark.el | ||
| 130 | (defmacro org-with-buffer-modified-unmodified (&rest body) | ||
| 131 | "Run BODY while preserving the buffer's `buffer-modified-p' state." | ||
| 132 | (org-with-gensyms (was-modified) | ||
| 133 | `(let ((,was-modified (buffer-modified-p))) | ||
| 134 | (unwind-protect | ||
| 135 | (progn ,@body) | ||
| 136 | (set-buffer-modified-p ,was-modified))))) | ||
| 137 | |||
| 129 | (defmacro org-without-partial-completion (&rest body) | 138 | (defmacro org-without-partial-completion (&rest body) |
| 130 | `(if (and (boundp 'partial-completion-mode) | 139 | `(if (and (boundp 'partial-completion-mode) |
| 131 | partial-completion-mode | 140 | partial-completion-mode |
diff --git a/lisp/org/org-mobile.el b/lisp/org/org-mobile.el index 3f41d45f511..d2e7c217f76 100644 --- a/lisp/org/org-mobile.el +++ b/lisp/org/org-mobile.el | |||
| @@ -304,12 +304,13 @@ Also exclude files matching `org-mobile-files-exclude-regexp'." | |||
| 304 | 304 | ||
| 305 | ;;;###autoload | 305 | ;;;###autoload |
| 306 | (defun org-mobile-push () | 306 | (defun org-mobile-push () |
| 307 | "Push the current state of Org affairs to the WebDAV directory. | 307 | "Push the current state of Org affairs to the target directory. |
| 308 | This will create the index file, copy all agenda files there, and also | 308 | This will create the index file, copy all agenda files there, and also |
| 309 | create all custom agenda views, for upload to the mobile phone." | 309 | create all custom agenda views, for upload to the mobile phone." |
| 310 | (interactive) | 310 | (interactive) |
| 311 | (let ((a-buffer (get-buffer org-agenda-buffer-name))) | 311 | (let ((a-buffer (get-buffer org-agenda-buffer-name))) |
| 312 | (let ((org-agenda-buffer-name "*SUMO*") | 312 | (let ((org-agenda-curbuf-name org-agenda-buffer-name) |
| 313 | (org-agenda-buffer-name "*SUMO*") | ||
| 313 | (org-agenda-tag-filter org-agenda-tag-filter) | 314 | (org-agenda-tag-filter org-agenda-tag-filter) |
| 314 | (org-agenda-redo-command org-agenda-redo-command)) | 315 | (org-agenda-redo-command org-agenda-redo-command)) |
| 315 | (save-excursion | 316 | (save-excursion |
| @@ -329,15 +330,17 @@ create all custom agenda views, for upload to the mobile phone." | |||
| 329 | (org-mobile-create-index-file) | 330 | (org-mobile-create-index-file) |
| 330 | (message "Writing checksums...") | 331 | (message "Writing checksums...") |
| 331 | (org-mobile-write-checksums) | 332 | (org-mobile-write-checksums) |
| 332 | (run-hooks 'org-mobile-post-push-hook)))) | 333 | (run-hooks 'org-mobile-post-push-hook))) |
| 334 | (setq org-agenda-buffer-name org-agenda-curbuf-name | ||
| 335 | org-agenda-this-buffer-name org-agenda-curbuf-name)) | ||
| 333 | (redraw-display) | 336 | (redraw-display) |
| 334 | (when (and a-buffer (buffer-live-p a-buffer)) | 337 | (when (buffer-live-p a-buffer) |
| 335 | (if (not (get-buffer-window a-buffer)) | 338 | (if (not (get-buffer-window a-buffer)) |
| 336 | (kill-buffer a-buffer) | 339 | (kill-buffer a-buffer) |
| 337 | (let ((cw (selected-window))) | 340 | (let ((cw (selected-window))) |
| 338 | (select-window (get-buffer-window a-buffer)) | 341 | (select-window (get-buffer-window a-buffer)) |
| 339 | (org-agenda-redo) | 342 | (org-agenda-redo) |
| 340 | (select-window cw))))) | 343 | (select-window cw))))) |
| 341 | (message "Files for mobile viewer staged")) | 344 | (message "Files for mobile viewer staged")) |
| 342 | 345 | ||
| 343 | (defvar org-mobile-before-process-capture-hook nil | 346 | (defvar org-mobile-before-process-capture-hook nil |
| @@ -417,7 +420,8 @@ agenda view showing the flagged items." | |||
| 417 | (target-file (expand-file-name org-mobile-index-file | 420 | (target-file (expand-file-name org-mobile-index-file |
| 418 | org-mobile-directory)) | 421 | org-mobile-directory)) |
| 419 | file link-name todo-kwds done-kwds tags drawers entry kwds dwds twds) | 422 | file link-name todo-kwds done-kwds tags drawers entry kwds dwds twds) |
| 420 | 423 | (when (stringp (car def-todo)) | |
| 424 | (setq def-todo (list (cons 'sequence def-todo)))) | ||
| 421 | (org-agenda-prepare-buffers (mapcar 'car files-alist)) | 425 | (org-agenda-prepare-buffers (mapcar 'car files-alist)) |
| 422 | (setq done-kwds (org-uniquify org-done-keywords-for-agenda)) | 426 | (setq done-kwds (org-uniquify org-done-keywords-for-agenda)) |
| 423 | (setq todo-kwds (org-delete-all | 427 | (setq todo-kwds (org-delete-all |
| @@ -536,7 +540,7 @@ The table of checksums is written to the file mobile-checksums." | |||
| 536 | (t (cons (car x) (cons "" (cdr x)))))) | 540 | (t (cons (car x) (cons "" (cdr x)))))) |
| 537 | org-agenda-custom-commands))) | 541 | org-agenda-custom-commands))) |
| 538 | (default-list '(("a" "Agenda" agenda) ("t" "All TODO" alltodo))) | 542 | (default-list '(("a" "Agenda" agenda) ("t" "All TODO" alltodo))) |
| 539 | thelist new e key desc type match settings cmds gkey gdesc gsettings cnt) | 543 | thelist atitle new e key desc type match settings cmds gkey gdesc gsettings cnt) |
| 540 | (cond | 544 | (cond |
| 541 | ((eq org-mobile-agendas 'custom) | 545 | ((eq org-mobile-agendas 'custom) |
| 542 | (setq thelist custom-list)) | 546 | (setq thelist custom-list)) |
| @@ -588,12 +592,13 @@ The table of checksums is written to the file mobile-checksums." | |||
| 588 | (setq cnt 0) | 592 | (setq cnt 0) |
| 589 | (while (setq e (pop cmds)) | 593 | (while (setq e (pop cmds)) |
| 590 | (setq type (car e) match (nth 1 e) settings (nth 2 e)) | 594 | (setq type (car e) match (nth 1 e) settings (nth 2 e)) |
| 595 | (setq atitle (if (string= "" gdesc) match gdesc)) | ||
| 591 | (setq settings (append gsettings settings)) | 596 | (setq settings (append gsettings settings)) |
| 592 | (setq settings | 597 | (setq settings |
| 593 | (cons (list 'org-agenda-title-append | 598 | (cons (list 'org-agenda-title-append |
| 594 | (concat "<after>KEYS=" gkey "#" (number-to-string | 599 | (concat "<after>KEYS=" gkey "#" (number-to-string |
| 595 | (setq cnt (1+ cnt))) | 600 | (setq cnt (1+ cnt))) |
| 596 | " TITLE: " gdesc " " match "</after>")) | 601 | " TITLE: " atitle "</after>")) |
| 597 | settings)) | 602 | settings)) |
| 598 | (push (list type match settings) new))))) | 603 | (push (list type match settings) new))))) |
| 599 | (and new (list "X" "SUMO" (reverse new) | 604 | (and new (list "X" "SUMO" (reverse new) |
| @@ -983,7 +988,7 @@ is currently a noop.") | |||
| 983 | (goto-char (point-max)) | 988 | (goto-char (point-max)) |
| 984 | (newline) | 989 | (newline) |
| 985 | (goto-char (point-max)) | 990 | (goto-char (point-max)) |
| 986 | (move-marker (make-marker) (point))))) | 991 | (point-marker)))) |
| 987 | (let ((file (match-string 1 link)) | 992 | (let ((file (match-string 1 link)) |
| 988 | (path (match-string 2 link))) | 993 | (path (match-string 2 link))) |
| 989 | (setq file (org-link-unescape file)) | 994 | (setq file (org-link-unescape file)) |
diff --git a/lisp/org/org-odt.el b/lisp/org/org-odt.el index 028554f5821..b5f6e21c0c2 100644 --- a/lisp/org/org-odt.el +++ b/lisp/org/org-odt.el | |||
| @@ -439,14 +439,14 @@ values. See Info node `(emacs) File Variables'." | |||
| 439 | "meta.xml" "styles.xml"))) | 439 | "meta.xml" "styles.xml"))) |
| 440 | ;; kill all xml buffers | 440 | ;; kill all xml buffers |
| 441 | (mapc (lambda (file) | 441 | (mapc (lambda (file) |
| 442 | (let ((buf (find-file-noselect | 442 | (with-current-buffer |
| 443 | (expand-file-name file org-odt-zip-dir) t))) | 443 | (find-file-noselect |
| 444 | (when (buffer-name buf) | 444 | (expand-file-name file org-odt-zip-dir) t) |
| 445 | (set-buffer-modified-p nil) | 445 | (set-buffer-modified-p nil) |
| 446 | (kill-buffer buf)))) | 446 | (kill-buffer))) |
| 447 | xml-files)) | 447 | xml-files)) |
| 448 | ;; delete temporary directory. | 448 | ;; delete temporary directory. |
| 449 | (delete-directory org-odt-zip-dir t))))) | 449 | (org-delete-directory org-odt-zip-dir t))))) |
| 450 | (org-condition-case-unless-debug err | 450 | (org-condition-case-unless-debug err |
| 451 | (prog1 (progn ,@body) | 451 | (prog1 (progn ,@body) |
| 452 | (funcall --cleanup-xml-buffers)) | 452 | (funcall --cleanup-xml-buffers)) |
| @@ -474,7 +474,7 @@ emacs --batch | |||
| 474 | --load=$HOME/lib/emacs/org.el | 474 | --load=$HOME/lib/emacs/org.el |
| 475 | --eval \"(setq org-export-headline-levels 2)\" | 475 | --eval \"(setq org-export-headline-levels 2)\" |
| 476 | --visit=MyFile --funcall org-export-as-odt-batch" | 476 | --visit=MyFile --funcall org-export-as-odt-batch" |
| 477 | (org-lparse-batch "odt")) | 477 | (org-odt-cleanup-xml-buffers (org-lparse-batch "odt"))) |
| 478 | 478 | ||
| 479 | ;;; org-export-as-odt | 479 | ;;; org-export-as-odt |
| 480 | ;;;###autoload | 480 | ;;;###autoload |
| @@ -1727,6 +1727,7 @@ ATTR is a string of other attributes of the a element." | |||
| 1727 | ((and (string= type "") | 1727 | ((and (string= type "") |
| 1728 | (or (not thefile) (string= thefile "")) | 1728 | (or (not thefile) (string= thefile "")) |
| 1729 | (plist-get org-lparse-opt-plist :section-numbers) | 1729 | (plist-get org-lparse-opt-plist :section-numbers) |
| 1730 | (get-text-property 0 'org-no-description fragment) | ||
| 1730 | (setq sec-frag fragment) | 1731 | (setq sec-frag fragment) |
| 1731 | (or (string-match "\\`sec\\(\\(-[0-9]+\\)+\\)" sec-frag) | 1732 | (or (string-match "\\`sec\\(\\(-[0-9]+\\)+\\)" sec-frag) |
| 1732 | (and (setq sec-frag | 1733 | (and (setq sec-frag |
| @@ -1756,7 +1757,11 @@ ATTR is a string of other attributes of the a element." | |||
| 1756 | (when (not (member type '("" "file"))) | 1757 | (when (not (member type '("" "file"))) |
| 1757 | (setq thefile (concat type ":" thefile))) | 1758 | (setq thefile (concat type ":" thefile))) |
| 1758 | 1759 | ||
| 1759 | (let ((org-odt-suppress-xref nil)) | 1760 | (let ((org-odt-suppress-xref |
| 1761 | ;; Typeset link to headlines with description, as a | ||
| 1762 | ;; regular hyperlink. | ||
| 1763 | (and (string= type "") | ||
| 1764 | (not (get-text-property 0 'org-no-description fragment))))) | ||
| 1760 | (org-odt-format-link | 1765 | (org-odt-format-link |
| 1761 | (org-xml-format-desc desc) thefile attr))))))) | 1766 | (org-xml-format-desc desc) thefile attr))))))) |
| 1762 | 1767 | ||
diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el index 18c6d6d70a4..fd84e62c003 100644 --- a/lisp/org/org-protocol.el +++ b/lisp/org/org-protocol.el | |||
| @@ -128,15 +128,15 @@ | |||
| 128 | (filename &optional up)) | 128 | (filename &optional up)) |
| 129 | (declare-function server-edit "server" (&optional arg)) | 129 | (declare-function server-edit "server" (&optional arg)) |
| 130 | 130 | ||
| 131 | (define-obsolete-function-alias | 131 | (org-define-obsolete-function-alias |
| 132 | 'org-protocol-unhex-compound 'org-link-unescape-compound | 132 | 'org-protocol-unhex-compound 'org-link-unescape-compound |
| 133 | "2011-02-17") | 133 | "2011-02-17") |
| 134 | 134 | ||
| 135 | (define-obsolete-function-alias | 135 | (org-define-obsolete-function-alias |
| 136 | 'org-protocol-unhex-string 'org-link-unescape | 136 | 'org-protocol-unhex-string 'org-link-unescape |
| 137 | "2011-02-17") | 137 | "2011-02-17") |
| 138 | 138 | ||
| 139 | (define-obsolete-function-alias | 139 | (org-define-obsolete-function-alias |
| 140 | 'org-protocol-unhex-single-byte-sequence | 140 | 'org-protocol-unhex-single-byte-sequence |
| 141 | 'org-link-unescape-single-byte-sequence | 141 | 'org-link-unescape-single-byte-sequence |
| 142 | "2011-02-17") | 142 | "2011-02-17") |
diff --git a/lisp/org/org-publish.el b/lisp/org/org-publish.el index 1388df47d97..20c6a6860aa 100644 --- a/lisp/org/org-publish.el +++ b/lisp/org/org-publish.el | |||
| @@ -577,7 +577,7 @@ PUB-DIR is the publishing directory." | |||
| 577 | (setq export-buf-or-file | 577 | (setq export-buf-or-file |
| 578 | (funcall (intern (concat "org-export-as-" format)) | 578 | (funcall (intern (concat "org-export-as-" format)) |
| 579 | (plist-get plist :headline-levels) | 579 | (plist-get plist :headline-levels) |
| 580 | nil plist nil | 580 | plist nil |
| 581 | (plist-get plist :body-only) | 581 | (plist-get plist :body-only) |
| 582 | pub-dir)) | 582 | pub-dir)) |
| 583 | (when (and (bufferp export-buf-or-file) | 583 | (when (and (bufferp export-buf-or-file) |
diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index 6dbf6d67fc5..501d30ab1d7 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el | |||
| @@ -39,6 +39,8 @@ | |||
| 39 | 39 | ||
| 40 | (declare-function org-do-remove-indentation "org" (&optional n)) | 40 | (declare-function org-do-remove-indentation "org" (&optional n)) |
| 41 | (declare-function org-at-table.el-p "org" ()) | 41 | (declare-function org-at-table.el-p "org" ()) |
| 42 | (declare-function org-in-src-block-p "org" (&optional inside)) | ||
| 43 | (declare-function org-in-block-p "org" (names)) | ||
| 42 | (declare-function org-get-indentation "org" (&optional line)) | 44 | (declare-function org-get-indentation "org" (&optional line)) |
| 43 | (declare-function org-switch-to-buffer-other-window "org" (&rest args)) | 45 | (declare-function org-switch-to-buffer-other-window "org" (&rest args)) |
| 44 | (declare-function org-pop-to-buffer-same-window | 46 | (declare-function org-pop-to-buffer-same-window |
| @@ -201,41 +203,40 @@ There is a mode hook, and keybindings for `org-edit-src-exit' and | |||
| 201 | `org-edit-src-save'") | 203 | `org-edit-src-save'") |
| 202 | 204 | ||
| 203 | (defun org-edit-src-code (&optional context code edit-buffer-name) | 205 | (defun org-edit-src-code (&optional context code edit-buffer-name) |
| 204 | "Edit the source CODE example at point. | 206 | "Edit the source CODE block at point. |
| 205 | The example is copied to a separate buffer, and that buffer is | 207 | The code is copied to a separate buffer and the appropriate mode |
| 206 | switched to the correct language mode. When done, exit with | 208 | is turned on. When done, exit with \\[org-edit-src-exit]. This will |
| 207 | \\[org-edit-src-exit]. This will remove the original code in the | 209 | remove the original code in the Org buffer, and replace it with the |
| 208 | Org buffer, and replace it with the edited version. An optional | 210 | edited version. An optional argument CONTEXT is used by \\[org-edit-src-save] |
| 209 | argument CONTEXT is used by \\[org-edit-src-save] when calling | 211 | when calling this function. See `org-src-window-setup' to configure |
| 210 | this function. See `org-src-window-setup' to configure the | 212 | the display of windows containing the Org buffer and the code buffer." |
| 211 | display of windows containing the Org buffer and the code | ||
| 212 | buffer." | ||
| 213 | (interactive) | 213 | (interactive) |
| 214 | (unless (eq context 'save) | 214 | (if (not (or (org-in-block-p '("src" "example" "latex" "html")) |
| 215 | (setq org-edit-src-saved-temp-window-config (current-window-configuration))) | 215 | (org-at-table.el-p))) |
| 216 | (let* ((mark (and (org-region-active-p) (mark))) | 216 | (user-error "Not in a source code or example block") |
| 217 | (case-fold-search t) | 217 | (unless (eq context 'save) |
| 218 | (info | 218 | (setq org-edit-src-saved-temp-window-config (current-window-configuration))) |
| 219 | ;; If the src region consists in no lines, we insert a blank | 219 | (let* ((mark (and (org-region-active-p) (mark))) |
| 220 | ;; line. | 220 | (case-fold-search t) |
| 221 | (let* ((temp (org-edit-src-find-region-and-lang)) | 221 | (info |
| 222 | (beg (nth 0 temp)) | 222 | ;; If the src region consists in no lines, we insert a blank |
| 223 | (end (nth 1 temp))) | 223 | ;; line. |
| 224 | (if (>= end beg) temp | 224 | (let* ((temp (org-edit-src-find-region-and-lang)) |
| 225 | (goto-char beg) | 225 | (beg (nth 0 temp)) |
| 226 | (insert "\n") | 226 | (end (nth 1 temp))) |
| 227 | (org-edit-src-find-region-and-lang)))) | 227 | (if (>= end beg) temp |
| 228 | (full-info (org-babel-get-src-block-info 'light)) | 228 | (goto-char beg) |
| 229 | (org-mode-p (derived-mode-p 'org-mode)) ;; derived-mode-p is reflexive | 229 | (insert "\n") |
| 230 | (beg (make-marker)) | 230 | (org-edit-src-find-region-and-lang)))) |
| 231 | ;; Move marker with inserted text for case when src block is | 231 | (full-info (org-babel-get-src-block-info 'light)) |
| 232 | ;; just one empty line, i.e. beg == end. | 232 | (org-mode-p (derived-mode-p 'org-mode)) ;; derived-mode-p is reflexive |
| 233 | (end (copy-marker nil t)) | 233 | (beg (make-marker)) |
| 234 | (allow-write-back-p (null code)) | 234 | ;; Move marker with inserted text for case when src block is |
| 235 | block-nindent total-nindent ovl lang lang-f single lfmt buffer msg | 235 | ;; just one empty line, i.e. beg == end. |
| 236 | begline markline markcol line col transmitted-variables) | 236 | (end (copy-marker (make-marker) t)) |
| 237 | (if (not info) | 237 | (allow-write-back-p (null code)) |
| 238 | nil | 238 | block-nindent total-nindent ovl lang lang-f single lfmt buffer msg |
| 239 | begline markline markcol line col transmitted-variables) | ||
| 239 | (setq beg (move-marker beg (nth 0 info)) | 240 | (setq beg (move-marker beg (nth 0 info)) |
| 240 | end (move-marker end (nth 1 info)) | 241 | end (move-marker end (nth 1 info)) |
| 241 | msg (if allow-write-back-p | 242 | msg (if allow-write-back-p |
| @@ -244,7 +245,7 @@ buffer." | |||
| 244 | "Exit with C-c ' (C-c and single quote)") | 245 | "Exit with C-c ' (C-c and single quote)") |
| 245 | code (or code (buffer-substring-no-properties beg end)) | 246 | code (or code (buffer-substring-no-properties beg end)) |
| 246 | lang (or (cdr (assoc (nth 2 info) org-src-lang-modes)) | 247 | lang (or (cdr (assoc (nth 2 info) org-src-lang-modes)) |
| 247 | (nth 2 info)) | 248 | (nth 2 info)) |
| 248 | lang (if (symbolp lang) (symbol-name lang) lang) | 249 | lang (if (symbolp lang) (symbol-name lang) lang) |
| 249 | single (nth 3 info) | 250 | single (nth 3 info) |
| 250 | block-nindent (nth 5 info) | 251 | block-nindent (nth 5 info) |
| @@ -527,6 +528,14 @@ the language, a switch telling if the content should be in a single line." | |||
| 527 | (pos (point)) | 528 | (pos (point)) |
| 528 | re1 re2 single beg end lang lfmt match-re1 ind entry) | 529 | re1 re2 single beg end lang lfmt match-re1 ind entry) |
| 529 | (catch 'exit | 530 | (catch 'exit |
| 531 | (when (org-at-table.el-p) | ||
| 532 | (re-search-backward "^[\t]*[^ \t|\\+]" nil t) | ||
| 533 | (setq beg (1+ (point-at-eol))) | ||
| 534 | (goto-char beg) | ||
| 535 | (or (re-search-forward "^[\t]*[^ \t|\\+]" nil t) | ||
| 536 | (progn (goto-char (point-max)) (newline))) | ||
| 537 | (setq end (1- (point-at-bol))) | ||
| 538 | (throw 'exit (list beg end 'table.el nil nil 0))) | ||
| 530 | (while (setq entry (pop re-list)) | 539 | (while (setq entry (pop re-list)) |
| 531 | (setq re1 (car entry) re2 (nth 1 entry) lang (nth 2 entry) | 540 | (setq re1 (car entry) re2 (nth 1 entry) lang (nth 2 entry) |
| 532 | single (nth 3 entry)) | 541 | single (nth 3 entry)) |
| @@ -557,16 +566,7 @@ the language, a switch telling if the content should be in a single line." | |||
| 557 | (throw 'exit | 566 | (throw 'exit |
| 558 | (list (match-end 0) end | 567 | (list (match-end 0) end |
| 559 | (org-edit-src-get-lang lang) | 568 | (org-edit-src-get-lang lang) |
| 560 | single lfmt ind))))))))) | 569 | single lfmt ind)))))))))))) |
| 561 | (when (org-at-table.el-p) | ||
| 562 | (re-search-backward "^[\t]*[^ \t|\\+]" nil t) | ||
| 563 | (setq beg (1+ (point-at-eol))) | ||
| 564 | (goto-char beg) | ||
| 565 | (or (re-search-forward "^[\t]*[^ \t|\\+]" nil t) | ||
| 566 | (progn (goto-char (point-max)) (newline))) | ||
| 567 | (setq end (point-at-bol)) | ||
| 568 | (setq ind (org-edit-src-get-indentation beg)) | ||
| 569 | (throw 'exit (list beg end 'table.el nil nil ind)))))) | ||
| 570 | 570 | ||
| 571 | (defun org-edit-src-get-lang (lang) | 571 | (defun org-edit-src-get-lang (lang) |
| 572 | "Extract the src language." | 572 | "Extract the src language." |
| @@ -633,7 +633,8 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"." | |||
| 633 | (unless (org-bound-and-true-p org-edit-src-from-org-mode) | 633 | (unless (org-bound-and-true-p org-edit-src-from-org-mode) |
| 634 | (error "This is not a sub-editing buffer, something is wrong")) | 634 | (error "This is not a sub-editing buffer, something is wrong")) |
| 635 | (widen) | 635 | (widen) |
| 636 | (let* ((beg org-edit-src-beg-marker) | 636 | (let* ((fixed-width-p (string-match "Fixed Width" (buffer-name))) |
| 637 | (beg org-edit-src-beg-marker) | ||
| 637 | (end org-edit-src-end-marker) | 638 | (end org-edit-src-end-marker) |
| 638 | (ovl org-edit-src-overlay) | 639 | (ovl org-edit-src-overlay) |
| 639 | (bufstr (buffer-string)) | 640 | (bufstr (buffer-string)) |
| @@ -670,7 +671,8 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"." | |||
| 670 | (goto-char (point-max)) (insert "\\n"))) | 671 | (goto-char (point-max)) (insert "\\n"))) |
| 671 | (goto-char (point-min)) | 672 | (goto-char (point-min)) |
| 672 | (if (looking-at "\\s-*") (replace-match " "))) | 673 | (if (looking-at "\\s-*") (replace-match " "))) |
| 673 | (when (org-bound-and-true-p org-edit-src-from-org-mode) | 674 | (when (and (org-bound-and-true-p org-edit-src-from-org-mode) |
| 675 | (not fixed-width-p)) | ||
| 674 | (org-escape-code-in-region (point-min) (point-max)) | 676 | (org-escape-code-in-region (point-min) (point-max)) |
| 675 | (setq delta (+ delta | 677 | (setq delta (+ delta |
| 676 | (save-excursion | 678 | (save-excursion |
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index b024770ce78..00b2eb4d028 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el | |||
| @@ -509,10 +509,10 @@ nil When nil, the command tries to be smart and figure out the | |||
| 509 | re) | 509 | re) |
| 510 | (goto-char beg) | 510 | (goto-char beg) |
| 511 | (beginning-of-line 1) | 511 | (beginning-of-line 1) |
| 512 | (setq beg (move-marker (make-marker) (point))) | 512 | (setq beg (point-marker)) |
| 513 | (goto-char end) | 513 | (goto-char end) |
| 514 | (if (bolp) (backward-char 1) (end-of-line 1)) | 514 | (if (bolp) (backward-char 1) (end-of-line 1)) |
| 515 | (setq end (move-marker (make-marker) (point))) | 515 | (setq end (point-marker)) |
| 516 | ;; Get the right field separator | 516 | ;; Get the right field separator |
| 517 | (unless separator | 517 | (unless separator |
| 518 | (goto-char beg) | 518 | (goto-char beg) |
| @@ -1895,7 +1895,7 @@ it can be edited in place." | |||
| 1895 | (if (and (boundp 'font-lock-mode) font-lock-mode) | 1895 | (if (and (boundp 'font-lock-mode) font-lock-mode) |
| 1896 | (font-lock-fontify-block)))) | 1896 | (font-lock-fontify-block)))) |
| 1897 | (t | 1897 | (t |
| 1898 | (let ((pos (move-marker (make-marker) (point))) | 1898 | (let ((pos (point-marker)) |
| 1899 | (coord | 1899 | (coord |
| 1900 | (if (eq org-table-use-standard-references t) | 1900 | (if (eq org-table-use-standard-references t) |
| 1901 | (concat (org-number-to-letters (org-table-current-column)) | 1901 | (concat (org-number-to-letters (org-table-current-column)) |
| @@ -3219,7 +3219,7 @@ Parameters get priority." | |||
| 3219 | (let ((key (org-table-current-field-formula 'key 'noerror)) | 3219 | (let ((key (org-table-current-field-formula 'key 'noerror)) |
| 3220 | (eql (sort (org-table-get-stored-formulas 'noerror) | 3220 | (eql (sort (org-table-get-stored-formulas 'noerror) |
| 3221 | 'org-table-formula-less-p)) | 3221 | 'org-table-formula-less-p)) |
| 3222 | (pos (move-marker (make-marker) (point))) | 3222 | (pos (point-marker)) |
| 3223 | (startline 1) | 3223 | (startline 1) |
| 3224 | (wc (current-window-configuration)) | 3224 | (wc (current-window-configuration)) |
| 3225 | (sel-win (selected-window)) | 3225 | (sel-win (selected-window)) |
| @@ -3580,7 +3580,7 @@ With prefix ARG, apply the new formulas to the table." | |||
| 3580 | (beginning-of-line 1) | 3580 | (beginning-of-line 1) |
| 3581 | (insert ind)) | 3581 | (insert ind)) |
| 3582 | (goto-char (point-max)) | 3582 | (goto-char (point-max)) |
| 3583 | (backward-delete-char 1))) | 3583 | (org-delete-backward-char 1))) |
| 3584 | (goto-char beg)) | 3584 | (goto-char beg)) |
| 3585 | (t nil)))) | 3585 | (t nil)))) |
| 3586 | 3586 | ||
| @@ -4235,7 +4235,7 @@ overwritten, and the table is not marked as requiring realignment." | |||
| 4235 | (looking-at "[^|\n]* +|")) | 4235 | (looking-at "[^|\n]* +|")) |
| 4236 | (let (org-table-may-need-update) | 4236 | (let (org-table-may-need-update) |
| 4237 | (goto-char (1- (match-end 0))) | 4237 | (goto-char (1- (match-end 0))) |
| 4238 | (backward-delete-char 1) | 4238 | (org-delete-backward-char 1) |
| 4239 | (goto-char (match-beginning 0)) | 4239 | (goto-char (match-beginning 0)) |
| 4240 | (self-insert-command N)) | 4240 | (self-insert-command N)) |
| 4241 | (setq org-table-may-need-update t) | 4241 | (setq org-table-may-need-update t) |
diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el index de434885b12..f638e57ad94 100644 --- a/lisp/org/org-version.el +++ b/lisp/org/org-version.el | |||
| @@ -5,13 +5,13 @@ | |||
| 5 | (defun org-release () | 5 | (defun org-release () |
| 6 | "The release version of org-mode. | 6 | "The release version of org-mode. |
| 7 | Inserted by installing org-mode or when a release is made." | 7 | Inserted by installing org-mode or when a release is made." |
| 8 | (let ((org-release "7.9.2+")) | 8 | (let ((org-release "7.9.3+")) |
| 9 | org-release)) | 9 | org-release)) |
| 10 | ;;;###autoload | 10 | ;;;###autoload |
| 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 (commit 488eea)")) | 14 | (let ((org-git-version "7.9.3+-GNU-Emacs-24-3 (commit 4cac75153)")) |
| 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 d4120b4224e..32ed13fc1a3 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -1219,7 +1219,15 @@ See also the QUOTE keyword." | |||
| 1219 | :type 'boolean) | 1219 | :type 'boolean) |
| 1220 | 1220 | ||
| 1221 | (defcustom org-goto-auto-isearch t | 1221 | (defcustom org-goto-auto-isearch t |
| 1222 | "Non-nil means typing characters in `org-goto' starts incremental search." | 1222 | "Non-nil means typing characters in `org-goto' starts incremental search. |
| 1223 | When nil, you can use these keybindings to navigate the buffer: | ||
| 1224 | |||
| 1225 | q Quit the org-goto interface | ||
| 1226 | n Go to the next visible heading | ||
| 1227 | p Go to the previous visible heading | ||
| 1228 | f Go one heading forward on same level | ||
| 1229 | b Go one heading backward on same level | ||
| 1230 | u Go one heading up" | ||
| 1223 | :group 'org-edit-structure | 1231 | :group 'org-edit-structure |
| 1224 | :type 'boolean) | 1232 | :type 'boolean) |
| 1225 | 1233 | ||
| @@ -2236,8 +2244,9 @@ Lisp variable `org-state'." | |||
| 2236 | (defvar org-blocker-hook nil | 2244 | (defvar org-blocker-hook nil |
| 2237 | "Hook for functions that are allowed to block a state change. | 2245 | "Hook for functions that are allowed to block a state change. |
| 2238 | 2246 | ||
| 2239 | Each function gets as its single argument a property list, see | 2247 | Functions in this hook should not modify the buffer. |
| 2240 | `org-trigger-hook' for more information about this list. | 2248 | Each function gets as its single argument a property list, |
| 2249 | see `org-trigger-hook' for more information about this list. | ||
| 2241 | 2250 | ||
| 2242 | If any of the functions in this hook returns nil, the state change | 2251 | If any of the functions in this hook returns nil, the state change |
| 2243 | is blocked.") | 2252 | is blocked.") |
| @@ -2245,8 +2254,8 @@ is blocked.") | |||
| 2245 | (defvar org-trigger-hook nil | 2254 | (defvar org-trigger-hook nil |
| 2246 | "Hook for functions that are triggered by a state change. | 2255 | "Hook for functions that are triggered by a state change. |
| 2247 | 2256 | ||
| 2248 | Each function gets as its single argument a property list with at least | 2257 | Each function gets as its single argument a property list with at |
| 2249 | the following elements: | 2258 | least the following elements: |
| 2250 | 2259 | ||
| 2251 | (:type type-of-change :position pos-at-entry-start | 2260 | (:type type-of-change :position pos-at-entry-start |
| 2252 | :from old-state :to new-state) | 2261 | :from old-state :to new-state) |
| @@ -2979,7 +2988,7 @@ When nil, only the tags directly given in a specific line apply there. | |||
| 2979 | This may also be a list of tags that should be inherited, or a regexp that | 2988 | This may also be a list of tags that should be inherited, or a regexp that |
| 2980 | matches tags that should be inherited. Additional control is possible | 2989 | matches tags that should be inherited. Additional control is possible |
| 2981 | with the variable `org-tags-exclude-from-inheritance' which gives an | 2990 | with the variable `org-tags-exclude-from-inheritance' which gives an |
| 2982 | explicit list of tags to be excluded from inheritance., even if the value of | 2991 | explicit list of tags to be excluded from inheritance, even if the value of |
| 2983 | `org-use-tag-inheritance' would select it for inheritance. | 2992 | `org-use-tag-inheritance' would select it for inheritance. |
| 2984 | 2993 | ||
| 2985 | If this option is t, a match early-on in a tree can lead to a large | 2994 | If this option is t, a match early-on in a tree can lead to a large |
| @@ -3952,7 +3961,7 @@ If TABLE-TYPE is non-nil, also check for table.el-type tables." | |||
| 3952 | (beginning-of-line 1) | 3961 | (beginning-of-line 1) |
| 3953 | (when (and (looking-at org-table-line-regexp) | 3962 | (when (and (looking-at org-table-line-regexp) |
| 3954 | ;; Exclude tables in src/example/verbatim/clocktable blocks | 3963 | ;; Exclude tables in src/example/verbatim/clocktable blocks |
| 3955 | (not (org-in-block-p '("src" "example")))) | 3964 | (not (org-in-block-p '("src" "example" "verbatim" "clocktable")))) |
| 3956 | (save-excursion (funcall function)) | 3965 | (save-excursion (funcall function)) |
| 3957 | (or (looking-at org-table-line-regexp) | 3966 | (or (looking-at org-table-line-regexp) |
| 3958 | (forward-char 1))) | 3967 | (forward-char 1))) |
| @@ -5007,13 +5016,15 @@ The following commands are available: | |||
| 5007 | (defun org-find-invisible-foreground () | 5016 | (defun org-find-invisible-foreground () |
| 5008 | (let ((candidates (remove | 5017 | (let ((candidates (remove |
| 5009 | "unspecified-bg" | 5018 | "unspecified-bg" |
| 5010 | (list | 5019 | (nconc |
| 5011 | (face-background 'default) | 5020 | (list (face-background 'default) |
| 5012 | (face-background 'org-default) | 5021 | (face-background 'org-default)) |
| 5013 | (cdr (assoc 'background-color default-frame-alist)) | 5022 | (mapcar |
| 5014 | (cdr (assoc 'background-color initial-frame-alist)) | 5023 | (lambda (alist) |
| 5015 | (cdr (assoc 'background-color window-system-default-frame-alist)) | 5024 | (when (boundp alist) |
| 5016 | (face-foreground 'org-hide))))) | 5025 | (cdr (assoc 'background-color (symbol-value alist))))) |
| 5026 | '(default-frame-alist initial-frame-alist window-system-default-frame-alist)) | ||
| 5027 | (list (face-foreground 'org-hide)))))) | ||
| 5017 | (car (remove nil candidates)))) | 5028 | (car (remove nil candidates)))) |
| 5018 | 5029 | ||
| 5019 | (defun org-current-time () | 5030 | (defun org-current-time () |
| @@ -5284,7 +5295,7 @@ will be prompted for." | |||
| 5284 | (and move (backward-char 1)))) | 5295 | (and move (backward-char 1)))) |
| 5285 | 5296 | ||
| 5286 | (defconst org-nonsticky-props | 5297 | (defconst org-nonsticky-props |
| 5287 | '(mouse-face highlight keymap invisible intangible help-echo org-linked-text)) | 5298 | '(mouse-face highlight keymap invisible intangible help-echo org-linked-text htmlize-link)) |
| 5288 | 5299 | ||
| 5289 | (defsubst org-rear-nonsticky-at (pos) | 5300 | (defsubst org-rear-nonsticky-at (pos) |
| 5290 | (add-text-properties (1- pos) pos (list 'rear-nonsticky org-nonsticky-props))) | 5301 | (add-text-properties (1- pos) pos (list 'rear-nonsticky org-nonsticky-props))) |
| @@ -5293,12 +5304,13 @@ will be prompted for." | |||
| 5293 | "Run through the buffer and add overlays to links." | 5304 | "Run through the buffer and add overlays to links." |
| 5294 | (catch 'exit | 5305 | (catch 'exit |
| 5295 | (let (f) | 5306 | (let (f) |
| 5296 | (when (re-search-forward (concat org-plain-link-re) limit t) | 5307 | (when (and (re-search-forward (concat org-plain-link-re) limit t) |
| 5308 | (not (org-in-src-block-p))) | ||
| 5297 | (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) | 5309 | (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) |
| 5298 | (setq f (get-text-property (match-beginning 0) 'face)) | 5310 | (setq f (get-text-property (match-beginning 0) 'face)) |
| 5299 | (if (or (eq f 'org-tag) | 5311 | (unless (or (org-in-src-block-p) |
| 5300 | (and (listp f) (memq 'org-tag f))) | 5312 | (eq f 'org-tag) |
| 5301 | nil | 5313 | (and (listp f) (memq 'org-tag f))) |
| 5302 | (add-text-properties (match-beginning 0) (match-end 0) | 5314 | (add-text-properties (match-beginning 0) (match-end 0) |
| 5303 | (list 'mouse-face 'highlight | 5315 | (list 'mouse-face 'highlight |
| 5304 | 'face 'org-link | 5316 | 'face 'org-link |
| @@ -5410,9 +5422,9 @@ by a #." | |||
| 5410 | '(font-lock-fontified t invisible t) | 5422 | '(font-lock-fontified t invisible t) |
| 5411 | '(font-lock-fontified t face org-document-info-keyword))) | 5423 | '(font-lock-fontified t face org-document-info-keyword))) |
| 5412 | (add-text-properties | 5424 | (add-text-properties |
| 5413 | (match-beginning 6) (match-end 6) | 5425 | (match-beginning 6) (1+ (match-end 6)) |
| 5414 | (if (string-equal dc1 "+title:") | 5426 | (if (string-equal dc1 "+title:") |
| 5415 | '(font-lock-fontified t face org-document-title) | 5427 | '(font-lock-fontified t face org-document-title) |
| 5416 | '(font-lock-fontified t face org-document-info)))) | 5428 | '(font-lock-fontified t face org-document-info)))) |
| 5417 | ((or (equal dc1 "+results") | 5429 | ((or (equal dc1 "+results") |
| 5418 | (member dc1 '("+begin:" "+end:" "+caption:" "+label:" | 5430 | (member dc1 '("+begin:" "+end:" "+caption:" "+label:" |
| @@ -5437,7 +5449,8 @@ by a #." | |||
| 5437 | 5449 | ||
| 5438 | (defun org-activate-angle-links (limit) | 5450 | (defun org-activate-angle-links (limit) |
| 5439 | "Run through the buffer and add overlays to links." | 5451 | "Run through the buffer and add overlays to links." |
| 5440 | (if (re-search-forward org-angle-link-re limit t) | 5452 | (if (and (re-search-forward org-angle-link-re limit t) |
| 5453 | (not (org-in-src-block-p))) | ||
| 5441 | (progn | 5454 | (progn |
| 5442 | (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) | 5455 | (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) |
| 5443 | (add-text-properties (match-beginning 0) (match-end 0) | 5456 | (add-text-properties (match-beginning 0) (match-end 0) |
| @@ -5465,7 +5478,8 @@ by a #." | |||
| 5465 | 5478 | ||
| 5466 | (defun org-activate-bracket-links (limit) | 5479 | (defun org-activate-bracket-links (limit) |
| 5467 | "Run through the buffer and add overlays to bracketed links." | 5480 | "Run through the buffer and add overlays to bracketed links." |
| 5468 | (if (re-search-forward org-bracket-link-regexp limit t) | 5481 | (if (and (re-search-forward org-bracket-link-regexp limit t) |
| 5482 | (not (org-in-src-block-p))) | ||
| 5469 | (let* ((help (concat "LINK: " | 5483 | (let* ((help (concat "LINK: " |
| 5470 | (org-match-string-no-properties 1))) | 5484 | (org-match-string-no-properties 1))) |
| 5471 | ;; FIXME: above we should remove the escapes. | 5485 | ;; FIXME: above we should remove the escapes. |
| @@ -6254,11 +6268,7 @@ in special contexts. | |||
| 6254 | (setq has-children (org-list-has-child-p (point) struct))) | 6268 | (setq has-children (org-list-has-child-p (point) struct))) |
| 6255 | (org-back-to-heading) | 6269 | (org-back-to-heading) |
| 6256 | (setq eoh (save-excursion (outline-end-of-heading) (point))) | 6270 | (setq eoh (save-excursion (outline-end-of-heading) (point))) |
| 6257 | (setq eos (save-excursion | 6271 | (setq eos (save-excursion (1- (org-end-of-subtree t t)))) |
| 6258 | (org-end-of-subtree t) | ||
| 6259 | (unless (eobp) | ||
| 6260 | (skip-chars-forward " \t\n")) | ||
| 6261 | (if (eobp) (point) (1- (point))))) | ||
| 6262 | (setq has-children | 6272 | (setq has-children |
| 6263 | (or (save-excursion | 6273 | (or (save-excursion |
| 6264 | (let ((level (funcall outline-level))) | 6274 | (let ((level (funcall outline-level))) |
| @@ -6283,7 +6293,8 @@ in special contexts. | |||
| 6283 | (cond | 6293 | (cond |
| 6284 | ((= eos eoh) | 6294 | ((= eos eoh) |
| 6285 | ;; Nothing is hidden behind this heading | 6295 | ;; Nothing is hidden behind this heading |
| 6286 | (run-hook-with-args 'org-pre-cycle-hook 'empty) | 6296 | (unless (org-before-first-heading-p) |
| 6297 | (run-hook-with-args 'org-pre-cycle-hook 'empty)) | ||
| 6287 | (message "EMPTY ENTRY") | 6298 | (message "EMPTY ENTRY") |
| 6288 | (setq org-cycle-subtree-status nil) | 6299 | (setq org-cycle-subtree-status nil) |
| 6289 | (save-excursion | 6300 | (save-excursion |
| @@ -6296,7 +6307,8 @@ in special contexts. | |||
| 6296 | (not (setq children-skipped | 6307 | (not (setq children-skipped |
| 6297 | org-cycle-skip-children-state-if-no-children)))) | 6308 | org-cycle-skip-children-state-if-no-children)))) |
| 6298 | ;; Entire subtree is hidden in one line: children view | 6309 | ;; Entire subtree is hidden in one line: children view |
| 6299 | (run-hook-with-args 'org-pre-cycle-hook 'children) | 6310 | (unless (org-before-first-heading-p) |
| 6311 | (run-hook-with-args 'org-pre-cycle-hook 'children)) | ||
| 6300 | (if (org-at-item-p) | 6312 | (if (org-at-item-p) |
| 6301 | (org-list-set-item-visibility (point-at-bol) struct 'children) | 6313 | (org-list-set-item-visibility (point-at-bol) struct 'children) |
| 6302 | (org-show-entry) | 6314 | (org-show-entry) |
| @@ -6324,24 +6336,28 @@ in special contexts. | |||
| 6324 | (outline-next-heading) | 6336 | (outline-next-heading) |
| 6325 | (if (outline-invisible-p) (org-flag-heading nil))) | 6337 | (if (outline-invisible-p) (org-flag-heading nil))) |
| 6326 | (setq org-cycle-subtree-status 'children) | 6338 | (setq org-cycle-subtree-status 'children) |
| 6327 | (run-hook-with-args 'org-cycle-hook 'children)) | 6339 | (unless (org-before-first-heading-p) |
| 6340 | (run-hook-with-args 'org-cycle-hook 'children))) | ||
| 6328 | ((or children-skipped | 6341 | ((or children-skipped |
| 6329 | (and (eq last-command this-command) | 6342 | (and (eq last-command this-command) |
| 6330 | (eq org-cycle-subtree-status 'children))) | 6343 | (eq org-cycle-subtree-status 'children))) |
| 6331 | ;; We just showed the children, or no children are there, | 6344 | ;; We just showed the children, or no children are there, |
| 6332 | ;; now show everything. | 6345 | ;; now show everything. |
| 6333 | (run-hook-with-args 'org-pre-cycle-hook 'subtree) | 6346 | (unless (org-before-first-heading-p) |
| 6347 | (run-hook-with-args 'org-pre-cycle-hook 'subtree)) | ||
| 6334 | (outline-flag-region eoh eos nil) | 6348 | (outline-flag-region eoh eos nil) |
| 6335 | (message (if children-skipped "SUBTREE (NO CHILDREN)" "SUBTREE")) | 6349 | (message (if children-skipped "SUBTREE (NO CHILDREN)" "SUBTREE")) |
| 6336 | (setq org-cycle-subtree-status 'subtree) | 6350 | (setq org-cycle-subtree-status 'subtree) |
| 6337 | (run-hook-with-args 'org-cycle-hook 'subtree)) | 6351 | (unless (org-before-first-heading-p) |
| 6352 | (run-hook-with-args 'org-cycle-hook 'subtree))) | ||
| 6338 | (t | 6353 | (t |
| 6339 | ;; Default action: hide the subtree. | 6354 | ;; Default action: hide the subtree. |
| 6340 | (run-hook-with-args 'org-pre-cycle-hook 'folded) | 6355 | (run-hook-with-args 'org-pre-cycle-hook 'folded) |
| 6341 | (outline-flag-region eoh eos t) | 6356 | (outline-flag-region eoh eos t) |
| 6342 | (message "FOLDED") | 6357 | (message "FOLDED") |
| 6343 | (setq org-cycle-subtree-status 'folded) | 6358 | (setq org-cycle-subtree-status 'folded) |
| 6344 | (run-hook-with-args 'org-cycle-hook 'folded))))) | 6359 | (unless (org-before-first-heading-p) |
| 6360 | (run-hook-with-args 'org-cycle-hook 'folded)))))) | ||
| 6345 | 6361 | ||
| 6346 | ;;;###autoload | 6362 | ;;;###autoload |
| 6347 | (defun org-global-cycle (&optional arg) | 6363 | (defun org-global-cycle (&optional arg) |
| @@ -6745,42 +6761,47 @@ Optional arguments START and END can be used to limit the range." | |||
| 6745 | 6761 | ||
| 6746 | (defvar org-goto-window-configuration nil) | 6762 | (defvar org-goto-window-configuration nil) |
| 6747 | (defvar org-goto-marker nil) | 6763 | (defvar org-goto-marker nil) |
| 6748 | (defvar org-goto-map | 6764 | (defvar org-goto-map) |
| 6749 | (let ((map (make-sparse-keymap))) | 6765 | (defun org-goto-map () |
| 6750 | (let ((cmds '(isearch-forward isearch-backward kill-ring-save set-mark-command mouse-drag-region universal-argument org-occur)) cmd) | 6766 | "Set the keymap `org-goto'." |
| 6751 | (while (setq cmd (pop cmds)) | 6767 | (setq org-goto-map |
| 6752 | (substitute-key-definition cmd cmd map global-map))) | 6768 | (let ((map (make-sparse-keymap))) |
| 6753 | (suppress-keymap map) | 6769 | (let ((cmds '(isearch-forward isearch-backward kill-ring-save set-mark-command |
| 6754 | (org-defkey map "\C-m" 'org-goto-ret) | 6770 | mouse-drag-region universal-argument org-occur)) |
| 6755 | (org-defkey map [(return)] 'org-goto-ret) | 6771 | cmd) |
| 6756 | (org-defkey map [(left)] 'org-goto-left) | 6772 | (while (setq cmd (pop cmds)) |
| 6757 | (org-defkey map [(right)] 'org-goto-right) | 6773 | (substitute-key-definition cmd cmd map global-map))) |
| 6758 | (org-defkey map [(control ?g)] 'org-goto-quit) | 6774 | (suppress-keymap map) |
| 6759 | (org-defkey map "\C-i" 'org-cycle) | 6775 | (org-defkey map "\C-m" 'org-goto-ret) |
| 6760 | (org-defkey map [(tab)] 'org-cycle) | 6776 | (org-defkey map [(return)] 'org-goto-ret) |
| 6761 | (org-defkey map [(down)] 'outline-next-visible-heading) | 6777 | (org-defkey map [(left)] 'org-goto-left) |
| 6762 | (org-defkey map [(up)] 'outline-previous-visible-heading) | 6778 | (org-defkey map [(right)] 'org-goto-right) |
| 6763 | (if org-goto-auto-isearch | 6779 | (org-defkey map [(control ?g)] 'org-goto-quit) |
| 6764 | (if (fboundp 'define-key-after) | 6780 | (org-defkey map "\C-i" 'org-cycle) |
| 6765 | (define-key-after map [t] 'org-goto-local-auto-isearch) | 6781 | (org-defkey map [(tab)] 'org-cycle) |
| 6766 | nil) | 6782 | (org-defkey map [(down)] 'outline-next-visible-heading) |
| 6767 | (org-defkey map "q" 'org-goto-quit) | 6783 | (org-defkey map [(up)] 'outline-previous-visible-heading) |
| 6768 | (org-defkey map "n" 'outline-next-visible-heading) | 6784 | (if org-goto-auto-isearch |
| 6769 | (org-defkey map "p" 'outline-previous-visible-heading) | 6785 | (if (fboundp 'define-key-after) |
| 6770 | (org-defkey map "f" 'outline-forward-same-level) | 6786 | (define-key-after map [t] 'org-goto-local-auto-isearch) |
| 6771 | (org-defkey map "b" 'outline-backward-same-level) | 6787 | nil) |
| 6772 | (org-defkey map "u" 'outline-up-heading)) | 6788 | (org-defkey map "q" 'org-goto-quit) |
| 6773 | (org-defkey map "/" 'org-occur) | 6789 | (org-defkey map "n" 'outline-next-visible-heading) |
| 6774 | (org-defkey map "\C-c\C-n" 'outline-next-visible-heading) | 6790 | (org-defkey map "p" 'outline-previous-visible-heading) |
| 6775 | (org-defkey map "\C-c\C-p" 'outline-previous-visible-heading) | 6791 | (org-defkey map "f" 'outline-forward-same-level) |
| 6776 | (org-defkey map "\C-c\C-f" 'outline-forward-same-level) | 6792 | (org-defkey map "b" 'outline-backward-same-level) |
| 6777 | (org-defkey map "\C-c\C-b" 'outline-backward-same-level) | 6793 | (org-defkey map "u" 'outline-up-heading)) |
| 6778 | (org-defkey map "\C-c\C-u" 'outline-up-heading) | 6794 | (org-defkey map "/" 'org-occur) |
| 6779 | map)) | 6795 | (org-defkey map "\C-c\C-n" 'outline-next-visible-heading) |
| 6796 | (org-defkey map "\C-c\C-p" 'outline-previous-visible-heading) | ||
| 6797 | (org-defkey map "\C-c\C-f" 'outline-forward-same-level) | ||
| 6798 | (org-defkey map "\C-c\C-b" 'outline-backward-same-level) | ||
| 6799 | (org-defkey map "\C-c\C-u" 'outline-up-heading) | ||
| 6800 | map))) | ||
| 6780 | 6801 | ||
| 6781 | (defconst org-goto-help | 6802 | (defconst org-goto-help |
| 6782 | "Browse buffer copy, to find location or copy text. Just type for auto-isearch. | 6803 | "Browse buffer copy, to find location or copy text.%s |
| 6783 | RET=jump to location [Q]uit and return to previous location | 6804 | RET=jump to location C-g=quit and return to previous location |
| 6784 | \[Up]/[Down]=next/prev headline TAB=cycle visibility [/] org-occur") | 6805 | \[Up]/[Down]=next/prev headline TAB=cycle visibility [/] org-occur") |
| 6785 | 6806 | ||
| 6786 | (defvar org-goto-start-pos) ; dynamically scoped parameter | 6807 | (defvar org-goto-start-pos) ; dynamically scoped parameter |
| @@ -6806,6 +6827,7 @@ in the indirect buffer and expose the headline hierarchy above. | |||
| 6806 | With a prefix argument, use the alternative interface: e.g. if | 6827 | With a prefix argument, use the alternative interface: e.g. if |
| 6807 | `org-goto-interface' is 'outline use 'outline-path-completion." | 6828 | `org-goto-interface' is 'outline use 'outline-path-completion." |
| 6808 | (interactive "P") | 6829 | (interactive "P") |
| 6830 | (org-goto-map) | ||
| 6809 | (let* ((org-refile-targets `((nil . (:maxlevel . ,org-goto-max-level)))) | 6831 | (let* ((org-refile-targets `((nil . (:maxlevel . ,org-goto-max-level)))) |
| 6810 | (org-refile-use-outline-path t) | 6832 | (org-refile-use-outline-path t) |
| 6811 | (org-refile-target-verify-function nil) | 6833 | (org-refile-target-verify-function nil) |
| @@ -6838,48 +6860,46 @@ With a prefix argument, use the alternative interface: e.g. if | |||
| 6838 | "Let the user select a location in the Org-mode buffer BUF. | 6860 | "Let the user select a location in the Org-mode buffer BUF. |
| 6839 | This function uses a recursive edit. It returns the selected position | 6861 | This function uses a recursive edit. It returns the selected position |
| 6840 | or nil." | 6862 | or nil." |
| 6841 | (let ((isearch-mode-map org-goto-local-auto-isearch-map) | 6863 | (org-no-popups |
| 6842 | (isearch-hide-immediately nil) | 6864 | (let ((isearch-mode-map org-goto-local-auto-isearch-map) |
| 6843 | (isearch-search-fun-function | 6865 | (isearch-hide-immediately nil) |
| 6844 | (lambda () 'org-goto-local-search-headings)) | 6866 | (isearch-search-fun-function |
| 6845 | (org-goto-selected-point org-goto-exit-command) | 6867 | (lambda () 'org-goto-local-search-headings)) |
| 6846 | (pop-up-frames nil) | 6868 | (org-goto-selected-point org-goto-exit-command)) |
| 6847 | (special-display-buffer-names nil) | 6869 | (save-excursion |
| 6848 | (special-display-regexps nil) | 6870 | (save-window-excursion |
| 6849 | (special-display-function nil)) | 6871 | (delete-other-windows) |
| 6850 | (save-excursion | 6872 | (and (get-buffer "*org-goto*") (kill-buffer "*org-goto*")) |
| 6851 | (save-window-excursion | 6873 | (org-pop-to-buffer-same-window |
| 6852 | (delete-other-windows) | 6874 | (condition-case nil |
| 6853 | (and (get-buffer "*org-goto*") (kill-buffer "*org-goto*")) | 6875 | (make-indirect-buffer (current-buffer) "*org-goto*") |
| 6854 | (org-pop-to-buffer-same-window | 6876 | (error (make-indirect-buffer (current-buffer) "*org-goto*")))) |
| 6855 | (condition-case nil | 6877 | (with-output-to-temp-buffer "*Org Help*" |
| 6856 | (make-indirect-buffer (current-buffer) "*org-goto*") | 6878 | (princ (format help (if org-goto-auto-isearch |
| 6857 | (error (make-indirect-buffer (current-buffer) "*org-goto*")))) | 6879 | " Just type for auto-isearch." |
| 6858 | (with-output-to-temp-buffer "*Help*" | 6880 | " n/p/f/b/u to navigate, q to quit.")))) |
| 6859 | (princ help)) | 6881 | (org-fit-window-to-buffer (get-buffer-window "*Org Help*")) |
| 6860 | (org-fit-window-to-buffer (get-buffer-window "*Help*")) | 6882 | (setq buffer-read-only nil) |
| 6861 | (setq buffer-read-only nil) | 6883 | (let ((org-startup-truncated t) |
| 6862 | (let ((org-startup-truncated t) | 6884 | (org-startup-folded nil) |
| 6863 | (org-startup-folded nil) | 6885 | (org-startup-align-all-tables nil)) |
| 6864 | (org-startup-align-all-tables nil)) | 6886 | (org-mode) |
| 6865 | (org-mode) | 6887 | (org-overview)) |
| 6866 | (org-overview)) | 6888 | (setq buffer-read-only t) |
| 6867 | (setq buffer-read-only t) | 6889 | (if (and (boundp 'org-goto-start-pos) |
| 6868 | (if (and (boundp 'org-goto-start-pos) | 6890 | (integer-or-marker-p org-goto-start-pos)) |
| 6869 | (integer-or-marker-p org-goto-start-pos)) | 6891 | (let ((org-show-hierarchy-above t) |
| 6870 | (let ((org-show-hierarchy-above t) | 6892 | (org-show-siblings t) |
| 6871 | (org-show-siblings t) | 6893 | (org-show-following-heading t)) |
| 6872 | (org-show-following-heading t)) | 6894 | (goto-char org-goto-start-pos) |
| 6873 | (goto-char org-goto-start-pos) | 6895 | (and (outline-invisible-p) (org-show-context))) |
| 6874 | (and (outline-invisible-p) (org-show-context))) | 6896 | (goto-char (point-min))) |
| 6875 | (goto-char (point-min))) | 6897 | (let (org-special-ctrl-a/e) (org-beginning-of-line)) |
| 6876 | (let (org-special-ctrl-a/e) (org-beginning-of-line)) | 6898 | (message "Select location and press RET") |
| 6877 | (message "Select location and press RET") | 6899 | (use-local-map org-goto-map) |
| 6878 | (use-local-map org-goto-map) | 6900 | (recursive-edit))) |
| 6879 | (recursive-edit) | 6901 | (kill-buffer "*org-goto*") |
| 6880 | )) | 6902 | (cons org-goto-selected-point org-goto-exit-command)))) |
| 6881 | (kill-buffer "*org-goto*") | ||
| 6882 | (cons org-goto-selected-point org-goto-exit-command))) | ||
| 6883 | 6903 | ||
| 6884 | (defvar org-goto-local-auto-isearch-map (make-sparse-keymap)) | 6904 | (defvar org-goto-local-auto-isearch-map (make-sparse-keymap)) |
| 6885 | (set-keymap-parent org-goto-local-auto-isearch-map isearch-mode-map) | 6905 | (set-keymap-parent org-goto-local-auto-isearch-map isearch-mode-map) |
| @@ -7382,12 +7402,7 @@ even level numbers will become the next higher odd number." | |||
| 7382 | ((< change 0) (max 1 (1+ (* 2 (/ (+ level (* 2 change)) 2)))))) | 7402 | ((< change 0) (max 1 (1+ (* 2 (/ (+ level (* 2 change)) 2)))))) |
| 7383 | (max 1 (+ level (or change 0))))) | 7403 | (max 1 (+ level (or change 0))))) |
| 7384 | 7404 | ||
| 7385 | (if (boundp 'define-obsolete-function-alias) | 7405 | (org-define-obsolete-function-alias 'org-get-legal-level 'org-get-valid-level "23.1") |
| 7386 | (if (or (featurep 'xemacs) (< emacs-major-version 23)) | ||
| 7387 | (define-obsolete-function-alias 'org-get-legal-level | ||
| 7388 | 'org-get-valid-level) | ||
| 7389 | (define-obsolete-function-alias 'org-get-legal-level | ||
| 7390 | 'org-get-valid-level "23.1"))) | ||
| 7391 | 7406 | ||
| 7392 | (defvar org-called-with-limited-levels nil) ;; Dynamically bound in | 7407 | (defvar org-called-with-limited-levels nil) ;; Dynamically bound in |
| 7393 | ;; ̀org-with-limited-levels' | 7408 | ;; ̀org-with-limited-levels' |
| @@ -7672,7 +7687,6 @@ useful if the caller implements cut-and-paste as copy-then-paste-then-cut." | |||
| 7672 | (if (org-called-interactively-p 'any) | 7687 | (if (org-called-interactively-p 'any) |
| 7673 | (org-back-to-heading nil) ; take what looks like a subtree | 7688 | (org-back-to-heading nil) ; take what looks like a subtree |
| 7674 | (org-back-to-heading t)) ; take what is really there | 7689 | (org-back-to-heading t)) ; take what is really there |
| 7675 | (org-back-over-empty-lines) | ||
| 7676 | (setq beg (point)) | 7690 | (setq beg (point)) |
| 7677 | (skip-chars-forward " \t\r\n") | 7691 | (skip-chars-forward " \t\r\n") |
| 7678 | (save-match-data | 7692 | (save-match-data |
| @@ -7682,7 +7696,6 @@ useful if the caller implements cut-and-paste as copy-then-paste-then-cut." | |||
| 7682 | (org-forward-heading-same-level (1- n) t) | 7696 | (org-forward-heading-same-level (1- n) t) |
| 7683 | (error nil)) | 7697 | (error nil)) |
| 7684 | (org-end-of-subtree t t)) | 7698 | (org-end-of-subtree t t)) |
| 7685 | (org-back-over-empty-lines) | ||
| 7686 | (setq end (point)) | 7699 | (setq end (point)) |
| 7687 | (goto-char beg0) | 7700 | (goto-char beg0) |
| 7688 | (when (> end beg) | 7701 | (when (> end beg) |
| @@ -7773,7 +7786,6 @@ the inserted text when done." | |||
| 7773 | (delete-region (point-at-bol) (point))) | 7786 | (delete-region (point-at-bol) (point))) |
| 7774 | ;; Paste | 7787 | ;; Paste |
| 7775 | (beginning-of-line (if (bolp) 1 2)) | 7788 | (beginning-of-line (if (bolp) 1 2)) |
| 7776 | (unless for-yank (org-back-over-empty-lines)) | ||
| 7777 | (setq beg (point)) | 7789 | (setq beg (point)) |
| 7778 | (and (fboundp 'org-id-paste-tracker) (org-id-paste-tracker txt)) | 7790 | (and (fboundp 'org-id-paste-tracker) (org-id-paste-tracker txt)) |
| 7779 | (insert-before-markers txt) | 7791 | (insert-before-markers txt) |
| @@ -8630,6 +8642,24 @@ call CMD." | |||
| 8630 | (put-text-property beg end 'org-category-position beg) | 8642 | (put-text-property beg end 'org-category-position beg) |
| 8631 | (goto-char pos))))))) | 8643 | (goto-char pos))))))) |
| 8632 | 8644 | ||
| 8645 | (defun org-refresh-properties (dprop tprop) | ||
| 8646 | "Refresh buffer text properties. | ||
| 8647 | DPROP is the drawer property and TPROP is the corresponding text | ||
| 8648 | property to set." | ||
| 8649 | (let ((case-fold-search t) | ||
| 8650 | (inhibit-read-only t) p) | ||
| 8651 | (org-unmodified | ||
| 8652 | (save-excursion | ||
| 8653 | (save-restriction | ||
| 8654 | (widen) | ||
| 8655 | (goto-char (point-min)) | ||
| 8656 | (while (re-search-forward (concat "^[ \t]*:" dprop ": +\\(.*\\)[ \t]*$") nil t) | ||
| 8657 | (setq p (org-match-string-no-properties 1)) | ||
| 8658 | (save-excursion | ||
| 8659 | (org-back-to-heading t) | ||
| 8660 | (put-text-property | ||
| 8661 | (point-at-bol) (point-at-eol) tprop p)))))))) | ||
| 8662 | |||
| 8633 | 8663 | ||
| 8634 | ;;;; Link Stuff | 8664 | ;;;; Link Stuff |
| 8635 | 8665 | ||
| @@ -8723,7 +8753,7 @@ type. For a simple example of an export function, see `org-bbdb.el'." | |||
| 8723 | (push (list type follow export) org-link-protocols))) | 8753 | (push (list type follow export) org-link-protocols))) |
| 8724 | 8754 | ||
| 8725 | (defvar org-agenda-buffer-name) ; Defined in org-agenda.el | 8755 | (defvar org-agenda-buffer-name) ; Defined in org-agenda.el |
| 8726 | (defvar org-link-to-org-use-id) ; Defined in org-id.el | 8756 | (defvar org-id-link-to-org-use-id) ; Defined in org-id.el |
| 8727 | 8757 | ||
| 8728 | ;;;###autoload | 8758 | ;;;###autoload |
| 8729 | (defun org-store-link (arg) | 8759 | (defun org-store-link (arg) |
| @@ -8839,13 +8869,13 @@ For file links, arg negates `org-context-in-file-links'." | |||
| 8839 | "::" (match-string 1)) | 8869 | "::" (match-string 1)) |
| 8840 | link cpltxt)) | 8870 | link cpltxt)) |
| 8841 | ((and (featurep 'org-id) | 8871 | ((and (featurep 'org-id) |
| 8842 | (or (eq org-link-to-org-use-id t) | 8872 | (or (eq org-id-link-to-org-use-id t) |
| 8843 | (and (org-called-interactively-p 'any) | 8873 | (and (org-called-interactively-p 'any) |
| 8844 | (or (eq org-link-to-org-use-id 'create-if-interactive) | 8874 | (or (eq org-id-link-to-org-use-id 'create-if-interactive) |
| 8845 | (and (eq org-link-to-org-use-id | 8875 | (and (eq org-id-link-to-org-use-id |
| 8846 | 'create-if-interactive-and-no-custom-id) | 8876 | 'create-if-interactive-and-no-custom-id) |
| 8847 | (not custom-id)))) | 8877 | (not custom-id)))) |
| 8848 | (and org-link-to-org-use-id (org-entry-get nil "ID")))) | 8878 | (and org-id-link-to-org-use-id (org-entry-get nil "ID")))) |
| 8849 | ;; We can make a link using the ID. | 8879 | ;; We can make a link using the ID. |
| 8850 | (setq link (condition-case nil | 8880 | (setq link (condition-case nil |
| 8851 | (prog1 (org-id-store-link) | 8881 | (prog1 (org-id-store-link) |
| @@ -9318,10 +9348,11 @@ Use TAB to complete link prefixes, then RET for type-specific completion support | |||
| 9318 | ;; URL-like link, normalize the use of angular brackets. | 9348 | ;; URL-like link, normalize the use of angular brackets. |
| 9319 | (setq link (org-remove-angle-brackets link))) | 9349 | (setq link (org-remove-angle-brackets link))) |
| 9320 | 9350 | ||
| 9321 | ;; Check if we are linking to the current file with a search option | 9351 | ;; Check if we are linking to the current file with a search |
| 9322 | ;; If yes, simplify the link by using only the search option. | 9352 | ;; option If yes, simplify the link by using only the search |
| 9353 | ;; option. | ||
| 9323 | (when (and buffer-file-name | 9354 | (when (and buffer-file-name |
| 9324 | (string-match "^file:\\(.+?\\)::\\([^>]+\\)" link)) | 9355 | (string-match "^file:\\(.+?\\)::\\(.+\\)" link)) |
| 9325 | (let* ((path (match-string 1 link)) | 9356 | (let* ((path (match-string 1 link)) |
| 9326 | (case-fold-search nil) | 9357 | (case-fold-search nil) |
| 9327 | (search (match-string 2 link))) | 9358 | (search (match-string 2 link))) |
| @@ -9652,7 +9683,13 @@ application the system uses for this file type." | |||
| 9652 | org-angle-link-re "\\|" | 9683 | org-angle-link-re "\\|" |
| 9653 | "[ \t]:[^ \t\n]+:[ \t]*$"))) | 9684 | "[ \t]:[^ \t\n]+:[ \t]*$"))) |
| 9654 | (not (get-text-property (point) 'org-linked-text))) | 9685 | (not (get-text-property (point) 'org-linked-text))) |
| 9655 | (or (org-offer-links-in-entry arg) | 9686 | (or (let* ((lkall (org-offer-links-in-entry (current-buffer) (point) arg)) |
| 9687 | (lk (car lkall)) | ||
| 9688 | (lkend (cdr lkall))) | ||
| 9689 | (when lk | ||
| 9690 | (prog1 (search-forward lk nil lkend) | ||
| 9691 | (goto-char (match-beginning 0)) | ||
| 9692 | (org-open-at-point)))) | ||
| 9656 | (progn (require 'org-attach) (org-attach-reveal 'if-exists)))) | 9693 | (progn (require 'org-attach) (org-attach-reveal 'if-exists)))) |
| 9657 | ((run-hook-with-args-until-success 'org-open-at-point-functions)) | 9694 | ((run-hook-with-args-until-success 'org-open-at-point-functions)) |
| 9658 | ((and (org-at-timestamp-p t) | 9695 | ((and (org-at-timestamp-p t) |
| @@ -9695,12 +9732,13 @@ application the system uses for this file type." | |||
| 9695 | (throw 'match t)) | 9732 | (throw 'match t)) |
| 9696 | 9733 | ||
| 9697 | (save-excursion | 9734 | (save-excursion |
| 9698 | (when (or (org-in-regexp org-angle-link-re) | 9735 | (let ((plinkpos (org-in-regexp org-plain-link-re))) |
| 9699 | (and (goto-char (car (org-in-regexp org-plain-link-re))) | 9736 | (when (or (org-in-regexp org-angle-link-re) |
| 9700 | (save-match-data (not (looking-back "\\[\\["))))) | 9737 | (and plinkpos (goto-char (car plinkpos)) |
| 9701 | (setq type (match-string 1) | 9738 | (save-match-data (not (looking-back "\\[\\["))))) |
| 9702 | path (org-link-unescape (match-string 2))) | 9739 | (setq type (match-string 1) |
| 9703 | (throw 'match t))) | 9740 | path (org-link-unescape (match-string 2))) |
| 9741 | (throw 'match t)))) | ||
| 9704 | (save-excursion | 9742 | (save-excursion |
| 9705 | (when (org-in-regexp (org-re "\\(:[[:alnum:]_@#%:]+\\):[ \t]*$")) | 9743 | (when (org-in-regexp (org-re "\\(:[[:alnum:]_@#%:]+\\):[ \t]*$")) |
| 9706 | (setq type "tags" | 9744 | (setq type "tags" |
| @@ -9713,7 +9751,7 @@ application the system uses for this file type." | |||
| 9713 | path (match-string 1)) | 9751 | path (match-string 1)) |
| 9714 | (throw 'match t))) | 9752 | (throw 'match t))) |
| 9715 | (unless path | 9753 | (unless path |
| 9716 | (error "No link found")) | 9754 | (user-error "No link found")) |
| 9717 | 9755 | ||
| 9718 | ;; switch back to reference buffer | 9756 | ;; switch back to reference buffer |
| 9719 | ;; needed when if called in a temporary buffer through | 9757 | ;; needed when if called in a temporary buffer through |
| @@ -9847,68 +9885,67 @@ application the system uses for this file type." | |||
| 9847 | (move-marker org-open-link-marker nil) | 9885 | (move-marker org-open-link-marker nil) |
| 9848 | (run-hook-with-args 'org-follow-link-hook))) | 9886 | (run-hook-with-args 'org-follow-link-hook))) |
| 9849 | 9887 | ||
| 9850 | (defun org-offer-links-in-entry (&optional nth zero) | 9888 | (defun org-offer-links-in-entry (buffer marker &optional nth zero) |
| 9851 | "Offer links in the current entry and follow the selected link. | 9889 | "Offer links in the current entry and return the selected link. |
| 9852 | If there is only one link, follow it immediately as well. | 9890 | If there is only one link, return it. |
| 9853 | If NTH is an integer, immediately pick the NTH link found. | 9891 | If NTH is an integer, return the NTH link found. |
| 9854 | If ZERO is a string, check also this string for a link, and if | 9892 | If ZERO is a string, check also this string for a link, and if |
| 9855 | there is one, offer it as link number zero." | 9893 | there is one, return it." |
| 9856 | (let ((re (concat "\\(" org-bracket-link-regexp "\\)\\|" | 9894 | (with-current-buffer buffer |
| 9857 | "\\(" org-angle-link-re "\\)\\|" | ||
| 9858 | "\\(" org-plain-link-re "\\)")) | ||
| 9859 | (cnt ?0) | ||
| 9860 | (in-emacs (if (integerp nth) nil nth)) | ||
| 9861 | have-zero end links link c) | ||
| 9862 | (when (and (stringp zero) (string-match org-bracket-link-regexp zero)) | ||
| 9863 | (push (match-string 0 zero) links) | ||
| 9864 | (setq cnt (1- cnt) have-zero t)) | ||
| 9865 | (save-excursion | 9895 | (save-excursion |
| 9866 | (org-back-to-heading t) | 9896 | (save-restriction |
| 9867 | (setq end (save-excursion (outline-next-heading) (point))) | 9897 | (widen) |
| 9868 | (while (re-search-forward re end t) | 9898 | (goto-char marker) |
| 9869 | (push (match-string 0) links)) | 9899 | (let ((re (concat "\\(" org-bracket-link-regexp "\\)\\|" |
| 9870 | (setq links (org-uniquify (reverse links)))) | 9900 | "\\(" org-angle-link-re "\\)\\|" |
| 9871 | 9901 | "\\(" org-plain-link-re "\\)")) | |
| 9872 | (cond | 9902 | (cnt ?0) |
| 9873 | ((null links) | 9903 | (in-emacs (if (integerp nth) nil nth)) |
| 9874 | (message "No links")) | 9904 | have-zero end links link c) |
| 9875 | ((equal (length links) 1) | 9905 | (when (and (stringp zero) (string-match org-bracket-link-regexp zero)) |
| 9876 | (setq link (list (car links)))) | 9906 | (push (match-string 0 zero) links) |
| 9877 | ((and (integerp nth) (>= (length links) (if have-zero (1+ nth) nth))) | 9907 | (setq cnt (1- cnt) have-zero t)) |
| 9878 | (setq link (list (nth (if have-zero nth (1- nth)) links)))) | 9908 | (save-excursion |
| 9879 | (t ; we have to select a link | 9909 | (org-back-to-heading t) |
| 9880 | (save-excursion | 9910 | (setq end (save-excursion (outline-next-heading) (point))) |
| 9881 | (save-window-excursion | 9911 | (while (re-search-forward re end t) |
| 9882 | (delete-other-windows) | 9912 | (push (match-string 0) links)) |
| 9883 | (with-output-to-temp-buffer "*Select Link*" | 9913 | (setq links (org-uniquify (reverse links)))) |
| 9884 | (mapc (lambda (l) | 9914 | (cond |
| 9885 | (if (not (string-match org-bracket-link-regexp l)) | 9915 | ((null links) |
| 9886 | (princ (format "[%c] %s\n" (incf cnt) | 9916 | (message "No links")) |
| 9887 | (org-remove-angle-brackets l))) | 9917 | ((equal (length links) 1) |
| 9888 | (if (match-end 3) | 9918 | (setq link (car links))) |
| 9889 | (princ (format "[%c] %s (%s)\n" (incf cnt) | 9919 | ((and (integerp nth) (>= (length links) (if have-zero (1+ nth) nth))) |
| 9890 | (match-string 3 l) (match-string 1 l))) | 9920 | (setq link (nth (if have-zero nth (1- nth)) links))) |
| 9891 | (princ (format "[%c] %s\n" (incf cnt) | 9921 | (t ; we have to select a link |
| 9892 | (match-string 1 l)))))) | 9922 | (save-excursion |
| 9893 | links)) | 9923 | (save-window-excursion |
| 9894 | (org-fit-window-to-buffer (get-buffer-window "*Select Link*")) | 9924 | (delete-other-windows) |
| 9895 | (message "Select link to open, RET to open all:") | 9925 | (with-output-to-temp-buffer "*Select Link*" |
| 9896 | (setq c (read-char-exclusive)) | 9926 | (mapc (lambda (l) |
| 9897 | (and (get-buffer "*Select Link*") (kill-buffer "*Select Link*")))) | 9927 | (if (not (string-match org-bracket-link-regexp l)) |
| 9898 | (when (equal c ?q) (error "Abort")) | 9928 | (princ (format "[%c] %s\n" (incf cnt) |
| 9899 | (if (equal c ?\C-m) | 9929 | (org-remove-angle-brackets l))) |
| 9900 | (setq link links) | 9930 | (if (match-end 3) |
| 9901 | (setq nth (- c ?0)) | 9931 | (princ (format "[%c] %s (%s)\n" (incf cnt) |
| 9902 | (if have-zero (setq nth (1+ nth))) | 9932 | (match-string 3 l) (match-string 1 l))) |
| 9903 | (unless (and (integerp nth) (>= (length links) nth)) | 9933 | (princ (format "[%c] %s\n" (incf cnt) |
| 9904 | (error "Invalid link selection")) | 9934 | (match-string 1 l)))))) |
| 9905 | (setq link (list (nth (1- nth) links)))))) | 9935 | links)) |
| 9906 | (if link | 9936 | (org-fit-window-to-buffer (get-buffer-window "*Select Link*")) |
| 9907 | (let ((buf (current-buffer))) | 9937 | (message "Select link to open, RET to open all:") |
| 9908 | (dolist (l link) | 9938 | (setq c (read-char-exclusive)) |
| 9909 | (org-open-link-from-string l in-emacs buf)) | 9939 | (and (get-buffer "*Select Link*") (kill-buffer "*Select Link*")))) |
| 9910 | t) | 9940 | (when (equal c ?q) (error "Abort")) |
| 9911 | nil))) | 9941 | (if (equal c ?\C-m) |
| 9942 | (setq link links) | ||
| 9943 | (setq nth (- c ?0)) | ||
| 9944 | (if have-zero (setq nth (1+ nth))) | ||
| 9945 | (unless (and (integerp nth) (>= (length links) nth)) | ||
| 9946 | (error "Invalid link selection")) | ||
| 9947 | (setq link (nth (1- nth) links))))) | ||
| 9948 | (cons link end)))))) | ||
| 9912 | 9949 | ||
| 9913 | ;; Add special file links that specify the way of opening | 9950 | ;; Add special file links that specify the way of opening |
| 9914 | 9951 | ||
| @@ -9930,12 +9967,6 @@ there is one, offer it as link number zero." | |||
| 9930 | '(add-hook 'org-export-preprocess-before-normalizing-links-hook | 9967 | '(add-hook 'org-export-preprocess-before-normalizing-links-hook |
| 9931 | 'org-remove-file-link-modifiers)) | 9968 | 'org-remove-file-link-modifiers)) |
| 9932 | 9969 | ||
| 9933 | ;;;; Time estimates | ||
| 9934 | |||
| 9935 | (defun org-get-effort (&optional pom) | ||
| 9936 | "Get the effort estimate for the current entry." | ||
| 9937 | (org-entry-get pom org-effort-property)) | ||
| 9938 | |||
| 9939 | ;;; File search | 9970 | ;;; File search |
| 9940 | 9971 | ||
| 9941 | (defvar org-create-file-search-functions nil | 9972 | (defvar org-create-file-search-functions nil |
| @@ -11259,8 +11290,7 @@ This function can be used in a hook." | |||
| 11259 | " +" t))) | 11290 | " +" t))) |
| 11260 | 11291 | ||
| 11261 | (defcustom org-structure-template-alist | 11292 | (defcustom org-structure-template-alist |
| 11262 | '( | 11293 | '(("s" "#+BEGIN_SRC ?\n\n#+END_SRC" |
| 11263 | ("s" "#+BEGIN_SRC ?\n\n#+END_SRC" | ||
| 11264 | "<src lang=\"?\">\n\n</src>") | 11294 | "<src lang=\"?\">\n\n</src>") |
| 11265 | ("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE" | 11295 | ("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE" |
| 11266 | "<example>\n?\n</example>") | 11296 | "<example>\n?\n</example>") |
| @@ -11268,6 +11298,8 @@ This function can be used in a hook." | |||
| 11268 | "<quote>\n?\n</quote>") | 11298 | "<quote>\n?\n</quote>") |
| 11269 | ("v" "#+BEGIN_VERSE\n?\n#+END_VERSE" | 11299 | ("v" "#+BEGIN_VERSE\n?\n#+END_VERSE" |
| 11270 | "<verse>\n?\n</verse>") | 11300 | "<verse>\n?\n</verse>") |
| 11301 | ("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM" | ||
| 11302 | "<verbatim>\n?\n</verbatim>") | ||
| 11271 | ("c" "#+BEGIN_CENTER\n?\n#+END_CENTER" | 11303 | ("c" "#+BEGIN_CENTER\n?\n#+END_CENTER" |
| 11272 | "<center>\n?\n</center>") | 11304 | "<center>\n?\n</center>") |
| 11273 | ("l" "#+BEGIN_LaTeX\n?\n#+END_LaTeX" | 11305 | ("l" "#+BEGIN_LaTeX\n?\n#+END_LaTeX" |
| @@ -11283,8 +11315,7 @@ This function can be used in a hook." | |||
| 11283 | ("i" "#+INDEX: ?" | 11315 | ("i" "#+INDEX: ?" |
| 11284 | "#+INDEX: ?") | 11316 | "#+INDEX: ?") |
| 11285 | ("I" "#+INCLUDE: %file ?" | 11317 | ("I" "#+INCLUDE: %file ?" |
| 11286 | "<include file=%file markup=\"?\">") | 11318 | "<include file=%file markup=\"?\">")) |
| 11287 | ) | ||
| 11288 | "Structure completion elements. | 11319 | "Structure completion elements. |
| 11289 | This is a list of abbreviation keys and values. The value gets inserted | 11320 | This is a list of abbreviation keys and values. The value gets inserted |
| 11290 | if you type `<' followed by the key and then press the completion key, | 11321 | if you type `<' followed by the key and then press the completion key, |
| @@ -11439,7 +11470,8 @@ For calling through lisp, arg is also interpreted in the following way: | |||
| 11439 | cl (if (outline-invisible-p) (org-end-of-subtree nil t)))) | 11470 | cl (if (outline-invisible-p) (org-end-of-subtree nil t)))) |
| 11440 | (if (equal arg '(16)) (setq arg 'nextset)) | 11471 | (if (equal arg '(16)) (setq arg 'nextset)) |
| 11441 | (let ((org-blocker-hook org-blocker-hook) | 11472 | (let ((org-blocker-hook org-blocker-hook) |
| 11442 | (case-fold-search nil)) | 11473 | commentp |
| 11474 | case-fold-search) | ||
| 11443 | (when (equal arg '(64)) | 11475 | (when (equal arg '(64)) |
| 11444 | (setq arg nil org-blocker-hook nil)) | 11476 | (setq arg nil org-blocker-hook nil)) |
| 11445 | (when (and org-blocker-hook | 11477 | (when (and org-blocker-hook |
| @@ -11449,6 +11481,9 @@ For calling through lisp, arg is also interpreted in the following way: | |||
| 11449 | (save-excursion | 11481 | (save-excursion |
| 11450 | (catch 'exit | 11482 | (catch 'exit |
| 11451 | (org-back-to-heading t) | 11483 | (org-back-to-heading t) |
| 11484 | (when (looking-at (concat "^\\*+ " org-comment-string)) | ||
| 11485 | (org-toggle-comment) | ||
| 11486 | (setq commentp t)) | ||
| 11452 | (if (looking-at org-outline-regexp) (goto-char (1- (match-end 0)))) | 11487 | (if (looking-at org-outline-regexp) (goto-char (1- (match-end 0)))) |
| 11453 | (or (looking-at (concat " +" org-todo-regexp "\\( +\\|[ \t]*$\\)")) | 11488 | (or (looking-at (concat " +" org-todo-regexp "\\( +\\|[ \t]*$\\)")) |
| 11454 | (looking-at "\\(?: *\\|[ \t]*$\\)")) | 11489 | (looking-at "\\(?: *\\|[ \t]*$\\)")) |
| @@ -11624,7 +11659,8 @@ For calling through lisp, arg is also interpreted in the following way: | |||
| 11624 | (and (looking-at " ") (just-one-space)))) | 11659 | (and (looking-at " ") (just-one-space)))) |
| 11625 | (when org-trigger-hook | 11660 | (when org-trigger-hook |
| 11626 | (save-excursion | 11661 | (save-excursion |
| 11627 | (run-hook-with-args 'org-trigger-hook change-plist))))))))) | 11662 | (run-hook-with-args 'org-trigger-hook change-plist))) |
| 11663 | (when commentp (org-toggle-comment)))))))) | ||
| 11628 | 11664 | ||
| 11629 | (defun org-block-todo-from-children-or-siblings-or-parent (change-plist) | 11665 | (defun org-block-todo-from-children-or-siblings-or-parent (change-plist) |
| 11630 | "Block turning an entry into a TODO, using the hierarchy. | 11666 | "Block turning an entry into a TODO, using the hierarchy. |
| @@ -11765,15 +11801,16 @@ changes because there are unchecked boxes in this entry." | |||
| 11765 | 11801 | ||
| 11766 | (defun org-entry-blocked-p () | 11802 | (defun org-entry-blocked-p () |
| 11767 | "Is the current entry blocked?" | 11803 | "Is the current entry blocked?" |
| 11768 | (if (org-entry-get nil "NOBLOCKING") | 11804 | (org-with-buffer-modified-unmodified |
| 11769 | nil ;; Never block this entry | 11805 | (if (org-entry-get nil "NOBLOCKING") |
| 11770 | (not | 11806 | nil ;; Never block this entry |
| 11771 | (run-hook-with-args-until-failure | 11807 | (not |
| 11772 | 'org-blocker-hook | 11808 | (run-hook-with-args-until-failure |
| 11773 | (list :type 'todo-state-change | 11809 | 'org-blocker-hook |
| 11774 | :position (point) | 11810 | (list :type 'todo-state-change |
| 11775 | :from 'todo | 11811 | :position (point) |
| 11776 | :to 'done))))) | 11812 | :from 'todo |
| 11813 | :to 'done)))))) | ||
| 11777 | 11814 | ||
| 11778 | (defun org-update-statistics-cookies (all) | 11815 | (defun org-update-statistics-cookies (all) |
| 11779 | "Update the statistics cookie, either from TODO or from checkboxes. | 11816 | "Update the statistics cookie, either from TODO or from checkboxes. |
| @@ -11785,7 +11822,7 @@ This should be called with the cursor in a line with a statistics cookie." | |||
| 11785 | (org-map-entries 'org-update-parent-todo-statistics)) | 11822 | (org-map-entries 'org-update-parent-todo-statistics)) |
| 11786 | (if (not (org-at-heading-p)) | 11823 | (if (not (org-at-heading-p)) |
| 11787 | (org-update-checkbox-count) | 11824 | (org-update-checkbox-count) |
| 11788 | (let ((pos (move-marker (make-marker) (point))) | 11825 | (let ((pos (point-marker)) |
| 11789 | end l1 l2) | 11826 | end l1 l2) |
| 11790 | (ignore-errors (org-back-to-heading t)) | 11827 | (ignore-errors (org-back-to-heading t)) |
| 11791 | (if (not (org-at-heading-p)) | 11828 | (if (not (org-at-heading-p)) |
| @@ -12666,7 +12703,7 @@ D Show deadlines and scheduled items between a date range." | |||
| 12666 | (let (ans kwd value ts-type) | 12703 | (let (ans kwd value ts-type) |
| 12667 | (setq type (or type org-sparse-tree-default-date-type)) | 12704 | (setq type (or type org-sparse-tree-default-date-type)) |
| 12668 | (setq org-ts-type type) | 12705 | (setq org-ts-type type) |
| 12669 | (message "Sparse tree: [r]egexp [/]regexp [t]odo [T]odo-kwd [m]atch [p]roperty\n [d]eadlines [b]efore-date [a]fter-date [D]ates range\n [c]ycle through date types: %s" | 12706 | (message "Sparse tree: [/]regexp [t]odo [T]odo-kwd [m]atch [p]roperty\n [d]eadlines [b]efore-date [a]fter-date [D]ates range\n [c]ycle through date types: %s" |
| 12670 | (cond ((eq type 'all) "all timestamps") | 12707 | (cond ((eq type 'all) "all timestamps") |
| 12671 | ((eq type 'scheduled) "only scheduled") | 12708 | ((eq type 'scheduled) "only scheduled") |
| 12672 | ((eq type 'deadline) "only deadline") | 12709 | ((eq type 'deadline) "only deadline") |
| @@ -12981,9 +13018,9 @@ and by additional input from the age of a schedules or deadline entry." | |||
| 12981 | 13018 | ||
| 12982 | (defun org-get-priority (s) | 13019 | (defun org-get-priority (s) |
| 12983 | "Find priority cookie and return priority." | 13020 | "Find priority cookie and return priority." |
| 12984 | (if (functionp org-get-priority-function) | 13021 | (save-match-data |
| 12985 | (funcall org-get-priority-function) | 13022 | (if (functionp org-get-priority-function) |
| 12986 | (save-match-data | 13023 | (funcall org-get-priority-function) |
| 12987 | (if (not (string-match org-priority-regexp s)) | 13024 | (if (not (string-match org-priority-regexp s)) |
| 12988 | (* 1000 (- org-lowest-priority org-default-priority)) | 13025 | (* 1000 (- org-lowest-priority org-default-priority)) |
| 12989 | (* 1000 (- org-lowest-priority | 13026 | (* 1000 (- org-lowest-priority |
| @@ -13113,18 +13150,9 @@ headlines matching this string." | |||
| 13113 | (or (not todo-only) | 13150 | (or (not todo-only) |
| 13114 | (and (member todo org-not-done-keywords) | 13151 | (and (member todo org-not-done-keywords) |
| 13115 | (or (not org-agenda-tags-todo-honor-ignore-options) | 13152 | (or (not org-agenda-tags-todo-honor-ignore-options) |
| 13116 | (not (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item))))) | 13153 | (not (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item)))))) |
| 13117 | |||
| 13118 | ;; Extra check for the archive tag | ||
| 13119 | ;; FIXME: Does the skipper already do this???? | ||
| 13120 | (or | ||
| 13121 | (not (member org-archive-tag tags-list)) | ||
| 13122 | ;; we have an archive tag, should we use this anyway? | ||
| 13123 | (or (not org-agenda-skip-archived-trees) | ||
| 13124 | (and (eq action 'agenda) org-agenda-archives-mode)))) | ||
| 13125 | 13154 | ||
| 13126 | ;; select this headline | 13155 | ;; select this headline |
| 13127 | |||
| 13128 | (cond | 13156 | (cond |
| 13129 | ((eq action 'sparse-tree) | 13157 | ((eq action 'sparse-tree) |
| 13130 | (and org-highlight-sparse-tree-matches | 13158 | (and org-highlight-sparse-tree-matches |
| @@ -14276,6 +14304,9 @@ When INCREMENT is non-nil, set the property to the next allowed value." | |||
| 14276 | existing nil nil "" nil cur)))))) | 14304 | existing nil nil "" nil cur)))))) |
| 14277 | (unless (equal (org-entry-get nil prop) val) | 14305 | (unless (equal (org-entry-get nil prop) val) |
| 14278 | (org-entry-put nil prop val)) | 14306 | (org-entry-put nil prop val)) |
| 14307 | (save-excursion | ||
| 14308 | (org-back-to-heading t) | ||
| 14309 | (put-text-property (point-at-bol) (point-at-eol) 'org-effort val)) | ||
| 14279 | (message "%s is now %s" prop val))) | 14310 | (message "%s is now %s" prop val))) |
| 14280 | 14311 | ||
| 14281 | (defun org-at-property-p () | 14312 | (defun org-at-property-p () |
| @@ -14454,26 +14485,27 @@ when a \"nil\" value can supersede a non-nil value higher up the hierarchy." | |||
| 14454 | ;; We need a special property. Use `org-entry-properties' to | 14485 | ;; We need a special property. Use `org-entry-properties' to |
| 14455 | ;; retrieve it, but specify the wanted property | 14486 | ;; retrieve it, but specify the wanted property |
| 14456 | (cdr (assoc property (org-entry-properties nil 'special property))) | 14487 | (cdr (assoc property (org-entry-properties nil 'special property))) |
| 14457 | (let* ((range (org-get-property-block)) | 14488 | (let ((range (org-get-property-block))) |
| 14458 | (props (list (or (assoc property org-file-properties) | 14489 | (when (and range (not (eq (car range) (cdr range)))) |
| 14459 | (assoc property org-global-properties) | 14490 | (let* ((props (list (or (assoc property org-file-properties) |
| 14460 | (assoc property org-global-properties-fixed)))) | 14491 | (assoc property org-global-properties) |
| 14461 | (ap (lambda (key) | 14492 | (assoc property org-global-properties-fixed)))) |
| 14462 | (when (re-search-forward | 14493 | (ap (lambda (key) |
| 14463 | (org-re-property key) (cdr range) t) | 14494 | (when (re-search-forward |
| 14464 | (setq props | 14495 | (org-re-property key) (cdr range) t) |
| 14465 | (org-update-property-plist | 14496 | (setq props |
| 14466 | key | 14497 | (org-update-property-plist |
| 14467 | (if (match-end 1) | 14498 | key |
| 14468 | (org-match-string-no-properties 1) "") | 14499 | (if (match-end 1) |
| 14469 | props))))) | 14500 | (org-match-string-no-properties 1) "") |
| 14470 | val) | 14501 | props))))) |
| 14471 | (when (and range (goto-char (car range))) | 14502 | val) |
| 14472 | (funcall ap property) | 14503 | (goto-char (car range)) |
| 14473 | (goto-char (car range)) | 14504 | (funcall ap property) |
| 14474 | (while (funcall ap (concat property "+"))) | 14505 | (goto-char (car range)) |
| 14475 | (setq val (cdr (assoc property props))) | 14506 | (while (funcall ap (concat property "+"))) |
| 14476 | (when val (if literal-nil val (org-not-nil val))))))))) | 14507 | (setq val (cdr (assoc property props))) |
| 14508 | (when val (if literal-nil val (org-not-nil val)))))))))) | ||
| 14477 | 14509 | ||
| 14478 | (defun org-property-or-variable-value (var &optional inherit) | 14510 | (defun org-property-or-variable-value (var &optional inherit) |
| 14479 | "Check if there is a property fixing the value of VAR. | 14511 | "Check if there is a property fixing the value of VAR. |
| @@ -14996,7 +15028,8 @@ completion." | |||
| 14996 | (interactive) | 15028 | (interactive) |
| 14997 | (unless (org-at-property-p) | 15029 | (unless (org-at-property-p) |
| 14998 | (error "Not at a property")) | 15030 | (error "Not at a property")) |
| 14999 | (let* ((key (match-string 2)) | 15031 | (let* ((prop (car (save-match-data (org-split-string (match-string 1) ":")))) |
| 15032 | (key (match-string 2)) | ||
| 15000 | (value (match-string 3)) | 15033 | (value (match-string 3)) |
| 15001 | (allowed (or (org-property-get-allowed-values (point) key) | 15034 | (allowed (or (org-property-get-allowed-values (point) key) |
| 15002 | (and (member value '("[ ]" "[-]" "[X]")) | 15035 | (and (member value '("[ ]" "[-]" "[X]")) |
| @@ -15015,6 +15048,10 @@ completion." | |||
| 15015 | (org-indent-line) | 15048 | (org-indent-line) |
| 15016 | (beginning-of-line 1) | 15049 | (beginning-of-line 1) |
| 15017 | (skip-chars-forward " \t") | 15050 | (skip-chars-forward " \t") |
| 15051 | (when (equal prop org-effort-property) | ||
| 15052 | (save-excursion | ||
| 15053 | (org-back-to-heading t) | ||
| 15054 | (put-text-property (point-at-bol) (point-at-eol) 'org-effort nval))) | ||
| 15018 | (run-hook-with-args 'org-property-changed-functions key nval))) | 15055 | (run-hook-with-args 'org-property-changed-functions key nval))) |
| 15019 | 15056 | ||
| 15020 | (defun org-find-olp (path &optional this-buffer) | 15057 | (defun org-find-olp (path &optional this-buffer) |
| @@ -15060,7 +15097,7 @@ only headings." | |||
| 15060 | (setq lmin (1+ flevel) lmax (+ lmin (if org-odd-levels-only 1 0))) | 15097 | (setq lmin (1+ flevel) lmax (+ lmin (if org-odd-levels-only 1 0))) |
| 15061 | (setq end (save-excursion (org-end-of-subtree t t)))) | 15098 | (setq end (save-excursion (org-end-of-subtree t t)))) |
| 15062 | (when (org-at-heading-p) | 15099 | (when (org-at-heading-p) |
| 15063 | (move-marker (make-marker) (point)))))))) | 15100 | (point-marker))))))) |
| 15064 | 15101 | ||
| 15065 | (defun org-find-exact-headline-in-buffer (heading &optional buffer pos-only) | 15102 | (defun org-find-exact-headline-in-buffer (heading &optional buffer pos-only) |
| 15066 | "Find node HEADING in BUFFER. | 15103 | "Find node HEADING in BUFFER. |
| @@ -15307,6 +15344,7 @@ user." | |||
| 15307 | (setcar (nthcdr 1 org-defdecode) 59) | 15344 | (setcar (nthcdr 1 org-defdecode) 59) |
| 15308 | (setq org-def (apply 'encode-time org-defdecode) | 15345 | (setq org-def (apply 'encode-time org-defdecode) |
| 15309 | org-defdecode (decode-time org-def))))) | 15346 | org-defdecode (decode-time org-def))))) |
| 15347 | (mouse-autoselect-window nil) ; Don't let the mouse jump | ||
| 15310 | (calendar-frame-setup nil) | 15348 | (calendar-frame-setup nil) |
| 15311 | (calendar-setup nil) | 15349 | (calendar-setup nil) |
| 15312 | (calendar-move-hook nil) | 15350 | (calendar-move-hook nil) |
| @@ -16966,6 +17004,8 @@ When a buffer is unmodified, it is just killed. When modified, it is saved | |||
| 16966 | (widen) | 17004 | (widen) |
| 16967 | (setq bmp (buffer-modified-p)) | 17005 | (setq bmp (buffer-modified-p)) |
| 16968 | (org-refresh-category-properties) | 17006 | (org-refresh-category-properties) |
| 17007 | (org-refresh-properties org-effort-property 'org-effort) | ||
| 17008 | (org-refresh-properties "APPT_WARNTIME" 'org-appt-warntime) | ||
| 16969 | (setq org-todo-keywords-for-agenda | 17009 | (setq org-todo-keywords-for-agenda |
| 16970 | (append org-todo-keywords-for-agenda org-todo-keywords-1)) | 17010 | (append org-todo-keywords-for-agenda org-todo-keywords-1)) |
| 16971 | (setq org-done-keywords-for-agenda | 17011 | (setq org-done-keywords-for-agenda |
| @@ -17758,7 +17798,7 @@ BEG and END default to the buffer boundaries." | |||
| 17758 | (list 'org-display-inline-remove-overlay)) | 17798 | (list 'org-display-inline-remove-overlay)) |
| 17759 | (push ov org-inline-image-overlays))))))))) | 17799 | (push ov org-inline-image-overlays))))))))) |
| 17760 | 17800 | ||
| 17761 | (define-obsolete-function-alias | 17801 | (org-define-obsolete-function-alias |
| 17762 | 'org-display-inline-modification-hook 'org-display-inline-remove-overlay "24.3") | 17802 | 'org-display-inline-modification-hook 'org-display-inline-remove-overlay "24.3") |
| 17763 | 17803 | ||
| 17764 | (defun org-display-inline-remove-overlay (ov after beg end &optional len) | 17804 | (defun org-display-inline-remove-overlay (ov after beg end &optional len) |
| @@ -18053,7 +18093,7 @@ BEG and END default to the buffer boundaries." | |||
| 18053 | ("c" . org-cycle) | 18093 | ("c" . org-cycle) |
| 18054 | ("C" . org-shifttab) | 18094 | ("C" . org-shifttab) |
| 18055 | (" " . org-display-outline-path) | 18095 | (" " . org-display-outline-path) |
| 18056 | (":" . org-columns) | 18096 | ("=" . org-columns) |
| 18057 | ("Outline Structure Editing") | 18097 | ("Outline Structure Editing") |
| 18058 | ("U" . org-shiftmetaup) | 18098 | ("U" . org-shiftmetaup) |
| 18059 | ("D" . org-shiftmetadown) | 18099 | ("D" . org-shiftmetadown) |
| @@ -18078,7 +18118,7 @@ BEG and END default to the buffer boundaries." | |||
| 18078 | ("1" . (org-priority ?A)) | 18118 | ("1" . (org-priority ?A)) |
| 18079 | ("2" . (org-priority ?B)) | 18119 | ("2" . (org-priority ?B)) |
| 18080 | ("3" . (org-priority ?C)) | 18120 | ("3" . (org-priority ?C)) |
| 18081 | (";" . org-set-tags-command) | 18121 | (":" . org-set-tags-command) |
| 18082 | ("e" . org-set-effort) | 18122 | ("e" . org-set-effort) |
| 18083 | ("E" . org-inc-effort) | 18123 | ("E" . org-inc-effort) |
| 18084 | ("W" . (lambda(m) (interactive "sMinutes before warning: ") | 18124 | ("W" . (lambda(m) (interactive "sMinutes before warning: ") |
| @@ -18138,7 +18178,7 @@ If not, return to the original position and throw an error." | |||
| 18138 | (defvar org-table-auto-blank-field) ; defined in org-table.el | 18178 | (defvar org-table-auto-blank-field) ; defined in org-table.el |
| 18139 | (defvar org-speed-command nil) | 18179 | (defvar org-speed-command nil) |
| 18140 | 18180 | ||
| 18141 | (define-obsolete-function-alias | 18181 | (org-define-obsolete-function-alias |
| 18142 | 'org-speed-command-default-hook 'org-speed-command-activate "24.3") | 18182 | 'org-speed-command-default-hook 'org-speed-command-activate "24.3") |
| 18143 | 18183 | ||
| 18144 | (defun org-speed-command-activate (keys) | 18184 | (defun org-speed-command-activate (keys) |
| @@ -18151,7 +18191,7 @@ Use `org-speed-commands-user' for further customization." | |||
| 18151 | (cdr (assoc keys (append org-speed-commands-user | 18191 | (cdr (assoc keys (append org-speed-commands-user |
| 18152 | org-speed-commands-default))))) | 18192 | org-speed-commands-default))))) |
| 18153 | 18193 | ||
| 18154 | (define-obsolete-function-alias | 18194 | (org-define-obsolete-function-alias |
| 18155 | 'org-babel-speed-command-hook 'org-babel-speed-command-activate "24.3") | 18195 | 'org-babel-speed-command-hook 'org-babel-speed-command-activate "24.3") |
| 18156 | 18196 | ||
| 18157 | (defun org-babel-speed-command-activate (keys) | 18197 | (defun org-babel-speed-command-activate (keys) |
| @@ -18296,25 +18336,26 @@ front of the next \"|\" separator, to keep the table aligned. The table will | |||
| 18296 | still be marked for re-alignment if the field did fill the entire column, | 18336 | still be marked for re-alignment if the field did fill the entire column, |
| 18297 | because, in this case the deletion might narrow the column." | 18337 | because, in this case the deletion might narrow the column." |
| 18298 | (interactive "p") | 18338 | (interactive "p") |
| 18299 | (org-check-before-invisible-edit 'delete-backward) | 18339 | (save-match-data |
| 18300 | (if (and (org-table-p) | 18340 | (org-check-before-invisible-edit 'delete-backward) |
| 18301 | (eq N 1) | 18341 | (if (and (org-table-p) |
| 18302 | (string-match "|" (buffer-substring (point-at-bol) (point))) | 18342 | (eq N 1) |
| 18303 | (looking-at ".*?|")) | 18343 | (string-match "|" (buffer-substring (point-at-bol) (point))) |
| 18304 | (let ((pos (point)) | 18344 | (looking-at ".*?|")) |
| 18305 | (noalign (looking-at "[^|\n\r]* |")) | 18345 | (let ((pos (point)) |
| 18306 | (c org-table-may-need-update)) | 18346 | (noalign (looking-at "[^|\n\r]* |")) |
| 18307 | (backward-delete-char N) | 18347 | (c org-table-may-need-update)) |
| 18308 | (if (not overwrite-mode) | 18348 | (backward-delete-char N) |
| 18309 | (progn | 18349 | (if (not overwrite-mode) |
| 18310 | (skip-chars-forward "^|") | 18350 | (progn |
| 18311 | (insert " ") | 18351 | (skip-chars-forward "^|") |
| 18312 | (goto-char (1- pos)))) | 18352 | (insert " ") |
| 18313 | ;; noalign: if there were two spaces at the end, this field | 18353 | (goto-char (1- pos)))) |
| 18314 | ;; does not determine the width of the column. | 18354 | ;; noalign: if there were two spaces at the end, this field |
| 18315 | (if noalign (setq org-table-may-need-update c))) | 18355 | ;; does not determine the width of the column. |
| 18316 | (backward-delete-char N) | 18356 | (if noalign (setq org-table-may-need-update c))) |
| 18317 | (org-fix-tags-on-the-fly))) | 18357 | (backward-delete-char N) |
| 18358 | (org-fix-tags-on-the-fly)))) | ||
| 18318 | 18359 | ||
| 18319 | (defun org-delete-char (N) | 18360 | (defun org-delete-char (N) |
| 18320 | "Like `delete-char', but insert whitespace at field end in tables. | 18361 | "Like `delete-char', but insert whitespace at field end in tables. |
| @@ -18323,25 +18364,26 @@ front of the next \"|\" separator, to keep the table aligned. The table will | |||
| 18323 | still be marked for re-alignment if the field did fill the entire column, | 18364 | still be marked for re-alignment if the field did fill the entire column, |
| 18324 | because, in this case the deletion might narrow the column." | 18365 | because, in this case the deletion might narrow the column." |
| 18325 | (interactive "p") | 18366 | (interactive "p") |
| 18326 | (org-check-before-invisible-edit 'delete) | 18367 | (save-match-data |
| 18327 | (if (and (org-table-p) | 18368 | (org-check-before-invisible-edit 'delete) |
| 18328 | (not (bolp)) | 18369 | (if (and (org-table-p) |
| 18329 | (not (= (char-after) ?|)) | 18370 | (not (bolp)) |
| 18330 | (eq N 1)) | 18371 | (not (= (char-after) ?|)) |
| 18331 | (if (looking-at ".*?|") | 18372 | (eq N 1)) |
| 18332 | (let ((pos (point)) | 18373 | (if (looking-at ".*?|") |
| 18333 | (noalign (looking-at "[^|\n\r]* |")) | 18374 | (let ((pos (point)) |
| 18334 | (c org-table-may-need-update)) | 18375 | (noalign (looking-at "[^|\n\r]* |")) |
| 18335 | (replace-match (concat | 18376 | (c org-table-may-need-update)) |
| 18336 | (substring (match-string 0) 1 -1) | 18377 | (replace-match (concat |
| 18337 | " |")) | 18378 | (substring (match-string 0) 1 -1) |
| 18338 | (goto-char pos) | 18379 | " |")) |
| 18339 | ;; noalign: if there were two spaces at the end, this field | 18380 | (goto-char pos) |
| 18340 | ;; does not determine the width of the column. | 18381 | ;; noalign: if there were two spaces at the end, this field |
| 18341 | (if noalign (setq org-table-may-need-update c))) | 18382 | ;; does not determine the width of the column. |
| 18342 | (delete-char N)) | 18383 | (if noalign (setq org-table-may-need-update c))) |
| 18343 | (delete-char N) | 18384 | (delete-char N)) |
| 18344 | (org-fix-tags-on-the-fly))) | 18385 | (delete-char N) |
| 18386 | (org-fix-tags-on-the-fly)))) | ||
| 18345 | 18387 | ||
| 18346 | ;; Make `delete-selection-mode' work with org-mode and orgtbl-mode | 18388 | ;; Make `delete-selection-mode' work with org-mode and orgtbl-mode |
| 18347 | (put 'org-self-insert-command 'delete-selection t) | 18389 | (put 'org-self-insert-command 'delete-selection t) |
| @@ -18956,15 +18998,22 @@ See the individual commands for more information." | |||
| 18956 | (org-table-paste-rectangle) | 18998 | (org-table-paste-rectangle) |
| 18957 | (org-paste-subtree arg))) | 18999 | (org-paste-subtree arg))) |
| 18958 | 19000 | ||
| 19001 | (defsubst org-in-fixed-width-region-p () | ||
| 19002 | "Is point in a fixed-width region?" | ||
| 19003 | (save-match-data | ||
| 19004 | (eq 'fixed-width (org-element-type (org-element-at-point))))) | ||
| 19005 | |||
| 18959 | (defun org-edit-special (&optional arg) | 19006 | (defun org-edit-special (&optional arg) |
| 18960 | "Call a special editor for the stuff at point. | 19007 | "Call a special editor for the stuff at point. |
| 18961 | When at a table, call the formula editor with `org-table-edit-formulas'. | 19008 | When at a table, call the formula editor with `org-table-edit-formulas'. |
| 18962 | When at the first line of an src example, call `org-edit-src-code'. | 19009 | When in a source code block, call `org-edit-src-code'. |
| 18963 | When in an #+include line, visit the include file. Otherwise call | 19010 | When in a fixed-width region, call `org-edit-fixed-width-region'. |
| 18964 | `ffap' to visit the file at point." | 19011 | When in an #+include line, visit the included file. |
| 19012 | On a link, call `ffap' to visit the link at point. | ||
| 19013 | Otherwise, return a user error." | ||
| 18965 | (interactive) | 19014 | (interactive) |
| 18966 | ;; possibly prep session before editing source | 19015 | ;; possibly prep session before editing source |
| 18967 | (when arg | 19016 | (when (and (org-in-src-block-p) arg) |
| 18968 | (let* ((info (org-babel-get-src-block-info)) | 19017 | (let* ((info (org-babel-get-src-block-info)) |
| 18969 | (lang (nth 0 info)) | 19018 | (lang (nth 0 info)) |
| 18970 | (params (nth 2 info)) | 19019 | (params (nth 2 info)) |
| @@ -18977,16 +19026,17 @@ When in an #+include line, visit the include file. Otherwise call | |||
| 18977 | (beginning-of-line 1) | 19026 | (beginning-of-line 1) |
| 18978 | (looking-at "\\(?:#\\+\\(?:setupfile\\|include\\):?[ \t]+\"?\\|[ \t]*<include\\>.*?file=\"\\)\\([^\"\n>]+\\)")) | 19027 | (looking-at "\\(?:#\\+\\(?:setupfile\\|include\\):?[ \t]+\"?\\|[ \t]*<include\\>.*?file=\"\\)\\([^\"\n>]+\\)")) |
| 18979 | (find-file (org-trim (match-string 1)))) | 19028 | (find-file (org-trim (match-string 1)))) |
| 18980 | ((org-edit-src-code)) | ||
| 18981 | ((org-edit-fixed-width-region)) | ||
| 18982 | ((org-at-table.el-p) | ||
| 18983 | (org-edit-src-code)) | ||
| 18984 | ((or (org-at-table-p) | 19029 | ((or (org-at-table-p) |
| 18985 | (save-excursion | 19030 | (save-excursion |
| 18986 | (beginning-of-line 1) | 19031 | (beginning-of-line 1) |
| 18987 | (let ((case-fold-search )) (looking-at "[ \t]*#\\+tblfm:")))) | 19032 | (let ((case-fold-search )) (looking-at "[ \t]*#\\+tblfm:")))) |
| 18988 | (call-interactively 'org-table-edit-formulas)) | 19033 | (call-interactively 'org-table-edit-formulas)) |
| 18989 | (t (call-interactively 'ffap)))) | 19034 | ((or (org-in-block-p '("src" "example" "latex" "html")) |
| 19035 | (org-at-table.el-p)) | ||
| 19036 | (org-edit-src-code)) | ||
| 19037 | ((org-in-fixed-width-region-p) (org-edit-fixed-width-region)) | ||
| 19038 | ((org-at-regexp-p org-any-link-re) (call-interactively 'ffap)) | ||
| 19039 | (t (user-error "No special environment to edit here")))) | ||
| 18990 | 19040 | ||
| 18991 | (defvar org-table-coordinate-overlays) ; defined in org-table.el | 19041 | (defvar org-table-coordinate-overlays) ; defined in org-table.el |
| 18992 | (defun org-ctrl-c-ctrl-c (&optional arg) | 19042 | (defun org-ctrl-c-ctrl-c (&optional arg) |
| @@ -19103,8 +19153,10 @@ This command does many different things, depending on context: | |||
| 19103 | (org-list-struct-fix-ind struct parents) | 19153 | (org-list-struct-fix-ind struct parents) |
| 19104 | (setq block-item | 19154 | (setq block-item |
| 19105 | (org-list-struct-fix-box struct parents prevs orderedp))) | 19155 | (org-list-struct-fix-box struct parents prevs orderedp))) |
| 19106 | (org-list-struct-apply-struct struct old-struct) | 19156 | (if (equal struct old-struct) |
| 19107 | (org-update-checkbox-count-maybe) | 19157 | (user-error "Cannot toggle this checkbox (unchecked subitems?)") |
| 19158 | (org-list-struct-apply-struct struct old-struct) | ||
| 19159 | (org-update-checkbox-count-maybe)) | ||
| 19108 | (when block-item | 19160 | (when block-item |
| 19109 | (message | 19161 | (message |
| 19110 | "Checkboxes were removed due to unchecked box at line %d" | 19162 | "Checkboxes were removed due to unchecked box at line %d" |
| @@ -20238,13 +20290,19 @@ and end of string." | |||
| 20238 | "Is S an ID created by UUIDGEN?" | 20290 | "Is S an ID created by UUIDGEN?" |
| 20239 | (string-match "\\`[0-9a-f]\\{8\\}-[0-9a-f]\\{4\\}-[0-9a-f]\\{4\\}-[0-9a-f]\\{4\\}-[0-9a-f]\\{12\\}\\'" (downcase s))) | 20291 | (string-match "\\`[0-9a-f]\\{8\\}-[0-9a-f]\\{4\\}-[0-9a-f]\\{4\\}-[0-9a-f]\\{4\\}-[0-9a-f]\\{12\\}\\'" (downcase s))) |
| 20240 | 20292 | ||
| 20241 | (defun org-in-src-block-p nil | 20293 | (defun org-in-src-block-p (&optional inside) |
| 20242 | "Whether point is in a code source block." | 20294 | "Whether point is in a code source block. |
| 20243 | (let (ov) | 20295 | When INSIDE is non-nil, don't consider we are within a src block |
| 20244 | (when (setq ov (overlays-at (point))) | 20296 | when point is at #+BEGIN_SRC or #+END_SRC." |
| 20245 | (memq 'org-block-background | 20297 | (let ((case-fold-search t) ov) |
| 20246 | (overlay-properties | 20298 | (or (and (setq ov (overlays-at (point))) |
| 20247 | (car ov)))))) | 20299 | (memq 'org-block-background |
| 20300 | (overlay-properties (car ov)))) | ||
| 20301 | (and (not inside) | ||
| 20302 | (save-match-data | ||
| 20303 | (save-excursion | ||
| 20304 | (beginning-of-line) | ||
| 20305 | (looking-at ".*#\\+\\(begin\\|end\\)_src"))))))) | ||
| 20248 | 20306 | ||
| 20249 | (defun org-context () | 20307 | (defun org-context () |
| 20250 | "Return a list of contexts of the current cursor position. | 20308 | "Return a list of contexts of the current cursor position. |
| @@ -20587,9 +20645,8 @@ return nil." | |||
| 20587 | "Switch to buffer in a second window on the current frame. | 20645 | "Switch to buffer in a second window on the current frame. |
| 20588 | In particular, do not allow pop-up frames. | 20646 | In particular, do not allow pop-up frames. |
| 20589 | Returns the newly created buffer." | 20647 | Returns the newly created buffer." |
| 20590 | (let (pop-up-frames special-display-buffer-names special-display-regexps | 20648 | (org-no-popups |
| 20591 | special-display-function) | 20649 | (apply 'switch-to-buffer-other-window args))) |
| 20592 | (apply 'switch-to-buffer-other-window args))) | ||
| 20593 | 20650 | ||
| 20594 | (defun org-combine-plists (&rest plists) | 20651 | (defun org-combine-plists (&rest plists) |
| 20595 | "Create a single property list from all plists in PLISTS. | 20652 | "Create a single property list from all plists in PLISTS. |
| @@ -20768,6 +20825,7 @@ hierarchy of headlines by UP levels before marking the subtree." | |||
| 20768 | (t | 20825 | (t |
| 20769 | (beginning-of-line 0) | 20826 | (beginning-of-line 0) |
| 20770 | (while (and (not (bobp)) | 20827 | (while (and (not (bobp)) |
| 20828 | (not (looking-at org-table-line-regexp)) | ||
| 20771 | (not (looking-at org-drawer-regexp)) | 20829 | (not (looking-at org-drawer-regexp)) |
| 20772 | ;; When point started in an inline task, do not move | 20830 | ;; When point started in an inline task, do not move |
| 20773 | ;; above task starting line. | 20831 | ;; above task starting line. |
| @@ -20898,6 +20956,7 @@ hierarchy of headlines by UP levels before marking the subtree." | |||
| 20898 | '(org-fill-paragraph-separate-nobreak-p | 20956 | '(org-fill-paragraph-separate-nobreak-p |
| 20899 | org-fill-line-break-nobreak-p))))) | 20957 | org-fill-line-break-nobreak-p))))) |
| 20900 | (org-set-local 'fill-paragraph-function 'org-fill-paragraph) | 20958 | (org-set-local 'fill-paragraph-function 'org-fill-paragraph) |
| 20959 | (org-set-local 'auto-fill-inhibit-regexp nil) | ||
| 20901 | (org-set-local 'adaptive-fill-function 'org-adaptive-fill-function) | 20960 | (org-set-local 'adaptive-fill-function 'org-adaptive-fill-function) |
| 20902 | (org-set-local 'normal-auto-fill-function 'org-auto-fill-function) | 20961 | (org-set-local 'normal-auto-fill-function 'org-auto-fill-function) |
| 20903 | (org-set-local 'comment-line-break-function 'org-comment-line-break-function)) | 20962 | (org-set-local 'comment-line-break-function 'org-comment-line-break-function)) |
| @@ -20920,48 +20979,54 @@ hierarchy of headlines by UP levels before marking the subtree." | |||
| 20920 | "Compute a fill prefix for the current line. | 20979 | "Compute a fill prefix for the current line. |
| 20921 | Return fill prefix, as a string, or nil if current line isn't | 20980 | Return fill prefix, as a string, or nil if current line isn't |
| 20922 | meant to be filled." | 20981 | meant to be filled." |
| 20923 | (org-with-wide-buffer | 20982 | (let (prefix) |
| 20924 | (unless (and (derived-mode-p 'message-mode) (not (message-in-body-p))) | 20983 | (when (and (derived-mode-p 'message-mode) (message-in-body-p)) |
| 20925 | ;; FIXME: This is really the job of orgstruct++-mode | 20984 | (save-excursion |
| 20926 | (let* ((p (line-beginning-position)) | 20985 | (beginning-of-line) |
| 20927 | (element (save-excursion (beginning-of-line) | 20986 | (cond ((looking-at message-cite-prefix-regexp) |
| 20928 | (org-element-at-point))) | 20987 | (setq prefix (match-string-no-properties 0))) |
| 20929 | (type (org-element-type element)) | 20988 | ((looking-at org-outline-regexp) |
| 20930 | (post-affiliated | 20989 | (setq prefix ""))))) |
| 20931 | (save-excursion | 20990 | (or prefix |
| 20932 | (goto-char (org-element-property :begin element)) | 20991 | (org-with-wide-buffer |
| 20933 | (while (looking-at org-element--affiliated-re) (forward-line)) | 20992 | (let* ((p (line-beginning-position)) |
| 20934 | (point)))) | 20993 | (element (save-excursion (beginning-of-line) (org-element-at-point))) |
| 20935 | (unless (< p post-affiliated) | 20994 | (type (org-element-type element)) |
| 20936 | (case type | 20995 | (post-affiliated |
| 20937 | (comment (looking-at "[ \t]*# ?") (match-string 0)) | 20996 | (save-excursion |
| 20938 | (footnote-definition "") | 20997 | (goto-char (org-element-property :begin element)) |
| 20939 | ((item plain-list) | 20998 | (while (looking-at org-element--affiliated-re) (forward-line)) |
| 20940 | (make-string (org-list-item-body-column post-affiliated) ? )) | 20999 | (point)))) |
| 20941 | (paragraph | 21000 | (unless (< p post-affiliated) |
| 20942 | ;; Fill prefix is usually the same as the current line, | 21001 | (case type |
| 20943 | ;; except if the paragraph is at the beginning of an item. | 21002 | (comment (looking-at "[ \t]*# ?") (match-string 0)) |
| 20944 | (let ((parent (org-element-property :parent element))) | 21003 | (footnote-definition "") |
| 20945 | (cond ((eq (org-element-type parent) 'item) | 21004 | ((item plain-list) |
| 20946 | (make-string (org-list-item-body-column | 21005 | (make-string (org-list-item-body-column post-affiliated) ? )) |
| 20947 | (org-element-property :begin parent)) | 21006 | (paragraph |
| 20948 | ? )) | 21007 | ;; Fill prefix is usually the same as the current line, |
| 20949 | ((save-excursion (beginning-of-line) (looking-at "[ \t]+")) | 21008 | ;; except if the paragraph is at the beginning of an item. |
| 20950 | (match-string 0)) | 21009 | (let ((parent (org-element-property :parent element))) |
| 20951 | (t "")))) | 21010 | (cond ((eq (org-element-type parent) 'item) |
| 20952 | (comment-block | 21011 | (make-string (org-list-item-body-column |
| 20953 | ;; Only fill contents if P is within block boundaries. | 21012 | (org-element-property :begin parent)) |
| 20954 | (let* ((cbeg (save-excursion (goto-char post-affiliated) | 21013 | ? )) |
| 20955 | (forward-line) | 21014 | ((save-excursion (beginning-of-line) (looking-at "[ \t]+")) |
| 20956 | (point))) | 21015 | (match-string 0)) |
| 20957 | (cend (save-excursion | 21016 | (t "")))) |
| 20958 | (goto-char (org-element-property :end element)) | 21017 | (comment-block |
| 20959 | (skip-chars-backward " \r\t\n") | 21018 | ;; Only fill contents if P is within block boundaries. |
| 20960 | (line-beginning-position)))) | 21019 | (let* ((cbeg (save-excursion (goto-char post-affiliated) |
| 20961 | (when (and (>= p cbeg) (< p cend)) | 21020 | (forward-line) |
| 20962 | (if (save-excursion (beginning-of-line) (looking-at "[ \t]+")) | 21021 | (point))) |
| 20963 | (match-string 0) | 21022 | (cend (save-excursion |
| 20964 | "")))))))))) | 21023 | (goto-char (org-element-property :end element)) |
| 21024 | (skip-chars-backward " \r\t\n") | ||
| 21025 | (line-beginning-position)))) | ||
| 21026 | (when (and (>= p cbeg) (< p cend)) | ||
| 21027 | (if (save-excursion (beginning-of-line) (looking-at "[ \t]+")) | ||
| 21028 | (match-string 0) | ||
| 21029 | ""))))))))))) | ||
| 20965 | 21030 | ||
| 20966 | (declare-function message-goto-body "message" ()) | 21031 | (declare-function message-goto-body "message" ()) |
| 20967 | (defvar message-cite-prefix-regexp) ; From message.el | 21032 | (defvar message-cite-prefix-regexp) ; From message.el |
| @@ -20981,12 +21046,12 @@ width for filling. | |||
| 20981 | 21046 | ||
| 20982 | For convenience, when point is at a plain list, an item or | 21047 | For convenience, when point is at a plain list, an item or |
| 20983 | a footnote definition, try to fill the first paragraph within." | 21048 | a footnote definition, try to fill the first paragraph within." |
| 20984 | ;; Falls back on message-fill-paragraph when necessary | ||
| 20985 | (interactive) | 21049 | (interactive) |
| 20986 | (if (and (derived-mode-p 'message-mode) | 21050 | (if (and (derived-mode-p 'message-mode) |
| 20987 | (or (not (message-in-body-p)) | 21051 | (or (not (message-in-body-p)) |
| 20988 | (save-excursion (move-beginning-of-line 1) | 21052 | (save-excursion (move-beginning-of-line 1) |
| 20989 | (looking-at message-cite-prefix-regexp)))) | 21053 | (looking-at message-cite-prefix-regexp)))) |
| 21054 | ;; First ensure filling is correct in message-mode. | ||
| 20990 | (let ((fill-paragraph-function | 21055 | (let ((fill-paragraph-function |
| 20991 | (cadadr (assoc 'fill-paragraph-function org-fb-vars))) | 21056 | (cadadr (assoc 'fill-paragraph-function org-fb-vars))) |
| 20992 | (fill-prefix (cadadr (assoc 'fill-prefix org-fb-vars))) | 21057 | (fill-prefix (cadadr (assoc 'fill-prefix org-fb-vars))) |
| @@ -21003,6 +21068,8 @@ a footnote definition, try to fill the first paragraph within." | |||
| 21003 | ;; the buffer. In that case, ignore filling. | 21068 | ;; the buffer. In that case, ignore filling. |
| 21004 | (if (< (point) (org-element-property :begin element)) t | 21069 | (if (< (point) (org-element-property :begin element)) t |
| 21005 | (case (org-element-type element) | 21070 | (case (org-element-type element) |
| 21071 | ;; Use major mode filling function is src blocks. | ||
| 21072 | (src-block (org-babel-do-key-sequence-in-edit-buffer (kbd "M-q"))) | ||
| 21006 | ;; Align Org tables, leave table.el tables as-is. | 21073 | ;; Align Org tables, leave table.el tables as-is. |
| 21007 | (table-row (org-table-align) t) | 21074 | (table-row (org-table-align) t) |
| 21008 | (table | 21075 | (table |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 4194d363a3d..f6c43e2c392 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -1280,7 +1280,7 @@ to `compilation-error-regexp-alist' if RULES is nil." | |||
| 1280 | ;; whether or not omake's own error messages are recognized. | 1280 | ;; whether or not omake's own error messages are recognized. |
| 1281 | (cond | 1281 | (cond |
| 1282 | ((not (memq 'omake compilation-error-regexp-alist)) nil) | 1282 | ((not (memq 'omake compilation-error-regexp-alist)) nil) |
| 1283 | ((string-match "\\`\\([^^]\\|^\\( \\*\\|\\[\\)\\)" pat) | 1283 | ((string-match "\\`\\([^^]\\|\\^\\( \\*\\|\\[\\)\\)" pat) |
| 1284 | nil) ;; Not anchored or anchored but already allows empty spaces. | 1284 | nil) ;; Not anchored or anchored but already allows empty spaces. |
| 1285 | (t (setq pat (concat "^ *" (substring pat 1))))) | 1285 | (t (setq pat (concat "^ *" (substring pat 1))))) |
| 1286 | 1286 | ||