diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/basic.texi | 5 | ||||
| -rw-r--r-- | doc/emacs/indent.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/misc.texi | 1 | ||||
| -rw-r--r-- | doc/emacs/rmail.texi | 8 | ||||
| -rw-r--r-- | doc/emacs/search.texi | 1 | ||||
| -rw-r--r-- | doc/lispref/commands.texi | 7 | ||||
| -rw-r--r-- | doc/lispref/errors.texi | 11 | ||||
| -rw-r--r-- | doc/lispref/internals.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/keymaps.texi | 5 | ||||
| -rw-r--r-- | doc/lispref/minibuf.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/os.texi | 13 | ||||
| -rw-r--r-- | doc/lispref/variables.texi | 2 | ||||
| -rw-r--r-- | doc/misc/efaq.texi | 60 | ||||
| -rw-r--r-- | doc/misc/flymake.texi | 3 | ||||
| -rw-r--r-- | doc/misc/org.texi | 1213 | ||||
| -rw-r--r-- | doc/misc/tramp.texi | 52 |
16 files changed, 857 insertions, 534 deletions
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index cd1ffbebd7c..77c80547462 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi | |||
| @@ -310,7 +310,10 @@ Scroll one screen backward, and move point onscreen if necessary | |||
| 310 | @kindex M-g c | 310 | @kindex M-g c |
| 311 | @findex goto-char | 311 | @findex goto-char |
| 312 | Read a number @var{n} and move point to buffer position @var{n}. | 312 | Read a number @var{n} and move point to buffer position @var{n}. |
| 313 | Position 1 is the beginning of the buffer. | 313 | Position 1 is the beginning of the buffer. If point is on or just |
| 314 | after a number in the buffer, that is the default for @var{n}. Just | ||
| 315 | type @key{RET} in the minibuffer to use it. You can also specify | ||
| 316 | @var{n} by giving @kbd{M-g c} a numeric prefix argument. | ||
| 314 | 317 | ||
| 315 | @item M-g M-g | 318 | @item M-g M-g |
| 316 | @itemx M-g g | 319 | @itemx M-g g |
diff --git a/doc/emacs/indent.texi b/doc/emacs/indent.texi index d6395ef155d..e8b46506335 100644 --- a/doc/emacs/indent.texi +++ b/doc/emacs/indent.texi | |||
| @@ -255,7 +255,7 @@ indentation; otherwise, it inserts a tab character. | |||
| 255 | indent can be further customized via the @code{tab-first-completion} | 255 | indent can be further customized via the @code{tab-first-completion} |
| 256 | variable. For instance, if that variable is @code{eol}, only complete | 256 | variable. For instance, if that variable is @code{eol}, only complete |
| 257 | if point is at the end of a line. @xref{Mode-Specific Indent,,, | 257 | if point is at the end of a line. @xref{Mode-Specific Indent,,, |
| 258 | elisp, The Emacs Lisp Reference Manual} for further details. | 258 | elisp, The Emacs Lisp Reference Manual}, for further details. |
| 259 | 259 | ||
| 260 | @cindex Electric Indent mode | 260 | @cindex Electric Indent mode |
| 261 | @cindex mode, Electric Indent | 261 | @cindex mode, Electric Indent |
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index c2c382ead0b..54fafae5654 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi | |||
| @@ -1709,6 +1709,7 @@ connections. A setup to use this functionality could be: | |||
| 1709 | @example | 1709 | @example |
| 1710 | [Socket] | 1710 | [Socket] |
| 1711 | ListenStream=/path/to/.emacs.socket | 1711 | ListenStream=/path/to/.emacs.socket |
| 1712 | DirectoryMode=0700 | ||
| 1712 | 1713 | ||
| 1713 | [Install] | 1714 | [Install] |
| 1714 | WantedBy=sockets.target | 1715 | WantedBy=sockets.target |
diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi index 467c5269866..0c47812449b 100644 --- a/doc/emacs/rmail.texi +++ b/doc/emacs/rmail.texi | |||
| @@ -1591,6 +1591,14 @@ value is used. | |||
| 1591 | Otherwise, Rmail will ask you for the password to use. | 1591 | Otherwise, Rmail will ask you for the password to use. |
| 1592 | @end enumerate | 1592 | @end enumerate |
| 1593 | 1593 | ||
| 1594 | On some mail servers the usernames include domain information, which | ||
| 1595 | can mean they contain the @samp{@@} character. The inbox specifier | ||
| 1596 | string uses @samp{@@} to signal the start of the mailserver name. | ||
| 1597 | This creates confusion for movemail. If your username contains | ||
| 1598 | @samp{@@} and you're using Mailutils @command{movemail} then you can | ||
| 1599 | fix this: Replace @code{@@} in the user name with its @acronym{URL} | ||
| 1600 | encoding @samp{%40}. | ||
| 1601 | |||
| 1594 | @vindex rmail-movemail-flags | 1602 | @vindex rmail-movemail-flags |
| 1595 | If you need to pass additional command-line flags to @command{movemail}, | 1603 | If you need to pass additional command-line flags to @command{movemail}, |
| 1596 | set the variable @code{rmail-movemail-flags} a list of the flags you | 1604 | set the variable @code{rmail-movemail-flags} a list of the flags you |
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 5be45ce6a92..77a4e8097e9 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi | |||
| @@ -1771,6 +1771,7 @@ occurrence of @var{string}. When done, exit the recursive editing level | |||
| 1771 | with @kbd{C-M-c} to proceed to the next occurrence. | 1771 | with @kbd{C-M-c} to proceed to the next occurrence. |
| 1772 | 1772 | ||
| 1773 | @item e | 1773 | @item e |
| 1774 | @itemx E | ||
| 1774 | to edit the replacement string in the minibuffer. When you exit the | 1775 | to edit the replacement string in the minibuffer. When you exit the |
| 1775 | minibuffer by typing @key{RET}, the minibuffer contents replace the | 1776 | minibuffer by typing @key{RET}, the minibuffer contents replace the |
| 1776 | current occurrence of the pattern. They also become the new | 1777 | current occurrence of the pattern. They also become the new |
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index ebfda01671e..15d7e4e3a71 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi | |||
| @@ -928,6 +928,13 @@ remapping), and @code{this-original-command} gives the command that | |||
| 928 | was specified to run but remapped into another command. | 928 | was specified to run but remapped into another command. |
| 929 | @end defvar | 929 | @end defvar |
| 930 | 930 | ||
| 931 | @defvar current-minibuffer-command | ||
| 932 | This has the same value as @code{this-command}, but is bound | ||
| 933 | recursively when entering a minibuffer. This variable can be used | ||
| 934 | from minibuffer hooks and the like to determine what command opened | ||
| 935 | the current minibuffer session. | ||
| 936 | @end defvar | ||
| 937 | |||
| 931 | @defun this-command-keys | 938 | @defun this-command-keys |
| 932 | This function returns a string or vector containing the key sequence | 939 | This function returns a string or vector containing the key sequence |
| 933 | that invoked the present command. Any events read by the command | 940 | that invoked the present command. Any events read by the command |
diff --git a/doc/lispref/errors.texi b/doc/lispref/errors.texi index cd8694be8a3..a386a41bd3d 100644 --- a/doc/lispref/errors.texi +++ b/doc/lispref/errors.texi | |||
| @@ -129,9 +129,18 @@ This is a subcategory of @code{file-error}. @xref{Modification Time}. | |||
| 129 | This is a subcategory of @code{file-error}. It happens, when a file | 129 | This is a subcategory of @code{file-error}. It happens, when a file |
| 130 | could not be watched for changes. @xref{File Notifications}. | 130 | could not be watched for changes. @xref{File Notifications}. |
| 131 | 131 | ||
| 132 | @item remote-file-error | ||
| 133 | This is a subcategory of @code{file-error}, which results from | ||
| 134 | problems in accessing a remote file. @xref{Remote Files,,, emacs, The | ||
| 135 | GNU Emacs Manual}. Often, this error appears when timers, process | ||
| 136 | filters, process sentinels or special events in general try to access | ||
| 137 | a remote file, and collide with another remote file operation. In | ||
| 138 | general it is a good idea to write a bug report. | ||
| 139 | @xref{Bugs,,, emacs, The GNU Emacs Manual}. | ||
| 140 | |||
| 132 | @c net/ange-ftp.el | 141 | @c net/ange-ftp.el |
| 133 | @item ftp-error | 142 | @item ftp-error |
| 134 | This is a subcategory of @code{file-error}, which results from | 143 | This is a subcategory of @code{remote-file-error}, which results from |
| 135 | problems in accessing a remote file using ftp. @xref{Remote Files,,, | 144 | problems in accessing a remote file using ftp. @xref{Remote Files,,, |
| 136 | emacs, The GNU Emacs Manual}. | 145 | emacs, The GNU Emacs Manual}. |
| 137 | 146 | ||
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index 28a5fdb3492..fa3dacbb7ae 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi | |||
| @@ -625,7 +625,7 @@ All the data here is approximate, because there's really no consistent | |||
| 625 | way to compute the size of a variable. For instance, two variables | 625 | way to compute the size of a variable. For instance, two variables |
| 626 | may share parts of a data structure, and this will be counted twice, | 626 | may share parts of a data structure, and this will be counted twice, |
| 627 | but this command may still give a useful high-level overview of which | 627 | but this command may still give a useful high-level overview of which |
| 628 | parts of Emacs is using memory. | 628 | parts of Emacs are using memory. |
| 629 | @end defun | 629 | @end defun |
| 630 | 630 | ||
| 631 | @node Stack-allocated Objects | 631 | @node Stack-allocated Objects |
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index 6635f50960a..9daeb2c77f9 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi | |||
| @@ -2812,6 +2812,11 @@ the shift modifier: | |||
| 2812 | @xref{Function Keys}, for more information about how to add modifiers to | 2812 | @xref{Function Keys}, for more information about how to add modifiers to |
| 2813 | function keys. | 2813 | function keys. |
| 2814 | 2814 | ||
| 2815 | If you have functions that change whether a tool bar item is enabled | ||
| 2816 | or not, this status is not necessarily updated visually immediately. | ||
| 2817 | To force recalculation of the tool bar, call | ||
| 2818 | @code{force-mode-line-update} (@pxref{Mode Line Format}). | ||
| 2819 | |||
| 2815 | @node Modifying Menus | 2820 | @node Modifying Menus |
| 2816 | @subsection Modifying Menus | 2821 | @subsection Modifying Menus |
| 2817 | @cindex menu modification | 2822 | @cindex menu modification |
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 56bc0b8ab67..48f068ee604 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi | |||
| @@ -1803,7 +1803,8 @@ The value should be a function to add prefixes and suffixes to | |||
| 1803 | completions. This function must accept one argument, a list of | 1803 | completions. This function must accept one argument, a list of |
| 1804 | completions, and should return such a list of completions where | 1804 | completions, and should return such a list of completions where |
| 1805 | each element contains a list of three elements: a completion, | 1805 | each element contains a list of three elements: a completion, |
| 1806 | a prefix string, and a suffix string. | 1806 | a prefix string, and a suffix string. This function takes priority |
| 1807 | over @code{:annotation-function}. | ||
| 1807 | 1808 | ||
| 1808 | @item :exit-function | 1809 | @item :exit-function |
| 1809 | The value should be a function to run after performing completion. | 1810 | The value should be a function to run after performing completion. |
| @@ -1911,7 +1912,8 @@ completions. The function should take one argument, | |||
| 1911 | return such a list of @var{completions} where each element contains a list | 1912 | return such a list of @var{completions} where each element contains a list |
| 1912 | of three elements: a completion, a prefix which is displayed before | 1913 | of three elements: a completion, a prefix which is displayed before |
| 1913 | the completion string in the @file{*Completions*} buffer, and | 1914 | the completion string in the @file{*Completions*} buffer, and |
| 1914 | a suffix displayed after the completion string. | 1915 | a suffix displayed after the completion string. This function |
| 1916 | takes priority over @code{annotation-function}. | ||
| 1915 | 1917 | ||
| 1916 | @item display-sort-function | 1918 | @item display-sort-function |
| 1917 | The value should be a function for sorting completions. The function | 1919 | The value should be a function for sorting completions. The function |
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index bc602205f5d..85f930d1897 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -2106,6 +2106,19 @@ run while waiting. If a timer function needs to perform an action | |||
| 2106 | after a certain time has elapsed, it can do this by scheduling a new | 2106 | after a certain time has elapsed, it can do this by scheduling a new |
| 2107 | timer. | 2107 | timer. |
| 2108 | 2108 | ||
| 2109 | If a timer function performs a remote file operation, it can be in | ||
| 2110 | conflict with an already running remote file operation of the same | ||
| 2111 | connection. Such conflicts are detected, and they result in a | ||
| 2112 | @code{remote-file-error} error (@pxref{Standard Errors}). This should | ||
| 2113 | be protected by wrapping the timer function body with | ||
| 2114 | |||
| 2115 | @lisp | ||
| 2116 | @group | ||
| 2117 | (ignore-error 'remote-file-error | ||
| 2118 | @dots{}) | ||
| 2119 | @end group | ||
| 2120 | @end lisp | ||
| 2121 | |||
| 2109 | If a timer function calls functions that can change the match data, | 2122 | If a timer function calls functions that can change the match data, |
| 2110 | it should save and restore the match data. @xref{Saving Match Data}. | 2123 | it should save and restore the match data. @xref{Saving Match Data}. |
| 2111 | 2124 | ||
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index b9ff0747382..9447e8d04c6 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi | |||
| @@ -1287,7 +1287,7 @@ be used.) | |||
| 1287 | 1287 | ||
| 1288 | @subsubheading Cross-file variable checking | 1288 | @subsubheading Cross-file variable checking |
| 1289 | 1289 | ||
| 1290 | @strong{Note:} This is an experimental feature that may change or | 1290 | @strong{Caution:} This is an experimental feature that may change or |
| 1291 | disappear without prior notice. | 1291 | disappear without prior notice. |
| 1292 | 1292 | ||
| 1293 | The byte-compiler can also warn about lexical variables that are | 1293 | The byte-compiler can also warn about lexical variables that are |
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index 462eb4cf3ae..83c0a19d391 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi | |||
| @@ -594,11 +594,11 @@ You can get a printed reference card listing commands and keys to | |||
| 594 | invoke them. You can order one from the FSF for $2 (or 10 for $18), | 594 | invoke them. You can order one from the FSF for $2 (or 10 for $18), |
| 595 | or you can print your own from the @file{etc/refcards/refcard.tex} or | 595 | or you can print your own from the @file{etc/refcards/refcard.tex} or |
| 596 | @file{etc/refcards/refcard.pdf} files in the Emacs distribution. | 596 | @file{etc/refcards/refcard.pdf} files in the Emacs distribution. |
| 597 | Beginning with version 21.1, the Emacs distribution comes with | 597 | The Emacs distribution comes with translations of the reference card |
| 598 | translations of the reference card into several languages; look for | 598 | into several languages; look for files named |
| 599 | files named @file{etc/refcards/@var{lang}-refcard.*}, where @var{lang} | 599 | @file{etc/refcards/@var{lang}-refcard.*}, where @var{lang} is a |
| 600 | is a two-letter code of the language. For example, the German version | 600 | two-letter code of the language. For example, the German version of |
| 601 | of the reference card is in the files @file{etc/refcards/de-refcard.tex} | 601 | the reference card is in the files @file{etc/refcards/de-refcard.tex} |
| 602 | and @file{etc/refcards/de-refcard.pdf}. | 602 | and @file{etc/refcards/de-refcard.pdf}. |
| 603 | 603 | ||
| 604 | @item | 604 | @item |
| @@ -1672,8 +1672,6 @@ would use with @code{display-line-numbers}. | |||
| 1672 | There is also the @samp{linum} package (distributed with Emacs since | 1672 | There is also the @samp{linum} package (distributed with Emacs since |
| 1673 | version 23.1) which will henceforth become obsolete. Users and | 1673 | version 23.1) which will henceforth become obsolete. Users and |
| 1674 | developers are encouraged to use @samp{display-line-numbers} instead. | 1674 | developers are encouraged to use @samp{display-line-numbers} instead. |
| 1675 | The packages @samp{setnu} and @samp{wb-line-number} (not distributed | ||
| 1676 | with Emacs) also implement this feature. | ||
| 1677 | 1675 | ||
| 1678 | @node Displaying the current file name in the titlebar | 1676 | @node Displaying the current file name in the titlebar |
| 1679 | @section How can I modify the titlebar to contain the current file name? | 1677 | @section How can I modify the titlebar to contain the current file name? |
| @@ -1694,7 +1692,7 @@ machine at which Emacs was invoked. This is done by setting | |||
| 1694 | @code{frame-title-format} to the default value of | 1692 | @code{frame-title-format} to the default value of |
| 1695 | 1693 | ||
| 1696 | @lisp | 1694 | @lisp |
| 1697 | (multiple-frames "%b" ("" invocation-name "@@" (system-name))) | 1695 | (multiple-frames "%b" ("" "%b - GNU Emacs at " system-name)) |
| 1698 | @end lisp | 1696 | @end lisp |
| 1699 | 1697 | ||
| 1700 | To modify the behavior such that frame titlebars contain the buffer's | 1698 | To modify the behavior such that frame titlebars contain the buffer's |
| @@ -3322,7 +3320,7 @@ the main GNU distribution site, sources are available as | |||
| 3322 | @c Don't include VER in the file name, because pretests are not there. | 3320 | @c Don't include VER in the file name, because pretests are not there. |
| 3323 | @uref{https://ftp.gnu.org/pub/gnu/emacs/emacs-VERSION.tar.gz} | 3321 | @uref{https://ftp.gnu.org/pub/gnu/emacs/emacs-VERSION.tar.gz} |
| 3324 | 3322 | ||
| 3325 | (Replace @samp{VERSION} with the relevant version number, e.g., @samp{23.1}.) | 3323 | (Replace @samp{VERSION} with the relevant version number, e.g., @samp{28.1}.) |
| 3326 | 3324 | ||
| 3327 | @item | 3325 | @item |
| 3328 | Next uncompress and extract the source files. This requires | 3326 | Next uncompress and extract the source files. This requires |
| @@ -3392,7 +3390,7 @@ problem (@pxref{Reporting bugs}). | |||
| 3392 | * Packages that do not come with Emacs:: | 3390 | * Packages that do not come with Emacs:: |
| 3393 | * Spell-checkers:: | 3391 | * Spell-checkers:: |
| 3394 | * Current GNU distributions:: | 3392 | * Current GNU distributions:: |
| 3395 | * Difference between Emacs and XEmacs:: | 3393 | * What was XEmacs?:: |
| 3396 | * Emacs for minimalists:: | 3394 | * Emacs for minimalists:: |
| 3397 | * Emacs for MS-DOS:: | 3395 | * Emacs for MS-DOS:: |
| 3398 | * Emacs for MS-Windows:: | 3396 | * Emacs for MS-Windows:: |
| @@ -3528,35 +3526,21 @@ A list of sites mirroring @samp{ftp.gnu.org} can be found at | |||
| 3528 | 3526 | ||
| 3529 | @uref{https://www.gnu.org/prep/ftp} | 3527 | @uref{https://www.gnu.org/prep/ftp} |
| 3530 | 3528 | ||
| 3531 | @node Difference between Emacs and XEmacs | 3529 | @node What was XEmacs? |
| 3532 | @section What is the difference between Emacs and XEmacs (formerly Lucid Emacs)? | 3530 | @section What was XEmacs? |
| 3533 | @cindex XEmacs | 3531 | @cindex XEmacs |
| 3534 | @cindex Difference Emacs and XEmacs | ||
| 3535 | @cindex Lucid Emacs | ||
| 3536 | @cindex Epoch | ||
| 3537 | 3532 | ||
| 3538 | XEmacs was a branch version of Emacs that is no longer actively | 3533 | XEmacs was a branch version of Emacs that is no longer actively |
| 3539 | developed. XEmacs was first called Lucid Emacs, and was initially | 3534 | developed. XEmacs last released a new version on January 30, 2009, |
| 3540 | derived from a prerelease version of Emacs 19. In this FAQ, we use | 3535 | and it lacks many important features that exist in Emacs. Since its |
| 3541 | the name ``Emacs'' only for the official version. | 3536 | development has stopped, we do not expect to see any new releases. |
| 3542 | |||
| 3543 | XEmacs last released a new version on January 30, 2009, and it lacks | ||
| 3544 | many important features that exists in Emacs. In the past, it was not | ||
| 3545 | uncommon for Emacs packages to include code for compatibility with | ||
| 3546 | XEmacs. Nowadays, although some packages still maintain such | ||
| 3547 | compatibility code, several of the more popular built-in and third | ||
| 3548 | party packages have either stopped supporting XEmacs or were developed | ||
| 3549 | exclusively for Emacs. | ||
| 3550 | 3537 | ||
| 3551 | Some XEmacs code has been contributed to Emacs, and we would like to | 3538 | In the past, it was not uncommon for Emacs packages to include code |
| 3552 | use other parts, but the earlier XEmacs maintainers did not always | 3539 | for compatibility with XEmacs. Nowadays, most built-in and third party |
| 3553 | keep track of the authors of contributed code, which makes it | 3540 | packages have either stopped supporting XEmacs or were developed |
| 3554 | impossible for the FSF to get copyright papers signed for that code. | 3541 | exclusively for Emacs. |
| 3555 | (The FSF requires these papers for all the code included in the Emacs | ||
| 3556 | release, aside from generic C support packages that retain their | ||
| 3557 | separate identity and are not integrated into the code of Emacs | ||
| 3558 | proper.) | ||
| 3559 | 3542 | ||
| 3543 | XEmacs was initially derived from a prerelease version of Emacs 19. | ||
| 3560 | If you want to talk about these two versions and distinguish them, | 3544 | If you want to talk about these two versions and distinguish them, |
| 3561 | please call them ``Emacs'' and ``XEmacs.'' To contrast ``XEmacs'' | 3545 | please call them ``Emacs'' and ``XEmacs.'' To contrast ``XEmacs'' |
| 3562 | with ``GNU Emacs'' would be misleading, since XEmacs too has its | 3546 | with ``GNU Emacs'' would be misleading, since XEmacs too has its |
| @@ -3622,8 +3606,8 @@ For MS-DOS, @pxref{Emacs for MS-DOS}. | |||
| 3622 | @section Where can I get Emacs for GNUstep? | 3606 | @section Where can I get Emacs for GNUstep? |
| 3623 | @cindex GNUstep, Emacs for | 3607 | @cindex GNUstep, Emacs for |
| 3624 | 3608 | ||
| 3625 | Beginning with version 23.1, Emacs supports GNUstep natively. | 3609 | Emacs supports GNUstep natively. See the file @file{nextstep/INSTALL} |
| 3626 | See the file @file{nextstep/INSTALL} in the distribution. | 3610 | in the distribution. |
| 3627 | 3611 | ||
| 3628 | @node Emacs for macOS | 3612 | @node Emacs for macOS |
| 3629 | @section Where can I get Emacs for macOS? | 3613 | @section Where can I get Emacs for macOS? |
| @@ -3631,8 +3615,8 @@ See the file @file{nextstep/INSTALL} in the distribution. | |||
| 3631 | @cindex Macintosh, Emacs for | 3615 | @cindex Macintosh, Emacs for |
| 3632 | @cindex macOS, Emacs for | 3616 | @cindex macOS, Emacs for |
| 3633 | 3617 | ||
| 3634 | Beginning with version 22.1, Emacs supports macOS natively. | 3618 | Emacs supports macOS natively. See the file @file{nextstep/INSTALL} |
| 3635 | See the file @file{nextstep/INSTALL} in the distribution. | 3619 | in the distribution. |
| 3636 | 3620 | ||
| 3637 | @c ------------------------------------------------------------ | 3621 | @c ------------------------------------------------------------ |
| 3638 | @node Key bindings | 3622 | @node Key bindings |
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi index b4757938e99..8f2954bdf4f 100644 --- a/doc/misc/flymake.texi +++ b/doc/misc/flymake.texi | |||
| @@ -581,7 +581,8 @@ can use the following function: | |||
| 581 | Compute @var{buffer}'s region (@var{beg} . @var{end}) corresponding | 581 | Compute @var{buffer}'s region (@var{beg} . @var{end}) corresponding |
| 582 | to @var{line} and @var{col}. If @var{col} is @code{nil}, return a | 582 | to @var{line} and @var{col}. If @var{col} is @code{nil}, return a |
| 583 | region just for @var{line}. Return @code{nil} if the region is | 583 | region just for @var{line}. Return @code{nil} if the region is |
| 584 | invalid. | 584 | invalid. This function saves match data (@pxref{Saving Match Data,,, |
| 585 | elisp, The Emacs Lisp Reference Manual}). | ||
| 585 | @end deffn | 586 | @end deffn |
| 586 | 587 | ||
| 587 | @cindex add a log message | 588 | @cindex add a log message |
diff --git a/doc/misc/org.texi b/doc/misc/org.texi index b7e05feb0f1..2f1781657d9 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi | |||
| @@ -7,13 +7,13 @@ | |||
| 7 | @set txicodequoteundirected | 7 | @set txicodequoteundirected |
| 8 | @set txicodequotebacktick | 8 | @set txicodequotebacktick |
| 9 | @set MAINTAINERSITE @uref{https://orgmode.org,maintainers webpage} | 9 | @set MAINTAINERSITE @uref{https://orgmode.org,maintainers webpage} |
| 10 | @set MAINTAINER Carsten Dominik | 10 | @set MAINTAINER Bastien Guerry |
| 11 | @set MAINTAINEREMAIL @email{carsten at orgmode dot org} | 11 | @set MAINTAINEREMAIL @email{bzg@gnu.org} |
| 12 | @set MAINTAINERCONTACT @uref{mailto:carsten at orgmode dot org,contact the maintainer} | 12 | @set MAINTAINERCONTACT @uref{mailto:bzg@gnu.org,contact the maintainer} |
| 13 | @c %**end of header | 13 | @c %**end of header |
| 14 | 14 | ||
| 15 | @copying | 15 | @copying |
| 16 | This manual is for Org version 9.3. | 16 | This manual is for Org version 9.4. |
| 17 | 17 | ||
| 18 | Copyright @copyright{} 2004--2020 Free Software Foundation, Inc. | 18 | Copyright @copyright{} 2004--2020 Free Software Foundation, Inc. |
| 19 | 19 | ||
| @@ -39,7 +39,7 @@ modify this GNU manual.'' | |||
| 39 | @finalout | 39 | @finalout |
| 40 | @titlepage | 40 | @titlepage |
| 41 | @title The Org Manual | 41 | @title The Org Manual |
| 42 | @subtitle Release 9.3 | 42 | @subtitle Release 9.4 |
| 43 | @author The Org Mode Developers | 43 | @author The Org Mode Developers |
| 44 | @page | 44 | @page |
| 45 | @vskip 0pt plus 1filll | 45 | @vskip 0pt plus 1filll |
| @@ -402,6 +402,10 @@ Texinfo Export | |||
| 402 | * Special blocks in Texinfo export:: Special block attributes. | 402 | * Special blocks in Texinfo export:: Special block attributes. |
| 403 | * A Texinfo example:: Processing Org to Texinfo. | 403 | * A Texinfo example:: Processing Org to Texinfo. |
| 404 | 404 | ||
| 405 | Export in Foreign Buffers | ||
| 406 | |||
| 407 | * Bare HTML:: Exporting HTML without CSS, Javascript, etc. | ||
| 408 | |||
| 405 | Publishing | 409 | Publishing |
| 406 | 410 | ||
| 407 | * Configuration:: Defining projects. | 411 | * Configuration:: Defining projects. |
| @@ -427,6 +431,7 @@ Sample Configuration | |||
| 427 | 431 | ||
| 428 | Working with Source Code | 432 | Working with Source Code |
| 429 | 433 | ||
| 434 | * Features Overview:: Enjoy the versatility of source blocks. | ||
| 430 | * Structure of Code Blocks:: Code block syntax described. | 435 | * Structure of Code Blocks:: Code block syntax described. |
| 431 | * Using Header Arguments:: Different ways to set header arguments. | 436 | * Using Header Arguments:: Different ways to set header arguments. |
| 432 | * Environment of a Code Block:: Arguments, sessions, working directory... | 437 | * Environment of a Code Block:: Arguments, sessions, working directory... |
| @@ -447,12 +452,13 @@ Miscellaneous | |||
| 447 | * Structure Templates:: Quick insertion of structural elements. | 452 | * Structure Templates:: Quick insertion of structural elements. |
| 448 | * Speed Keys:: Electric commands at the beginning of a headline. | 453 | * Speed Keys:: Electric commands at the beginning of a headline. |
| 449 | * Clean View:: Getting rid of leading stars in the outline. | 454 | * Clean View:: Getting rid of leading stars in the outline. |
| 455 | * Execute commands in the active region:: Execute commands on multiple items in Org or agenda view. | ||
| 450 | * Dynamic Headline Numbering:: Display and update outline numbering. | 456 | * Dynamic Headline Numbering:: Display and update outline numbering. |
| 451 | * The Very Busy @kbd{C-c C-c} Key:: When in doubt, press @kbd{C-c C-c}. | 457 | * The Very Busy @kbd{C-c C-c} Key:: When in doubt, press @kbd{C-c C-c}. |
| 452 | * In-buffer Settings:: Overview of keywords. | 458 | * In-buffer Settings:: Overview of keywords. |
| 453 | * Org Syntax:: Formal description of Org's syntax. | 459 | * Org Syntax:: Formal description of Org's syntax. |
| 454 | * Documentation Access:: Read documentation about current syntax. | 460 | * Documentation Access:: Read documentation about current syntax. |
| 455 | * Escape Character:: | 461 | * Escape Character:: Prevent Org from interpreting your writing. |
| 456 | * Code Evaluation Security:: Org files evaluate in-line code. | 462 | * Code Evaluation Security:: Org files evaluate in-line code. |
| 457 | * Interaction:: With other Emacs packages. | 463 | * Interaction:: With other Emacs packages. |
| 458 | * TTY Keys:: Using Org on a tty. | 464 | * TTY Keys:: Using Org on a tty. |
| @@ -549,7 +555,7 @@ Markdown. New export backends can be derived from existing ones, or | |||
| 549 | defined from scratch. | 555 | defined from scratch. |
| 550 | 556 | ||
| 551 | Org files can include source code blocks, which makes Org uniquely | 557 | Org files can include source code blocks, which makes Org uniquely |
| 552 | suited for authoring technical documents with code examples. Org | 558 | suited for authoring technical documents with code examples. Org |
| 553 | source code blocks are fully functional; they can be evaluated in | 559 | source code blocks are fully functional; they can be evaluated in |
| 554 | place and their results can be captured in the file. This makes it | 560 | place and their results can be captured in the file. This makes it |
| 555 | possible to create a single file reproducible research compendium. | 561 | possible to create a single file reproducible research compendium. |
| @@ -603,7 +609,8 @@ We @strong{strongly recommend} sticking to a single installation method. | |||
| 603 | @subheading Using Emacs packaging system | 609 | @subheading Using Emacs packaging system |
| 604 | 610 | ||
| 605 | Recent Emacs distributions include a packaging system which lets you | 611 | Recent Emacs distributions include a packaging system which lets you |
| 606 | install Elisp libraries. You can install Org with @kbd{M-x package-install @key{RET} org}. | 612 | install Elisp libraries. You can install Org from the ``package menu'', |
| 613 | with @kbd{M-x list-packages}. See @ref{Package Menu,Package Menu,,emacs,}. | ||
| 607 | 614 | ||
| 608 | @quotation Important | 615 | @quotation Important |
| 609 | You need to do this in a session where no @samp{.org} file has been | 616 | You need to do this in a session where no @samp{.org} file has been |
| @@ -619,7 +626,7 @@ page}. | |||
| 619 | @subheading Downloading Org as an archive | 626 | @subheading Downloading Org as an archive |
| 620 | 627 | ||
| 621 | You can download Org latest release from @uref{https://orgmode.org/, Org's website}. In this case, | 628 | You can download Org latest release from @uref{https://orgmode.org/, Org's website}. In this case, |
| 622 | make sure you set the load-path correctly in your Emacs init file: | 629 | make sure you set the load path correctly in your Emacs init file: |
| 623 | 630 | ||
| 624 | @lisp | 631 | @lisp |
| 625 | (add-to-list 'load-path "~/path/to/orgdir/lisp") | 632 | (add-to-list 'load-path "~/path/to/orgdir/lisp") |
| @@ -627,7 +634,7 @@ make sure you set the load-path correctly in your Emacs init file: | |||
| 627 | 634 | ||
| 628 | The downloaded archive contains contributed libraries that are not | 635 | The downloaded archive contains contributed libraries that are not |
| 629 | included in Emacs. If you want to use them, add the @samp{contrib/} | 636 | included in Emacs. If you want to use them, add the @samp{contrib/} |
| 630 | directory to your load-path: | 637 | directory to your load path: |
| 631 | 638 | ||
| 632 | @lisp | 639 | @lisp |
| 633 | (add-to-list 'load-path "~/path/to/orgdir/contrib/lisp" t) | 640 | (add-to-list 'load-path "~/path/to/orgdir/contrib/lisp" t) |
| @@ -643,7 +650,7 @@ You can clone Org's repository and install Org like this: | |||
| 643 | 650 | ||
| 644 | @example | 651 | @example |
| 645 | $ cd ~/src/ | 652 | $ cd ~/src/ |
| 646 | $ git clone git@@code.orgmode.org:bzg/org-mode.git | 653 | $ git clone https://code.orgmode.org/bzg/org-mode.git |
| 647 | $ cd org-mode/ | 654 | $ cd org-mode/ |
| 648 | $ make autoloads | 655 | $ make autoloads |
| 649 | @end example | 656 | @end example |
| @@ -652,7 +659,7 @@ Note that in this case, @samp{make autoloads} is mandatory: it defines | |||
| 652 | Org's version in @samp{org-version.el} and Org's autoloads in | 659 | Org's version in @samp{org-version.el} and Org's autoloads in |
| 653 | @samp{org-loaddefs.el}. | 660 | @samp{org-loaddefs.el}. |
| 654 | 661 | ||
| 655 | Remember to add the correct load-path as described in the method | 662 | Remember to add the correct load path as described in the method |
| 656 | above. | 663 | above. |
| 657 | 664 | ||
| 658 | You can also compile with @samp{make}, generate the documentation with | 665 | You can also compile with @samp{make}, generate the documentation with |
| @@ -731,7 +738,9 @@ ideas about it, please send an email to the Org mailing list | |||
| 731 | @email{emacs-orgmode@@gnu.org}. You can subscribe to the list @uref{https://lists.gnu.org/mailman/listinfo/emacs-orgmode, from this | 738 | @email{emacs-orgmode@@gnu.org}. You can subscribe to the list @uref{https://lists.gnu.org/mailman/listinfo/emacs-orgmode, from this |
| 732 | web page}. If you are not a member of the mailing list, your mail will | 739 | web page}. If you are not a member of the mailing list, your mail will |
| 733 | be passed to the list after a moderator has approved it@footnote{Please consider subscribing to the mailing list in order to | 740 | be passed to the list after a moderator has approved it@footnote{Please consider subscribing to the mailing list in order to |
| 734 | minimize the work the mailing list moderators have to do.}. | 741 | minimize the work the mailing list moderators have to do.}. We ask |
| 742 | you to read and respect the @uref{https://www.gnu.org/philosophy/kind-communication.html, GNU Kind Communications Guidelines} when | ||
| 743 | sending messages on this mailing list. | ||
| 735 | 744 | ||
| 736 | @findex org-version | 745 | @findex org-version |
| 737 | @findex org-submit-bug-report | 746 | @findex org-submit-bug-report |
| @@ -827,7 +836,7 @@ or, from the menu: Org @arrow{} Refresh/Reload @arrow{} Reload Org uncompiled. | |||
| 827 | Then, activate the debugger: | 836 | Then, activate the debugger: |
| 828 | 837 | ||
| 829 | @example | 838 | @example |
| 830 | M-x toggle-debug-or-error <RET> | 839 | M-x toggle-debug-on-error <RET> |
| 831 | @end example | 840 | @end example |
| 832 | 841 | ||
| 833 | 842 | ||
| @@ -925,13 +934,13 @@ the entire show and hide functionalities into a single command, | |||
| 925 | @vindex org-special-ctrl-k | 934 | @vindex org-special-ctrl-k |
| 926 | @vindex org-ctrl-k-protect-subtree | 935 | @vindex org-ctrl-k-protect-subtree |
| 927 | 936 | ||
| 928 | Headlines define the structure of an outline tree. The headlines in | 937 | Headlines define the structure of an outline tree. Org headlines |
| 929 | Org start with one or more stars, on the left margin@footnote{See the variables @code{org-special-ctrl-a/e}, @code{org-special-ctrl-k}, | 938 | start on the left margin@footnote{See the variables @code{org-special-ctrl-a/e}, @code{org-special-ctrl-k}, |
| 930 | and @code{org-ctrl-k-protect-subtree} to configure special behavior of | 939 | and @code{org-ctrl-k-protect-subtree} to configure special behavior of |
| 931 | @kbd{C-a}, @kbd{C-e}, and @kbd{C-k} in headlines. Note | 940 | @kbd{C-a}, @kbd{C-e}, and @kbd{C-k} in headlines. Note |
| 932 | also that clocking only works with headings indented less than 30 | 941 | also that clocking only works with headings indented less than 30 |
| 933 | stars.}. For | 942 | stars.} with one or more stars followed by |
| 934 | example: | 943 | a space. For example: |
| 935 | 944 | ||
| 936 | @example | 945 | @example |
| 937 | * Top level headline | 946 | * Top level headline |
| @@ -1020,10 +1029,12 @@ Point must be on a headline for this to work@footnote{See, however, the option @ | |||
| 1020 | '--------------------------------------' | 1029 | '--------------------------------------' |
| 1021 | @end example | 1030 | @end example |
| 1022 | 1031 | ||
| 1023 | When @kbd{S-@key{TAB}} is called with a numeric prefix argument N, | 1032 | When @kbd{S-@key{TAB}} is called with a numeric prefix argument |
| 1024 | the CONTENTS view up to headlines of level N are shown. Note that | 1033 | @var{N}, view contents only up to headlines of level |
| 1025 | inside tables (see @ref{Tables}), @kbd{S-@key{TAB}} jumps to the previous | 1034 | @var{N}. |
| 1026 | field instead. | 1035 | |
| 1036 | Note that inside tables (see @ref{Tables}), @kbd{S-@key{TAB}} jumps to the | ||
| 1037 | previous field instead. | ||
| 1027 | 1038 | ||
| 1028 | @vindex org-cycle-global-at-bob | 1039 | @vindex org-cycle-global-at-bob |
| 1029 | You can run global cycling using @kbd{@key{TAB}} only if point is at | 1040 | You can run global cycling using @kbd{@key{TAB}} only if point is at |
| @@ -1047,9 +1058,9 @@ Show all, including drawers. | |||
| 1047 | @kindex C-c C-r | 1058 | @kindex C-c C-r |
| 1048 | @findex org-reveal | 1059 | @findex org-reveal |
| 1049 | Reveal context around point, showing the current entry, the | 1060 | Reveal context around point, showing the current entry, the |
| 1050 | following heading and the hierarchy above. Useful for working near | 1061 | following heading and the hierarchy above. It is useful for working |
| 1051 | a location that has been exposed by a sparse tree command (see | 1062 | near a location that has been exposed by a sparse tree command (see |
| 1052 | @ref{Sparse Trees}) or an agenda command (see @ref{Agenda Commands}). With a prefix argument show, on each level, all sibling | 1063 | @ref{Sparse Trees}) or an agenda command (see @ref{Agenda Commands}). With a prefix argument, show, on each level, all sibling |
| 1053 | headings. With a double prefix argument, also show the entire | 1064 | headings. With a double prefix argument, also show the entire |
| 1054 | subtree of the parent. | 1065 | subtree of the parent. |
| 1055 | 1066 | ||
| @@ -1057,15 +1068,15 @@ subtree of the parent. | |||
| 1057 | @cindex show branches, command | 1068 | @cindex show branches, command |
| 1058 | @kindex C-c C-k | 1069 | @kindex C-c C-k |
| 1059 | @findex outline-show-branches | 1070 | @findex outline-show-branches |
| 1060 | Expose all the headings of the subtree, CONTENTS view for just one | 1071 | Expose all the headings of the subtree, but not their bodies. |
| 1061 | subtree. | ||
| 1062 | 1072 | ||
| 1063 | @item @kbd{C-c @key{TAB}} (@code{outline-show-children}) | 1073 | @item @kbd{C-c @key{TAB}} (@code{outline-show-children}) |
| 1064 | @cindex show children, command | 1074 | @cindex show children, command |
| 1065 | @kindex C-c TAB | 1075 | @kindex C-c TAB |
| 1066 | @findex outline-show-children | 1076 | @findex outline-show-children |
| 1067 | Expose all direct children of the subtree. With a numeric prefix | 1077 | Expose all direct children of the subtree. With a numeric prefix |
| 1068 | argument N, expose all children down to level N@. | 1078 | argument @var{N}, expose all children down to level |
| 1079 | @var{N}. | ||
| 1069 | 1080 | ||
| 1070 | @item @kbd{C-c C-x b} (@code{org-tree-to-indirect-buffer}) | 1081 | @item @kbd{C-c C-x b} (@code{org-tree-to-indirect-buffer}) |
| 1071 | @kindex C-c C-x b | 1082 | @kindex C-c C-x b |
| @@ -1074,10 +1085,10 @@ Show the current subtree in an indirect buffer@footnote{The indirect buffer cont | |||
| 1074 | to the current tree. Editing the indirect buffer also changes the | 1085 | to the current tree. Editing the indirect buffer also changes the |
| 1075 | original buffer, but without affecting visibility in that buffer. For | 1086 | original buffer, but without affecting visibility in that buffer. For |
| 1076 | more information about indirect buffers, see @ref{Indirect Buffers,GNU Emacs Manual,,emacs,}.}. With | 1087 | more information about indirect buffers, see @ref{Indirect Buffers,GNU Emacs Manual,,emacs,}.}. With |
| 1077 | a numeric prefix argument, N, go up to level N and then take that | 1088 | a numeric prefix argument @var{N}, go up to level @var{N} |
| 1078 | tree. If N is negative then go up that many levels. With | 1089 | and then take that tree. If @var{N} is negative then go up |
| 1079 | a @kbd{C-u} prefix, do not remove the previously used indirect | 1090 | that many levels. With a @kbd{C-u} prefix, do not remove the |
| 1080 | buffer. | 1091 | previously used indirect buffer. |
| 1081 | 1092 | ||
| 1082 | @item @kbd{C-c C-x v} (@code{org-copy-visible}) | 1093 | @item @kbd{C-c C-x v} (@code{org-copy-visible}) |
| 1083 | @kindex C-c C-x v | 1094 | @kindex C-c C-x v |
| @@ -1090,10 +1101,10 @@ Copy the @emph{visible} text in the region into the kill ring. | |||
| 1090 | 1101 | ||
| 1091 | @vindex org-startup-folded | 1102 | @vindex org-startup-folded |
| 1092 | When Emacs first visits an Org file, the global state is set to | 1103 | When Emacs first visits an Org file, the global state is set to |
| 1093 | OVERVIEW, i.e., only the top level headlines are visible@footnote{When @code{org-agenda-inhibit-startup} is non-@code{nil}, Org does not | 1104 | @code{showeverything}, i.e., all file content is visible@footnote{When @code{org-agenda-inhibit-startup} is non-@code{nil}, Org does not |
| 1094 | honor the default visibility state when first opening a file for the | 1105 | honor the default visibility state when first opening a file for the |
| 1095 | agenda (see @ref{Speeding Up Your Agendas}).}. This | 1106 | agenda (see @ref{Speeding Up Your Agendas}).}. This can |
| 1096 | can be configured through the variable @code{org-startup-folded}, or on | 1107 | be configured through the variable @code{org-startup-folded}, or on |
| 1097 | a per-file basis by adding one of the following lines anywhere in the | 1108 | a per-file basis by adding one of the following lines anywhere in the |
| 1098 | buffer: | 1109 | buffer: |
| 1099 | 1110 | ||
| @@ -1270,14 +1281,22 @@ level. Yet another @kbd{@key{TAB}}, and you are back to the initial | |||
| 1270 | level. | 1281 | level. |
| 1271 | 1282 | ||
| 1272 | @item @kbd{M-@key{LEFT}} (@code{org-do-promote}) | 1283 | @item @kbd{M-@key{LEFT}} (@code{org-do-promote}) |
| 1284 | @itemx @kbd{M-@key{RIGHT}} (@code{org-do-demote}) | ||
| 1273 | @kindex M-LEFT | 1285 | @kindex M-LEFT |
| 1274 | @findex org-do-promote | 1286 | @findex org-do-promote |
| 1275 | Promote current heading by one level. | ||
| 1276 | |||
| 1277 | @item @kbd{M-@key{RIGHT}} (@code{org-do-demote}) | ||
| 1278 | @kindex M-RIGHT | 1287 | @kindex M-RIGHT |
| 1279 | @findex org-do-demote | 1288 | @findex org-do-demote |
| 1280 | Demote current heading by one level. | 1289 | Promote or demote current heading by one level. |
| 1290 | |||
| 1291 | @cindex region, active | ||
| 1292 | @cindex active region | ||
| 1293 | @cindex transient mark mode | ||
| 1294 | When there is an active region---i.e., when Transient Mark mode is | ||
| 1295 | active---promotion and demotion work on all headlines in the region. | ||
| 1296 | To select a region of headlines, it is best to place both point and | ||
| 1297 | mark at the beginning of a line, mark at the beginning of the first | ||
| 1298 | headline, and point at the line just after the last headline to | ||
| 1299 | change. | ||
| 1281 | 1300 | ||
| 1282 | @item @kbd{M-S-@key{LEFT}} (@code{org-promote-subtree}) | 1301 | @item @kbd{M-S-@key{LEFT}} (@code{org-promote-subtree}) |
| 1283 | @kindex M-S-LEFT | 1302 | @kindex M-S-LEFT |
| @@ -1396,16 +1415,8 @@ Finally, if the first line is a headline, remove the stars from all | |||
| 1396 | headlines in the region. | 1415 | headlines in the region. |
| 1397 | @end table | 1416 | @end table |
| 1398 | 1417 | ||
| 1399 | @cindex region, active | 1418 | Note that when point is inside a table (see @ref{Tables}), the Meta-Cursor |
| 1400 | @cindex active region | 1419 | keys have different functionality. |
| 1401 | @cindex transient mark mode | ||
| 1402 | When there is an active region---i.e., when Transient Mark mode is | ||
| 1403 | active---promotion and demotion work on all headlines in the region. | ||
| 1404 | To select a region of headlines, it is best to place both point and | ||
| 1405 | mark at the beginning of a line, mark at the beginning of the first | ||
| 1406 | headline, and point at the line just after the last headline to | ||
| 1407 | change. Note that when point is inside a table (see @ref{Tables}), the | ||
| 1408 | Meta-Cursor keys have different functionality. | ||
| 1409 | 1420 | ||
| 1410 | @node Sparse Trees | 1421 | @node Sparse Trees |
| 1411 | @section Sparse Trees | 1422 | @section Sparse Trees |
| @@ -1481,12 +1492,12 @@ matching the string @samp{FIXME}. | |||
| 1481 | The other sparse tree commands select headings based on TODO keywords, | 1492 | The other sparse tree commands select headings based on TODO keywords, |
| 1482 | tags, or properties and are discussed later in this manual. | 1493 | tags, or properties and are discussed later in this manual. |
| 1483 | 1494 | ||
| 1484 | @kindex C-c C-e v | 1495 | @kindex C-c C-e C-v |
| 1485 | @cindex printing sparse trees | 1496 | @cindex printing sparse trees |
| 1486 | @cindex visible text, printing | 1497 | @cindex visible text, printing |
| 1487 | To print a sparse tree, you can use the Emacs command | 1498 | To print a sparse tree, you can use the Emacs command |
| 1488 | @code{ps-print-buffer-with-faces} which does not print invisible parts of | 1499 | @code{ps-print-buffer-with-faces} which does not print invisible parts of |
| 1489 | the document. Or you can use the command @kbd{C-c C-e v} to | 1500 | the document. Or you can use the command @kbd{C-c C-e C-v} to |
| 1490 | export only the visible part of the document and print the resulting | 1501 | export only the visible part of the document and print the resulting |
| 1491 | file. | 1502 | file. |
| 1492 | 1503 | ||
| @@ -1560,7 +1571,7 @@ My favorite scenes are (in this order) | |||
| 1560 | But in the end, no individual scenes matter but the film as a whole. | 1571 | But in the end, no individual scenes matter but the film as a whole. |
| 1561 | Important actors in this film are: | 1572 | Important actors in this film are: |
| 1562 | - Elijah Wood :: He plays Frodo | 1573 | - Elijah Wood :: He plays Frodo |
| 1563 | - Sean Astin :: He plays Sam, Frodo's friend. I still remember him | 1574 | - Sean Astin :: He plays Sam, Frodo's friend. I still remember him |
| 1564 | very well from his role as Mikey Walsh in /The Goonies/. | 1575 | very well from his role as Mikey Walsh in /The Goonies/. |
| 1565 | @end example | 1576 | @end example |
| 1566 | 1577 | ||
| @@ -1677,11 +1688,11 @@ bullets (@samp{-}, @samp{+}, @samp{*}, @samp{1.}, @samp{1)}) or a subset of them | |||
| 1677 | on @code{org-plain-list-ordered-item-terminator}, the type of list, and | 1688 | on @code{org-plain-list-ordered-item-terminator}, the type of list, and |
| 1678 | its indentation. With a numeric prefix argument N, select the Nth | 1689 | its indentation. With a numeric prefix argument N, select the Nth |
| 1679 | bullet from this list. If there is an active region when calling | 1690 | bullet from this list. If there is an active region when calling |
| 1680 | this, selected text is changed into an item. With a prefix | 1691 | this, all lines are converted to list items. With a prefix |
| 1681 | argument, all lines are converted to list items. If the first line | 1692 | argument, the selected text is changed into a single item. If the |
| 1682 | already was a list item, any item marker is removed from the list. | 1693 | first line already was a list item, any item marker is removed from |
| 1683 | Finally, even without an active region, a normal line is converted | 1694 | the list. Finally, even without an active region, a normal line is |
| 1684 | into a list item. | 1695 | converted into a list item. |
| 1685 | 1696 | ||
| 1686 | @item @kbd{C-c *} | 1697 | @item @kbd{C-c *} |
| 1687 | @kindex C-c * | 1698 | @kindex C-c * |
| @@ -1812,7 +1823,7 @@ as the first non-whitespace character is considered part of a table. | |||
| 1812 | @samp{|} is also the column separator@footnote{To insert a vertical bar into a table field, use @samp{\vert} or, | 1823 | @samp{|} is also the column separator@footnote{To insert a vertical bar into a table field, use @samp{\vert} or, |
| 1813 | inside a word @samp{abc\vert@{@}def}.}. Moreover, a line starting | 1824 | inside a word @samp{abc\vert@{@}def}.}. Moreover, a line starting |
| 1814 | with @samp{|-} is a horizontal rule. It separates rows explicitly. Rows | 1825 | with @samp{|-} is a horizontal rule. It separates rows explicitly. Rows |
| 1815 | before the first horizontal rule are header lines. A table might look | 1826 | before the first horizontal rule are header lines. A table might look |
| 1816 | like this: | 1827 | like this: |
| 1817 | 1828 | ||
| 1818 | @example | 1829 | @example |
| @@ -1937,7 +1948,8 @@ Kill the current column. | |||
| 1937 | @item @kbd{M-S-@key{RIGHT}} (@code{org-table-insert-column}) | 1948 | @item @kbd{M-S-@key{RIGHT}} (@code{org-table-insert-column}) |
| 1938 | @kindex M-S-RIGHT | 1949 | @kindex M-S-RIGHT |
| 1939 | @findex org-table-insert-column | 1950 | @findex org-table-insert-column |
| 1940 | Insert a new column to the left of point position. | 1951 | Insert a new column at point position. Move the recent column and |
| 1952 | all cells to the right of this column to the right. | ||
| 1941 | 1953 | ||
| 1942 | @item @kbd{M-@key{UP}} (@code{org-table-move-row-up}) | 1954 | @item @kbd{M-@key{UP}} (@code{org-table-move-row-up}) |
| 1943 | @kindex M-UP | 1955 | @kindex M-UP |
| @@ -2121,6 +2133,18 @@ format used to export the file can be configured in the variable | |||
| 2121 | name and the format for table export in a subtree. Org supports | 2133 | name and the format for table export in a subtree. Org supports |
| 2122 | quite general formats for exported tables. The exporter format is | 2134 | quite general formats for exported tables. The exporter format is |
| 2123 | the same as the format used by Orgtbl radio tables, see @ref{Translator functions}, for a detailed description. | 2135 | the same as the format used by Orgtbl radio tables, see @ref{Translator functions}, for a detailed description. |
| 2136 | |||
| 2137 | @item @kbd{M-x org-table-header-line-mode} | ||
| 2138 | @findex org-table-header-line-mode | ||
| 2139 | @vindex org-table-header-line-p | ||
| 2140 | Turn on the display of the first data row of the table at point in | ||
| 2141 | the window header line when this first row is not visible anymore in | ||
| 2142 | the buffer. You can activate this minor mode by default by setting | ||
| 2143 | the option @code{org-table-header-line-p} to @code{t}. | ||
| 2144 | |||
| 2145 | @item @kbd{M-x org-table-transpose-table-at-point} | ||
| 2146 | @findex org-table-transpose-table-at-point | ||
| 2147 | Transpose the table at point and eliminate hlines. | ||
| 2124 | @end table | 2148 | @end table |
| 2125 | 2149 | ||
| 2126 | @node Column Width and Alignment | 2150 | @node Column Width and Alignment |
| @@ -2163,12 +2187,12 @@ several columns or display them with a fixed width, regardless of | |||
| 2163 | content, as shown in the following example. | 2187 | content, as shown in the following example. |
| 2164 | 2188 | ||
| 2165 | @example | 2189 | @example |
| 2166 | |---+---------------------+--------| |---+-------…|…| | 2190 | |---+---------------------+--------| |---+-------…+…| |
| 2167 | | | <6> | | | | <6> …|…| | 2191 | | | <6> | | | | <6> …|…| |
| 2168 | | 1 | one | some | ----\ | 1 | one …|…| | 2192 | | 1 | one | some | ----\ | 1 | one …|…| |
| 2169 | | 2 | two | boring | ----/ | 2 | two …|…| | 2193 | | 2 | two | boring | ----/ | 2 | two …|…| |
| 2170 | | 3 | This is a long text | column | | 3 | This i…|…| | 2194 | | 3 | This is a long text | column | | 3 | This i…|…| |
| 2171 | |---+---------------------+--------| |---+-------…|…| | 2195 | |---+---------------------+--------| |---+-------…+…| |
| 2172 | @end example | 2196 | @end example |
| 2173 | 2197 | ||
| 2174 | To set the width of a column, one field anywhere in the column may | 2198 | To set the width of a column, one field anywhere in the column may |
| @@ -2396,11 +2420,12 @@ Here are a few examples: | |||
| 2396 | @cindex range references | 2420 | @cindex range references |
| 2397 | @cindex references, to ranges | 2421 | @cindex references, to ranges |
| 2398 | You may reference a rectangular range of fields by specifying two | 2422 | You may reference a rectangular range of fields by specifying two |
| 2399 | field references connected by two dots @samp{..}. If both fields are in | 2423 | field references connected by two dots @samp{..}. The ends are included in |
| 2400 | the current row, you may simply use @samp{$2..$7}, but if at least one | 2424 | the range. If both fields are in the current row, you may simply use |
| 2401 | field is in a different row, you need to use the general @samp{@@ROW$COLUMN} | 2425 | @samp{$2..$7}, but if at least one field is in a different row, you need to |
| 2402 | format at least for the first field, i.e., the reference must start | 2426 | use the general @samp{@@ROW$COLUMN} format at least for the first field, |
| 2403 | with @samp{@@} in order to be interpreted correctly. Examples: | 2427 | i.e., the reference must start with @samp{@@} in order to be interpreted |
| 2428 | correctly. Examples: | ||
| 2404 | 2429 | ||
| 2405 | @multitable @columnfractions 0.2 0.8 | 2430 | @multitable @columnfractions 0.2 0.8 |
| 2406 | @item @samp{$1..$3} | 2431 | @item @samp{$1..$3} |
| @@ -2410,7 +2435,7 @@ with @samp{@@} in order to be interpreted correctly. Examples: | |||
| 2410 | @item @samp{$<<<..$>>} | 2435 | @item @samp{$<<<..$>>} |
| 2411 | @tab start in third column, continue to the last but one | 2436 | @tab start in third column, continue to the last but one |
| 2412 | @item @samp{@@2$1..@@4$3} | 2437 | @item @samp{@@2$1..@@4$3} |
| 2413 | @tab six fields between these two fields (same as @samp{A2..C4}) | 2438 | @tab nine fields between these two fields (same as @samp{A2..C4}) |
| 2414 | @item @samp{@@-1$-2..@@-1} | 2439 | @item @samp{@@-1$-2..@@-1} |
| 2415 | @tab 3 fields in the row above, starting from 2 columns on the left | 2440 | @tab 3 fields in the row above, starting from 2 columns on the left |
| 2416 | @item @samp{@@I..II} | 2441 | @item @samp{@@I..II} |
| @@ -2446,7 +2471,7 @@ Insert column number on odd rows, set field to empty on even rows. | |||
| 2446 | Copy text or values of each row of column 1 of the table named | 2471 | Copy text or values of each row of column 1 of the table named |
| 2447 | @var{FOO} into column 2 of the current table. | 2472 | @var{FOO} into column 2 of the current table. |
| 2448 | 2473 | ||
| 2449 | @item @samp{@@3 = 2 * remote(FOO, @@@@1$$#)} | 2474 | @item @samp{@@3 = 2 * remote(FOO, @@1$$#)} |
| 2450 | Insert the doubled value of each column of row 1 of the table | 2475 | Insert the doubled value of each column of row 1 of the table |
| 2451 | named @var{FOO} into row 3 of the current table. | 2476 | named @var{FOO} into row 3 of the current table. |
| 2452 | @end table | 2477 | @end table |
| @@ -3429,29 +3454,26 @@ or alternatively | |||
| 3429 | 3454 | ||
| 3430 | @cindex escape syntax, for links | 3455 | @cindex escape syntax, for links |
| 3431 | @cindex backslashes, in links | 3456 | @cindex backslashes, in links |
| 3432 | Some @samp{\} and @samp{]} characters in the @var{LINK} part need to be | 3457 | Some @samp{\}, @samp{[} and @samp{]} characters in the @var{LINK} part need to |
| 3433 | ``escaped'', i.e., preceded by another @samp{\} character. More | 3458 | be ``escaped'', i.e., preceded by another @samp{\} character. More |
| 3434 | specifically, the following character categories, and only them, must | 3459 | specifically, the following characters, and only them, must be |
| 3435 | be escaped, in order: | 3460 | escaped: |
| 3436 | 3461 | ||
| 3437 | @enumerate | 3462 | @enumerate |
| 3438 | @item | 3463 | @item |
| 3439 | all consecutive @samp{\} characters at the end of the link, | 3464 | all @samp{[} and @samp{]} characters, |
| 3440 | @item | ||
| 3441 | any @samp{]} character at the very end of the link, | ||
| 3442 | @item | 3465 | @item |
| 3443 | all consecutive @samp{\} characters preceding @samp{][} or @samp{]]} patterns, | 3466 | every @samp{\} character preceding either @samp{]} or @samp{[}, |
| 3444 | @item | 3467 | @item |
| 3445 | any @samp{]} character followed by either @samp{[} or @samp{]}. | 3468 | every @samp{\} character at the end of the link. |
| 3446 | @end enumerate | 3469 | @end enumerate |
| 3447 | 3470 | ||
| 3448 | @findex org-link-escape | 3471 | @findex org-link-escape |
| 3449 | Org takes for granted that such links are correctly escaped. | 3472 | Functions inserting links (see @ref{Handling Links}) properly escape |
| 3450 | Functions inserting links (see @ref{Handling Links}) take care of this. | 3473 | ambiguous characters. You only need to bother about the rules above |
| 3451 | You only need to bother about those rules when inserting directly, or | 3474 | when inserting directly, or yanking, a URI within square brackets. |
| 3452 | yanking, a URI within square brackets. When in doubt, you may use the | 3475 | When in doubt, you may use the function @code{org-link-escape}, which turns |
| 3453 | function @code{org-link-escape}, which turns a link string into its | 3476 | a link string into its escaped form. |
| 3454 | properly escaped form. | ||
| 3455 | 3477 | ||
| 3456 | Once a link in the buffer is complete, with all brackets present, Org | 3478 | Once a link in the buffer is complete, with all brackets present, Org |
| 3457 | changes the display so that @samp{DESCRIPTION} is displayed instead of | 3479 | changes the display so that @samp{DESCRIPTION} is displayed instead of |
| @@ -3479,29 +3501,32 @@ Literal links. | |||
| 3479 | 3501 | ||
| 3480 | @cindex internal links | 3502 | @cindex internal links |
| 3481 | @cindex links, internal | 3503 | @cindex links, internal |
| 3482 | @cindex targets, for links | ||
| 3483 | 3504 | ||
| 3484 | @cindex @samp{CUSTOM_ID}, property | 3505 | A link that does not look like a URL---i.e., does not start with |
| 3485 | If the link does not look like a URL, it is considered to be internal | 3506 | a known scheme or a file name---refers to the current document. You |
| 3486 | in the current file. The most important case is a link like | 3507 | can follow it with @kbd{C-c C-o} when point is on the link, or |
| 3487 | @samp{[[#my-custom-id]]} which links to the entry with the @samp{CUSTOM_ID} property | 3508 | with a mouse click (see @ref{Handling Links}). |
| 3488 | @samp{my-custom-id}. You are responsible yourself to make sure these | ||
| 3489 | custom IDs are unique in a file. | ||
| 3490 | 3509 | ||
| 3491 | Links such as @samp{[[My Target]]} or @samp{[[My Target][Find my target]]} lead to a text search in | 3510 | @cindex @samp{CUSTOM_ID}, property |
| 3492 | the current file. | 3511 | Org provides several refinements to internal navigation within |
| 3512 | a document. Most notably, a construct like @samp{[[#my-custom-id]]} | ||
| 3513 | specifically targets the entry with the @samp{CUSTOM_ID} property set to | ||
| 3514 | @samp{my-custom-id}. Also, an internal link looking like @samp{[[*Some | ||
| 3515 | section]]} points to a headline with the name @samp{Some section}@footnote{To insert a link targeting a headline, in-buffer completion | ||
| 3516 | can be used. Just type a star followed by a few optional letters into | ||
| 3517 | the buffer and press @kbd{M-@key{TAB}}. All headlines in the current | ||
| 3518 | buffer are offered as completions.}. | ||
| 3493 | 3519 | ||
| 3494 | The link can be followed with @kbd{C-c C-o} when point is on | 3520 | @cindex targets, for links |
| 3495 | the link, or with a mouse click (see @ref{Handling Links}). Links to | 3521 | When the link does not belong to any of the cases above, Org looks for |
| 3496 | custom IDs point to the corresponding headline. The preferred match | 3522 | a @emph{dedicated target}: the same string in double angular brackets, like |
| 3497 | for a text link is a @emph{dedicated target}: the same string in double | 3523 | @samp{<<My Target>>}. |
| 3498 | angular brackets, like @samp{<<My Target>>}. | ||
| 3499 | 3524 | ||
| 3500 | @cindex @samp{NAME}, keyword | 3525 | @cindex @samp{NAME}, keyword |
| 3501 | If no dedicated target exists, the link tries to match the exact name | 3526 | If no dedicated target exists, the link tries to match the exact name |
| 3502 | of an element within the buffer. Naming is done with the @samp{NAME} | 3527 | of an element within the buffer. Naming is done, unsurprisingly, with |
| 3503 | keyword, which has to be put in the line before the element it refers | 3528 | the @samp{NAME} keyword, which has to be put in the line before the element |
| 3504 | to, as in the following example | 3529 | it refers to, as in the following example |
| 3505 | 3530 | ||
| 3506 | @example | 3531 | @example |
| 3507 | #+NAME: My Target | 3532 | #+NAME: My Target |
| @@ -3510,12 +3535,15 @@ to, as in the following example | |||
| 3510 | | of | four cells | | 3535 | | of | four cells | |
| 3511 | @end example | 3536 | @end example |
| 3512 | 3537 | ||
| 3513 | If none of the above succeeds, Org searches for a headline that is | 3538 | @vindex org-link-search-must-match-exact-headline |
| 3514 | exactly the link text but may also include a TODO keyword and | 3539 | Ultimately, if none of the above succeeds, Org searches for a headline |
| 3515 | tags@footnote{To insert a link targeting a headline, in-buffer completion | 3540 | that is exactly the link text but may also include a TODO keyword and |
| 3516 | can be used. Just type a star followed by a few optional letters into | 3541 | tags, or initiates a plain text search, according to the value of |
| 3517 | the buffer and press @kbd{M-@key{TAB}}. All headlines in the current | 3542 | @code{org-link-search-must-match-exact-headline}. |
| 3518 | buffer are offered as completions.}. | 3543 | |
| 3544 | Note that you must make sure custom IDs, dedicated targets, and names | ||
| 3545 | are unique throughout the document. Org provides a linter to assist | ||
| 3546 | you in the process, if needed. See @ref{Org Syntax}. | ||
| 3519 | 3547 | ||
| 3520 | During export, internal links are used to mark objects and assign them | 3548 | During export, internal links are used to mark objects and assign them |
| 3521 | a number. Marked objects are then referenced by links pointing to | 3549 | a number. Marked objects are then referenced by links pointing to |
| @@ -3673,7 +3701,7 @@ options: | |||
| 3673 | @item | 3701 | @item |
| 3674 | @tab @samp{file:projects.org} | 3702 | @tab @samp{file:projects.org} |
| 3675 | @item | 3703 | @item |
| 3676 | @tab @samp{file:projects.org::some words} (text search) @footnote{The actual behavior of the search depends on the value of the | 3704 | @tab @samp{file:projects.org::some words} (text search)@footnote{The actual behavior of the search depends on the value of the |
| 3677 | variable @code{org-link-search-must-match-exact-headline}. If its value is | 3705 | variable @code{org-link-search-must-match-exact-headline}. If its value is |
| 3678 | @code{nil}, then a fuzzy text search is done. If it is @code{t}, then only the | 3706 | @code{nil}, then a fuzzy text search is done. If it is @code{t}, then only the |
| 3679 | exact headline is matched, ignoring spaces and statistic cookies. If | 3707 | exact headline is matched, ignoring spaces and statistic cookies. If |
| @@ -3834,7 +3862,7 @@ user/channel/server under the point. | |||
| 3834 | For any other file, the link points to the file, with a search | 3862 | For any other file, the link points to the file, with a search |
| 3835 | string (see @ref{Search Options}) pointing to the contents | 3863 | string (see @ref{Search Options}) pointing to the contents |
| 3836 | of the current line. If there is an active region, the selected | 3864 | of the current line. If there is an active region, the selected |
| 3837 | words form the basis of the search string. You can write custom Lisp | 3865 | words form the basis of the search string. You can write custom Lisp |
| 3838 | functions to select the search string and perform the search for | 3866 | functions to select the search string and perform the search for |
| 3839 | particular file types (see @ref{Custom Searches}). | 3867 | particular file types (see @ref{Custom Searches}). |
| 3840 | 3868 | ||
| @@ -3980,8 +4008,8 @@ this also to @kbd{M-n} and @kbd{M-p}. | |||
| 3980 | 4008 | ||
| 3981 | @lisp | 4009 | @lisp |
| 3982 | (with-eval-after-load 'org | 4010 | (with-eval-after-load 'org |
| 3983 | (define-key org-mode-map "\M-n" 'org-next-link) | 4011 | (define-key org-mode-map (kbd "M-n") 'org-next-link) |
| 3984 | (define-key org-mode-map "\M-p" 'org-previous-link)) | 4012 | (define-key org-mode-map (kbd "M-p") 'org-previous-link)) |
| 3985 | @end lisp | 4013 | @end lisp |
| 3986 | @end table | 4014 | @end table |
| 3987 | 4015 | ||
| @@ -4022,12 +4050,11 @@ replacement text. Here is an example: | |||
| 4022 | 4050 | ||
| 4023 | @lisp | 4051 | @lisp |
| 4024 | (setq org-link-abbrev-alist | 4052 | (setq org-link-abbrev-alist |
| 4025 | '(("bugzilla" . "http://10.1.2.9/bugzilla/show_bug.cgi?id=") | 4053 | '(("bugzilla" . "http://10.1.2.9/bugzilla/show_bug.cgi?id=") |
| 4026 | ("url-to-ja" . "http://translate.google.fr/translate?sl=en&tl=ja&u=%h") | 4054 | ("Nu Html Checker" . "https://validator.w3.org/nu/?doc=%h") |
| 4027 | ("google" . "http://www.google.com/search?q=") | 4055 | ("duckduckgo" . "https://duckduckgo.com/?q=%s") |
| 4028 | ("gmap" . "http://maps.google.com/maps?q=%s") | 4056 | ("omap" . "http://nominatim.openstreetmap.org/search?q=%s&polygon=1") |
| 4029 | ("omap" . "http://nominatim.openstreetmap.org/search?q=%s&polygon=1") | 4057 | ("ads" . "https://ui.adsabs.harvard.edu/search/q=%20author%3A\"%s\""))) |
| 4030 | ("ads" . "https://ui.adsabs.harvard.edu/search/q=%20author%3A\"%s\""))) | ||
| 4031 | @end lisp | 4058 | @end lisp |
| 4032 | 4059 | ||
| 4033 | If the replacement text contains the string @samp{%s}, it is replaced with | 4060 | If the replacement text contains the string @samp{%s}, it is replaced with |
| @@ -4852,8 +4879,8 @@ example. | |||
| 4852 | 4879 | ||
| 4853 | If you use Org mode extensively, you may end up with enough TODO items | 4880 | If you use Org mode extensively, you may end up with enough TODO items |
| 4854 | that it starts to make sense to prioritize them. Prioritizing can be | 4881 | that it starts to make sense to prioritize them. Prioritizing can be |
| 4855 | done by placing a @emph{priority cookie} into the headline of a TODO item, | 4882 | done by placing a @emph{priority cookie} into the headline of a TODO item |
| 4856 | like this | 4883 | right after the TODO keyword, like this: |
| 4857 | 4884 | ||
| 4858 | @example | 4885 | @example |
| 4859 | *** TODO [#A] Write letter to Sam Fortune | 4886 | *** TODO [#A] Write letter to Sam Fortune |
| @@ -4864,11 +4891,22 @@ like this | |||
| 4864 | By default, Org mode supports three priorities: @samp{A}, @samp{B}, and @samp{C}. | 4891 | By default, Org mode supports three priorities: @samp{A}, @samp{B}, and @samp{C}. |
| 4865 | @samp{A} is the highest priority. An entry without a cookie is treated as | 4892 | @samp{A} is the highest priority. An entry without a cookie is treated as |
| 4866 | equivalent if it had priority @samp{B}. Priorities make a difference only | 4893 | equivalent if it had priority @samp{B}. Priorities make a difference only |
| 4867 | for sorting in the agenda (see @ref{Weekly/daily agenda}); outside the | 4894 | for sorting in the agenda (see @ref{Weekly/daily agenda}). Outside the |
| 4868 | agenda, they have no inherent meaning to Org mode. The cookies are | 4895 | agenda, they have no inherent meaning to Org mode. The cookies are |
| 4869 | displayed with the face defined by the variable @code{org-priority-faces}, | 4896 | displayed with the face defined by the variable @code{org-priority-faces}, |
| 4870 | which can be customized. | 4897 | which can be customized. |
| 4871 | 4898 | ||
| 4899 | You can also use numeric values for priorities, such as | ||
| 4900 | |||
| 4901 | @example | ||
| 4902 | *** TODO [#1] Write letter to Sam Fortune | ||
| 4903 | @end example | ||
| 4904 | |||
| 4905 | |||
| 4906 | When using numeric priorities, you need to set @code{org-priority-highest}, | ||
| 4907 | @code{org-priority-lowest} and @code{org-priority-default} to integers, which | ||
| 4908 | must all be strictly inferior to 65. | ||
| 4909 | |||
| 4872 | Priorities can be attached to any outline node; they do not need to be | 4910 | Priorities can be attached to any outline node; they do not need to be |
| 4873 | TODO items. | 4911 | TODO items. |
| 4874 | 4912 | ||
| @@ -4894,12 +4932,12 @@ that these keys are also used to modify timestamps (see @ref{Creating Timestamps | |||
| 4894 | a discussion of the interaction with shift-selection. | 4932 | a discussion of the interaction with shift-selection. |
| 4895 | @end table | 4933 | @end table |
| 4896 | 4934 | ||
| 4897 | @vindex org-highest-priority | 4935 | @vindex org-priority-highest |
| 4898 | @vindex org-lowest-priority | 4936 | @vindex org-priority-lowest |
| 4899 | @vindex org-default-priority | 4937 | @vindex org-priority-default |
| 4900 | You can change the range of allowed priorities by setting the | 4938 | You can change the range of allowed priorities by setting the |
| 4901 | variables @code{org-highest-priority}, @code{org-lowest-priority}, and | 4939 | variables @code{org-priority-highest}, @code{org-priority-lowest}, and |
| 4902 | @code{org-default-priority}. For an individual buffer, you may set these | 4940 | @code{org-priority-default}. For an individual buffer, you may set these |
| 4903 | values (highest, lowest, default) like this (please make sure that the | 4941 | values (highest, lowest, default) like this (please make sure that the |
| 4904 | highest priority is earlier in the alphabet than the lowest priority): | 4942 | highest priority is earlier in the alphabet than the lowest priority): |
| 4905 | 4943 | ||
| @@ -4908,6 +4946,13 @@ highest priority is earlier in the alphabet than the lowest priority): | |||
| 4908 | #+PRIORITIES: A C B | 4946 | #+PRIORITIES: A C B |
| 4909 | @end example | 4947 | @end example |
| 4910 | 4948 | ||
| 4949 | |||
| 4950 | Or, using numeric values: | ||
| 4951 | |||
| 4952 | @example | ||
| 4953 | #+PRIORITIES: 1 10 5 | ||
| 4954 | @end example | ||
| 4955 | |||
| 4911 | @node Breaking Down Tasks | 4956 | @node Breaking Down Tasks |
| 4912 | @section Breaking Down Tasks into Subtasks | 4957 | @section Breaking Down Tasks into Subtasks |
| 4913 | 4958 | ||
| @@ -5061,6 +5106,21 @@ this headline and the next---so @emph{not} the entire subtree. | |||
| 5061 | If there is no active region, just toggle the checkbox at point. | 5106 | If there is no active region, just toggle the checkbox at point. |
| 5062 | @end itemize | 5107 | @end itemize |
| 5063 | 5108 | ||
| 5109 | @item @kbd{C-c C-x C-r} (@code{org-toggle-radio-button}) | ||
| 5110 | @kindex C-c C-x C-r | ||
| 5111 | @findex org-toggle-radio-button | ||
| 5112 | @cindex radio button, checkbox as | ||
| 5113 | Toggle checkbox status by using the checkbox of the item at point as | ||
| 5114 | a radio button: when the checkbox is turned on, all other checkboxes | ||
| 5115 | on the same level will be turned off. With a universal prefix | ||
| 5116 | argument, toggle the presence of the checkbox. With a double prefix | ||
| 5117 | argument, set it to @samp{[-]}. | ||
| 5118 | |||
| 5119 | @findex org-list-checkbox-radio-mode | ||
| 5120 | @kbd{C-c C-c} can be told to consider checkboxes as radio buttons by | ||
| 5121 | setting @samp{#+ATTR_ORG: :radio t} right before the list or by calling | ||
| 5122 | @kbd{M-x org-list-checkbox-radio-mode} to activate this minor mode. | ||
| 5123 | |||
| 5064 | @item @kbd{M-S-@key{RET}} (@code{org-insert-todo-heading}) | 5124 | @item @kbd{M-S-@key{RET}} (@code{org-insert-todo-heading}) |
| 5065 | @kindex M-S-RET | 5125 | @kindex M-S-RET |
| 5066 | @findex org-insert-todo-heading | 5126 | @findex org-insert-todo-heading |
| @@ -5549,7 +5609,7 @@ with many examples, see @ref{Matching tags and properties}. | |||
| 5549 | 5609 | ||
| 5550 | A property is a key-value pair associated with an entry. Properties | 5610 | A property is a key-value pair associated with an entry. Properties |
| 5551 | can be set so they are associated with a single entry, with every | 5611 | can be set so they are associated with a single entry, with every |
| 5552 | entry in a tree, or with every entry in an Org file. | 5612 | entry in a tree, or with the whole buffer. |
| 5553 | 5613 | ||
| 5554 | There are two main applications for properties in Org mode. First, | 5614 | There are two main applications for properties in Org mode. First, |
| 5555 | properties are like tags, but with a value. Imagine maintaining | 5615 | properties are like tags, but with a value. Imagine maintaining |
| @@ -5619,8 +5679,12 @@ disks in a box like this: | |||
| 5619 | :END: | 5679 | :END: |
| 5620 | @end example | 5680 | @end example |
| 5621 | 5681 | ||
| 5622 | If you want to set properties that can be inherited by any entry in | 5682 | Properties can be inserted on buffer level. That means they apply |
| 5623 | a file, use a line like: | 5683 | before the first headline and can be inherited by all entries in a |
| 5684 | file. Property blocks defined before first headline needs to be | ||
| 5685 | located at the top of the buffer, allowing only comments above. | ||
| 5686 | |||
| 5687 | Properties can also be defined using lines like: | ||
| 5624 | 5688 | ||
| 5625 | @cindex @samp{_ALL} suffix, in properties | 5689 | @cindex @samp{_ALL} suffix, in properties |
| 5626 | @cindex @samp{PROPERTY}, keyword | 5690 | @cindex @samp{PROPERTY}, keyword |
| @@ -5685,7 +5749,8 @@ necessary, the property drawer is created as well. | |||
| 5685 | @findex org-insert-drawer | 5749 | @findex org-insert-drawer |
| 5686 | Insert a property drawer into the current entry. The drawer is | 5750 | Insert a property drawer into the current entry. The drawer is |
| 5687 | inserted early in the entry, but after the lines with planning | 5751 | inserted early in the entry, but after the lines with planning |
| 5688 | information like deadlines. | 5752 | information like deadlines. If before first headline the drawer is |
| 5753 | inserted at the top of the drawer after any potential comments. | ||
| 5689 | 5754 | ||
| 5690 | @item @kbd{C-c C-c} (@code{org-property-action}) | 5755 | @item @kbd{C-c C-c} (@code{org-property-action}) |
| 5691 | @kindex C-c C-c | 5756 | @kindex C-c C-c |
| @@ -5767,7 +5832,7 @@ not be used as keys in the properties drawer: | |||
| 5767 | @item @samp{CLOSED} | 5832 | @item @samp{CLOSED} |
| 5768 | @tab When was this entry closed? | 5833 | @tab When was this entry closed? |
| 5769 | @item @samp{DEADLINE} | 5834 | @item @samp{DEADLINE} |
| 5770 | @tab The deadline time string, without the angular brackets. | 5835 | @tab The deadline timestamp. |
| 5771 | @item @samp{FILE} | 5836 | @item @samp{FILE} |
| 5772 | @tab The filename the entry is located in. | 5837 | @tab The filename the entry is located in. |
| 5773 | @item @samp{ITEM} | 5838 | @item @samp{ITEM} |
| @@ -5775,7 +5840,7 @@ not be used as keys in the properties drawer: | |||
| 5775 | @item @samp{PRIORITY} | 5840 | @item @samp{PRIORITY} |
| 5776 | @tab The priority of the entry, a string with a single letter. | 5841 | @tab The priority of the entry, a string with a single letter. |
| 5777 | @item @samp{SCHEDULED} | 5842 | @item @samp{SCHEDULED} |
| 5778 | @tab The scheduling timestamp, without the angular brackets. | 5843 | @tab The scheduling timestamp. |
| 5779 | @item @samp{TAGS} | 5844 | @item @samp{TAGS} |
| 5780 | @tab The tags defined directly in the headline. | 5845 | @tab The tags defined directly in the headline. |
| 5781 | @item @samp{TIMESTAMP} | 5846 | @item @samp{TIMESTAMP} |
| @@ -5804,7 +5869,7 @@ Create a sparse tree with all matching entries. With | |||
| 5804 | a @kbd{C-u} prefix argument, ignore headlines that are not | 5869 | a @kbd{C-u} prefix argument, ignore headlines that are not |
| 5805 | a TODO line. | 5870 | a TODO line. |
| 5806 | 5871 | ||
| 5807 | @item @kbd{M-x org-agenda m}, @code{org-tags-view} | 5872 | @item @kbd{M-x org-agenda m} (@code{org-tags-view}) |
| 5808 | @kindex m @r{(Agenda dispatcher)} | 5873 | @kindex m @r{(Agenda dispatcher)} |
| 5809 | @findex org-tags-view | 5874 | @findex org-tags-view |
| 5810 | Create a global list of tag/property matches from all agenda files. | 5875 | Create a global list of tag/property matches from all agenda files. |
| @@ -5922,14 +5987,6 @@ done by defining a column format line. | |||
| 5922 | @node Scope of column definitions | 5987 | @node Scope of column definitions |
| 5923 | @subsubsection Scope of column definitions | 5988 | @subsubsection Scope of column definitions |
| 5924 | 5989 | ||
| 5925 | To define a column format for an entire file, use a line like: | ||
| 5926 | |||
| 5927 | @cindex @samp{COLUMNS}, keyword | ||
| 5928 | @example | ||
| 5929 | #+COLUMNS: %25ITEM %TAGS %PRIORITY %TODO | ||
| 5930 | @end example | ||
| 5931 | |||
| 5932 | |||
| 5933 | To specify a format that only applies to a specific tree, add | 5990 | To specify a format that only applies to a specific tree, add |
| 5934 | a @samp{COLUMNS} property to the top node of that tree, for example: | 5991 | a @samp{COLUMNS} property to the top node of that tree, for example: |
| 5935 | 5992 | ||
| @@ -5940,6 +5997,16 @@ a @samp{COLUMNS} property to the top node of that tree, for example: | |||
| 5940 | :END: | 5997 | :END: |
| 5941 | @end example | 5998 | @end example |
| 5942 | 5999 | ||
| 6000 | A @samp{COLUMNS} property within a property drawer before first headline | ||
| 6001 | will apply to the entire file. As an addition to property drawers, | ||
| 6002 | keywords can also be defined for an entire file using a line like: | ||
| 6003 | |||
| 6004 | @cindex @samp{COLUMNS}, keyword | ||
| 6005 | @example | ||
| 6006 | #+COLUMNS: %25ITEM %TAGS %PRIORITY %TODO | ||
| 6007 | @end example | ||
| 6008 | |||
| 6009 | |||
| 5943 | If a @samp{COLUMNS} property is present in an entry, it defines columns for | 6010 | If a @samp{COLUMNS} property is present in an entry, it defines columns for |
| 5944 | the entry itself, and for the entire subtree below it. Since the | 6011 | the entry itself, and for the entire subtree below it. Since the |
| 5945 | column definition is part of the hierarchical structure of the | 6012 | column definition is part of the hierarchical structure of the |
| @@ -6097,15 +6164,16 @@ format is taken from the @samp{#+COLUMNS} line or from the variable | |||
| 6097 | @code{org-columns-default-format}, and column view is established for the | 6164 | @code{org-columns-default-format}, and column view is established for the |
| 6098 | current entry and its subtree. | 6165 | current entry and its subtree. |
| 6099 | 6166 | ||
| 6100 | @item @kbd{r} or @kbd{g} (@code{org-columns-redo}) | 6167 | @item @kbd{r} or @kbd{g} on a columns view line (@code{org-columns-redo}) |
| 6101 | @kindex r | 6168 | @kindex r |
| 6102 | @kindex g | 6169 | @kindex g |
| 6103 | @findex org-columns-redo | 6170 | @findex org-columns-redo |
| 6104 | Recreate the column view, to include recent changes made in the | 6171 | Recreate the column view, to include recent changes made in the |
| 6105 | buffer. | 6172 | buffer. |
| 6106 | 6173 | ||
| 6107 | @item @kbd{q} (@code{org-columns-quit}) | 6174 | @item @kbd{C-c C-c} or @kbd{q} on a columns view line (@code{org-columns-quit}) |
| 6108 | @kindex q | 6175 | @kindex q |
| 6176 | @kindex C-c C-c | ||
| 6109 | @findex org-columns-quit | 6177 | @findex org-columns-quit |
| 6110 | Exit column view. | 6178 | Exit column view. |
| 6111 | @end table | 6179 | @end table |
| @@ -6141,10 +6209,11 @@ invokes the same interface that you normally use to change that | |||
| 6141 | property. For example, the tag completion or fast selection | 6209 | property. For example, the tag completion or fast selection |
| 6142 | interface pops up when editing a @samp{TAGS} property. | 6210 | interface pops up when editing a @samp{TAGS} property. |
| 6143 | 6211 | ||
| 6144 | @item @kbd{C-c C-c} (@code{org-columns-set-tags-or-toggle}) | 6212 | @item @kbd{C-c C-c} (@code{org-columns-toggle-or-columns-quit}) |
| 6145 | @kindex C-c C-c | 6213 | @kindex C-c C-c |
| 6146 | @findex org-columns-set-tags-or-toggle | 6214 | @findex org-columns-toggle-or-columns-quit |
| 6147 | When there is a checkbox at point, toggle it. | 6215 | When there is a checkbox at point, toggle it. Else exit column |
| 6216 | view. | ||
| 6148 | 6217 | ||
| 6149 | @item @kbd{v} (@code{org-columns-show-value}) | 6218 | @item @kbd{v} (@code{org-columns-show-value}) |
| 6150 | @kindex v | 6219 | @kindex v |
| @@ -6227,6 +6296,14 @@ create a globally unique ID for the current entry and copy it to | |||
| 6227 | the kill-ring. | 6296 | the kill-ring. |
| 6228 | @end table | 6297 | @end table |
| 6229 | 6298 | ||
| 6299 | @item @samp{:match} | ||
| 6300 | When set to a string, use this as a tags/property match filter to | ||
| 6301 | select only a subset of the headlines in the scope set by the @code{:id} | ||
| 6302 | parameter. | ||
| 6303 | @end table | ||
| 6304 | |||
| 6305 | |||
| 6306 | @table @asis | ||
| 6230 | @item @samp{:hlines} | 6307 | @item @samp{:hlines} |
| 6231 | When @code{t}, insert an hline after every line. When a number N, insert | 6308 | When @code{t}, insert an hline after every line. When a number N, insert |
| 6232 | an hline before each headline with level @code{<= N}. | 6309 | an hline before each headline with level @code{<= N}. |
| @@ -6256,12 +6333,16 @@ block. | |||
| 6256 | The following commands insert or update the dynamic block: | 6333 | The following commands insert or update the dynamic block: |
| 6257 | 6334 | ||
| 6258 | @table @asis | 6335 | @table @asis |
| 6259 | @item @kbd{C-c C-x i} (@code{org-insert-columns-dblock}) | 6336 | @item @code{org-columns-insert-dblock} |
| 6260 | @kindex C-c C-x i | 6337 | @kindex C-c C-x x |
| 6261 | @findex org-insert-columns-dblock | 6338 | @findex org-columns-insert-dblock |
| 6262 | Insert a dynamic block capturing a column view. Prompt for the | 6339 | Insert a dynamic block capturing a column view. Prompt for the |
| 6263 | scope or ID of the view. | 6340 | scope or ID of the view. |
| 6264 | 6341 | ||
| 6342 | This command can be invoked by calling | ||
| 6343 | @code{org-dynamic-block-insert-dblock} (@kbd{C-c C-x x}) and | ||
| 6344 | selecting ``columnview'' (see @ref{Dynamic Blocks}). | ||
| 6345 | |||
| 6265 | @item @kbd{C-c C-c} @kbd{C-c C-x C-u} (@code{org-dblock-update}) | 6346 | @item @kbd{C-c C-c} @kbd{C-c C-x C-u} (@code{org-dblock-update}) |
| 6266 | @kindex C-c C-c | 6347 | @kindex C-c C-c |
| 6267 | @kindex C-c C-x C-u | 6348 | @kindex C-c C-x C-u |
| @@ -6634,6 +6715,8 @@ can control the calendar fully from the minibuffer: | |||
| 6634 | @kindex M-S-RIGHT | 6715 | @kindex M-S-RIGHT |
| 6635 | @kindex M-S-LEFT | 6716 | @kindex M-S-LEFT |
| 6636 | @kindex RET | 6717 | @kindex RET |
| 6718 | @kindex . | ||
| 6719 | @kindex C-. | ||
| 6637 | @multitable @columnfractions 0.25 0.55 | 6720 | @multitable @columnfractions 0.25 0.55 |
| 6638 | @item @kbd{@key{RET}} | 6721 | @item @kbd{@key{RET}} |
| 6639 | @tab Choose date at point in calendar. | 6722 | @tab Choose date at point in calendar. |
| @@ -6659,6 +6742,11 @@ can control the calendar fully from the minibuffer: | |||
| 6659 | @tab Scroll calendar forward by 3 months. | 6742 | @tab Scroll calendar forward by 3 months. |
| 6660 | @item @kbd{C-v} | 6743 | @item @kbd{C-v} |
| 6661 | @tab Scroll calendar backward by 3 months. | 6744 | @tab Scroll calendar backward by 3 months. |
| 6745 | @item @kbd{C-.} | ||
| 6746 | @tab Select today's date@footnote{You can also use the calendar command @kbd{.} to jump to | ||
| 6747 | today's date, but if you are inserting an hour specification for your | ||
| 6748 | timestamp, @kbd{.} will then insert a dot after the hour. By contrast, | ||
| 6749 | @kbd{C-.} will always jump to today's date.} | ||
| 6662 | @end multitable | 6750 | @end multitable |
| 6663 | 6751 | ||
| 6664 | @vindex org-read-date-display-live | 6752 | @vindex org-read-date-display-live |
| @@ -6898,7 +6986,7 @@ organize such tasks using a so-called repeater in a @samp{DEADLINE}, | |||
| 6898 | the @samp{+1m} is a repeater; the intended interpretation is that the task | 6986 | the @samp{+1m} is a repeater; the intended interpretation is that the task |
| 6899 | has a deadline on @samp{<2005-10-01>} and repeats itself every (one) month | 6987 | has a deadline on @samp{<2005-10-01>} and repeats itself every (one) month |
| 6900 | starting from that time. You can use yearly, monthly, weekly, daily | 6988 | starting from that time. You can use yearly, monthly, weekly, daily |
| 6901 | and hourly repeat cookies by using the @samp{y}, @samp{w}, @samp{m}, @samp{d} and @samp{h} | 6989 | and hourly repeat cookies by using the @samp{y}, @samp{m}, @samp{w}, @samp{d} and @samp{h} |
| 6902 | letters. If you need both a repeater and a special warning period in | 6990 | letters. If you need both a repeater and a special warning period in |
| 6903 | a deadline entry, the repeater should come first and the warning | 6991 | a deadline entry, the repeater should come first and the warning |
| 6904 | period last | 6992 | period last |
| @@ -6948,8 +7036,8 @@ if you have not paid the rent for three months, marking this entry | |||
| 6948 | DONE still keeps it as an overdue deadline. Depending on the task, | 7036 | DONE still keeps it as an overdue deadline. Depending on the task, |
| 6949 | this may not be the best way to handle it. For example, if you forgot | 7037 | this may not be the best way to handle it. For example, if you forgot |
| 6950 | to call your father for 3 weeks, it does not make sense to call him | 7038 | to call your father for 3 weeks, it does not make sense to call him |
| 6951 | 3 times in a single day to make up for it. Finally, there are tasks | 7039 | 3 times in a single day to make up for it. Finally, there are tasks, |
| 6952 | like changing batteries which should always repeat a certain time | 7040 | like changing batteries, which should always repeat a certain time |
| 6953 | @emph{after} the last time you did it. For these tasks, Org mode has | 7041 | @emph{after} the last time you did it. For these tasks, Org mode has |
| 6954 | special repeaters @samp{++} and @samp{.+}. For example: | 7042 | special repeaters @samp{++} and @samp{.+}. For example: |
| 6955 | 7043 | ||
| @@ -6971,7 +7059,11 @@ special repeaters @samp{++} and @samp{.+}. For example: | |||
| 6971 | 7059 | ||
| 6972 | ** TODO Check the batteries in the smoke detectors | 7060 | ** TODO Check the batteries in the smoke detectors |
| 6973 | DEADLINE: <2005-11-01 Tue .+1m> | 7061 | DEADLINE: <2005-11-01 Tue .+1m> |
| 6974 | Marking this DONE will shift the date to one month after today. | 7062 | Marking this DONE shifts the date to one month after today. |
| 7063 | |||
| 7064 | ** TODO Wash my hands | ||
| 7065 | DEADLINE: <2019-04-05 08:00 Sun .+1h> | ||
| 7066 | Marking this DONE shifts the date to exactly one hour from now. | ||
| 6975 | @end example | 7067 | @end example |
| 6976 | 7068 | ||
| 6977 | @vindex org-agenda-skip-scheduled-if-deadline-is-shown | 7069 | @vindex org-agenda-skip-scheduled-if-deadline-is-shown |
| @@ -7004,7 +7096,7 @@ recorded. It also computes the total time spent on each | |||
| 7004 | subtree@footnote{Clocking only works if all headings are indented with less | 7096 | subtree@footnote{Clocking only works if all headings are indented with less |
| 7005 | than 30 stars. This is a hard-coded limitation of @code{lmax} in | 7097 | than 30 stars. This is a hard-coded limitation of @code{lmax} in |
| 7006 | @code{org-clock-sum}.} of a project. And it remembers a history or tasks | 7098 | @code{org-clock-sum}.} of a project. And it remembers a history or tasks |
| 7007 | recently clocked, to that you can jump quickly between a number of | 7099 | recently clocked, so that you can jump quickly between a number of |
| 7008 | tasks absorbing your time. | 7100 | tasks absorbing your time. |
| 7009 | 7101 | ||
| 7010 | To save the clock history across Emacs sessions, use: | 7102 | To save the clock history across Emacs sessions, use: |
| @@ -7173,12 +7265,18 @@ Org mode can produce quite complex reports based on the time clocking | |||
| 7173 | information. Such a report is called a @emph{clock table}, because it is | 7265 | information. Such a report is called a @emph{clock table}, because it is |
| 7174 | formatted as one or several Org tables. | 7266 | formatted as one or several Org tables. |
| 7175 | 7267 | ||
| 7176 | You can insert, or update, a clock table through Org dynamic blocks | 7268 | @table @asis |
| 7177 | insert command (see @ref{Dynamic Blocks}), by pressing @kbd{C-c C-x x c l o c k t a b l e @key{RET}}. When called with a prefix argument, | 7269 | @item @code{org-clock-report} |
| 7270 | @kindex C-c C-x x | ||
| 7271 | @findex org-clock-report | ||
| 7272 | Insert or update a clock table. When called with a prefix argument, | ||
| 7178 | jump to the first clock table in the current document and update it. | 7273 | jump to the first clock table in the current document and update it. |
| 7179 | The clock table includes archived trees. | 7274 | The clock table includes archived trees. |
| 7180 | 7275 | ||
| 7181 | @table @asis | 7276 | This command can be invoked by calling |
| 7277 | @code{org-dynamic-block-insert-dblock} (@kbd{C-c C-x x}) and | ||
| 7278 | selecting ``clocktable'' (see @ref{Dynamic Blocks}). | ||
| 7279 | |||
| 7182 | @item @kbd{C-c C-c} or @kbd{C-c C-x C-u} (@code{org-dblock-update}) | 7280 | @item @kbd{C-c C-c} or @kbd{C-c C-x C-u} (@code{org-dblock-update}) |
| 7183 | @kindex C-c C-c | 7281 | @kindex C-c C-c |
| 7184 | @kindex C-c C-x C-u | 7282 | @kindex C-c C-x C-u |
| @@ -7202,7 +7300,7 @@ needs to be in the @samp{#+BEGIN: clocktable} line for this command. If | |||
| 7202 | @end table | 7300 | @end table |
| 7203 | 7301 | ||
| 7204 | Here is an example of the frame for a clock table as it is inserted | 7302 | Here is an example of the frame for a clock table as it is inserted |
| 7205 | into the buffer with the @kbd{C-c C-x C-r} command: | 7303 | into the buffer by @code{org-clock-report}: |
| 7206 | 7304 | ||
| 7207 | @cindex @samp{BEGIN clocktable} | 7305 | @cindex @samp{BEGIN clocktable} |
| 7208 | @example | 7306 | @example |
| @@ -7211,10 +7309,9 @@ into the buffer with the @kbd{C-c C-x C-r} command: | |||
| 7211 | @end example | 7309 | @end example |
| 7212 | 7310 | ||
| 7213 | @vindex org-clocktable-defaults | 7311 | @vindex org-clocktable-defaults |
| 7214 | The @samp{#+BEGIN} line and specify a number of options to define the | 7312 | The @samp{#+BEGIN} line contains options to define the scope, structure, |
| 7215 | scope, structure, and formatting of the report. Defaults for all | 7313 | and formatting of the report. Defaults for all these options can be |
| 7216 | these options can be configured in the variable | 7314 | configured in the variable @code{org-clocktable-defaults}. |
| 7217 | @code{org-clocktable-defaults}. | ||
| 7218 | 7315 | ||
| 7219 | First there are options that determine which clock entries are to | 7316 | First there are options that determine which clock entries are to |
| 7220 | be selected: | 7317 | be selected: |
| @@ -7302,9 +7399,9 @@ The starting day of the week. The default is 1 for Monday. | |||
| 7302 | The starting day of the month. The default is 1 for the first. | 7399 | The starting day of the month. The default is 1 for the first. |
| 7303 | 7400 | ||
| 7304 | @item @samp{:step} | 7401 | @item @samp{:step} |
| 7305 | Set to @samp{day}, @samp{week}, @samp{month} or @samp{year} to split the table into | 7402 | Set to @samp{day}, @samp{week}, @samp{semimonth}, @samp{month}, or @samp{year} to split the |
| 7306 | chunks. To use this, either @samp{:block}, or @samp{:tstart} and @samp{:tend} are | 7403 | table into chunks. To use this, either @samp{:block}, or @samp{:tstart} and |
| 7307 | required. | 7404 | @samp{:tend} are required. |
| 7308 | 7405 | ||
| 7309 | @item @samp{:stepskip0} | 7406 | @item @samp{:stepskip0} |
| 7310 | When non-@code{nil}, do not show steps that have zero time. | 7407 | When non-@code{nil}, do not show steps that have zero time. |
| @@ -7539,6 +7636,23 @@ If you only want this from time to time, use three universal prefix | |||
| 7539 | arguments with @code{org-clock-in} and two @kbd{C-u C-u} with | 7636 | arguments with @code{org-clock-in} and two @kbd{C-u C-u} with |
| 7540 | @code{org-clock-in-last}. | 7637 | @code{org-clock-in-last}. |
| 7541 | 7638 | ||
| 7639 | @anchor{Clocking out automatically after some idle time} | ||
| 7640 | @subsubheading Clocking out automatically after some idle time | ||
| 7641 | |||
| 7642 | @cindex auto clocking out after idle time | ||
| 7643 | |||
| 7644 | @vindex org-clock-auto-clockout-timer | ||
| 7645 | When you often forget to clock out before being idle and you don't | ||
| 7646 | want to manually set the clocking time to take into account, you can | ||
| 7647 | set @code{org-clock-auto-clockout-timer} to a number of seconds and add | ||
| 7648 | @samp{(org-clock-auto-clockout-insinuate)} to your @samp{.emacs} file. | ||
| 7649 | |||
| 7650 | When the clock is running and Emacs is idle for more than this number | ||
| 7651 | of seconds, the clock will be clocked out automatically. | ||
| 7652 | |||
| 7653 | Use @samp{M-x org-clock-toggle-auto-clockout RET} to temporarily turn this | ||
| 7654 | on or off. | ||
| 7655 | |||
| 7542 | @node Effort Estimates | 7656 | @node Effort Estimates |
| 7543 | @section Effort Estimates | 7657 | @section Effort Estimates |
| 7544 | 7658 | ||
| @@ -7551,9 +7665,14 @@ to produce offers with quotations of the estimated work effort, you | |||
| 7551 | may want to assign effort estimates to entries. If you are also | 7665 | may want to assign effort estimates to entries. If you are also |
| 7552 | clocking your work, you may later want to compare the planned effort | 7666 | clocking your work, you may later want to compare the planned effort |
| 7553 | with the actual working time, a great way to improve planning | 7667 | with the actual working time, a great way to improve planning |
| 7554 | estimates. Effort estimates are stored in a special property | 7668 | estimates. |
| 7555 | @samp{EFFORT}. You can set the effort for an entry with the following | 7669 | |
| 7556 | commands: | 7670 | Effort estimates are stored in a special property @samp{EFFORT}. Multiple |
| 7671 | formats are supported, such as @samp{3:12}, @samp{1:23:45}, or @samp{1d3h5min}; see | ||
| 7672 | the file @samp{org-duration.el} for more detailed information about the | ||
| 7673 | format. | ||
| 7674 | |||
| 7675 | You can set the effort for an entry with the following commands: | ||
| 7557 | 7676 | ||
| 7558 | @table @asis | 7677 | @table @asis |
| 7559 | @item @kbd{C-c C-x e} (@code{org-set-effort}) | 7678 | @item @kbd{C-c C-x e} (@code{org-set-effort}) |
| @@ -7767,9 +7886,9 @@ Clear the target cache. Caching of refile targets can be turned on | |||
| 7767 | by setting @code{org-refile-use-cache}. To make the command see new | 7886 | by setting @code{org-refile-use-cache}. To make the command see new |
| 7768 | possible targets, you have to clear the cache with this command. | 7887 | possible targets, you have to clear the cache with this command. |
| 7769 | 7888 | ||
| 7770 | @item @kbd{C-c M-w} (@code{org-copy}) | 7889 | @item @kbd{C-c M-w} (@code{org-refile-copy}) |
| 7771 | @kindex C-c M-w | 7890 | @kindex C-c M-w |
| 7772 | @findex org-copy | 7891 | @findex org-refile-copy |
| 7773 | Copying works like refiling, except that the original note is not | 7892 | Copying works like refiling, except that the original note is not |
| 7774 | deleted. | 7893 | deleted. |
| 7775 | @end table | 7894 | @end table |
| @@ -7860,6 +7979,10 @@ came, its outline path the archiving time etc. Configure the variable | |||
| 7860 | @code{org-archive-save-context-info} to adjust the amount of information | 7979 | @code{org-archive-save-context-info} to adjust the amount of information |
| 7861 | added. | 7980 | added. |
| 7862 | 7981 | ||
| 7982 | @vindex org-archive-subtree-save-file-p | ||
| 7983 | When @code{org-archive-subtree-save-file-p} is non-@code{nil}, save the target | ||
| 7984 | archive buffer. | ||
| 7985 | |||
| 7863 | @node Internal archiving | 7986 | @node Internal archiving |
| 7864 | @subsection Internal archiving | 7987 | @subsection Internal archiving |
| 7865 | 7988 | ||
| @@ -7924,7 +8047,7 @@ none is found, the command offers to set the @samp{ARCHIVE} tag for the | |||
| 7924 | child. If point is @emph{not} on a headline when this command is | 8047 | child. If point is @emph{not} on a headline when this command is |
| 7925 | invoked, check the level 1 trees. | 8048 | invoked, check the level 1 trees. |
| 7926 | 8049 | ||
| 7927 | @item @kbd{C-@key{TAB}} (@code{org-force-cycle-archived}) | 8050 | @item @kbd{C-c C-@key{TAB}} (@code{org-force-cycle-archived}) |
| 7928 | @kindex C-TAB | 8051 | @kindex C-TAB |
| 7929 | Cycle a tree even if it is tagged with @samp{ARCHIVE}. | 8052 | Cycle a tree even if it is tagged with @samp{ARCHIVE}. |
| 7930 | 8053 | ||
| @@ -8106,7 +8229,7 @@ going through the interactive template selection, you can create your | |||
| 8106 | key binding like this: | 8229 | key binding like this: |
| 8107 | 8230 | ||
| 8108 | @lisp | 8231 | @lisp |
| 8109 | (define-key global-map "\C-cx" | 8232 | (define-key global-map (kbd "C-c x") |
| 8110 | (lambda () (interactive) (org-capture nil "x"))) | 8233 | (lambda () (interactive) (org-capture nil "x"))) |
| 8111 | @end lisp | 8234 | @end lisp |
| 8112 | 8235 | ||
| @@ -8225,9 +8348,15 @@ file and moves point to the right location. | |||
| 8225 | The template for creating the capture item. If you leave this | 8348 | The template for creating the capture item. If you leave this |
| 8226 | empty, an appropriate default template will be used. Otherwise this | 8349 | empty, an appropriate default template will be used. Otherwise this |
| 8227 | is a string with escape codes, which will be replaced depending on | 8350 | is a string with escape codes, which will be replaced depending on |
| 8228 | time and context of the capture call. The string with escapes may | 8351 | time and context of the capture call. You may also get this |
| 8229 | be loaded from a template file, using the special syntax @samp{(file | 8352 | template string from a file@footnote{When the file name is not absolute, Org assumes it is relative |
| 8230 | "template filename")}. See below for more details. | 8353 | to @code{org-directory}.}, or dynamically, from a function |
| 8354 | using either syntax: | ||
| 8355 | |||
| 8356 | @example | ||
| 8357 | (file "/path/to/template-file") | ||
| 8358 | (function FUNCTION-RETURNING-THE-TEMPLATE) | ||
| 8359 | @end example | ||
| 8231 | 8360 | ||
| 8232 | @item properties | 8361 | @item properties |
| 8233 | The rest of the entry is a property list of additional options. | 8362 | The rest of the entry is a property list of additional options. |
| @@ -8244,10 +8373,23 @@ When set, do not offer to edit the information, just file it away | |||
| 8244 | immediately. This makes sense if the template only needs | 8373 | immediately. This makes sense if the template only needs |
| 8245 | information that can be added automatically. | 8374 | information that can be added automatically. |
| 8246 | 8375 | ||
| 8376 | @item @code{:jump-to-captured} | ||
| 8377 | When set, jump to the captured entry when finished. | ||
| 8378 | |||
| 8247 | @item @code{:empty-lines} | 8379 | @item @code{:empty-lines} |
| 8248 | Set this to the number of lines to insert before and after the new | 8380 | Set this to the number of lines to insert before and after the new |
| 8249 | item. Default 0, and the only other common value is 1. | 8381 | item. Default 0, and the only other common value is 1. |
| 8250 | 8382 | ||
| 8383 | @item @code{:empty-lines-after} | ||
| 8384 | Set this to the number of lines that should be inserted after the | ||
| 8385 | new item. Overrides @code{:empty-lines} for the number of lines | ||
| 8386 | inserted after. | ||
| 8387 | |||
| 8388 | @item @code{:empty-lines-before} | ||
| 8389 | Set this to the number of lines that should be inserted before the | ||
| 8390 | new item. Overrides @code{:empty-lines} for the number lines inserted | ||
| 8391 | before. | ||
| 8392 | |||
| 8251 | @item @code{:clock-in} | 8393 | @item @code{:clock-in} |
| 8252 | Start the clock in this item. | 8394 | Start the clock in this item. |
| 8253 | 8395 | ||
| @@ -8269,9 +8411,10 @@ you can force the same behavior by calling @code{org-capture} with | |||
| 8269 | a @kbd{C-1} prefix argument. | 8411 | a @kbd{C-1} prefix argument. |
| 8270 | 8412 | ||
| 8271 | @item @code{:tree-type} | 8413 | @item @code{:tree-type} |
| 8272 | When @code{week}, make a week tree instead of the month tree, i.e., | 8414 | Use @code{week} to make a week tree instead of the month-day tree, |
| 8273 | place the headings for each day under a heading with the current | 8415 | i.e., place the headings for each day under a heading with the |
| 8274 | ISO week. | 8416 | current ISO week. Use @code{month} to group entries by month |
| 8417 | only. Default is to group entries by day. | ||
| 8275 | 8418 | ||
| 8276 | @item @code{:unnarrowed} | 8419 | @item @code{:unnarrowed} |
| 8277 | Do not narrow the target buffer, simply show the full buffer. | 8420 | Do not narrow the target buffer, simply show the full buffer. |
| @@ -8469,8 +8612,8 @@ See the docstring of the variable for more information. | |||
| 8469 | It is often useful to associate reference material with an outline | 8612 | It is often useful to associate reference material with an outline |
| 8470 | node. Small chunks of plain text can simply be stored in the subtree | 8613 | node. Small chunks of plain text can simply be stored in the subtree |
| 8471 | of a project. Hyperlinks (see @ref{Hyperlinks}) can establish associations | 8614 | of a project. Hyperlinks (see @ref{Hyperlinks}) can establish associations |
| 8472 | with files that live elsewhere on your computer or in the cloud, like | 8615 | with files that live elsewhere on a local, or even remote, computer, |
| 8473 | emails or source code files belonging to a project. | 8616 | like emails or source code files belonging to a project. |
| 8474 | 8617 | ||
| 8475 | Another method is @emph{attachments}, which are files located in a | 8618 | Another method is @emph{attachments}, which are files located in a |
| 8476 | directory belonging to an outline node. Org uses directories either | 8619 | directory belonging to an outline node. Org uses directories either |
| @@ -8487,18 +8630,19 @@ named by a unique ID of each entry, or by a @samp{DIR} property. | |||
| 8487 | @node Attachment defaults and dispatcher | 8630 | @node Attachment defaults and dispatcher |
| 8488 | @subsection Attachment defaults and dispatcher | 8631 | @subsection Attachment defaults and dispatcher |
| 8489 | 8632 | ||
| 8490 | By default, org-attach will use ID properties when adding attachments | 8633 | By default, Org attach uses ID properties when adding attachments to |
| 8491 | to outline nodes. This makes working with attachments fully | 8634 | outline nodes. This makes working with attachments fully automated. |
| 8492 | automated. There is no decision needed for folder-name or location. | 8635 | There is no decision needed for folder-name or location. ID-based |
| 8493 | ID-based directories are by default located in the @samp{data/} directory, | 8636 | directories are by default located in the @samp{data/} directory, which |
| 8494 | which lives in the same directory where your Org file lives@footnote{If you move entries or Org files from one directory to | 8637 | lives in the same directory where your Org file lives@footnote{If you move entries or Org files from one directory to |
| 8495 | another, you may want to configure @code{org-attach-id-dir} to contain | 8638 | another, you may want to configure @code{org-attach-id-dir} to contain |
| 8496 | an absolute path.}. | 8639 | an absolute path.}. |
| 8497 | For more control over the setup, see @ref{Attachment options}. | ||
| 8498 | 8640 | ||
| 8499 | When attachments are made using @code{org-attach} a default tag @samp{ATTACH} is | 8641 | When attachments are made using @code{org-attach} a default tag @samp{ATTACH} is |
| 8500 | added to the node that gets the attachments. | 8642 | added to the node that gets the attachments. |
| 8501 | 8643 | ||
| 8644 | For more control over the setup, see @ref{Attachment options}. | ||
| 8645 | |||
| 8502 | The following commands deal with attachments: | 8646 | The following commands deal with attachments: |
| 8503 | 8647 | ||
| 8504 | @table @asis | 8648 | @table @asis |
| @@ -8616,11 +8760,11 @@ This option changes that to relative links. | |||
| 8616 | @vindex org-attach-use-inheritance | 8760 | @vindex org-attach-use-inheritance |
| 8617 | By default folders attached to an outline node are inherited from | 8761 | By default folders attached to an outline node are inherited from |
| 8618 | parents according to @code{org-use-property-inheritance}. If one instead | 8762 | parents according to @code{org-use-property-inheritance}. If one instead |
| 8619 | want to set inheritance specifically for org-attach that can be done | 8763 | want to set inheritance specifically for Org attach that can be done |
| 8620 | using @code{org-attach-use-inheritance}. Inheriting documents through | 8764 | using @code{org-attach-use-inheritance}. Inheriting documents through |
| 8621 | the node hierarchy makes a lot of sense in most cases. Especially | 8765 | the node hierarchy makes a lot of sense in most cases. Especially |
| 8622 | since the introduction of @ref{Attachment links}. The following example | 8766 | when using attachment links (see @ref{Attachment links}). The following |
| 8623 | shows one use case for attachment inheritance: | 8767 | example shows one use case for attachment inheritance: |
| 8624 | 8768 | ||
| 8625 | @example | 8769 | @example |
| 8626 | * Chapter A ... | 8770 | * Chapter A ... |
| @@ -8631,11 +8775,11 @@ shows one use case for attachment inheritance: | |||
| 8631 | Some text | 8775 | Some text |
| 8632 | 8776 | ||
| 8633 | #+NAME: Image 1 | 8777 | #+NAME: Image 1 |
| 8634 | [[Attachment:image 1.jpg]] | 8778 | [[attachment:image 1.jpg]] |
| 8635 | @end example | 8779 | @end example |
| 8636 | 8780 | ||
| 8637 | Without inheritance one would not be able to resolve the link to | 8781 | Without inheritance one would not be able to resolve the link to |
| 8638 | image @samp{1.jpg}, since the link is inside a sub-heading to @samp{Chapter | 8782 | @samp{image 1.jpg}, since the link is inside a sub-heading to @samp{Chapter |
| 8639 | A}. | 8783 | A}. |
| 8640 | 8784 | ||
| 8641 | Inheritance works the same way for both @samp{ID} and @samp{DIR} property. If | 8785 | Inheritance works the same way for both @samp{ID} and @samp{DIR} property. If |
| @@ -8677,6 +8821,18 @@ structure in any other way. All functions in this list will be | |||
| 8677 | tried when resolving existing ID's into paths, to maintain backward | 8821 | tried when resolving existing ID's into paths, to maintain backward |
| 8678 | compatibility with existing folders in your system. | 8822 | compatibility with existing folders in your system. |
| 8679 | 8823 | ||
| 8824 | @item @code{org-attach-store-link-p} | ||
| 8825 | @vindex org-attach-store-link-p | ||
| 8826 | Stores a link to the file that is being attached. The link is | ||
| 8827 | stored in @code{org-stored-links} for later insertion with @kbd{C-c C-l} (see @ref{Handling Links}). Depending on what option is set in | ||
| 8828 | @code{org-attach-store-link-p}, the link is stored to either the original | ||
| 8829 | location as a file link, the attachment location as an attachment | ||
| 8830 | link or to the attachment location as a file link. | ||
| 8831 | |||
| 8832 | @item @code{org-attach-commands} | ||
| 8833 | @vindex org-attach-commands | ||
| 8834 | List of all commands used in the attach dispatcher. | ||
| 8835 | |||
| 8680 | @item @code{org-attach-expert} | 8836 | @item @code{org-attach-expert} |
| 8681 | @vindex org-attach-expert | 8837 | @vindex org-attach-expert |
| 8682 | Do not show the splash buffer with the attach dispatcher when | 8838 | Do not show the splash buffer with the attach dispatcher when |
| @@ -8722,6 +8878,7 @@ the following to your Emacs config: | |||
| 8722 | 8878 | ||
| 8723 | @cindex attach from Dired | 8879 | @cindex attach from Dired |
| 8724 | @findex org-attach-dired-to-subtree | 8880 | @findex org-attach-dired-to-subtree |
| 8881 | |||
| 8725 | It is possible to attach files to a subtree from a Dired buffer. To | 8882 | It is possible to attach files to a subtree from a Dired buffer. To |
| 8726 | use this feature, have one window in Dired mode containing the file(s) | 8883 | use this feature, have one window in Dired mode containing the file(s) |
| 8727 | to be attached and another window with point in the subtree that shall | 8884 | to be attached and another window with point in the subtree that shall |
| @@ -9005,9 +9162,11 @@ to specify the number of context lines for each match, default is | |||
| 9005 | @end enumerate | 9162 | @end enumerate |
| 9006 | 9163 | ||
| 9007 | @item @kbd{#} | 9164 | @item @kbd{#} |
| 9008 | @itemx @kbd{!} | ||
| 9009 | Create a list of stuck projects (see @ref{Stuck projects}). | 9165 | Create a list of stuck projects (see @ref{Stuck projects}). |
| 9010 | 9166 | ||
| 9167 | @item @kbd{!} | ||
| 9168 | Configure the list of stuck projects (see @ref{Stuck projects}). | ||
| 9169 | |||
| 9011 | @item @kbd{<} | 9170 | @item @kbd{<} |
| 9012 | @kindex < @r{(Agenda dispatcher)} | 9171 | @kindex < @r{(Agenda dispatcher)} |
| 9013 | Restrict an agenda command to the current buffer@footnote{For backward compatibility, you can also press @kbd{1} to | 9172 | Restrict an agenda command to the current buffer@footnote{For backward compatibility, you can also press @kbd{1} to |
| @@ -9755,7 +9914,7 @@ then applied to the view and persists as a basic filter through | |||
| 9755 | refreshes and more secondary filtering. The filter is a global | 9914 | refreshes and more secondary filtering. The filter is a global |
| 9756 | property of the entire agenda view---in a block agenda, you should | 9915 | property of the entire agenda view---in a block agenda, you should |
| 9757 | only set this in the global options section, not in the section of an | 9916 | only set this in the global options section, not in the section of an |
| 9758 | individual block.}. You can switch quickly between | 9917 | individual block.}. You can switch quickly between |
| 9759 | different filters without having to recreate the agenda. @emph{Limits} on | 9918 | different filters without having to recreate the agenda. @emph{Limits} on |
| 9760 | the other hand take effect before the agenda buffer is populated, so | 9919 | the other hand take effect before the agenda buffer is populated, so |
| 9761 | they are mostly useful when defined as local variables within custom | 9920 | they are mostly useful when defined as local variables within custom |
| @@ -9803,7 +9962,7 @@ again by pressing @kbd{<}. | |||
| 9803 | @item @kbd{=} (@code{org-agenda-filter-by-regexp}) | 9962 | @item @kbd{=} (@code{org-agenda-filter-by-regexp}) |
| 9804 | @findex org-agenda-filter-by-regexp | 9963 | @findex org-agenda-filter-by-regexp |
| 9805 | Filter the agenda view by a regular expression: only show agenda | 9964 | Filter the agenda view by a regular expression: only show agenda |
| 9806 | entries matching the regular expression the user entered. To clear | 9965 | entries matching the regular expression the user entered. To clear |
| 9807 | the filter, call the command again by pressing @kbd{=}. | 9966 | the filter, call the command again by pressing @kbd{=}. |
| 9808 | 9967 | ||
| 9809 | @item @kbd{_} (@code{org-agenda-filter-by-effort}) | 9968 | @item @kbd{_} (@code{org-agenda-filter-by-effort}) |
| @@ -9845,17 +10004,18 @@ in a single string, with full completion support. For example, | |||
| 9845 | +work-John+<0:10-/plot/ | 10004 | +work-John+<0:10-/plot/ |
| 9846 | @end example | 10005 | @end example |
| 9847 | 10006 | ||
| 9848 | selects entries with category `work' and effort estimates below 10 | 10007 | |
| 9849 | minutes, and deselects entries with tag `John' or matching the | 10008 | selects entries with category @samp{work} and effort estimates below 10 |
| 9850 | regexp `plot'. `+' can be left out if that does not lead to | 10009 | minutes, and deselects entries with tag @samp{John} or matching the |
| 10010 | regexp @samp{plot}. You can leave @samp{+} out if that does not lead to | ||
| 9851 | ambiguities. The sequence of elements is arbitrary. The filter | 10011 | ambiguities. The sequence of elements is arbitrary. The filter |
| 9852 | syntax assumes that there is no overlap between categories and tags | 10012 | syntax assumes that there is no overlap between categories and tags. |
| 9853 | (tags will take priority). If you reply to the prompt with the | 10013 | Otherwise, tags take priority. If you reply to the prompt with the |
| 9854 | empty string, all filtering is removed. If a filter is specified, | 10014 | empty string, all filtering is removed. If a filter is specified, |
| 9855 | it replaces all current filters. But if you call the command with a | 10015 | it replaces all current filters. But if you call the command with |
| 9856 | double prefix argument, or if you add an additional `+' | 10016 | a double prefix argument, or if you add an additional @samp{+} (e.g., |
| 9857 | (e.g. `++work') to the front of the string, the new filter elements | 10017 | @samp{++work}) to the front of the string, the new filter elements are |
| 9858 | are added to the active ones. A single prefix argument applies the | 10018 | added to the active ones. A single prefix argument applies the |
| 9859 | entire filter in a negative sense. | 10019 | entire filter in a negative sense. |
| 9860 | 10020 | ||
| 9861 | @item @kbd{|} (@code{org-agenda-filter-remove-all}) | 10021 | @item @kbd{|} (@code{org-agenda-filter-remove-all}) |
| @@ -9866,35 +10026,34 @@ Remove all filters in the current agenda view. | |||
| 9866 | @subsubheading Computed tag filtering | 10026 | @subsubheading Computed tag filtering |
| 9867 | 10027 | ||
| 9868 | @vindex org-agenda-auto-exclude-function | 10028 | @vindex org-agenda-auto-exclude-function |
| 9869 | If the variable @code{org-agenda-auto-exclude-function} is set to a | 10029 | If the variable @code{org-agenda-auto-exclude-function} is set to |
| 9870 | user-defined function, that function can select tags that should be | 10030 | a user-defined function, that function can select tags that should be |
| 9871 | used as a tag filter when requested. The function will be called with | 10031 | used as a tag filter when requested. The function will be called with |
| 9872 | lower-case versions of all tags represented in the current view. The | 10032 | lower-case versions of all tags represented in the current view. The |
| 9873 | function should the return @samp{"-tag"} if the filter should remove | 10033 | function should return @samp{"-tag"} if the filter should remove |
| 9874 | entries with that tag, @samp{"+tag"} if only entries with this tag should | 10034 | entries with that tag, @samp{"+tag"} if only entries with this tag should |
| 9875 | be kept, or @samp{nil} if that tag is irrelevant. For example, let's say | 10035 | be kept, or @samp{nil} if that tag is irrelevant. For example, let's say |
| 9876 | you use a @samp{Net} tag to identify tasks which need network access, an | 10036 | you use a @samp{Net} tag to identify tasks which need network access, an |
| 9877 | @samp{Errand} tag for errands in town, and a @samp{Call} tag for making phone | 10037 | @samp{Errand} tag for errands in town, and a @samp{Call} tag for making phone |
| 9878 | calls. You could auto-exclude these tags based on the availability of | 10038 | calls. You could auto-exclude these tags based on the availability of |
| 9879 | the Internet, and outside of business hours, with something like this: | 10039 | the Internet, and outside of business hours, with something like this: |
| 9880 | 10040 | ||
| 9881 | @lisp | 10041 | @lisp |
| 9882 | (defun org-my-auto-exclude-fn (tag) | 10042 | (defun my-auto-exclude-fn (tag) |
| 9883 | (if (cond | 10043 | (when (cond ((string= tag "net") |
| 9884 | ((string= tag "net") | 10044 | (/= 0 (call-process "/sbin/ping" nil nil nil |
| 9885 | (/= 0 (call-process "/sbin/ping" nil nil nil | 10045 | "-c1" "-q" "-t1" "mail.gnu.org"))) |
| 9886 | "-c1" "-q" "-t1" "mail.gnu.org"))) | 10046 | ((member tag '("errand" "call")) |
| 9887 | ((member tag '("errand" "call")) | 10047 | (let ((hr (nth 2 (decode-time)))) |
| 9888 | (let ((hr (nth 2 (decode-time)))) | 10048 | (or (< hr 8) (> hr 21))))) |
| 9889 | (or (< hr 8) (> hr 21))))) | 10049 | (concat "-" tag))) |
| 9890 | (concat "-" tag))) | 10050 | |
| 9891 | 10051 | (setq org-agenda-auto-exclude-function #'my-auto-exclude-fn) | |
| 9892 | (setq org-agenda-auto-exclude-function 'org-my-auto-exclude-fn) | ||
| 9893 | @end lisp | 10052 | @end lisp |
| 9894 | 10053 | ||
| 9895 | You can apply this self-adapting filter by using a double prefix | 10054 | You can apply this self-adapting filter by using a triple prefix |
| 9896 | argument to @code{org-agenda-filter}, i.e. press @kbd{C-u C-u /}, or | 10055 | argument to @code{org-agenda-filter}, i.e.@tie{}press @kbd{C-u C-u C-u /}, |
| 9897 | by pressing @kbd{@key{RET}} in @code{org-agenda-filter-by-tag}. | 10056 | or by pressing @kbd{@key{RET}} in @code{org-agenda-filter-by-tag}. |
| 9898 | 10057 | ||
| 9899 | @anchor{Setting limits for the agenda} | 10058 | @anchor{Setting limits for the agenda} |
| 9900 | @subsubheading Setting limits for the agenda | 10059 | @subsubheading Setting limits for the agenda |
| @@ -10293,7 +10452,7 @@ both in the agenda buffer and in the remote buffer. | |||
| 10293 | @kindex t | 10452 | @kindex t |
| 10294 | @findex org-agenda-todo | 10453 | @findex org-agenda-todo |
| 10295 | Change the TODO state of the item, both in the agenda and in the | 10454 | Change the TODO state of the item, both in the agenda and in the |
| 10296 | original Org file. A prefix arg is passed through to the @code{org-todo} | 10455 | original Org file. A prefix arg is passed through to the @code{org-todo} |
| 10297 | command, so for example a @kbd{C-u} prefix are will trigger | 10456 | command, so for example a @kbd{C-u} prefix are will trigger |
| 10298 | taking a note to document the state change. | 10457 | taking a note to document the state change. |
| 10299 | 10458 | ||
| @@ -10370,11 +10529,6 @@ Set the priority for the current item. Org mode prompts for the | |||
| 10370 | priority character. If you reply with @kbd{@key{SPC}}, the priority | 10529 | priority character. If you reply with @kbd{@key{SPC}}, the priority |
| 10371 | cookie is removed from the entry. | 10530 | cookie is removed from the entry. |
| 10372 | 10531 | ||
| 10373 | @item @kbd{P} (@code{org-agenda-show-priority}) | ||
| 10374 | @kindex P | ||
| 10375 | @findex org-agenda-show-priority | ||
| 10376 | Display weighted priority of current item. | ||
| 10377 | |||
| 10378 | @item @kbd{+} or @kbd{S-@key{UP}} (@code{org-agenda-priority-up}) | 10532 | @item @kbd{+} or @kbd{S-@key{UP}} (@code{org-agenda-priority-up}) |
| 10379 | @kindex + | 10533 | @kindex + |
| 10380 | @kindex S-UP | 10534 | @kindex S-UP |
| @@ -10389,6 +10543,12 @@ in the original buffer, but the agenda is not resorted. Use the | |||
| 10389 | @findex org-agenda-priority-down | 10543 | @findex org-agenda-priority-down |
| 10390 | Decrease the priority of the current item. | 10544 | Decrease the priority of the current item. |
| 10391 | 10545 | ||
| 10546 | @item @kbd{C-c C-x e} or short @kbd{e} (@code{org-agenda-set-effort}) | ||
| 10547 | @kindex e | ||
| 10548 | @kindex C-c C-x e | ||
| 10549 | @findex org-agenda-set-effort | ||
| 10550 | Set the effort property for the current item. | ||
| 10551 | |||
| 10392 | @item @kbd{C-c C-z} or short @kbd{z} (@code{org-agenda-add-note}) | 10552 | @item @kbd{C-c C-z} or short @kbd{z} (@code{org-agenda-add-note}) |
| 10393 | @kindex z | 10553 | @kindex z |
| 10394 | @kindex C-c C-z | 10554 | @kindex C-c C-z |
| @@ -10806,8 +10966,10 @@ Another possibility is the construction of agenda views that comprise | |||
| 10806 | the results of @emph{several} commands, each of which creates a block in | 10966 | the results of @emph{several} commands, each of which creates a block in |
| 10807 | the agenda buffer. The available commands include @code{agenda} for the | 10967 | the agenda buffer. The available commands include @code{agenda} for the |
| 10808 | daily or weekly agenda (as created with @kbd{a}) , @code{alltodo} for | 10968 | daily or weekly agenda (as created with @kbd{a}) , @code{alltodo} for |
| 10809 | the global TODO list (as constructed with @kbd{t}), and the | 10969 | the global TODO list (as constructed with @kbd{t}), @code{stuck} for |
| 10970 | the list of stuck projects (as obtained with @kbd{#}) and the | ||
| 10810 | matching commands discussed above: @code{todo}, @code{tags}, and @code{tags-todo}. | 10971 | matching commands discussed above: @code{todo}, @code{tags}, and @code{tags-todo}. |
| 10972 | |||
| 10811 | Here are two examples: | 10973 | Here are two examples: |
| 10812 | 10974 | ||
| 10813 | @lisp | 10975 | @lisp |
| @@ -11248,6 +11410,13 @@ get in your way. Configure the variable @code{org-use-sub-superscripts} to | |||
| 11248 | change this convention. For example, when setting this variable to | 11410 | change this convention. For example, when setting this variable to |
| 11249 | @code{@{@}}, @samp{a_b} is not interpreted as a subscript, but @samp{a_@{b@}} is. | 11411 | @code{@{@}}, @samp{a_b} is not interpreted as a subscript, but @samp{a_@{b@}} is. |
| 11250 | 11412 | ||
| 11413 | You can set @code{org-use-sub-superscripts} in a file using the export | ||
| 11414 | option @samp{^:} (see @ref{Export Settings}). For example, @samp{#+OPTIONS: ^:@{@}} | ||
| 11415 | sets @code{org-use-sub-superscripts} to @code{@{@}} and limits super- and | ||
| 11416 | subscripts to the curly bracket notation. | ||
| 11417 | |||
| 11418 | You can also toggle the visual display of super- and subscripts: | ||
| 11419 | |||
| 11251 | @table @asis | 11420 | @table @asis |
| 11252 | @item @kbd{C-c C-x \} (@code{org-toggle-pretty-entities}) | 11421 | @item @kbd{C-c C-x \} (@code{org-toggle-pretty-entities}) |
| 11253 | @kindex C-c C-x \ | 11422 | @kindex C-c C-x \ |
| @@ -11255,6 +11424,13 @@ change this convention. For example, when setting this variable to | |||
| 11255 | This command formats sub- and superscripts in a WYSIWYM way. | 11424 | This command formats sub- and superscripts in a WYSIWYM way. |
| 11256 | @end table | 11425 | @end table |
| 11257 | 11426 | ||
| 11427 | @vindex org-pretty-entities | ||
| 11428 | @vindex org-pretty-entities-include-sub-superscripts | ||
| 11429 | Set both @code{org-pretty-entities} and | ||
| 11430 | @code{org-pretty-entities-include-sub-superscripts} to @code{t} to start with | ||
| 11431 | super- and subscripts @emph{visually} interpreted as specified by the | ||
| 11432 | option @code{org-use-sub-superscripts}. | ||
| 11433 | |||
| 11258 | @node Special Symbols | 11434 | @node Special Symbols |
| 11259 | @section Special Symbols | 11435 | @section Special Symbols |
| 11260 | 11436 | ||
| @@ -11891,7 +12067,7 @@ back-ends: | |||
| 11891 | @end itemize | 12067 | @end itemize |
| 11892 | 12068 | ||
| 11893 | Users can install libraries for additional formats from the Emacs | 12069 | Users can install libraries for additional formats from the Emacs |
| 11894 | packaging system. For easy discovery, these packages have a common | 12070 | packaging system. For easy discovery, these packages have a common |
| 11895 | naming scheme: @code{ox-NAME}, where @var{NAME} is a format. For | 12071 | naming scheme: @code{ox-NAME}, where @var{NAME} is a format. For |
| 11896 | example, @code{ox-koma-letter} for @emph{koma-letter} back-end. More libraries | 12072 | example, @code{ox-koma-letter} for @emph{koma-letter} back-end. More libraries |
| 11897 | can be found in the @samp{contrib/} directory (see @ref{Installation}). | 12073 | can be found in the @samp{contrib/} directory (see @ref{Installation}). |
| @@ -12067,9 +12243,7 @@ The email address (@code{user-mail-address}). | |||
| 12067 | Language to use for translating certain strings | 12243 | Language to use for translating certain strings |
| 12068 | (@code{org-export-default-language}). With @samp{#+LANGUAGE: fr}, for | 12244 | (@code{org-export-default-language}). With @samp{#+LANGUAGE: fr}, for |
| 12069 | example, Org translates @samp{Table of contents} to the French @samp{Table des | 12245 | example, Org translates @samp{Table of contents} to the French @samp{Table des |
| 12070 | matières}@footnote{For export to @LaTeX{} format---or @LaTeX{}-related formats such as | 12246 | matières}@footnote{DEFINITION NOT FOUND@.}. |
| 12071 | Beamer---, the @samp{org-latex-package-alist} variable needs further | ||
| 12072 | configuration. See @ref{@LaTeX{} specific export settings}.}. | ||
| 12073 | 12247 | ||
| 12074 | @item @samp{SELECT_TAGS} | 12248 | @item @samp{SELECT_TAGS} |
| 12075 | @cindex @samp{SELECT_TAGS}, keyword | 12249 | @cindex @samp{SELECT_TAGS}, keyword |
| @@ -13399,7 +13573,7 @@ following lines before the table in the Org file: | |||
| 13399 | @cindex @samp{ATTR_HTML}, keyword | 13573 | @cindex @samp{ATTR_HTML}, keyword |
| 13400 | @example | 13574 | @example |
| 13401 | #+CAPTION: This is a table with lines around and between cells | 13575 | #+CAPTION: This is a table with lines around and between cells |
| 13402 | #+ATTR_HTML: border="2" rules="all" frame="border" | 13576 | #+ATTR_HTML: :border 2 :rules all :frame border |
| 13403 | @end example | 13577 | @end example |
| 13404 | 13578 | ||
| 13405 | The HTML export back-end preserves column groupings in Org tables (see | 13579 | The HTML export back-end preserves column groupings in Org tables (see |
| @@ -13695,17 +13869,15 @@ simpler ways of customizing as described above. | |||
| 13695 | @subsection JavaScript supported display of web pages | 13869 | @subsection JavaScript supported display of web pages |
| 13696 | 13870 | ||
| 13697 | Sebastian Rose has written a JavaScript program especially designed to | 13871 | Sebastian Rose has written a JavaScript program especially designed to |
| 13698 | enhance the web viewing experience of HTML files created with Org. | 13872 | allow two different ways of viewing HTML files created with Org. One |
| 13699 | This program enhances large files in two different ways of viewing. | 13873 | is an @emph{Info}-like mode where each section is displayed separately and |
| 13700 | One is an @emph{Info}-like mode where each section is displayed separately | 13874 | navigation can be done with the @kbd{n} and @kbd{p} keys, and some other |
| 13701 | and navigation can be done with the @kbd{n} and @kbd{p} | 13875 | keys as well, press @kbd{?} for an overview of the available keys. The |
| 13702 | keys, and some other keys as well, press @kbd{?} for an overview | 13876 | second one has a @emph{folding} view, much like Org provides inside Emacs. |
| 13703 | of the available keys. The second one has a @emph{folding} view, much like | 13877 | The script is available at @uref{https://orgmode.org/org-info.js} and the |
| 13704 | Org provides inside Emacs. The script is available at | 13878 | documentation at @uref{https://orgmode.org/worg/code/org-info-js/}. The |
| 13705 | @uref{https://orgmode.org/org-info.js} and the documentation at | 13879 | script is hosted on @uref{https://orgmode.org}, but for reliability, prefer |
| 13706 | @uref{https://orgmode.org/worg/code/org-info-js/}. The script is hosted on | 13880 | installing it on your own web server. |
| 13707 | @uref{https://orgmode.org}, but for reliability, prefer installing it on your | ||
| 13708 | own web server. | ||
| 13709 | 13881 | ||
| 13710 | To use this program, just add this line to the Org file: | 13882 | To use this program, just add this line to the Org file: |
| 13711 | 13883 | ||
| @@ -16269,6 +16441,33 @@ tables and lists in foreign buffers. For example, in an HTML buffer, | |||
| 16269 | write a list in Org syntax, select it, and convert it to HTML with | 16441 | write a list in Org syntax, select it, and convert it to HTML with |
| 16270 | @kbd{M-x org-html-convert-region-to-html}. | 16442 | @kbd{M-x org-html-convert-region-to-html}. |
| 16271 | 16443 | ||
| 16444 | @menu | ||
| 16445 | * Bare HTML:: Exporting HTML without CSS, Javascript, etc. | ||
| 16446 | @end menu | ||
| 16447 | |||
| 16448 | @node Bare HTML | ||
| 16449 | @subsection Exporting to minimal HTML | ||
| 16450 | |||
| 16451 | If you want to output a minimal HTML file, with no CSS, no Javascript, | ||
| 16452 | no preamble or postamble, here are the variable you would need to set: | ||
| 16453 | |||
| 16454 | @vindex org-html-head | ||
| 16455 | @vindex org-html-head-extra | ||
| 16456 | @vindex org-html-head-include-default-style | ||
| 16457 | @vindex org-html-head-include-scripts | ||
| 16458 | @vindex org-html-preamble | ||
| 16459 | @vindex org-html-postamble | ||
| 16460 | @vindex org-html-use-infojs | ||
| 16461 | @lisp | ||
| 16462 | (setq org-html-head "" | ||
| 16463 | org-html-head-extra "" | ||
| 16464 | org-html-head-include-default-style nil | ||
| 16465 | org-html-head-include-scripts nil | ||
| 16466 | org-html-preamble nil | ||
| 16467 | org-html-postamble nil | ||
| 16468 | org-html-use-infojs nil) | ||
| 16469 | @end lisp | ||
| 16470 | |||
| 16272 | @node Publishing | 16471 | @node Publishing |
| 16273 | @chapter Publishing | 16472 | @chapter Publishing |
| 16274 | 16473 | ||
| @@ -16654,6 +16853,8 @@ any, during publishing. Options set within a file (see @ref{Export Settings}), | |||
| 16654 | @tab @code{org-html-mathjax-options} | 16853 | @tab @code{org-html-mathjax-options} |
| 16655 | @item @code{:html-mathjax-template} | 16854 | @item @code{:html-mathjax-template} |
| 16656 | @tab @code{org-html-mathjax-template} | 16855 | @tab @code{org-html-mathjax-template} |
| 16856 | @item @code{:html-equation-reference-format} | ||
| 16857 | @tab @code{org-html-equation-reference-format} | ||
| 16657 | @item @code{:html-metadata-timestamp-format} | 16858 | @item @code{:html-metadata-timestamp-format} |
| 16658 | @tab @code{org-html-metadata-timestamp-format} | 16859 | @tab @code{org-html-metadata-timestamp-format} |
| 16659 | @item @code{:html-postamble-format} | 16860 | @item @code{:html-postamble-format} |
| @@ -17169,6 +17370,34 @@ Here is an example source code block in the Emacs Lisp language: | |||
| 17169 | #+END_SRC | 17370 | #+END_SRC |
| 17170 | @end example | 17371 | @end example |
| 17171 | 17372 | ||
| 17373 | Source code blocks are one of many Org block types, which also include | ||
| 17374 | ``center'', ``comment'', ``dynamic'', ``example'', ``export'', ``quote'', | ||
| 17375 | ``special'', and ``verse''. This section pertains to blocks between | ||
| 17376 | @samp{#+BEGIN_SRC} and @samp{#+END_SRC}. | ||
| 17377 | |||
| 17378 | Details of Org's facilities for working with source code are described | ||
| 17379 | in the following sections. | ||
| 17380 | |||
| 17381 | @menu | ||
| 17382 | * Features Overview:: Enjoy the versatility of source blocks. | ||
| 17383 | * Structure of Code Blocks:: Code block syntax described. | ||
| 17384 | * Using Header Arguments:: Different ways to set header arguments. | ||
| 17385 | * Environment of a Code Block:: Arguments, sessions, working directory... | ||
| 17386 | * Evaluating Code Blocks:: Place results of evaluation in the Org buffer. | ||
| 17387 | * Results of Evaluation:: Choosing a results type, post-processing... | ||
| 17388 | * Exporting Code Blocks:: Export contents and/or results. | ||
| 17389 | * Extracting Source Code:: Create pure source code files. | ||
| 17390 | * Languages:: List of supported code block languages. | ||
| 17391 | * Editing Source Code:: Language major-mode editing. | ||
| 17392 | * Noweb Reference Syntax:: Literate programming in Org mode. | ||
| 17393 | * Library of Babel:: Use and contribute to a library of useful code blocks. | ||
| 17394 | * Key bindings and Useful Functions:: Work quickly with code blocks. | ||
| 17395 | * Batch Execution:: Call functions from the command line. | ||
| 17396 | @end menu | ||
| 17397 | |||
| 17398 | @node Features Overview | ||
| 17399 | @section Features Overview | ||
| 17400 | |||
| 17172 | Org can manage the source code in the block delimited by @samp{#+BEGIN_SRC} | 17401 | Org can manage the source code in the block delimited by @samp{#+BEGIN_SRC} |
| 17173 | @dots{} @samp{#+END_SRC} in several ways that can simplify housekeeping tasks | 17402 | @dots{} @samp{#+END_SRC} in several ways that can simplify housekeeping tasks |
| 17174 | essential to modern source code maintenance. Org can edit, format, | 17403 | essential to modern source code maintenance. Org can edit, format, |
| @@ -17177,13 +17406,7 @@ and execute a source code block, then capture the results. The Org | |||
| 17177 | mode literature sometimes refers to source code blocks as @emph{live code} | 17406 | mode literature sometimes refers to source code blocks as @emph{live code} |
| 17178 | blocks because they can alter the content of the Org document or the | 17407 | blocks because they can alter the content of the Org document or the |
| 17179 | material that it exports. Users can control how live they want each | 17408 | material that it exports. Users can control how live they want each |
| 17180 | source code block by tweaking the header arguments (see @ref{Using Header Arguments}) for compiling, execution, extraction, and | 17409 | source code block by tweaking the header arguments (see @ref{Using Header Arguments}) for compiling, execution, extraction, and exporting. |
| 17181 | exporting. | ||
| 17182 | |||
| 17183 | Source code blocks are one of many Org block types, which also include | ||
| 17184 | ``center'', ``comment'', ``dynamic'', ``example'', ``export'', ``quote'', | ||
| 17185 | ``special'', and ``verse''. This section pertains to blocks between | ||
| 17186 | @samp{#+BEGIN_SRC} and @samp{#+END_SRC}. | ||
| 17187 | 17410 | ||
| 17188 | For editing and formatting a source code block, Org uses an | 17411 | For editing and formatting a source code block, Org uses an |
| 17189 | appropriate Emacs major mode that includes features specifically | 17412 | appropriate Emacs major mode that includes features specifically |
| @@ -17221,25 +17444,6 @@ configuration settings of the execution environment, the results of | |||
| 17221 | the execution, and associated narratives, claims, references, and | 17444 | the execution, and associated narratives, claims, references, and |
| 17222 | internal and external links in a single Org document. | 17445 | internal and external links in a single Org document. |
| 17223 | 17446 | ||
| 17224 | Details of Org's facilities for working with source code are described | ||
| 17225 | in the following sections. | ||
| 17226 | |||
| 17227 | @menu | ||
| 17228 | * Structure of Code Blocks:: Code block syntax described. | ||
| 17229 | * Using Header Arguments:: Different ways to set header arguments. | ||
| 17230 | * Environment of a Code Block:: Arguments, sessions, working directory... | ||
| 17231 | * Evaluating Code Blocks:: Place results of evaluation in the Org buffer. | ||
| 17232 | * Results of Evaluation:: Choosing a results type, post-processing... | ||
| 17233 | * Exporting Code Blocks:: Export contents and/or results. | ||
| 17234 | * Extracting Source Code:: Create pure source code files. | ||
| 17235 | * Languages:: List of supported code block languages. | ||
| 17236 | * Editing Source Code:: Language major-mode editing. | ||
| 17237 | * Noweb Reference Syntax:: Literate programming in Org mode. | ||
| 17238 | * Library of Babel:: Use and contribute to a library of useful code blocks. | ||
| 17239 | * Key bindings and Useful Functions:: Work quickly with code blocks. | ||
| 17240 | * Batch Execution:: Call functions from the command line. | ||
| 17241 | @end menu | ||
| 17242 | |||
| 17243 | @node Structure of Code Blocks | 17447 | @node Structure of Code Blocks |
| 17244 | @section Structure of Code Blocks | 17448 | @section Structure of Code Blocks |
| 17245 | 17449 | ||
| @@ -17988,7 +18192,7 @@ variable @code{org-babel-inline-result-wrap}, which by default is set to | |||
| 17988 | This is the name of the code block (see @ref{Structure of Code Blocks}) | 18192 | This is the name of the code block (see @ref{Structure of Code Blocks}) |
| 17989 | to be evaluated in the current document. If the block is located in | 18193 | to be evaluated in the current document. If the block is located in |
| 17990 | another file, start @samp{<name>} with the file name followed by | 18194 | another file, start @samp{<name>} with the file name followed by |
| 17991 | a colon. For example, in order to execute a block named @samp{clear-data} | 18195 | a colon. For example, in order to execute a block named @samp{clear-data} |
| 17992 | in @samp{file.org}, you can write the following: | 18196 | in @samp{file.org}, you can write the following: |
| 17993 | 18197 | ||
| 17994 | @example | 18198 | @example |
| @@ -18080,8 +18284,7 @@ A note of warning: when @samp{cache} is used in a session, caching may | |||
| 18080 | cause unexpected results. | 18284 | cause unexpected results. |
| 18081 | 18285 | ||
| 18082 | When the caching mechanism tests for any source code changes, it does | 18286 | When the caching mechanism tests for any source code changes, it does |
| 18083 | not expand Noweb style references (see @ref{Noweb Reference Syntax}). For | 18287 | not expand noweb style references (see @ref{Noweb Reference Syntax}). |
| 18084 | reasons why, see @uref{http://thread.gmane.org/gmane.emacs.orgmode/79046}. | ||
| 18085 | 18288 | ||
| 18086 | The @samp{cache} header argument can have one of two values: @samp{yes} or @samp{no}. | 18289 | The @samp{cache} header argument can have one of two values: @samp{yes} or @samp{no}. |
| 18087 | 18290 | ||
| @@ -18155,20 +18358,20 @@ they are mutually exclusive. | |||
| 18155 | 18358 | ||
| 18156 | @table @asis | 18359 | @table @asis |
| 18157 | @item @samp{value} | 18360 | @item @samp{value} |
| 18158 | Default. Functional mode. Org gets the value by wrapping the code | 18361 | Default for most Babel libraries@footnote{Actually, the constructs @samp{call_<name>()} and @samp{src_<lang>@{@}} |
| 18159 | in a function definition in the language of the source block. That | 18362 | are not evaluated when they appear in a keyword (see @ref{In-buffer Settings}).}. Functional mode. Org |
| 18160 | is why when using @samp{:results value}, code should execute like | 18363 | gets the value by wrapping the code in a function definition in the |
| 18161 | a function and return a value. For languages like Python, an | 18364 | language of the source block. That is why when using @samp{:results |
| 18162 | explicit @code{return} statement is mandatory when using @samp{:results | 18365 | value}, code should execute like a function and return a value. For |
| 18163 | value}. Result is the value returned by the last statement in the | 18366 | languages like Python, an explicit @code{return} statement is mandatory |
| 18164 | code block. | 18367 | when using @samp{:results value}. Result is the value returned by the |
| 18368 | last statement in the code block. | ||
| 18165 | 18369 | ||
| 18166 | When evaluating the code block in a session (see @ref{Environment of a Code Block}), Org passes the code to an interpreter running as an | 18370 | When evaluating the code block in a session (see @ref{Environment of a Code Block}), Org passes the code to an interpreter running as an |
| 18167 | interactive Emacs inferior process. Org gets the value from the | 18371 | interactive Emacs inferior process. Org gets the value from the |
| 18168 | source code interpreter's last statement output. Org has to use | 18372 | source code interpreter's last statement output. Org has to use |
| 18169 | language-specific methods to obtain the value. For example, from | 18373 | language-specific methods to obtain the value. For example, from |
| 18170 | the variable @code{_} in Python and Ruby, and the value of @code{.Last.value} | 18374 | the variable @code{_} in Ruby, and the value of @code{.Last.value} in R@. |
| 18171 | in R@. | ||
| 18172 | 18375 | ||
| 18173 | @item @samp{output} | 18376 | @item @samp{output} |
| 18174 | Scripting mode. Org passes the code to an external process running | 18377 | Scripting mode. Org passes the code to an external process running |
| @@ -18178,41 +18381,6 @@ stream as text results. | |||
| 18178 | When using a session, Org passes the code to the interpreter running | 18381 | When using a session, Org passes the code to the interpreter running |
| 18179 | as an interactive Emacs inferior process. Org concatenates any text | 18382 | as an interactive Emacs inferior process. Org concatenates any text |
| 18180 | output from the interpreter and returns the collection as a result. | 18383 | output from the interpreter and returns the collection as a result. |
| 18181 | |||
| 18182 | Note that this collection is not the same as that would be collected | ||
| 18183 | from stdout of a non-interactive interpreter running as an external | ||
| 18184 | process. Compare for example these two blocks: | ||
| 18185 | |||
| 18186 | @example | ||
| 18187 | #+BEGIN_SRC python :results output | ||
| 18188 | print "hello" | ||
| 18189 | 2 | ||
| 18190 | print "bye" | ||
| 18191 | #+END_SRC | ||
| 18192 | |||
| 18193 | #+RESULTS: | ||
| 18194 | : hello | ||
| 18195 | : bye | ||
| 18196 | @end example | ||
| 18197 | |||
| 18198 | In the above non-session mode, the ``2'' is not printed; so it does | ||
| 18199 | not appear in results. | ||
| 18200 | |||
| 18201 | @example | ||
| 18202 | #+BEGIN_SRC python :results output :session | ||
| 18203 | print "hello" | ||
| 18204 | 2 | ||
| 18205 | print "bye" | ||
| 18206 | #+END_SRC | ||
| 18207 | |||
| 18208 | #+RESULTS: | ||
| 18209 | : hello | ||
| 18210 | : 2 | ||
| 18211 | : bye | ||
| 18212 | @end example | ||
| 18213 | |||
| 18214 | In the above session, the interactive interpreter receives and | ||
| 18215 | prints ``2''. Results show that. | ||
| 18216 | @end table | 18384 | @end table |
| 18217 | 18385 | ||
| 18218 | @anchor{Type} | 18386 | @anchor{Type} |
| @@ -18312,14 +18480,25 @@ and the extension are mandatory. | |||
| 18312 | 18480 | ||
| 18313 | @cindex @samp{file-desc}, header argument | 18481 | @cindex @samp{file-desc}, header argument |
| 18314 | The @samp{file-desc} header argument defines the description (see | 18482 | The @samp{file-desc} header argument defines the description (see |
| 18315 | @ref{Link Format}) for the link. If @samp{file-desc} has no value, Org | 18483 | @ref{Link Format}) for the link. If @samp{file-desc} is present but has no value, |
| 18316 | uses the generated file name for both the ``link'' and | 18484 | the @samp{file} value is used as the link description. When this |
| 18317 | ``description'' parts of the link. | 18485 | argument is not present, the description is omitted. |
| 18318 | 18486 | ||
| 18319 | @cindex @samp{sep}, header argument | 18487 | @cindex @samp{sep}, header argument |
| 18320 | By default, Org assumes that a table written to a file has | 18488 | By default, Org assumes that a table written to a file has |
| 18321 | TAB-delimited output. You can choose a different separator with | 18489 | TAB-delimited output. You can choose a different separator with |
| 18322 | the @samp{sep} header argument. | 18490 | the @samp{sep} header argument. |
| 18491 | |||
| 18492 | @cindex @samp{file-mode}, header argument | ||
| 18493 | The @samp{file-mode} header argument defines the file permissions. To | ||
| 18494 | make it executable, use @samp{:file-mode (identity #o755)}. | ||
| 18495 | |||
| 18496 | @example | ||
| 18497 | #+BEGIN_SRC shell :results file :file script.sh :file-mode (identity #o755) | ||
| 18498 | echo "#!/bin/bash" | ||
| 18499 | echo "echo Hello World" | ||
| 18500 | #+END_SRC | ||
| 18501 | @end example | ||
| 18323 | @end table | 18502 | @end table |
| 18324 | 18503 | ||
| 18325 | @anchor{Format} | 18504 | @anchor{Format} |
| @@ -18349,13 +18528,13 @@ Results enclosed in a @samp{BEGIN_EXPORT latex} block. Usage example: | |||
| 18349 | 18528 | ||
| 18350 | @item @samp{link} | 18529 | @item @samp{link} |
| 18351 | @itemx @samp{graphics} | 18530 | @itemx @samp{graphics} |
| 18352 | Result is a link to the file specified in @samp{:file} header argument. | 18531 | When used along with @samp{file} type, the result is a link to the file |
| 18353 | However, unlike plain @samp{:file}, nothing is written to the disk. The | 18532 | specified in @samp{:file} header argument. However, unlike plain @samp{file} |
| 18354 | block is used for its side-effects only, as in the following | 18533 | type, nothing is written to the disk. The block is used for its |
| 18355 | example: | 18534 | side-effects only, as in the following example: |
| 18356 | 18535 | ||
| 18357 | @example | 18536 | @example |
| 18358 | #+begin_src shell :results link :file "download.tar.gz" | 18537 | #+begin_src shell :results file link :file "download.tar.gz" |
| 18359 | wget -c "http://example.com/download.tar.gz" | 18538 | wget -c "http://example.com/download.tar.gz" |
| 18360 | #+end_src | 18539 | #+end_src |
| 18361 | @end example | 18540 | @end example |
| @@ -18557,7 +18736,7 @@ code. | |||
| 18557 | When Org tangles code blocks, it expands, merges, and transforms them. | 18736 | When Org tangles code blocks, it expands, merges, and transforms them. |
| 18558 | Then Org recomposes them into one or more separate files, as | 18737 | Then Org recomposes them into one or more separate files, as |
| 18559 | configured through the options. During this tangling process, Org | 18738 | configured through the options. During this tangling process, Org |
| 18560 | expands variables in the source code, and resolves any Noweb style | 18739 | expands variables in the source code, and resolves any noweb style |
| 18561 | references (see @ref{Noweb Reference Syntax}). | 18740 | references (see @ref{Noweb Reference Syntax}). |
| 18562 | 18741 | ||
| 18563 | @anchor{Header arguments} | 18742 | @anchor{Header arguments} |
| @@ -18615,7 +18794,7 @@ the source block. | |||
| 18615 | Includes both @samp{link} and @samp{org} options. | 18794 | Includes both @samp{link} and @samp{org} options. |
| 18616 | 18795 | ||
| 18617 | @item @samp{noweb} | 18796 | @item @samp{noweb} |
| 18618 | Includes @samp{link} option, expands Noweb references (see @ref{Noweb Reference Syntax}), and wraps them in link comments inside the body | 18797 | Includes @samp{link} option, expands noweb references (see @ref{Noweb Reference Syntax}), and wraps them in link comments inside the body |
| 18619 | of the code block. | 18798 | of the code block. |
| 18620 | @end table | 18799 | @end table |
| 18621 | 18800 | ||
| @@ -18654,7 +18833,7 @@ By default Org expands code blocks during tangling. The @samp{no-expand} | |||
| 18654 | header argument turns off such expansions. Note that one side-effect | 18833 | header argument turns off such expansions. Note that one side-effect |
| 18655 | of expansion by @code{org-babel-expand-src-block} also assigns values (see | 18834 | of expansion by @code{org-babel-expand-src-block} also assigns values (see |
| 18656 | @ref{Environment of a Code Block}) to variables. Expansions also replace | 18835 | @ref{Environment of a Code Block}) to variables. Expansions also replace |
| 18657 | Noweb references with their targets (see @ref{Noweb Reference Syntax}). | 18836 | noweb references with their targets (see @ref{Noweb Reference Syntax}). |
| 18658 | Some of these expansions may cause premature assignment, hence this | 18837 | Some of these expansions may cause premature assignment, hence this |
| 18659 | option. This option makes a difference only for tangling. It has no | 18838 | option. This option makes a difference only for tangling. It has no |
| 18660 | effect when exporting since code blocks for execution have to be | 18839 | effect when exporting since code blocks for execution have to be |
| @@ -18715,7 +18894,7 @@ file. | |||
| 18715 | 18894 | ||
| 18716 | Code blocks in the following languages are supported. | 18895 | Code blocks in the following languages are supported. |
| 18717 | 18896 | ||
| 18718 | @multitable @columnfractions 0.20 0.35 0.20 0.20 | 18897 | @multitable @columnfractions 0.25 0.25 0.25 0.20 |
| 18719 | @headitem Language | 18898 | @headitem Language |
| 18720 | @tab Identifier | 18899 | @tab Identifier |
| 18721 | @tab Language | 18900 | @tab Language |
| @@ -18915,11 +19094,13 @@ for Python and Emacs Lisp languages. | |||
| 18915 | @node Noweb Reference Syntax | 19094 | @node Noweb Reference Syntax |
| 18916 | @section Noweb Reference Syntax | 19095 | @section Noweb Reference Syntax |
| 18917 | 19096 | ||
| 18918 | @cindex code block, Noweb reference | 19097 | @cindex code block, noweb reference |
| 18919 | @cindex syntax, Noweb | 19098 | @cindex syntax, noweb |
| 18920 | @cindex source code, Noweb reference | 19099 | @cindex source code, noweb reference |
| 18921 | 19100 | ||
| 18922 | Org supports named blocks in Noweb@footnote{For Noweb literate programming details, see | 19101 | @cindex @samp{noweb-ref}, header argument |
| 19102 | Source code blocks can include references to other source code blocks, | ||
| 19103 | using a noweb@footnote{For noweb literate programming details, see | ||
| 18923 | @uref{http://www.cs.tufts.edu/~nr/noweb/}.} style syntax: | 19104 | @uref{http://www.cs.tufts.edu/~nr/noweb/}.} style syntax: |
| 18924 | 19105 | ||
| 18925 | @example | 19106 | @example |
| @@ -18927,42 +19108,48 @@ Org supports named blocks in Noweb@footnote{For Noweb literate programming detai | |||
| 18927 | @end example | 19108 | @end example |
| 18928 | 19109 | ||
| 18929 | 19110 | ||
| 18930 | Org can replace the construct with the source code, or the results of | 19111 | @noindent |
| 18931 | evaluation, of the code block identified as @var{CODE-BLOCK-ID}. | 19112 | where @var{CODE-BLOCK-ID} refers to either the @samp{NAME} of a single |
| 19113 | source code block, or a collection of one or more source code blocks | ||
| 19114 | sharing the same @samp{noweb-ref} header argument (see @ref{Using Header Arguments}). Org can replace such references with the source code of | ||
| 19115 | the block or blocks being referenced, or, in the case of a single | ||
| 19116 | source code block named with @samp{NAME}, with the results of an evaluation | ||
| 19117 | of that block. | ||
| 18932 | 19118 | ||
| 18933 | @cindex @samp{noweb}, header argument | 19119 | @cindex @samp{noweb}, header argument |
| 18934 | The @samp{noweb} header argument controls expansion of Noweb syntax | 19120 | The @samp{noweb} header argument controls expansion of noweb syntax |
| 18935 | references. Expansions occur when source code blocks are evaluated, | 19121 | references. Expansions occur when source code blocks are evaluated, |
| 18936 | tangled, or exported. | 19122 | tangled, or exported. |
| 18937 | 19123 | ||
| 18938 | @table @asis | 19124 | @table @asis |
| 18939 | @item @samp{no} | 19125 | @item @samp{no} |
| 18940 | Default. No expansion of Noweb syntax references in the body of the | 19126 | Default. No expansion of noweb syntax references in the body of the |
| 18941 | code when evaluating, tangling, or exporting. | 19127 | code when evaluating, tangling, or exporting. |
| 18942 | 19128 | ||
| 18943 | @item @samp{yes} | 19129 | @item @samp{yes} |
| 18944 | Expansion of Noweb syntax references in the body of the code block | 19130 | Expansion of noweb syntax references in the body of the code block |
| 18945 | when evaluating, tangling, or exporting. | 19131 | when evaluating, tangling, or exporting. |
| 18946 | 19132 | ||
| 18947 | @item @samp{tangle} | 19133 | @item @samp{tangle} |
| 18948 | Expansion of Noweb syntax references in the body of the code block | 19134 | Expansion of noweb syntax references in the body of the code block |
| 18949 | when tangling. No expansion when evaluating or exporting. | 19135 | when tangling. No expansion when evaluating or exporting. |
| 18950 | 19136 | ||
| 18951 | @item @samp{no-export} | 19137 | @item @samp{no-export} |
| 18952 | Expansion of Noweb syntax references in the body of the code block | 19138 | Expansion of noweb syntax references in the body of the code block |
| 18953 | when evaluating or tangling. No expansion when exporting. | 19139 | when evaluating or tangling. No expansion when exporting. |
| 18954 | 19140 | ||
| 18955 | @item @samp{strip-export} | 19141 | @item @samp{strip-export} |
| 18956 | Expansion of Noweb syntax references in the body of the code block | 19142 | Expansion of noweb syntax references in the body of the code block |
| 18957 | when expanding prior to evaluating or tangling. Removes Noweb | 19143 | when expanding prior to evaluating or tangling. Removes noweb |
| 18958 | syntax references when exporting. | 19144 | syntax references when exporting. |
| 18959 | 19145 | ||
| 18960 | @item @samp{eval} | 19146 | @item @samp{eval} |
| 18961 | Expansion of Noweb syntax references in the body of the code block | 19147 | Expansion of noweb syntax references in the body of the code block |
| 18962 | only before evaluating. | 19148 | only before evaluating. |
| 18963 | @end table | 19149 | @end table |
| 18964 | 19150 | ||
| 18965 | In the following example, | 19151 | In the most simple case, the contents of a single source block is |
| 19152 | inserted within other blocks. Thus, in following example, | ||
| 18966 | 19153 | ||
| 18967 | @example | 19154 | @example |
| 18968 | #+NAME: initialization | 19155 | #+NAME: initialization |
| @@ -18986,88 +19173,11 @@ the second code block is expanded as | |||
| 18986 | #+END_SRC | 19173 | #+END_SRC |
| 18987 | @end example | 19174 | @end example |
| 18988 | 19175 | ||
| 18989 | Noweb insertions honor prefix characters that appear before the Noweb | 19176 | You may also include the contents of multiple blocks sharing a common |
| 18990 | syntax reference. This behavior is illustrated in the following | 19177 | @samp{noweb-ref} header argument, which can be set at the file, sub-tree, |
| 18991 | example. Because the @samp{<<example>>} Noweb reference appears behind the | 19178 | or code block level. In the example Org file shown next, the body of |
| 18992 | SQL comment syntax, each line of the expanded Noweb reference is | 19179 | the source code in each block is extracted for concatenation to a pure |
| 18993 | commented. With: | 19180 | code file when tangled. |
| 18994 | |||
| 18995 | @example | ||
| 18996 | #+NAME: example | ||
| 18997 | #+BEGIN_SRC text | ||
| 18998 | this is the | ||
| 18999 | multi-line body of example | ||
| 19000 | #+END_SRC | ||
| 19001 | @end example | ||
| 19002 | |||
| 19003 | @noindent | ||
| 19004 | this code block: | ||
| 19005 | |||
| 19006 | @example | ||
| 19007 | #+BEGIN_SRC sql :noweb yes | ||
| 19008 | ---<<example>> | ||
| 19009 | #+END_SRC | ||
| 19010 | @end example | ||
| 19011 | |||
| 19012 | @noindent | ||
| 19013 | expands to: | ||
| 19014 | |||
| 19015 | @example | ||
| 19016 | #+BEGIN_SRC sql :noweb yes | ||
| 19017 | ---this is the | ||
| 19018 | ---multi-line body of example | ||
| 19019 | #+END_SRC | ||
| 19020 | @end example | ||
| 19021 | |||
| 19022 | Since this change does not affect Noweb replacement text without | ||
| 19023 | newlines in them, inline Noweb references are acceptable. | ||
| 19024 | |||
| 19025 | This feature can also be used for management of indentation in | ||
| 19026 | exported code snippets. With: | ||
| 19027 | |||
| 19028 | @example | ||
| 19029 | #+NAME: if-true | ||
| 19030 | #+BEGIN_SRC python :exports none | ||
| 19031 | print('do things when true') | ||
| 19032 | #+end_src | ||
| 19033 | |||
| 19034 | #+name: if-false | ||
| 19035 | #+begin_src python :exports none | ||
| 19036 | print('do things when false') | ||
| 19037 | #+end_src | ||
| 19038 | @end example | ||
| 19039 | |||
| 19040 | @noindent | ||
| 19041 | this code block: | ||
| 19042 | |||
| 19043 | @example | ||
| 19044 | #+begin_src python :noweb yes :results output | ||
| 19045 | if true: | ||
| 19046 | <<if-true>> | ||
| 19047 | else: | ||
| 19048 | <<if-false>> | ||
| 19049 | #+end_src | ||
| 19050 | @end example | ||
| 19051 | |||
| 19052 | @noindent | ||
| 19053 | expands to: | ||
| 19054 | |||
| 19055 | @example | ||
| 19056 | if true: | ||
| 19057 | print('do things when true') | ||
| 19058 | else: | ||
| 19059 | print('do things when false') | ||
| 19060 | @end example | ||
| 19061 | |||
| 19062 | @cindex @samp{noweb-ref}, header argument | ||
| 19063 | When expanding Noweb style references, Org concatenates code blocks by | ||
| 19064 | matching the reference name to either the code block name or, if none | ||
| 19065 | is found, to the @samp{noweb-ref} header argument. | ||
| 19066 | |||
| 19067 | For simple concatenation, set this @samp{noweb-ref} header argument at the | ||
| 19068 | sub-tree or file level. In the example Org file shown next, the body | ||
| 19069 | of the source code in each block is extracted for concatenation to | ||
| 19070 | a pure code file when tangled. | ||
| 19071 | 19181 | ||
| 19072 | @example | 19182 | @example |
| 19073 | #+BEGIN_SRC sh :tangle yes :noweb yes :shebang #!/bin/sh | 19183 | #+BEGIN_SRC sh :tangle yes :noweb yes :shebang #!/bin/sh |
| @@ -19096,24 +19206,25 @@ a pure code file when tangled. | |||
| 19096 | 19206 | ||
| 19097 | @cindex @samp{noweb-sep}, header argument | 19207 | @cindex @samp{noweb-sep}, header argument |
| 19098 | By default a newline separates each noweb reference concatenation. To | 19208 | By default a newline separates each noweb reference concatenation. To |
| 19099 | change this newline separator, edit the @samp{noweb-sep} header argument. | 19209 | use a different separator, edit the @samp{noweb-sep} header argument. |
| 19100 | 19210 | ||
| 19101 | Eventually, Org can include the results of a code block rather than | 19211 | Alternatively, Org can include the results of evaluation of a single |
| 19102 | its body. To that effect, append parentheses, possibly including | 19212 | code block rather than its body. Evaluation occurs when parentheses, |
| 19103 | arguments, to the code block name, as shown below. | 19213 | possibly including arguments, are appended to the code block name, as |
| 19214 | shown below. | ||
| 19104 | 19215 | ||
| 19105 | @example | 19216 | @example |
| 19106 | <<code-block-name(optional arguments)>> | 19217 | <<NAME(optional arguments)>> |
| 19107 | @end example | 19218 | @end example |
| 19108 | 19219 | ||
| 19109 | 19220 | ||
| 19110 | Note that when using the above approach to a code block's results, the | 19221 | Note that in this case, a code block name set by @samp{NAME} keyword is |
| 19111 | code block name set by @samp{NAME} keyword is required; the reference set | 19222 | required; the reference set by @samp{noweb-ref} will not work when |
| 19112 | by @samp{noweb-ref} does not work in that case. | 19223 | evaluation is desired. |
| 19113 | 19224 | ||
| 19114 | Here is an example that demonstrates how the exported content changes | 19225 | Here is an example that demonstrates how the exported content changes |
| 19115 | when Noweb style references are used with parentheses versus without. | 19226 | when noweb style references are used with parentheses versus without. |
| 19116 | With: | 19227 | Given: |
| 19117 | 19228 | ||
| 19118 | @example | 19229 | @example |
| 19119 | #+NAME: some-code | 19230 | #+NAME: some-code |
| @@ -19139,7 +19250,7 @@ print(num*10) | |||
| 19139 | @end example | 19250 | @end example |
| 19140 | 19251 | ||
| 19141 | 19252 | ||
| 19142 | Below, a similar Noweb style reference is used, but with parentheses, | 19253 | Below, a similar noweb style reference is used, but with parentheses, |
| 19143 | while setting a variable @samp{num} to 10: | 19254 | while setting a variable @samp{num} to 10: |
| 19144 | 19255 | ||
| 19145 | @example | 19256 | @example |
| @@ -19149,13 +19260,99 @@ while setting a variable @samp{num} to 10: | |||
| 19149 | @end example | 19260 | @end example |
| 19150 | 19261 | ||
| 19151 | @noindent | 19262 | @noindent |
| 19152 | Note that now the expansion contains the results of the code block | 19263 | Note that the expansion now contains the results of the code block |
| 19153 | @samp{some-code}, not the code block itself: | 19264 | @samp{some-code}, not the code block itself: |
| 19154 | 19265 | ||
| 19155 | @example | 19266 | @example |
| 19156 | 100 | 19267 | 100 |
| 19157 | @end example | 19268 | @end example |
| 19158 | 19269 | ||
| 19270 | |||
| 19271 | Noweb insertions honor prefix characters that appear before the noweb | ||
| 19272 | syntax reference. This behavior is illustrated in the following | ||
| 19273 | example. Because the @samp{<<example>>} noweb reference appears behind the | ||
| 19274 | SQL comment syntax, each line of the expanded noweb reference is | ||
| 19275 | commented. With: | ||
| 19276 | |||
| 19277 | @example | ||
| 19278 | #+NAME: example | ||
| 19279 | #+BEGIN_SRC text | ||
| 19280 | this is the | ||
| 19281 | multi-line body of example | ||
| 19282 | #+END_SRC | ||
| 19283 | @end example | ||
| 19284 | |||
| 19285 | @noindent | ||
| 19286 | this code block: | ||
| 19287 | |||
| 19288 | @example | ||
| 19289 | #+BEGIN_SRC sql :noweb yes | ||
| 19290 | ---<<example>> | ||
| 19291 | #+END_SRC | ||
| 19292 | @end example | ||
| 19293 | |||
| 19294 | @noindent | ||
| 19295 | expands to: | ||
| 19296 | |||
| 19297 | @example | ||
| 19298 | #+BEGIN_SRC sql :noweb yes | ||
| 19299 | ---this is the | ||
| 19300 | ---multi-line body of example | ||
| 19301 | #+END_SRC | ||
| 19302 | @end example | ||
| 19303 | |||
| 19304 | Since this change does not affect noweb replacement text without | ||
| 19305 | newlines in them, inline noweb references are acceptable. | ||
| 19306 | |||
| 19307 | This feature can also be used for management of indentation in | ||
| 19308 | exported code snippets. With: | ||
| 19309 | |||
| 19310 | @example | ||
| 19311 | #+NAME: if-true | ||
| 19312 | #+BEGIN_SRC python :exports none | ||
| 19313 | print('do things when true') | ||
| 19314 | #+end_src | ||
| 19315 | |||
| 19316 | #+name: if-false | ||
| 19317 | #+begin_src python :exports none | ||
| 19318 | print('do things when false') | ||
| 19319 | #+end_src | ||
| 19320 | @end example | ||
| 19321 | |||
| 19322 | @noindent | ||
| 19323 | this code block: | ||
| 19324 | |||
| 19325 | @example | ||
| 19326 | #+begin_src python :noweb yes :results output | ||
| 19327 | if true: | ||
| 19328 | <<if-true>> | ||
| 19329 | else: | ||
| 19330 | <<if-false>> | ||
| 19331 | #+end_src | ||
| 19332 | @end example | ||
| 19333 | |||
| 19334 | @noindent | ||
| 19335 | expands to: | ||
| 19336 | |||
| 19337 | @example | ||
| 19338 | if true: | ||
| 19339 | print('do things when true') | ||
| 19340 | else: | ||
| 19341 | print('do things when false') | ||
| 19342 | @end example | ||
| 19343 | |||
| 19344 | When in doubt about the outcome of a source code block expansion, you | ||
| 19345 | can preview the results with the following command: | ||
| 19346 | |||
| 19347 | @table @asis | ||
| 19348 | @item @kbd{C-c C-v v} or @kbd{C-c C-v C-v} (@code{org-babel-expand-src-block}) | ||
| 19349 | @findex org-babel-expand-src-block | ||
| 19350 | @kindex C-c C-v v | ||
| 19351 | @kindex C-c C-v C-v | ||
| 19352 | Expand the current source code block according to its header | ||
| 19353 | arguments and pop open the results in a preview buffer. | ||
| 19354 | @end table | ||
| 19355 | |||
| 19159 | @node Library of Babel | 19356 | @node Library of Babel |
| 19160 | @section Library of Babel | 19357 | @section Library of Babel |
| 19161 | 19358 | ||
| @@ -19357,12 +19554,13 @@ emacs -Q --batch --eval " | |||
| 19357 | * Structure Templates:: Quick insertion of structural elements. | 19554 | * Structure Templates:: Quick insertion of structural elements. |
| 19358 | * Speed Keys:: Electric commands at the beginning of a headline. | 19555 | * Speed Keys:: Electric commands at the beginning of a headline. |
| 19359 | * Clean View:: Getting rid of leading stars in the outline. | 19556 | * Clean View:: Getting rid of leading stars in the outline. |
| 19557 | * Execute commands in the active region:: Execute commands on multiple items in Org or agenda view. | ||
| 19360 | * Dynamic Headline Numbering:: Display and update outline numbering. | 19558 | * Dynamic Headline Numbering:: Display and update outline numbering. |
| 19361 | * The Very Busy @kbd{C-c C-c} Key:: When in doubt, press @kbd{C-c C-c}. | 19559 | * The Very Busy @kbd{C-c C-c} Key:: When in doubt, press @kbd{C-c C-c}. |
| 19362 | * In-buffer Settings:: Overview of keywords. | 19560 | * In-buffer Settings:: Overview of keywords. |
| 19363 | * Org Syntax:: Formal description of Org's syntax. | 19561 | * Org Syntax:: Formal description of Org's syntax. |
| 19364 | * Documentation Access:: Read documentation about current syntax. | 19562 | * Documentation Access:: Read documentation about current syntax. |
| 19365 | * Escape Character:: | 19563 | * Escape Character:: Prevent Org from interpreting your writing. |
| 19366 | * Code Evaluation Security:: Org files evaluate in-line code. | 19564 | * Code Evaluation Security:: Org files evaluate in-line code. |
| 19367 | * Interaction:: With other Emacs packages. | 19565 | * Interaction:: With other Emacs packages. |
| 19368 | * TTY Keys:: Using Org on a tty. | 19566 | * TTY Keys:: Using Org on a tty. |
| @@ -19411,10 +19609,6 @@ At the beginning of an empty headline, complete TODO keywords. | |||
| 19411 | After @samp{\}, complete @TeX{} symbols supported by the exporter. | 19609 | After @samp{\}, complete @TeX{} symbols supported by the exporter. |
| 19412 | 19610 | ||
| 19413 | @item | 19611 | @item |
| 19414 | After @samp{*}, complete headlines in the current buffer so that they | ||
| 19415 | can be used in search links like: @samp{[[*find this headline]]} | ||
| 19416 | |||
| 19417 | @item | ||
| 19418 | After @samp{:} in a headline, complete tags. Org deduces the list of | 19612 | After @samp{:} in a headline, complete tags. Org deduces the list of |
| 19419 | tags from the @samp{TAGS} in-buffer option (see @ref{Setting Tags}), the | 19613 | tags from the @samp{TAGS} in-buffer option (see @ref{Setting Tags}), the |
| 19420 | variable @code{org-tag-alist}, or from all tags used in the current | 19614 | variable @code{org-tag-alist}, or from all tags used in the current |
| @@ -19426,7 +19620,11 @@ of keys is constructed dynamically from all keys used in the | |||
| 19426 | current buffer. | 19620 | current buffer. |
| 19427 | 19621 | ||
| 19428 | @item | 19622 | @item |
| 19429 | After @samp{[}, complete link abbreviations (see @ref{Link Abbreviations}). | 19623 | After @samp{[[}, complete link abbreviations (see @ref{Link Abbreviations}). |
| 19624 | |||
| 19625 | @item | ||
| 19626 | After @samp{[[*}, complete headlines in the current buffer so that they | ||
| 19627 | can be used in search links like: @samp{[[*find this headline]]} | ||
| 19430 | 19628 | ||
| 19431 | @item | 19629 | @item |
| 19432 | After @samp{#+}, complete the special keywords like @samp{TYP_TODO} or | 19630 | After @samp{#+}, complete the special keywords like @samp{TYP_TODO} or |
| @@ -19580,9 +19778,16 @@ through @code{word-wrap}.}. | |||
| 19580 | @vindex org-indent-indentation-per-level | 19778 | @vindex org-indent-indentation-per-level |
| 19581 | To make more horizontal space, the headlines are shifted by two | 19779 | To make more horizontal space, the headlines are shifted by two |
| 19582 | characters. Configure @code{org-indent-indentation-per-level} variable for | 19780 | characters. Configure @code{org-indent-indentation-per-level} variable for |
| 19583 | a different number. Only one star on each headline is visible, the | 19781 | a different number. |
| 19584 | rest are masked with the same font color as the background@footnote{Note that turning on Org Indent mode sets | 19782 | |
| 19585 | @code{org-hide-leading-stars} to @code{t} and @code{org-adapt-indentation} to @code{nil}.}. | 19783 | @vindex org-indent-mode-turns-on-hiding-stars |
| 19784 | @vindex org-indent-mode-turns-off-org-adapt-indentation | ||
| 19785 | By default, Org Indent mode turns off @code{org-adapt-indentation} and does | ||
| 19786 | hide leading stars by locally setting @code{org-hide-leading-stars} to @code{t}: | ||
| 19787 | only one star on each headline is visible, the rest are masked with | ||
| 19788 | the same font color as the background. If you want to customize this | ||
| 19789 | default behavior, see @code{org-indent-mode-turns-on-hiding-stars} and | ||
| 19790 | @code{org-indent-mode-turns-off-org-adapt-indentation}. | ||
| 19586 | 19791 | ||
| 19587 | @vindex org-startup-indented | 19792 | @vindex org-startup-indented |
| 19588 | To globally turn on Org Indent mode for all files, customize the | 19793 | To globally turn on Org Indent mode for all files, customize the |
| @@ -19601,7 +19806,9 @@ It is possible to use hard spaces to achieve the indentation instead, | |||
| 19601 | if the bare ASCII file should have the indented look also outside | 19806 | if the bare ASCII file should have the indented look also outside |
| 19602 | Emacs@footnote{This works, but requires extra effort. Org Indent mode is | 19807 | Emacs@footnote{This works, but requires extra effort. Org Indent mode is |
| 19603 | more convenient for most applications.}. With Org's support, you have to indent all lines to | 19808 | more convenient for most applications.}. With Org's support, you have to indent all lines to |
| 19604 | line up with the outline headers. You would use these settings: | 19809 | line up with the outline headers. You would use these |
| 19810 | settings@footnote{@code{org-adapt-indentation} can also be set to @samp{'headline-data}, | ||
| 19811 | in which case only data lines below the headline will be indented.}: | ||
| 19605 | 19812 | ||
| 19606 | @lisp | 19813 | @lisp |
| 19607 | (setq org-adapt-indentation t | 19814 | (setq org-adapt-indentation t |
| @@ -19631,7 +19838,7 @@ face @code{org-hide} to them. For per-file preference, use these file | |||
| 19631 | @item @emph{Odd levels} (@code{org-odd-levels-only}) | 19838 | @item @emph{Odd levels} (@code{org-odd-levels-only}) |
| 19632 | @vindex org-odd-levels-only | 19839 | @vindex org-odd-levels-only |
| 19633 | The third setting makes Org use only odd levels, 1, 3, 5, @dots{}, in | 19840 | The third setting makes Org use only odd levels, 1, 3, 5, @dots{}, in |
| 19634 | the outline to create more indentation. On a per-file level, | 19841 | the outline to create more indentation. On a per-file level, |
| 19635 | control this with: | 19842 | control this with: |
| 19636 | 19843 | ||
| 19637 | @example | 19844 | @example |
| @@ -19643,6 +19850,26 @@ To convert a file between single and double stars layouts, use | |||
| 19643 | @kbd{M-x org-convert-to-odd-levels} and @kbd{M-x org-convert-to-oddeven-levels}. | 19850 | @kbd{M-x org-convert-to-odd-levels} and @kbd{M-x org-convert-to-oddeven-levels}. |
| 19644 | @end table | 19851 | @end table |
| 19645 | 19852 | ||
| 19853 | @node Execute commands in the active region | ||
| 19854 | @section Execute commands in the active region | ||
| 19855 | |||
| 19856 | @vindex org-loop-over-headlines-in-active-region | ||
| 19857 | When in an Org buffer and the region is active, some commands will | ||
| 19858 | apply to all the subtrees in the active region. For example, hitting | ||
| 19859 | @kbd{C-c C-s} when multiple headlines are within the active region will | ||
| 19860 | successively prompt you for a new schedule date and time. To disable | ||
| 19861 | this, set the option @code{org-loop-over-headlines-in-active-region} to | ||
| 19862 | non-@code{t}, activate the region and run the command normally. | ||
| 19863 | |||
| 19864 | @vindex org-agenda-loop-over-headlines-in-active-region | ||
| 19865 | @code{org-agenda-loop-over-headlines-in-active-region} is the equivalent | ||
| 19866 | option of the agenda buffer, where you can also use @ref{Bulk remote editing selected entries, , bulk editing of | ||
| 19867 | selected entries}. | ||
| 19868 | |||
| 19869 | Not all commands can loop in the active region and what subtrees or | ||
| 19870 | headlines are considered can be refined: see the docstrings of these | ||
| 19871 | options for more details. | ||
| 19872 | |||
| 19646 | @node Dynamic Headline Numbering | 19873 | @node Dynamic Headline Numbering |
| 19647 | @section Dynamic Headline Numbering | 19874 | @section Dynamic Headline Numbering |
| 19648 | 19875 | ||
| @@ -19671,6 +19898,11 @@ If @code{org-num-skip-footnotes} is non-@code{nil}, footnotes sections (see | |||
| 19671 | You can control how the numbering is displayed by setting | 19898 | You can control how the numbering is displayed by setting |
| 19672 | @code{org-num-face} and @code{org-num-format-function}. | 19899 | @code{org-num-face} and @code{org-num-format-function}. |
| 19673 | 19900 | ||
| 19901 | @vindex org-startup-numerated | ||
| 19902 | You can also turn this mode globally for all Org files by setting the | ||
| 19903 | option @code{org-startup-numerated} to @samp{t}, or locally on a file by using | ||
| 19904 | @samp{#+startup: num}. | ||
| 19905 | |||
| 19674 | @node The Very Busy @kbd{C-c C-c} Key | 19906 | @node The Very Busy @kbd{C-c C-c} Key |
| 19675 | @section The Very Busy @kbd{C-c C-c} Key | 19907 | @section The Very Busy @kbd{C-c C-c} Key |
| 19676 | 19908 | ||
| @@ -19684,6 +19916,9 @@ manual, but here is a consolidated list for easy reference. | |||
| 19684 | 19916 | ||
| 19685 | @itemize | 19917 | @itemize |
| 19686 | @item | 19918 | @item |
| 19919 | If column view (see @ref{Column View}) is on, exit column view. | ||
| 19920 | |||
| 19921 | @item | ||
| 19687 | If any highlights shown in the buffer from the creation of a sparse | 19922 | If any highlights shown in the buffer from the creation of a sparse |
| 19688 | tree, or from clock display, remove such highlights. | 19923 | tree, or from clock display, remove such highlights. |
| 19689 | 19924 | ||
| @@ -19753,7 +19988,7 @@ Closing and reopening the Org file in Emacs also activates the | |||
| 19753 | changes. | 19988 | changes. |
| 19754 | 19989 | ||
| 19755 | @table @asis | 19990 | @table @asis |
| 19756 | @item @samp{#+ARCHIVE: %s_done} | 19991 | @item @samp{#+ARCHIVE: %s_done::} |
| 19757 | @cindex @samp{ARCHIVE}, keyword | 19992 | @cindex @samp{ARCHIVE}, keyword |
| 19758 | @vindex org-archive-location | 19993 | @vindex org-archive-location |
| 19759 | Sets the archive location of the agenda file. The corresponding | 19994 | Sets the archive location of the agenda file. The corresponding |
| @@ -19793,9 +20028,9 @@ corresponding variable is @code{org-link-abbrev-alist}. | |||
| 19793 | 20028 | ||
| 19794 | @item @samp{#+PRIORITIES: highest lowest default} | 20029 | @item @samp{#+PRIORITIES: highest lowest default} |
| 19795 | @cindex @samp{PRIORITIES}, keyword | 20030 | @cindex @samp{PRIORITIES}, keyword |
| 19796 | @vindex org-highest-priority | 20031 | @vindex org-priority-highest |
| 19797 | @vindex org-lowest-priority | 20032 | @vindex org-priority-lowest |
| 19798 | @vindex org-default-priority | 20033 | @vindex org-priority-default |
| 19799 | This line sets the limits and the default for the priorities. All | 20034 | This line sets the limits and the default for the priorities. All |
| 19800 | three must be either letters A--Z or numbers 0--9. The highest | 20035 | three must be either letters A--Z or numbers 0--9. The highest |
| 19801 | priority must have a lower ASCII number than the lowest priority. | 20036 | priority must have a lower ASCII number than the lowest priority. |
| @@ -19827,8 +20062,8 @@ Startup options Org uses when first visiting a file. | |||
| 19827 | @vindex org-startup-folded | 20062 | @vindex org-startup-folded |
| 19828 | The first set of options deals with the initial visibility of the | 20063 | The first set of options deals with the initial visibility of the |
| 19829 | outline tree. The corresponding variable for global default | 20064 | outline tree. The corresponding variable for global default |
| 19830 | settings is @code{org-startup-folded} with a default value of @code{t}, which | 20065 | settings is @code{org-startup-folded} with a default value of |
| 19831 | is the same as @code{overview}. | 20066 | @code{showeverything}. |
| 19832 | 20067 | ||
| 19833 | @multitable {aaaaaaaaaaaaaaaa} {aaaaaaaaaaaaaaaaaaaaaaaaaa} | 20068 | @multitable {aaaaaaaaaaaaaaaa} {aaaaaaaaaaaaaaaaaaaaaaaaaa} |
| 19834 | @item @samp{overview} | 20069 | @item @samp{overview} |
| @@ -19854,6 +20089,17 @@ wraps long lines, including headlines, correctly indented.}. | |||
| 19854 | @tab Start with Org Indent mode turned off. | 20089 | @tab Start with Org Indent mode turned off. |
| 19855 | @end multitable | 20090 | @end multitable |
| 19856 | 20091 | ||
| 20092 | @vindex org-startup-numerated | ||
| 20093 | Dynamic virtual numeration of headlines is controlled by the variable | ||
| 20094 | @code{org-startup-numerated}. | ||
| 20095 | |||
| 20096 | @multitable {aaaaaaa} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa} | ||
| 20097 | @item @samp{num} | ||
| 20098 | @tab Start with Org num mode turned on. | ||
| 20099 | @item @samp{nonum} | ||
| 20100 | @tab Start with Org num mode turned off. | ||
| 20101 | @end multitable | ||
| 20102 | |||
| 19857 | @vindex org-startup-align-all-tables | 20103 | @vindex org-startup-align-all-tables |
| 19858 | Aligns tables consistently upon visiting a file. The | 20104 | Aligns tables consistently upon visiting a file. The |
| 19859 | corresponding variable is @code{org-startup-align-all-tables} with | 20105 | corresponding variable is @code{org-startup-align-all-tables} with |
| @@ -20116,8 +20362,10 @@ using it on a headline displays ``Document Structure'' section. | |||
| 20116 | @cindex zero width space | 20362 | @cindex zero width space |
| 20117 | You may sometimes want to write text that looks like Org syntax, but | 20363 | You may sometimes want to write text that looks like Org syntax, but |
| 20118 | should really read as plain text. Org may use a specific escape | 20364 | should really read as plain text. Org may use a specific escape |
| 20119 | character in some situations, e.g., a backslash in macros (see @ref{Macro Replacement}) or a comma in source and example blocks (see @ref{Literal Examples}). In the general case, however, we suggest to use the zero | 20365 | character in some situations, i.e., a backslash in macros (see @ref{Macro Replacement}) and links (see @ref{Link Format}), or a comma in source and |
| 20120 | width space. You can insert one with any of the following: | 20366 | example blocks (see @ref{Literal Examples}). In the general case, however, |
| 20367 | we suggest to use the zero width space. You can insert one with any | ||
| 20368 | of the following: | ||
| 20121 | 20369 | ||
| 20122 | @example | 20370 | @example |
| 20123 | C-x 8 <RET> zero width space <RET> | 20371 | C-x 8 <RET> zero width space <RET> |
| @@ -20617,8 +20865,8 @@ javascript:location.href='org-protocol://capture?template=x'+ | |||
| 20617 | 20865 | ||
| 20618 | @vindex org-protocol-default-template-key | 20866 | @vindex org-protocol-default-template-key |
| 20619 | The capture template to be used can be specified in the bookmark (like | 20867 | The capture template to be used can be specified in the bookmark (like |
| 20620 | @samp{X} above). If unspecified, the template key is set in the variable | 20868 | @samp{X} above). If unspecified, the template key is set in the variable |
| 20621 | @code{org-protocol-default-template-key}. The following template | 20869 | @code{org-protocol-default-template-key}. The following template |
| 20622 | placeholders are available: | 20870 | placeholders are available: |
| 20623 | 20871 | ||
| 20624 | @example | 20872 | @example |
| @@ -20778,13 +21026,11 @@ compatible with Org Mobile. It also describes synchronizing changes, | |||
| 20778 | such as to notes, between the mobile application and the computer. | 21026 | such as to notes, between the mobile application and the computer. |
| 20779 | 21027 | ||
| 20780 | To change tags and TODO states in the mobile application, first | 21028 | To change tags and TODO states in the mobile application, first |
| 20781 | customize the variables @code{org-todo-keywords} and @code{org-tag-alist}. | 21029 | customize the variables @code{org-todo-keywords}, @code{org-tag-alist} and |
| 20782 | These should cover all the important tags and TODO keywords, even if | 21030 | @code{org-tag-persistent-alist}. These should cover all the important tags |
| 20783 | Org files use only some of them. Though the mobile application is | 21031 | and TODO keywords, even if Org files use only some of them. Though |
| 20784 | expected to support in-buffer settings, it is required to understand | 21032 | the mobile application is expected to support in-buffer settings, it |
| 20785 | TODO states @emph{sets} (see @ref{Per-file keywords}) and | 21033 | is required to understand TODO states @emph{sets} (see @ref{Per-file keywords}) and @emph{mutually exclusive} tags (see @ref{Setting Tags}) only for those set in these variables. |
| 20786 | @emph{mutually exclusive} tags (see @ref{Setting Tags}) only for those set in | ||
| 20787 | these variables. | ||
| 20788 | 21034 | ||
| 20789 | @menu | 21035 | @menu |
| 20790 | * Setting up the staging area:: For the mobile device. | 21036 | * Setting up the staging area:: For the mobile device. |
| @@ -20966,14 +21212,14 @@ process of adding Org links to Unix man pages, which look like this | |||
| 20966 | 21212 | ||
| 20967 | 21213 | ||
| 20968 | @noindent | 21214 | @noindent |
| 20969 | The following @samp{org-man.el} file implements it | 21215 | The following @samp{ol-man.el} file implements it |
| 20970 | 21216 | ||
| 20971 | @lisp | 21217 | @lisp |
| 20972 | ;;; org-man.el - Support for links to man pages in Org mode | 21218 | ;;; ol-man.el - Support for links to man pages in Org mode |
| 20973 | (require 'org) | 21219 | (require 'ol) |
| 20974 | 21220 | ||
| 20975 | (org-link-set-parameters "man" | 21221 | (org-link-set-parameters "man" |
| 20976 | :follow org-man-command | 21222 | :follow #'org-man-open |
| 20977 | :export #'org-man-export | 21223 | :export #'org-man-export |
| 20978 | :store #'org-man-store-link) | 21224 | :store #'org-man-store-link) |
| 20979 | 21225 | ||
| @@ -20982,6 +21228,11 @@ The following @samp{org-man.el} file implements it | |||
| 20982 | :group 'org-link | 21228 | :group 'org-link |
| 20983 | :type '(choice (const man) (const woman))) | 21229 | :type '(choice (const man) (const woman))) |
| 20984 | 21230 | ||
| 21231 | (defun org-man-open (path _) | ||
| 21232 | "Visit the manpage on PATH. | ||
| 21233 | PATH should be a topic that can be thrown at the man command." | ||
| 21234 | (funcall org-man-command path)) | ||
| 21235 | |||
| 20985 | (defun org-man-store-link () | 21236 | (defun org-man-store-link () |
| 20986 | "Store a link to a man page." | 21237 | "Store a link to a man page." |
| 20987 | (when (memq major-mode '(Man-mode woman-mode)) | 21238 | (when (memq major-mode '(Man-mode woman-mode)) |
| @@ -20989,7 +21240,7 @@ The following @samp{org-man.el} file implements it | |||
| 20989 | (let* ((page (org-man-get-page-name)) | 21240 | (let* ((page (org-man-get-page-name)) |
| 20990 | (link (concat "man:" page)) | 21241 | (link (concat "man:" page)) |
| 20991 | (description (format "Man page for %s" page))) | 21242 | (description (format "Man page for %s" page))) |
| 20992 | (org-store-link-props | 21243 | (org-link-store-props |
| 20993 | :type "man" | 21244 | :type "man" |
| 20994 | :link link | 21245 | :link link |
| 20995 | :description description)))) | 21246 | :description description)))) |
| @@ -21001,7 +21252,7 @@ The following @samp{org-man.el} file implements it | |||
| 21001 | (match-string 1 (buffer-name)) | 21252 | (match-string 1 (buffer-name)) |
| 21002 | (error "Cannot create link to this man page"))) | 21253 | (error "Cannot create link to this man page"))) |
| 21003 | 21254 | ||
| 21004 | (defun org-man-export (link description format) | 21255 | (defun org-man-export (link description format _) |
| 21005 | "Export a man page link from Org files." | 21256 | "Export a man page link from Org files." |
| 21006 | (let ((path (format "http://man.he.net/?topic=%s§ion=all" link)) | 21257 | (let ((path (format "http://man.he.net/?topic=%s§ion=all" link)) |
| 21007 | (desc (or description link))) | 21258 | (desc (or description link))) |
| @@ -21012,8 +21263,8 @@ The following @samp{org-man.el} file implements it | |||
| 21012 | (`ascii (format "%s (%s)" desc path)) | 21263 | (`ascii (format "%s (%s)" desc path)) |
| 21013 | (t path)))) | 21264 | (t path)))) |
| 21014 | 21265 | ||
| 21015 | (provide 'org-man) | 21266 | (provide ol-man) |
| 21016 | ;;; org-man.el ends here | 21267 | ;;; ol-man.el ends here |
| 21017 | @end lisp | 21268 | @end lisp |
| 21018 | 21269 | ||
| 21019 | @noindent | 21270 | @noindent |
| @@ -21021,15 +21272,15 @@ To activate links to man pages in Org, enter this in the Emacs init | |||
| 21021 | file: | 21272 | file: |
| 21022 | 21273 | ||
| 21023 | @lisp | 21274 | @lisp |
| 21024 | (require 'org-man) | 21275 | (require 'ol-man) |
| 21025 | @end lisp | 21276 | @end lisp |
| 21026 | 21277 | ||
| 21027 | @noindent | 21278 | @noindent |
| 21028 | A review of @samp{org-man.el}: | 21279 | A review of @samp{ol-man.el}: |
| 21029 | 21280 | ||
| 21030 | @enumerate | 21281 | @enumerate |
| 21031 | @item | 21282 | @item |
| 21032 | First, @samp{(require 'org)} ensures @samp{org.el} is loaded. | 21283 | First, @samp{(require 'ol)} ensures that @samp{ol.el} is loaded. |
| 21033 | 21284 | ||
| 21034 | @item | 21285 | @item |
| 21035 | @findex org-link-set-parameters | 21286 | @findex org-link-set-parameters |
| @@ -21384,7 +21635,7 @@ Update all dynamic blocks in the current file. | |||
| 21384 | 21635 | ||
| 21385 | Before updating a dynamic block, Org removes content between the | 21636 | Before updating a dynamic block, Org removes content between the |
| 21386 | @samp{BEGIN} and @samp{END} markers. Org then reads the parameters on the | 21637 | @samp{BEGIN} and @samp{END} markers. Org then reads the parameters on the |
| 21387 | @samp{BEGIN} line for passing to the writer function as a plist. The | 21638 | @samp{BEGIN} line for passing to the writer function as a plist. The |
| 21388 | previous content of the dynamic block becomes erased from the buffer | 21639 | previous content of the dynamic block becomes erased from the buffer |
| 21389 | and appended to the plist under @code{:content}. | 21640 | and appended to the plist under @code{:content}. |
| 21390 | 21641 | ||
| @@ -21986,7 +22237,7 @@ a JavaScript program for displaying webpages derived from Org using | |||
| 21986 | an Info-like or a folding interface with single-key navigation. | 22237 | an Info-like or a folding interface with single-key navigation. |
| 21987 | @end table | 22238 | @end table |
| 21988 | 22239 | ||
| 21989 | See below for the full list of contributions! Again, please let me | 22240 | See below for the full list of contributions! Again, please let me |
| 21990 | know what I am missing here! | 22241 | know what I am missing here! |
| 21991 | 22242 | ||
| 21992 | @anchor{From Bastien} | 22243 | @anchor{From Bastien} |
| @@ -22043,7 +22294,7 @@ be complete if the ones above were not mentioned in this manual. | |||
| 22043 | 22294 | ||
| 22044 | @itemize | 22295 | @itemize |
| 22045 | @item | 22296 | @item |
| 22046 | Russel Adams came up with the idea for drawers. | 22297 | Russell Adams came up with the idea for drawers. |
| 22047 | 22298 | ||
| 22048 | @item | 22299 | @item |
| 22049 | Thomas Baumann wrote @samp{ol-bbdb.el} and @samp{ol-mhe.el}. | 22300 | Thomas Baumann wrote @samp{ol-bbdb.el} and @samp{ol-mhe.el}. |
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 59b8bdbdf37..0557ca54695 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi | |||
| @@ -2508,7 +2508,7 @@ whatever shell is installed on the device with this setting: | |||
| 2508 | @lisp | 2508 | @lisp |
| 2509 | @group | 2509 | @group |
| 2510 | (add-to-list 'tramp-connection-properties | 2510 | (add-to-list 'tramp-connection-properties |
| 2511 | (list (regexp-quote "192.168.0.26") "remote-shell" "sh")) | 2511 | (list (regexp-quote "192.168.0.26") "remote-shell" "sh")) |
| 2512 | @end group | 2512 | @end group |
| 2513 | @end lisp | 2513 | @end lisp |
| 2514 | 2514 | ||
| @@ -2560,7 +2560,7 @@ the previous example, fix the connection properties as follows: | |||
| 2560 | @lisp | 2560 | @lisp |
| 2561 | @group | 2561 | @group |
| 2562 | (add-to-list 'tramp-connection-properties | 2562 | (add-to-list 'tramp-connection-properties |
| 2563 | (list (regexp-quote "android") "remote-shell" "sh")) | 2563 | (list (regexp-quote "android") "remote-shell" "sh")) |
| 2564 | @end group | 2564 | @end group |
| 2565 | @end lisp | 2565 | @end lisp |
| 2566 | 2566 | ||
| @@ -4341,9 +4341,9 @@ configure @file{~/.ssh/config} on the proxy host: | |||
| 4341 | @example | 4341 | @example |
| 4342 | @group | 4342 | @group |
| 4343 | Host * | 4343 | Host * |
| 4344 | ControlMaster auto | 4344 | ControlMaster auto |
| 4345 | ControlPath tramp.%C | 4345 | ControlPath tramp.%C |
| 4346 | ControlPersist no | 4346 | ControlPersist no |
| 4347 | @end group | 4347 | @end group |
| 4348 | @end example | 4348 | @end example |
| 4349 | 4349 | ||
| @@ -4878,6 +4878,25 @@ In case you have installed it from its Git repository, @ref{Recompilation}. | |||
| 4878 | 4878 | ||
| 4879 | 4879 | ||
| 4880 | @item | 4880 | @item |
| 4881 | I get an error @samp{Remote file error: Forbidden reentrant call of Tramp} | ||
| 4882 | |||
| 4883 | Timers, process filters and sentinels, and other event based functions | ||
| 4884 | can run at any time, when a remote file operation is still running. | ||
| 4885 | This can cause @value{tramp} to block. When such a situation is | ||
| 4886 | detected, this error is triggered. It shall be fixed in the | ||
| 4887 | respective function (an error report will help), but for the time | ||
| 4888 | being you can suppress this error by the following code in your | ||
| 4889 | @file{~/.emacs}: | ||
| 4890 | |||
| 4891 | @lisp | ||
| 4892 | @group | ||
| 4893 | (setq debug-ignored-errors | ||
| 4894 | (cons 'remote-file-error debug-ignored-errors)) | ||
| 4895 | @end group | ||
| 4896 | @end lisp | ||
| 4897 | |||
| 4898 | |||
| 4899 | @item | ||
| 4881 | How to disable other packages from calling @value{tramp}? | 4900 | How to disable other packages from calling @value{tramp}? |
| 4882 | 4901 | ||
| 4883 | There are packages that call @value{tramp} without the user ever | 4902 | There are packages that call @value{tramp} without the user ever |
| @@ -4982,7 +5001,7 @@ handlers. | |||
| 4982 | 5001 | ||
| 4983 | @node External packages | 5002 | @node External packages |
| 4984 | @section Integrating with external Lisp packages | 5003 | @section Integrating with external Lisp packages |
| 4985 | @subsection File name completion. | 5004 | @subsection File name completion |
| 4986 | 5005 | ||
| 4987 | @vindex non-essential | 5006 | @vindex non-essential |
| 4988 | Sometimes, it is not convenient to open a new connection to a remote | 5007 | Sometimes, it is not convenient to open a new connection to a remote |
| @@ -5000,7 +5019,7 @@ bind it to non-@code{nil} value. | |||
| 5000 | @end lisp | 5019 | @end lisp |
| 5001 | 5020 | ||
| 5002 | 5021 | ||
| 5003 | @subsection File attributes cache. | 5022 | @subsection File attributes cache |
| 5004 | 5023 | ||
| 5005 | Keeping a local cache of remote file attributes in sync with the | 5024 | Keeping a local cache of remote file attributes in sync with the |
| 5006 | remote host is a time-consuming operation. Flushing and re-querying | 5025 | remote host is a time-consuming operation. Flushing and re-querying |
| @@ -5040,6 +5059,25 @@ root-directory, it is most likely sufficient to make the | |||
| 5040 | @code{default-directory} of the process buffer as the root directory. | 5059 | @code{default-directory} of the process buffer as the root directory. |
| 5041 | 5060 | ||
| 5042 | 5061 | ||
| 5062 | @subsection Timers | ||
| 5063 | |||
| 5064 | Timers run asynchronously at any time when Emacs is waiting for | ||
| 5065 | sending a string to a process, or waiting for process output. They | ||
| 5066 | can run any remote file operation, which would conflict with the | ||
| 5067 | already running remote file operation, if the same connection is | ||
| 5068 | affected. @value{tramp} detects this situation, and raises the | ||
| 5069 | @code{remote-file-error} error. A timer function shall avoid this | ||
| 5070 | situation. At least, it shall protect itself against this error, by | ||
| 5071 | wrapping the timer function body with | ||
| 5072 | |||
| 5073 | @lisp | ||
| 5074 | @group | ||
| 5075 | (ignore-error 'remote-file-error | ||
| 5076 | @dots{}) | ||
| 5077 | @end group | ||
| 5078 | @end lisp | ||
| 5079 | |||
| 5080 | |||
| 5043 | @node Traces and Profiles | 5081 | @node Traces and Profiles |
| 5044 | @chapter How to Customize Traces | 5082 | @chapter How to Customize Traces |
| 5045 | @vindex tramp-verbose | 5083 | @vindex tramp-verbose |