aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorYuuki Harano2020-12-21 01:53:07 +0900
committerYuuki Harano2020-12-21 01:53:07 +0900
commit565d8f57d349c19d9bbb5d5d5fdacf3c70b85d42 (patch)
tree5a25406b9f4ff091cb6856e857d2857bb3e631e4 /doc
parenta44cd7c88121bb0e04bdf13d73e15f085cf3b085 (diff)
parent87b82a1969edf80d3bd4781454ec9fc968773a6d (diff)
downloademacs-565d8f57d349c19d9bbb5d5d5fdacf3c70b85d42.tar.gz
emacs-565d8f57d349c19d9bbb5d5d5fdacf3c70b85d42.zip
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/basic.texi5
-rw-r--r--doc/emacs/indent.texi2
-rw-r--r--doc/emacs/misc.texi1
-rw-r--r--doc/emacs/rmail.texi8
-rw-r--r--doc/emacs/search.texi1
-rw-r--r--doc/lispref/commands.texi7
-rw-r--r--doc/lispref/errors.texi11
-rw-r--r--doc/lispref/internals.texi2
-rw-r--r--doc/lispref/keymaps.texi5
-rw-r--r--doc/lispref/minibuf.texi6
-rw-r--r--doc/lispref/os.texi13
-rw-r--r--doc/lispref/variables.texi2
-rw-r--r--doc/misc/efaq.texi60
-rw-r--r--doc/misc/flymake.texi3
-rw-r--r--doc/misc/org.texi1213
-rw-r--r--doc/misc/tramp.texi52
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
312Read a number @var{n} and move point to buffer position @var{n}. 312Read a number @var{n} and move point to buffer position @var{n}.
313Position 1 is the beginning of the buffer. 313Position 1 is the beginning of the buffer. If point is on or just
314after a number in the buffer, that is the default for @var{n}. Just
315type @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.
255indent can be further customized via the @code{tab-first-completion} 255indent can be further customized via the @code{tab-first-completion}
256variable. For instance, if that variable is @code{eol}, only complete 256variable. For instance, if that variable is @code{eol}, only complete
257if point is at the end of a line. @xref{Mode-Specific Indent,,, 257if point is at the end of a line. @xref{Mode-Specific Indent,,,
258elisp, The Emacs Lisp Reference Manual} for further details. 258elisp, 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]
1711ListenStream=/path/to/.emacs.socket 1711ListenStream=/path/to/.emacs.socket
1712DirectoryMode=0700
1712 1713
1713[Install] 1714[Install]
1714WantedBy=sockets.target 1715WantedBy=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.
1591Otherwise, Rmail will ask you for the password to use. 1591Otherwise, Rmail will ask you for the password to use.
1592@end enumerate 1592@end enumerate
1593 1593
1594On some mail servers the usernames include domain information, which
1595can mean they contain the @samp{@@} character. The inbox specifier
1596string uses @samp{@@} to signal the start of the mailserver name.
1597This creates confusion for movemail. If your username contains
1598@samp{@@} and you're using Mailutils @command{movemail} then you can
1599fix this: Replace @code{@@} in the user name with its @acronym{URL}
1600encoding @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},
1596set the variable @code{rmail-movemail-flags} a list of the flags you 1604set 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
1771with @kbd{C-M-c} to proceed to the next occurrence. 1771with @kbd{C-M-c} to proceed to the next occurrence.
1772 1772
1773@item e 1773@item e
1774@itemx E
1774to edit the replacement string in the minibuffer. When you exit the 1775to edit the replacement string in the minibuffer. When you exit the
1775minibuffer by typing @key{RET}, the minibuffer contents replace the 1776minibuffer by typing @key{RET}, the minibuffer contents replace the
1776current occurrence of the pattern. They also become the new 1777current 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
928was specified to run but remapped into another command. 928was specified to run but remapped into another command.
929@end defvar 929@end defvar
930 930
931@defvar current-minibuffer-command
932This has the same value as @code{this-command}, but is bound
933recursively when entering a minibuffer. This variable can be used
934from minibuffer hooks and the like to determine what command opened
935the current minibuffer session.
936@end defvar
937
931@defun this-command-keys 938@defun this-command-keys
932This function returns a string or vector containing the key sequence 939This function returns a string or vector containing the key sequence
933that invoked the present command. Any events read by the command 940that 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}.
129This is a subcategory of @code{file-error}. It happens, when a file 129This is a subcategory of @code{file-error}. It happens, when a file
130could not be watched for changes. @xref{File Notifications}. 130could not be watched for changes. @xref{File Notifications}.
131 131
132@item remote-file-error
133This is a subcategory of @code{file-error}, which results from
134problems in accessing a remote file. @xref{Remote Files,,, emacs, The
135GNU Emacs Manual}. Often, this error appears when timers, process
136filters, process sentinels or special events in general try to access
137a remote file, and collide with another remote file operation. In
138general 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
134This is a subcategory of @code{file-error}, which results from 143This is a subcategory of @code{remote-file-error}, which results from
135problems in accessing a remote file using ftp. @xref{Remote Files,,, 144problems in accessing a remote file using ftp. @xref{Remote Files,,,
136emacs, The GNU Emacs Manual}. 145emacs, 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
625way to compute the size of a variable. For instance, two variables 625way to compute the size of a variable. For instance, two variables
626may share parts of a data structure, and this will be counted twice, 626may share parts of a data structure, and this will be counted twice,
627but this command may still give a useful high-level overview of which 627but this command may still give a useful high-level overview of which
628parts of Emacs is using memory. 628parts 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
2813function keys. 2813function keys.
2814 2814
2815If you have functions that change whether a tool bar item is enabled
2816or not, this status is not necessarily updated visually immediately.
2817To 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
1803completions. This function must accept one argument, a list of 1803completions. This function must accept one argument, a list of
1804completions, and should return such a list of completions where 1804completions, and should return such a list of completions where
1805each element contains a list of three elements: a completion, 1805each element contains a list of three elements: a completion,
1806a prefix string, and a suffix string. 1806a prefix string, and a suffix string. This function takes priority
1807over @code{:annotation-function}.
1807 1808
1808@item :exit-function 1809@item :exit-function
1809The value should be a function to run after performing completion. 1810The value should be a function to run after performing completion.
@@ -1911,7 +1912,8 @@ completions. The function should take one argument,
1911return such a list of @var{completions} where each element contains a list 1912return such a list of @var{completions} where each element contains a list
1912of three elements: a completion, a prefix which is displayed before 1913of three elements: a completion, a prefix which is displayed before
1913the completion string in the @file{*Completions*} buffer, and 1914the completion string in the @file{*Completions*} buffer, and
1914a suffix displayed after the completion string. 1915a suffix displayed after the completion string. This function
1916takes priority over @code{annotation-function}.
1915 1917
1916@item display-sort-function 1918@item display-sort-function
1917The value should be a function for sorting completions. The function 1919The 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
2106after a certain time has elapsed, it can do this by scheduling a new 2106after a certain time has elapsed, it can do this by scheduling a new
2107timer. 2107timer.
2108 2108
2109 If a timer function performs a remote file operation, it can be in
2110conflict with an already running remote file operation of the same
2111connection. Such conflicts are detected, and they result in a
2112@code{remote-file-error} error (@pxref{Standard Errors}). This should
2113be 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,
2110it should save and restore the match data. @xref{Saving Match Data}. 2123it 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
1291disappear without prior notice. 1291disappear without prior notice.
1292 1292
1293The byte-compiler can also warn about lexical variables that are 1293The 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
594invoke them. You can order one from the FSF for $2 (or 10 for $18), 594invoke them. You can order one from the FSF for $2 (or 10 for $18),
595or you can print your own from the @file{etc/refcards/refcard.tex} or 595or 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.
597Beginning with version 21.1, the Emacs distribution comes with 597The Emacs distribution comes with translations of the reference card
598translations of the reference card into several languages; look for 598into several languages; look for files named
599files named @file{etc/refcards/@var{lang}-refcard.*}, where @var{lang} 599@file{etc/refcards/@var{lang}-refcard.*}, where @var{lang} is a
600is a two-letter code of the language. For example, the German version 600two-letter code of the language. For example, the German version of
601of the reference card is in the files @file{etc/refcards/de-refcard.tex} 601the reference card is in the files @file{etc/refcards/de-refcard.tex}
602and @file{etc/refcards/de-refcard.pdf}. 602and @file{etc/refcards/de-refcard.pdf}.
603 603
604@item 604@item
@@ -1672,8 +1672,6 @@ would use with @code{display-line-numbers}.
1672There is also the @samp{linum} package (distributed with Emacs since 1672There is also the @samp{linum} package (distributed with Emacs since
1673version 23.1) which will henceforth become obsolete. Users and 1673version 23.1) which will henceforth become obsolete. Users and
1674developers are encouraged to use @samp{display-line-numbers} instead. 1674developers are encouraged to use @samp{display-line-numbers} instead.
1675The packages @samp{setnu} and @samp{wb-line-number} (not distributed
1676with 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
1700To modify the behavior such that frame titlebars contain the buffer's 1698To 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
3328Next uncompress and extract the source files. This requires 3326Next 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
3538XEmacs was a branch version of Emacs that is no longer actively 3533XEmacs was a branch version of Emacs that is no longer actively
3539developed. XEmacs was first called Lucid Emacs, and was initially 3534developed. XEmacs last released a new version on January 30, 2009,
3540derived from a prerelease version of Emacs 19. In this FAQ, we use 3535and it lacks many important features that exist in Emacs. Since its
3541the name ``Emacs'' only for the official version. 3536development has stopped, we do not expect to see any new releases.
3542
3543XEmacs last released a new version on January 30, 2009, and it lacks
3544many important features that exists in Emacs. In the past, it was not
3545uncommon for Emacs packages to include code for compatibility with
3546XEmacs. Nowadays, although some packages still maintain such
3547compatibility code, several of the more popular built-in and third
3548party packages have either stopped supporting XEmacs or were developed
3549exclusively for Emacs.
3550 3537
3551Some XEmacs code has been contributed to Emacs, and we would like to 3538In the past, it was not uncommon for Emacs packages to include code
3552use other parts, but the earlier XEmacs maintainers did not always 3539for compatibility with XEmacs. Nowadays, most built-in and third party
3553keep track of the authors of contributed code, which makes it 3540packages have either stopped supporting XEmacs or were developed
3554impossible for the FSF to get copyright papers signed for that code. 3541exclusively for Emacs.
3555(The FSF requires these papers for all the code included in the Emacs
3556release, aside from generic C support packages that retain their
3557separate identity and are not integrated into the code of Emacs
3558proper.)
3559 3542
3543XEmacs was initially derived from a prerelease version of Emacs 19.
3560If you want to talk about these two versions and distinguish them, 3544If you want to talk about these two versions and distinguish them,
3561please call them ``Emacs'' and ``XEmacs.'' To contrast ``XEmacs'' 3545please call them ``Emacs'' and ``XEmacs.'' To contrast ``XEmacs''
3562with ``GNU Emacs'' would be misleading, since XEmacs too has its 3546with ``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
3625Beginning with version 23.1, Emacs supports GNUstep natively. 3609Emacs supports GNUstep natively. See the file @file{nextstep/INSTALL}
3626See the file @file{nextstep/INSTALL} in the distribution. 3610in 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
3634Beginning with version 22.1, Emacs supports macOS natively. 3618Emacs supports macOS natively. See the file @file{nextstep/INSTALL}
3635See the file @file{nextstep/INSTALL} in the distribution. 3619in 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:
581Compute @var{buffer}'s region (@var{beg} . @var{end}) corresponding 581Compute @var{buffer}'s region (@var{beg} . @var{end}) corresponding
582to @var{line} and @var{col}. If @var{col} is @code{nil}, return a 582to @var{line} and @var{col}. If @var{col} is @code{nil}, return a
583region just for @var{line}. Return @code{nil} if the region is 583region just for @var{line}. Return @code{nil} if the region is
584invalid. 584invalid. This function saves match data (@pxref{Saving Match Data,,,
585elisp, 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
16This manual is for Org version 9.3. 16This manual is for Org version 9.4.
17 17
18Copyright @copyright{} 2004--2020 Free Software Foundation, Inc. 18Copyright @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
405Export in Foreign Buffers
406
407* Bare HTML:: Exporting HTML without CSS, Javascript, etc.
408
405Publishing 409Publishing
406 410
407* Configuration:: Defining projects. 411* Configuration:: Defining projects.
@@ -427,6 +431,7 @@ Sample Configuration
427 431
428Working with Source Code 432Working 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
549defined from scratch. 555defined from scratch.
550 556
551Org files can include source code blocks, which makes Org uniquely 557Org files can include source code blocks, which makes Org uniquely
552suited for authoring technical documents with code examples. Org 558suited for authoring technical documents with code examples. Org
553source code blocks are fully functional; they can be evaluated in 559source code blocks are fully functional; they can be evaluated in
554place and their results can be captured in the file. This makes it 560place and their results can be captured in the file. This makes it
555possible to create a single file reproducible research compendium. 561possible 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
605Recent Emacs distributions include a packaging system which lets you 611Recent Emacs distributions include a packaging system which lets you
606install Elisp libraries. You can install Org with @kbd{M-x package-install @key{RET} org}. 612install Elisp libraries. You can install Org from the ``package menu'',
613with @kbd{M-x list-packages}. See @ref{Package Menu,Package Menu,,emacs,}.
607 614
608@quotation Important 615@quotation Important
609You need to do this in a session where no @samp{.org} file has been 616You 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
621You can download Org latest release from @uref{https://orgmode.org/, Org's website}. In this case, 628You can download Org latest release from @uref{https://orgmode.org/, Org's website}. In this case,
622make sure you set the load-path correctly in your Emacs init file: 629make 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
628The downloaded archive contains contributed libraries that are not 635The downloaded archive contains contributed libraries that are not
629included in Emacs. If you want to use them, add the @samp{contrib/} 636included in Emacs. If you want to use them, add the @samp{contrib/}
630directory to your load-path: 637directory 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
652Org's version in @samp{org-version.el} and Org's autoloads in 659Org's version in @samp{org-version.el} and Org's autoloads in
653@samp{org-loaddefs.el}. 660@samp{org-loaddefs.el}.
654 661
655Remember to add the correct load-path as described in the method 662Remember to add the correct load path as described in the method
656above. 663above.
657 664
658You can also compile with @samp{make}, generate the documentation with 665You 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
732web page}. If you are not a member of the mailing list, your mail will 739web page}. If you are not a member of the mailing list, your mail will
733be passed to the list after a moderator has approved it@footnote{Please consider subscribing to the mailing list in order to 740be passed to the list after a moderator has approved it@footnote{Please consider subscribing to the mailing list in order to
734minimize the work the mailing list moderators have to do.}. 741minimize the work the mailing list moderators have to do.}. We ask
742you to read and respect the @uref{https://www.gnu.org/philosophy/kind-communication.html, GNU Kind Communications Guidelines} when
743sending 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.
827Then, activate the debugger: 836Then, activate the debugger:
828 837
829@example 838@example
830M-x toggle-debug-or-error <RET> 839M-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
928Headlines define the structure of an outline tree. The headlines in 937Headlines define the structure of an outline tree. Org headlines
929Org 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}, 938start on the left margin@footnote{See the variables @code{org-special-ctrl-a/e}, @code{org-special-ctrl-k},
930and @code{org-ctrl-k-protect-subtree} to configure special behavior of 939and @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
932also that clocking only works with headings indented less than 30 941also that clocking only works with headings indented less than 30
933stars.}. For 942stars.} with one or more stars followed by
934example: 943a 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
1023When @kbd{S-@key{TAB}} is called with a numeric prefix argument N, 1032When @kbd{S-@key{TAB}} is called with a numeric prefix argument
1024the CONTENTS view up to headlines of level N are shown. Note that 1033@var{N}, view contents only up to headlines of level
1025inside tables (see @ref{Tables}), @kbd{S-@key{TAB}} jumps to the previous 1034@var{N}.
1026field instead. 1035
1036Note that inside tables (see @ref{Tables}), @kbd{S-@key{TAB}} jumps to the
1037previous field instead.
1027 1038
1028@vindex org-cycle-global-at-bob 1039@vindex org-cycle-global-at-bob
1029You can run global cycling using @kbd{@key{TAB}} only if point is at 1040You 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
1049Reveal context around point, showing the current entry, the 1060Reveal context around point, showing the current entry, the
1050following heading and the hierarchy above. Useful for working near 1061following heading and the hierarchy above. It is useful for working
1051a location that has been exposed by a sparse tree command (see 1062near 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
1053headings. With a double prefix argument, also show the entire 1064headings. With a double prefix argument, also show the entire
1054subtree of the parent. 1065subtree 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
1060Expose all the headings of the subtree, CONTENTS view for just one 1071Expose all the headings of the subtree, but not their bodies.
1061subtree.
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
1067Expose all direct children of the subtree. With a numeric prefix 1077Expose all direct children of the subtree. With a numeric prefix
1068argument N, expose all children down to level N@. 1078argument @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
1074to the current tree. Editing the indirect buffer also changes the 1085to the current tree. Editing the indirect buffer also changes the
1075original buffer, but without affecting visibility in that buffer. For 1086original buffer, but without affecting visibility in that buffer. For
1076more information about indirect buffers, see @ref{Indirect Buffers,GNU Emacs Manual,,emacs,}.}. With 1087more information about indirect buffers, see @ref{Indirect Buffers,GNU Emacs Manual,,emacs,}.}. With
1077a numeric prefix argument, N, go up to level N and then take that 1088a numeric prefix argument @var{N}, go up to level @var{N}
1078tree. If N is negative then go up that many levels. With 1089and then take that tree. If @var{N} is negative then go up
1079a @kbd{C-u} prefix, do not remove the previously used indirect 1090that many levels. With a @kbd{C-u} prefix, do not remove the
1080buffer. 1091previously 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
1092When Emacs first visits an Org file, the global state is set to 1103When Emacs first visits an Org file, the global state is set to
1093OVERVIEW, 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
1094honor the default visibility state when first opening a file for the 1105honor the default visibility state when first opening a file for the
1095agenda (see @ref{Speeding Up Your Agendas}).}. This 1106agenda (see @ref{Speeding Up Your Agendas}).}. This can
1096can be configured through the variable @code{org-startup-folded}, or on 1107be configured through the variable @code{org-startup-folded}, or on
1097a per-file basis by adding one of the following lines anywhere in the 1108a per-file basis by adding one of the following lines anywhere in the
1098buffer: 1109buffer:
1099 1110
@@ -1270,14 +1281,22 @@ level. Yet another @kbd{@key{TAB}}, and you are back to the initial
1270level. 1281level.
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
1275Promote 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
1280Demote current heading by one level. 1289Promote or demote current heading by one level.
1290
1291@cindex region, active
1292@cindex active region
1293@cindex transient mark mode
1294When there is an active region---i.e., when Transient Mark mode is
1295active---promotion and demotion work on all headlines in the region.
1296To select a region of headlines, it is best to place both point and
1297mark at the beginning of a line, mark at the beginning of the first
1298headline, and point at the line just after the last headline to
1299change.
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
1396headlines in the region. 1415headlines in the region.
1397@end table 1416@end table
1398 1417
1399@cindex region, active 1418Note that when point is inside a table (see @ref{Tables}), the Meta-Cursor
1400@cindex active region 1419keys have different functionality.
1401@cindex transient mark mode
1402When there is an active region---i.e., when Transient Mark mode is
1403active---promotion and demotion work on all headlines in the region.
1404To select a region of headlines, it is best to place both point and
1405mark at the beginning of a line, mark at the beginning of the first
1406headline, and point at the line just after the last headline to
1407change. Note that when point is inside a table (see @ref{Tables}), the
1408Meta-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}.
1481The other sparse tree commands select headings based on TODO keywords, 1492The other sparse tree commands select headings based on TODO keywords,
1482tags, or properties and are discussed later in this manual. 1493tags, 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
1487To print a sparse tree, you can use the Emacs command 1498To 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
1489the document. Or you can use the command @kbd{C-c C-e v} to 1500the document. Or you can use the command @kbd{C-c C-e C-v} to
1490export only the visible part of the document and print the resulting 1501export only the visible part of the document and print the resulting
1491file. 1502file.
1492 1503
@@ -1560,7 +1571,7 @@ My favorite scenes are (in this order)
1560But in the end, no individual scenes matter but the film as a whole. 1571But in the end, no individual scenes matter but the film as a whole.
1561Important actors in this film are: 1572Important 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
1677on @code{org-plain-list-ordered-item-terminator}, the type of list, and 1688on @code{org-plain-list-ordered-item-terminator}, the type of list, and
1678its indentation. With a numeric prefix argument N, select the Nth 1689its indentation. With a numeric prefix argument N, select the Nth
1679bullet from this list. If there is an active region when calling 1690bullet from this list. If there is an active region when calling
1680this, selected text is changed into an item. With a prefix 1691this, all lines are converted to list items. With a prefix
1681argument, all lines are converted to list items. If the first line 1692argument, the selected text is changed into a single item. If the
1682already was a list item, any item marker is removed from the list. 1693first line already was a list item, any item marker is removed from
1683Finally, even without an active region, a normal line is converted 1694the list. Finally, even without an active region, a normal line is
1684into a list item. 1695converted 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,
1813inside a word @samp{abc\vert@{@}def}.}. Moreover, a line starting 1824inside a word @samp{abc\vert@{@}def}.}. Moreover, a line starting
1814with @samp{|-} is a horizontal rule. It separates rows explicitly. Rows 1825with @samp{|-} is a horizontal rule. It separates rows explicitly. Rows
1815before the first horizontal rule are header lines. A table might look 1826before the first horizontal rule are header lines. A table might look
1816like this: 1827like 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
1940Insert a new column to the left of point position. 1951Insert a new column at point position. Move the recent column and
1952all 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
2121name and the format for table export in a subtree. Org supports 2133name and the format for table export in a subtree. Org supports
2122quite general formats for exported tables. The exporter format is 2134quite general formats for exported tables. The exporter format is
2123the same as the format used by Orgtbl radio tables, see @ref{Translator functions}, for a detailed description. 2135the 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
2140Turn on the display of the first data row of the table at point in
2141the window header line when this first row is not visible anymore in
2142the buffer. You can activate this minor mode by default by setting
2143the 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
2147Transpose 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
2163content, as shown in the following example. 2187content, 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
2174To set the width of a column, one field anywhere in the column may 2198To 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
2398You may reference a rectangular range of fields by specifying two 2422You may reference a rectangular range of fields by specifying two
2399field references connected by two dots @samp{..}. If both fields are in 2423field references connected by two dots @samp{..}. The ends are included in
2400the current row, you may simply use @samp{$2..$7}, but if at least one 2424the range. If both fields are in the current row, you may simply use
2401field 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
2402format at least for the first field, i.e., the reference must start 2426use the general @samp{@@ROW$COLUMN} format at least for the first field,
2403with @samp{@@} in order to be interpreted correctly. Examples: 2427i.e., the reference must start with @samp{@@} in order to be interpreted
2428correctly. 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.
2446Copy text or values of each row of column 1 of the table named 2471Copy 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$$#)}
2450Insert the doubled value of each column of row 1 of the table 2475Insert the doubled value of each column of row 1 of the table
2451named @var{FOO} into row 3 of the current table. 2476named @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
3432Some @samp{\} and @samp{]} characters in the @var{LINK} part need to be 3457Some @samp{\}, @samp{[} and @samp{]} characters in the @var{LINK} part need to
3433``escaped'', i.e., preceded by another @samp{\} character. More 3458be ``escaped'', i.e., preceded by another @samp{\} character. More
3434specifically, the following character categories, and only them, must 3459specifically, the following characters, and only them, must be
3435be escaped, in order: 3460escaped:
3436 3461
3437@enumerate 3462@enumerate
3438@item 3463@item
3439all consecutive @samp{\} characters at the end of the link, 3464all @samp{[} and @samp{]} characters,
3440@item
3441any @samp{]} character at the very end of the link,
3442@item 3465@item
3443all consecutive @samp{\} characters preceding @samp{][} or @samp{]]} patterns, 3466every @samp{\} character preceding either @samp{]} or @samp{[},
3444@item 3467@item
3445any @samp{]} character followed by either @samp{[} or @samp{]}. 3468every @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
3449Org takes for granted that such links are correctly escaped. 3472Functions inserting links (see @ref{Handling Links}) properly escape
3450Functions inserting links (see @ref{Handling Links}) take care of this. 3473ambiguous characters. You only need to bother about the rules above
3451You only need to bother about those rules when inserting directly, or 3474when inserting directly, or yanking, a URI within square brackets.
3452yanking, a URI within square brackets. When in doubt, you may use the 3475When in doubt, you may use the function @code{org-link-escape}, which turns
3453function @code{org-link-escape}, which turns a link string into its 3476a link string into its escaped form.
3454properly escaped form.
3455 3477
3456Once a link in the buffer is complete, with all brackets present, Org 3478Once a link in the buffer is complete, with all brackets present, Org
3457changes the display so that @samp{DESCRIPTION} is displayed instead of 3479changes 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 3505A link that does not look like a URL---i.e., does not start with
3485If the link does not look like a URL, it is considered to be internal 3506a known scheme or a file name---refers to the current document. You
3486in the current file. The most important case is a link like 3507can 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 3508with a mouse click (see @ref{Handling Links}).
3488@samp{my-custom-id}. You are responsible yourself to make sure these
3489custom IDs are unique in a file.
3490 3509
3491Links such as @samp{[[My Target]]} or @samp{[[My Target][Find my target]]} lead to a text search in 3510@cindex @samp{CUSTOM_ID}, property
3492the current file. 3511Org provides several refinements to internal navigation within
3512a document. Most notably, a construct like @samp{[[#my-custom-id]]}
3513specifically targets the entry with the @samp{CUSTOM_ID} property set to
3514@samp{my-custom-id}. Also, an internal link looking like @samp{[[*Some
3515section]]} points to a headline with the name @samp{Some section}@footnote{To insert a link targeting a headline, in-buffer completion
3516can be used. Just type a star followed by a few optional letters into
3517the buffer and press @kbd{M-@key{TAB}}. All headlines in the current
3518buffer are offered as completions.}.
3493 3519
3494The link can be followed with @kbd{C-c C-o} when point is on 3520@cindex targets, for links
3495the link, or with a mouse click (see @ref{Handling Links}). Links to 3521When the link does not belong to any of the cases above, Org looks for
3496custom IDs point to the corresponding headline. The preferred match 3522a @emph{dedicated target}: the same string in double angular brackets, like
3497for a text link is a @emph{dedicated target}: the same string in double 3523@samp{<<My Target>>}.
3498angular brackets, like @samp{<<My Target>>}.
3499 3524
3500@cindex @samp{NAME}, keyword 3525@cindex @samp{NAME}, keyword
3501If no dedicated target exists, the link tries to match the exact name 3526If no dedicated target exists, the link tries to match the exact name
3502of an element within the buffer. Naming is done with the @samp{NAME} 3527of an element within the buffer. Naming is done, unsurprisingly, with
3503keyword, which has to be put in the line before the element it refers 3528the @samp{NAME} keyword, which has to be put in the line before the element
3504to, as in the following example 3529it 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
3513If none of the above succeeds, Org searches for a headline that is 3538@vindex org-link-search-must-match-exact-headline
3514exactly the link text but may also include a TODO keyword and 3539Ultimately, if none of the above succeeds, Org searches for a headline
3515tags@footnote{To insert a link targeting a headline, in-buffer completion 3540that is exactly the link text but may also include a TODO keyword and
3516can be used. Just type a star followed by a few optional letters into 3541tags, or initiates a plain text search, according to the value of
3517the buffer and press @kbd{M-@key{TAB}}. All headlines in the current 3542@code{org-link-search-must-match-exact-headline}.
3518buffer are offered as completions.}. 3543
3544Note that you must make sure custom IDs, dedicated targets, and names
3545are unique throughout the document. Org provides a linter to assist
3546you in the process, if needed. See @ref{Org Syntax}.
3519 3547
3520During export, internal links are used to mark objects and assign them 3548During export, internal links are used to mark objects and assign them
3521a number. Marked objects are then referenced by links pointing to 3549a 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
3677variable @code{org-link-search-must-match-exact-headline}. If its value is 3705variable @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
3679exact headline is matched, ignoring spaces and statistic cookies. If 3707exact headline is matched, ignoring spaces and statistic cookies. If
@@ -3834,7 +3862,7 @@ user/channel/server under the point.
3834For any other file, the link points to the file, with a search 3862For any other file, the link points to the file, with a search
3835string (see @ref{Search Options}) pointing to the contents 3863string (see @ref{Search Options}) pointing to the contents
3836of the current line. If there is an active region, the selected 3864of the current line. If there is an active region, the selected
3837words form the basis of the search string. You can write custom Lisp 3865words form the basis of the search string. You can write custom Lisp
3838functions to select the search string and perform the search for 3866functions to select the search string and perform the search for
3839particular file types (see @ref{Custom Searches}). 3867particular 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
4033If the replacement text contains the string @samp{%s}, it is replaced with 4060If the replacement text contains the string @samp{%s}, it is replaced with
@@ -4852,8 +4879,8 @@ example.
4852 4879
4853If you use Org mode extensively, you may end up with enough TODO items 4880If you use Org mode extensively, you may end up with enough TODO items
4854that it starts to make sense to prioritize them. Prioritizing can be 4881that it starts to make sense to prioritize them. Prioritizing can be
4855done by placing a @emph{priority cookie} into the headline of a TODO item, 4882done by placing a @emph{priority cookie} into the headline of a TODO item
4856like this 4883right 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
4864By default, Org mode supports three priorities: @samp{A}, @samp{B}, and @samp{C}. 4891By 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
4866equivalent if it had priority @samp{B}. Priorities make a difference only 4893equivalent if it had priority @samp{B}. Priorities make a difference only
4867for sorting in the agenda (see @ref{Weekly/daily agenda}); outside the 4894for sorting in the agenda (see @ref{Weekly/daily agenda}). Outside the
4868agenda, they have no inherent meaning to Org mode. The cookies are 4895agenda, they have no inherent meaning to Org mode. The cookies are
4869displayed with the face defined by the variable @code{org-priority-faces}, 4896displayed with the face defined by the variable @code{org-priority-faces},
4870which can be customized. 4897which can be customized.
4871 4898
4899You 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
4906When using numeric priorities, you need to set @code{org-priority-highest},
4907@code{org-priority-lowest} and @code{org-priority-default} to integers, which
4908must all be strictly inferior to 65.
4909
4872Priorities can be attached to any outline node; they do not need to be 4910Priorities can be attached to any outline node; they do not need to be
4873TODO items. 4911TODO items.
4874 4912
@@ -4894,12 +4932,12 @@ that these keys are also used to modify timestamps (see @ref{Creating Timestamps
4894a discussion of the interaction with shift-selection. 4932a 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
4900You can change the range of allowed priorities by setting the 4938You can change the range of allowed priorities by setting the
4901variables @code{org-highest-priority}, @code{org-lowest-priority}, and 4939variables @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
4903values (highest, lowest, default) like this (please make sure that the 4941values (highest, lowest, default) like this (please make sure that the
4904highest priority is earlier in the alphabet than the lowest priority): 4942highest 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
4950Or, 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.
5061If there is no active region, just toggle the checkbox at point. 5106If 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
5113Toggle checkbox status by using the checkbox of the item at point as
5114a radio button: when the checkbox is turned on, all other checkboxes
5115on the same level will be turned off. With a universal prefix
5116argument, toggle the presence of the checkbox. With a double prefix
5117argument, 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
5121setting @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
5550A property is a key-value pair associated with an entry. Properties 5610A property is a key-value pair associated with an entry. Properties
5551can be set so they are associated with a single entry, with every 5611can be set so they are associated with a single entry, with every
5552entry in a tree, or with every entry in an Org file. 5612entry in a tree, or with the whole buffer.
5553 5613
5554There are two main applications for properties in Org mode. First, 5614There are two main applications for properties in Org mode. First,
5555properties are like tags, but with a value. Imagine maintaining 5615properties 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
5622If you want to set properties that can be inherited by any entry in 5682Properties can be inserted on buffer level. That means they apply
5623a file, use a line like: 5683before the first headline and can be inherited by all entries in a
5684file. Property blocks defined before first headline needs to be
5685located at the top of the buffer, allowing only comments above.
5686
5687Properties 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
5686Insert a property drawer into the current entry. The drawer is 5750Insert a property drawer into the current entry. The drawer is
5687inserted early in the entry, but after the lines with planning 5751inserted early in the entry, but after the lines with planning
5688information like deadlines. 5752information like deadlines. If before first headline the drawer is
5753inserted 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
5804a @kbd{C-u} prefix argument, ignore headlines that are not 5869a @kbd{C-u} prefix argument, ignore headlines that are not
5805a TODO line. 5870a 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
5810Create a global list of tag/property matches from all agenda files. 5875Create 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
5925To 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
5933To specify a format that only applies to a specific tree, add 5990To specify a format that only applies to a specific tree, add
5934a @samp{COLUMNS} property to the top node of that tree, for example: 5991a @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
6000A @samp{COLUMNS} property within a property drawer before first headline
6001will apply to the entire file. As an addition to property drawers,
6002keywords 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
5943If a @samp{COLUMNS} property is present in an entry, it defines columns for 6010If a @samp{COLUMNS} property is present in an entry, it defines columns for
5944the entry itself, and for the entire subtree below it. Since the 6011the entry itself, and for the entire subtree below it. Since the
5945column definition is part of the hierarchical structure of the 6012column 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
6098current entry and its subtree. 6165current 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
6104Recreate the column view, to include recent changes made in the 6171Recreate the column view, to include recent changes made in the
6105buffer. 6172buffer.
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
6110Exit column view. 6178Exit column view.
6111@end table 6179@end table
@@ -6141,10 +6209,11 @@ invokes the same interface that you normally use to change that
6141property. For example, the tag completion or fast selection 6209property. For example, the tag completion or fast selection
6142interface pops up when editing a @samp{TAGS} property. 6210interface 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
6147When there is a checkbox at point, toggle it. 6215When there is a checkbox at point, toggle it. Else exit column
6216view.
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
6227the kill-ring. 6296the kill-ring.
6228@end table 6297@end table
6229 6298
6299@item @samp{:match}
6300When set to a string, use this as a tags/property match filter to
6301select only a subset of the headlines in the scope set by the @code{:id}
6302parameter.
6303@end table
6304
6305
6306@table @asis
6230@item @samp{:hlines} 6307@item @samp{:hlines}
6231When @code{t}, insert an hline after every line. When a number N, insert 6308When @code{t}, insert an hline after every line. When a number N, insert
6232an hline before each headline with level @code{<= N}. 6309an hline before each headline with level @code{<= N}.
@@ -6256,12 +6333,16 @@ block.
6256The following commands insert or update the dynamic block: 6333The 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
6262Insert a dynamic block capturing a column view. Prompt for the 6339Insert a dynamic block capturing a column view. Prompt for the
6263scope or ID of the view. 6340scope or ID of the view.
6264 6341
6342This command can be invoked by calling
6343@code{org-dynamic-block-insert-dblock} (@kbd{C-c C-x x}) and
6344selecting ``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
6747today's date, but if you are inserting an hour specification for your
6748timestamp, @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},
6898the @samp{+1m} is a repeater; the intended interpretation is that the task 6986the @samp{+1m} is a repeater; the intended interpretation is that the task
6899has a deadline on @samp{<2005-10-01>} and repeats itself every (one) month 6987has a deadline on @samp{<2005-10-01>} and repeats itself every (one) month
6900starting from that time. You can use yearly, monthly, weekly, daily 6988starting from that time. You can use yearly, monthly, weekly, daily
6901and hourly repeat cookies by using the @samp{y}, @samp{w}, @samp{m}, @samp{d} and @samp{h} 6989and hourly repeat cookies by using the @samp{y}, @samp{m}, @samp{w}, @samp{d} and @samp{h}
6902letters. If you need both a repeater and a special warning period in 6990letters. If you need both a repeater and a special warning period in
6903a deadline entry, the repeater should come first and the warning 6991a deadline entry, the repeater should come first and the warning
6904period last 6992period last
@@ -6948,8 +7036,8 @@ if you have not paid the rent for three months, marking this entry
6948DONE still keeps it as an overdue deadline. Depending on the task, 7036DONE still keeps it as an overdue deadline. Depending on the task,
6949this may not be the best way to handle it. For example, if you forgot 7037this may not be the best way to handle it. For example, if you forgot
6950to call your father for 3 weeks, it does not make sense to call him 7038to call your father for 3 weeks, it does not make sense to call him
69513 times in a single day to make up for it. Finally, there are tasks 70393 times in a single day to make up for it. Finally, there are tasks,
6952like changing batteries which should always repeat a certain time 7040like 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
6954special repeaters @samp{++} and @samp{.+}. For example: 7042special 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
7004subtree@footnote{Clocking only works if all headings are indented with less 7096subtree@footnote{Clocking only works if all headings are indented with less
7005than 30 stars. This is a hard-coded limitation of @code{lmax} in 7097than 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
7007recently clocked, to that you can jump quickly between a number of 7099recently clocked, so that you can jump quickly between a number of
7008tasks absorbing your time. 7100tasks absorbing your time.
7009 7101
7010To save the clock history across Emacs sessions, use: 7102To save the clock history across Emacs sessions, use:
@@ -7173,12 +7265,18 @@ Org mode can produce quite complex reports based on the time clocking
7173information. Such a report is called a @emph{clock table}, because it is 7265information. Such a report is called a @emph{clock table}, because it is
7174formatted as one or several Org tables. 7266formatted as one or several Org tables.
7175 7267
7176You can insert, or update, a clock table through Org dynamic blocks 7268@table @asis
7177insert 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
7272Insert or update a clock table. When called with a prefix argument,
7178jump to the first clock table in the current document and update it. 7273jump to the first clock table in the current document and update it.
7179The clock table includes archived trees. 7274The clock table includes archived trees.
7180 7275
7181@table @asis 7276This command can be invoked by calling
7277@code{org-dynamic-block-insert-dblock} (@kbd{C-c C-x x}) and
7278selecting ``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
7204Here is an example of the frame for a clock table as it is inserted 7302Here is an example of the frame for a clock table as it is inserted
7205into the buffer with the @kbd{C-c C-x C-r} command: 7303into 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
7214The @samp{#+BEGIN} line and specify a number of options to define the 7312The @samp{#+BEGIN} line contains options to define the scope, structure,
7215scope, structure, and formatting of the report. Defaults for all 7313and formatting of the report. Defaults for all these options can be
7216these options can be configured in the variable 7314configured in the variable @code{org-clocktable-defaults}.
7217@code{org-clocktable-defaults}.
7218 7315
7219First there are options that determine which clock entries are to 7316First there are options that determine which clock entries are to
7220be selected: 7317be selected:
@@ -7302,9 +7399,9 @@ The starting day of the week. The default is 1 for Monday.
7302The starting day of the month. The default is 1 for the first. 7399The starting day of the month. The default is 1 for the first.
7303 7400
7304@item @samp{:step} 7401@item @samp{:step}
7305Set to @samp{day}, @samp{week}, @samp{month} or @samp{year} to split the table into 7402Set to @samp{day}, @samp{week}, @samp{semimonth}, @samp{month}, or @samp{year} to split the
7306chunks. To use this, either @samp{:block}, or @samp{:tstart} and @samp{:tend} are 7403table into chunks. To use this, either @samp{:block}, or @samp{:tstart} and
7307required. 7404@samp{:tend} are required.
7308 7405
7309@item @samp{:stepskip0} 7406@item @samp{:stepskip0}
7310When non-@code{nil}, do not show steps that have zero time. 7407When 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
7539arguments with @code{org-clock-in} and two @kbd{C-u C-u} with 7636arguments 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
7645When you often forget to clock out before being idle and you don't
7646want to manually set the clocking time to take into account, you can
7647set @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
7650When the clock is running and Emacs is idle for more than this number
7651of seconds, the clock will be clocked out automatically.
7652
7653Use @samp{M-x org-clock-toggle-auto-clockout RET} to temporarily turn this
7654on 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
7551may want to assign effort estimates to entries. If you are also 7665may want to assign effort estimates to entries. If you are also
7552clocking your work, you may later want to compare the planned effort 7666clocking your work, you may later want to compare the planned effort
7553with the actual working time, a great way to improve planning 7667with the actual working time, a great way to improve planning
7554estimates. Effort estimates are stored in a special property 7668estimates.
7555@samp{EFFORT}. You can set the effort for an entry with the following 7669
7556commands: 7670Effort estimates are stored in a special property @samp{EFFORT}. Multiple
7671formats are supported, such as @samp{3:12}, @samp{1:23:45}, or @samp{1d3h5min}; see
7672the file @samp{org-duration.el} for more detailed information about the
7673format.
7674
7675You 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
7767by setting @code{org-refile-use-cache}. To make the command see new 7886by setting @code{org-refile-use-cache}. To make the command see new
7768possible targets, you have to clear the cache with this command. 7887possible 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
7773Copying works like refiling, except that the original note is not 7892Copying works like refiling, except that the original note is not
7774deleted. 7893deleted.
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
7861added. 7980added.
7862 7981
7982@vindex org-archive-subtree-save-file-p
7983When @code{org-archive-subtree-save-file-p} is non-@code{nil}, save the target
7984archive 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
7924child. If point is @emph{not} on a headline when this command is 8047child. If point is @emph{not} on a headline when this command is
7925invoked, check the level 1 trees. 8048invoked, 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
7929Cycle a tree even if it is tagged with @samp{ARCHIVE}. 8052Cycle 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
8106key binding like this: 8229key 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.
8225The template for creating the capture item. If you leave this 8348The template for creating the capture item. If you leave this
8226empty, an appropriate default template will be used. Otherwise this 8349empty, an appropriate default template will be used. Otherwise this
8227is a string with escape codes, which will be replaced depending on 8350is a string with escape codes, which will be replaced depending on
8228time and context of the capture call. The string with escapes may 8351time and context of the capture call. You may also get this
8229be loaded from a template file, using the special syntax @samp{(file 8352template 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. 8353to @code{org-directory}.}, or dynamically, from a function
8354using 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
8233The rest of the entry is a property list of additional options. 8362The 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
8244immediately. This makes sense if the template only needs 8373immediately. This makes sense if the template only needs
8245information that can be added automatically. 8374information that can be added automatically.
8246 8375
8376@item @code{:jump-to-captured}
8377When set, jump to the captured entry when finished.
8378
8247@item @code{:empty-lines} 8379@item @code{:empty-lines}
8248Set this to the number of lines to insert before and after the new 8380Set this to the number of lines to insert before and after the new
8249item. Default 0, and the only other common value is 1. 8381item. Default 0, and the only other common value is 1.
8250 8382
8383@item @code{:empty-lines-after}
8384Set this to the number of lines that should be inserted after the
8385new item. Overrides @code{:empty-lines} for the number of lines
8386inserted after.
8387
8388@item @code{:empty-lines-before}
8389Set this to the number of lines that should be inserted before the
8390new item. Overrides @code{:empty-lines} for the number lines inserted
8391before.
8392
8251@item @code{:clock-in} 8393@item @code{:clock-in}
8252Start the clock in this item. 8394Start the clock in this item.
8253 8395
@@ -8269,9 +8411,10 @@ you can force the same behavior by calling @code{org-capture} with
8269a @kbd{C-1} prefix argument. 8411a @kbd{C-1} prefix argument.
8270 8412
8271@item @code{:tree-type} 8413@item @code{:tree-type}
8272When @code{week}, make a week tree instead of the month tree, i.e., 8414Use @code{week} to make a week tree instead of the month-day tree,
8273place the headings for each day under a heading with the current 8415i.e., place the headings for each day under a heading with the
8274ISO week. 8416current ISO week. Use @code{month} to group entries by month
8417only. Default is to group entries by day.
8275 8418
8276@item @code{:unnarrowed} 8419@item @code{:unnarrowed}
8277Do not narrow the target buffer, simply show the full buffer. 8420Do not narrow the target buffer, simply show the full buffer.
@@ -8469,8 +8612,8 @@ See the docstring of the variable for more information.
8469It is often useful to associate reference material with an outline 8612It is often useful to associate reference material with an outline
8470node. Small chunks of plain text can simply be stored in the subtree 8613node. Small chunks of plain text can simply be stored in the subtree
8471of a project. Hyperlinks (see @ref{Hyperlinks}) can establish associations 8614of a project. Hyperlinks (see @ref{Hyperlinks}) can establish associations
8472with files that live elsewhere on your computer or in the cloud, like 8615with files that live elsewhere on a local, or even remote, computer,
8473emails or source code files belonging to a project. 8616like emails or source code files belonging to a project.
8474 8617
8475Another method is @emph{attachments}, which are files located in a 8618Another method is @emph{attachments}, which are files located in a
8476directory belonging to an outline node. Org uses directories either 8619directory 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
8490By default, org-attach will use ID properties when adding attachments 8633By default, Org attach uses ID properties when adding attachments to
8491to outline nodes. This makes working with attachments fully 8634outline nodes. This makes working with attachments fully automated.
8492automated. There is no decision needed for folder-name or location. 8635There is no decision needed for folder-name or location. ID-based
8493ID-based directories are by default located in the @samp{data/} directory, 8636directories are by default located in the @samp{data/} directory, which
8494which lives in the same directory where your Org file lives@footnote{If you move entries or Org files from one directory to 8637lives in the same directory where your Org file lives@footnote{If you move entries or Org files from one directory to
8495another, you may want to configure @code{org-attach-id-dir} to contain 8638another, you may want to configure @code{org-attach-id-dir} to contain
8496an absolute path.}. 8639an absolute path.}.
8497For more control over the setup, see @ref{Attachment options}.
8498 8640
8499When attachments are made using @code{org-attach} a default tag @samp{ATTACH} is 8641When attachments are made using @code{org-attach} a default tag @samp{ATTACH} is
8500added to the node that gets the attachments. 8642added to the node that gets the attachments.
8501 8643
8644For more control over the setup, see @ref{Attachment options}.
8645
8502The following commands deal with attachments: 8646The 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
8617By default folders attached to an outline node are inherited from 8761By default folders attached to an outline node are inherited from
8618parents according to @code{org-use-property-inheritance}. If one instead 8762parents according to @code{org-use-property-inheritance}. If one instead
8619want to set inheritance specifically for org-attach that can be done 8763want to set inheritance specifically for Org attach that can be done
8620using @code{org-attach-use-inheritance}. Inheriting documents through 8764using @code{org-attach-use-inheritance}. Inheriting documents through
8621the node hierarchy makes a lot of sense in most cases. Especially 8765the node hierarchy makes a lot of sense in most cases. Especially
8622since the introduction of @ref{Attachment links}. The following example 8766when using attachment links (see @ref{Attachment links}). The following
8623shows one use case for attachment inheritance: 8767example 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:
8631Some text 8775Some 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
8637Without inheritance one would not be able to resolve the link to 8781Without inheritance one would not be able to resolve the link to
8638image @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
8641Inheritance works the same way for both @samp{ID} and @samp{DIR} property. If 8785Inheritance 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
8677tried when resolving existing ID's into paths, to maintain backward 8821tried when resolving existing ID's into paths, to maintain backward
8678compatibility with existing folders in your system. 8822compatibility with existing folders in your system.
8679 8823
8824@item @code{org-attach-store-link-p}
8825@vindex org-attach-store-link-p
8826Stores a link to the file that is being attached. The link is
8827stored 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
8829location as a file link, the attachment location as an attachment
8830link or to the attachment location as a file link.
8831
8832@item @code{org-attach-commands}
8833@vindex org-attach-commands
8834List 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
8682Do not show the splash buffer with the attach dispatcher when 8838Do 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
8725It is possible to attach files to a subtree from a Dired buffer. To 8882It is possible to attach files to a subtree from a Dired buffer. To
8726use this feature, have one window in Dired mode containing the file(s) 8883use this feature, have one window in Dired mode containing the file(s)
8727to be attached and another window with point in the subtree that shall 8884to 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{!}
9009Create a list of stuck projects (see @ref{Stuck projects}). 9165Create a list of stuck projects (see @ref{Stuck projects}).
9010 9166
9167@item @kbd{!}
9168Configure 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)}
9013Restrict an agenda command to the current buffer@footnote{For backward compatibility, you can also press @kbd{1} to 9172Restrict 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
9755refreshes and more secondary filtering. The filter is a global 9914refreshes and more secondary filtering. The filter is a global
9756property of the entire agenda view---in a block agenda, you should 9915property of the entire agenda view---in a block agenda, you should
9757only set this in the global options section, not in the section of an 9916only set this in the global options section, not in the section of an
9758individual block.}. You can switch quickly between 9917individual block.}. You can switch quickly between
9759different filters without having to recreate the agenda. @emph{Limits} on 9918different filters without having to recreate the agenda. @emph{Limits} on
9760the other hand take effect before the agenda buffer is populated, so 9919the other hand take effect before the agenda buffer is populated, so
9761they are mostly useful when defined as local variables within custom 9920they 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
9805Filter the agenda view by a regular expression: only show agenda 9964Filter the agenda view by a regular expression: only show agenda
9806entries matching the regular expression the user entered. To clear 9965entries matching the regular expression the user entered. To clear
9807the filter, call the command again by pressing @kbd{=}. 9966the 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
9848selects entries with category `work' and effort estimates below 10 10007
9849minutes, and deselects entries with tag `John' or matching the 10008selects entries with category @samp{work} and effort estimates below 10
9850regexp `plot'. `+' can be left out if that does not lead to 10009minutes, and deselects entries with tag @samp{John} or matching the
10010regexp @samp{plot}. You can leave @samp{+} out if that does not lead to
9851ambiguities. The sequence of elements is arbitrary. The filter 10011ambiguities. The sequence of elements is arbitrary. The filter
9852syntax assumes that there is no overlap between categories and tags 10012syntax assumes that there is no overlap between categories and tags.
9853(tags will take priority). If you reply to the prompt with the 10013Otherwise, tags take priority. If you reply to the prompt with the
9854empty string, all filtering is removed. If a filter is specified, 10014empty string, all filtering is removed. If a filter is specified,
9855it replaces all current filters. But if you call the command with a 10015it replaces all current filters. But if you call the command with
9856double prefix argument, or if you add an additional `+' 10016a 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
9858are added to the active ones. A single prefix argument applies the 10018added to the active ones. A single prefix argument applies the
9859entire filter in a negative sense. 10019entire 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
9869If the variable @code{org-agenda-auto-exclude-function} is set to a 10029If the variable @code{org-agenda-auto-exclude-function} is set to
9870user-defined function, that function can select tags that should be 10030a user-defined function, that function can select tags that should be
9871used as a tag filter when requested. The function will be called with 10031used as a tag filter when requested. The function will be called with
9872lower-case versions of all tags represented in the current view. The 10032lower-case versions of all tags represented in the current view. The
9873function should the return @samp{"-tag"} if the filter should remove 10033function should return @samp{"-tag"} if the filter should remove
9874entries with that tag, @samp{"+tag"} if only entries with this tag should 10034entries with that tag, @samp{"+tag"} if only entries with this tag should
9875be kept, or @samp{nil} if that tag is irrelevant. For example, let's say 10035be kept, or @samp{nil} if that tag is irrelevant. For example, let's say
9876you use a @samp{Net} tag to identify tasks which need network access, an 10036you 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
9878calls. You could auto-exclude these tags based on the availability of 10038calls. You could auto-exclude these tags based on the availability of
9879the Internet, and outside of business hours, with something like this: 10039the 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
9895You can apply this self-adapting filter by using a double prefix 10054You can apply this self-adapting filter by using a triple prefix
9896argument to @code{org-agenda-filter}, i.e. press @kbd{C-u C-u /}, or 10055argument to @code{org-agenda-filter}, i.e.@tie{}press @kbd{C-u C-u C-u /},
9897by pressing @kbd{@key{RET}} in @code{org-agenda-filter-by-tag}. 10056or 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
10295Change the TODO state of the item, both in the agenda and in the 10454Change the TODO state of the item, both in the agenda and in the
10296original Org file. A prefix arg is passed through to the @code{org-todo} 10455original Org file. A prefix arg is passed through to the @code{org-todo}
10297command, so for example a @kbd{C-u} prefix are will trigger 10456command, so for example a @kbd{C-u} prefix are will trigger
10298taking a note to document the state change. 10457taking 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
10370priority character. If you reply with @kbd{@key{SPC}}, the priority 10529priority character. If you reply with @kbd{@key{SPC}}, the priority
10371cookie is removed from the entry. 10530cookie 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
10376Display 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
10390Decrease the priority of the current item. 10544Decrease 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
10550Set 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
10806the results of @emph{several} commands, each of which creates a block in 10966the results of @emph{several} commands, each of which creates a block in
10807the agenda buffer. The available commands include @code{agenda} for the 10967the agenda buffer. The available commands include @code{agenda} for the
10808daily or weekly agenda (as created with @kbd{a}) , @code{alltodo} for 10968daily or weekly agenda (as created with @kbd{a}) , @code{alltodo} for
10809the global TODO list (as constructed with @kbd{t}), and the 10969the global TODO list (as constructed with @kbd{t}), @code{stuck} for
10970the list of stuck projects (as obtained with @kbd{#}) and the
10810matching commands discussed above: @code{todo}, @code{tags}, and @code{tags-todo}. 10971matching commands discussed above: @code{todo}, @code{tags}, and @code{tags-todo}.
10972
10811Here are two examples: 10973Here 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
11248change this convention. For example, when setting this variable to 11410change 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
11413You can set @code{org-use-sub-superscripts} in a file using the export
11414option @samp{^:} (see @ref{Export Settings}). For example, @samp{#+OPTIONS: ^:@{@}}
11415sets @code{org-use-sub-superscripts} to @code{@{@}} and limits super- and
11416subscripts to the curly bracket notation.
11417
11418You 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
11255This command formats sub- and superscripts in a WYSIWYM way. 11424This 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
11429Set both @code{org-pretty-entities} and
11430@code{org-pretty-entities-include-sub-superscripts} to @code{t} to start with
11431super- and subscripts @emph{visually} interpreted as specified by the
11432option @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
11893Users can install libraries for additional formats from the Emacs 12069Users can install libraries for additional formats from the Emacs
11894packaging system. For easy discovery, these packages have a common 12070packaging system. For easy discovery, these packages have a common
11895naming scheme: @code{ox-NAME}, where @var{NAME} is a format. For 12071naming scheme: @code{ox-NAME}, where @var{NAME} is a format. For
11896example, @code{ox-koma-letter} for @emph{koma-letter} back-end. More libraries 12072example, @code{ox-koma-letter} for @emph{koma-letter} back-end. More libraries
11897can be found in the @samp{contrib/} directory (see @ref{Installation}). 12073can be found in the @samp{contrib/} directory (see @ref{Installation}).
@@ -12067,9 +12243,7 @@ The email address (@code{user-mail-address}).
12067Language to use for translating certain strings 12243Language 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
12069example, Org translates @samp{Table of contents} to the French @samp{Table des 12245example, 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@.}.
12071Beamer---, the @samp{org-latex-package-alist} variable needs further
12072configuration. 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
13405The HTML export back-end preserves column groupings in Org tables (see 13579The 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
13697Sebastian Rose has written a JavaScript program especially designed to 13871Sebastian Rose has written a JavaScript program especially designed to
13698enhance the web viewing experience of HTML files created with Org. 13872allow two different ways of viewing HTML files created with Org. One
13699This program enhances large files in two different ways of viewing. 13873is an @emph{Info}-like mode where each section is displayed separately and
13700One is an @emph{Info}-like mode where each section is displayed separately 13874navigation can be done with the @kbd{n} and @kbd{p} keys, and some other
13701and navigation can be done with the @kbd{n} and @kbd{p} 13875keys as well, press @kbd{?} for an overview of the available keys. The
13702keys, and some other keys as well, press @kbd{?} for an overview 13876second one has a @emph{folding} view, much like Org provides inside Emacs.
13703of the available keys. The second one has a @emph{folding} view, much like 13877The script is available at @uref{https://orgmode.org/org-info.js} and the
13704Org provides inside Emacs. The script is available at 13878documentation at @uref{https://orgmode.org/worg/code/org-info-js/}. The
13705@uref{https://orgmode.org/org-info.js} and the documentation at 13879script 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 13880installing it on your own web server.
13707@uref{https://orgmode.org}, but for reliability, prefer installing it on your
13708own web server.
13709 13881
13710To use this program, just add this line to the Org file: 13882To 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,
16269write a list in Org syntax, select it, and convert it to HTML with 16441write 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
16451If you want to output a minimal HTML file, with no CSS, no Javascript,
16452no 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
17373Source 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
17378Details of Org's facilities for working with source code are described
17379in 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
17172Org can manage the source code in the block delimited by @samp{#+BEGIN_SRC} 17401Org 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
17174essential to modern source code maintenance. Org can edit, format, 17403essential 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
17177mode literature sometimes refers to source code blocks as @emph{live code} 17406mode literature sometimes refers to source code blocks as @emph{live code}
17178blocks because they can alter the content of the Org document or the 17407blocks because they can alter the content of the Org document or the
17179material that it exports. Users can control how live they want each 17408material that it exports. Users can control how live they want each
17180source code block by tweaking the header arguments (see @ref{Using Header Arguments}) for compiling, execution, extraction, and 17409source code block by tweaking the header arguments (see @ref{Using Header Arguments}) for compiling, execution, extraction, and exporting.
17181exporting.
17182
17183Source 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
17188For editing and formatting a source code block, Org uses an 17411For editing and formatting a source code block, Org uses an
17189appropriate Emacs major mode that includes features specifically 17412appropriate Emacs major mode that includes features specifically
@@ -17221,25 +17444,6 @@ configuration settings of the execution environment, the results of
17221the execution, and associated narratives, claims, references, and 17444the execution, and associated narratives, claims, references, and
17222internal and external links in a single Org document. 17445internal and external links in a single Org document.
17223 17446
17224Details of Org's facilities for working with source code are described
17225in 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
17988This is the name of the code block (see @ref{Structure of Code Blocks}) 18192This is the name of the code block (see @ref{Structure of Code Blocks})
17989to be evaluated in the current document. If the block is located in 18193to be evaluated in the current document. If the block is located in
17990another file, start @samp{<name>} with the file name followed by 18194another file, start @samp{<name>} with the file name followed by
17991a colon. For example, in order to execute a block named @samp{clear-data} 18195a colon. For example, in order to execute a block named @samp{clear-data}
17992in @samp{file.org}, you can write the following: 18196in @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
18080cause unexpected results. 18284cause unexpected results.
18081 18285
18082When the caching mechanism tests for any source code changes, it does 18286When the caching mechanism tests for any source code changes, it does
18083not expand Noweb style references (see @ref{Noweb Reference Syntax}). For 18287not expand noweb style references (see @ref{Noweb Reference Syntax}).
18084reasons why, see @uref{http://thread.gmane.org/gmane.emacs.orgmode/79046}.
18085 18288
18086The @samp{cache} header argument can have one of two values: @samp{yes} or @samp{no}. 18289The @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}
18158Default. Functional mode. Org gets the value by wrapping the code 18361Default for most Babel libraries@footnote{Actually, the constructs @samp{call_<name>()} and @samp{src_<lang>@{@}}
18159in a function definition in the language of the source block. That 18362are not evaluated when they appear in a keyword (see @ref{In-buffer Settings}).}. Functional mode. Org
18160is why when using @samp{:results value}, code should execute like 18363gets the value by wrapping the code in a function definition in the
18161a function and return a value. For languages like Python, an 18364language of the source block. That is why when using @samp{:results
18162explicit @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 18366languages like Python, an explicit @code{return} statement is mandatory
18164code block. 18367when using @samp{:results value}. Result is the value returned by the
18368last statement in the code block.
18165 18369
18166When evaluating the code block in a session (see @ref{Environment of a Code Block}), Org passes the code to an interpreter running as an 18370When evaluating the code block in a session (see @ref{Environment of a Code Block}), Org passes the code to an interpreter running as an
18167interactive Emacs inferior process. Org gets the value from the 18371interactive Emacs inferior process. Org gets the value from the
18168source code interpreter's last statement output. Org has to use 18372source code interpreter's last statement output. Org has to use
18169language-specific methods to obtain the value. For example, from 18373language-specific methods to obtain the value. For example, from
18170the variable @code{_} in Python and Ruby, and the value of @code{.Last.value} 18374the variable @code{_} in Ruby, and the value of @code{.Last.value} in R@.
18171in R@.
18172 18375
18173@item @samp{output} 18376@item @samp{output}
18174Scripting mode. Org passes the code to an external process running 18377Scripting mode. Org passes the code to an external process running
@@ -18178,41 +18381,6 @@ stream as text results.
18178When using a session, Org passes the code to the interpreter running 18381When using a session, Org passes the code to the interpreter running
18179as an interactive Emacs inferior process. Org concatenates any text 18382as an interactive Emacs inferior process. Org concatenates any text
18180output from the interpreter and returns the collection as a result. 18383output from the interpreter and returns the collection as a result.
18181
18182Note that this collection is not the same as that would be collected
18183from stdout of a non-interactive interpreter running as an external
18184process. 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
18198In the above non-session mode, the ``2'' is not printed; so it does
18199not 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
18214In the above session, the interactive interpreter receives and
18215prints ``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
18314The @samp{file-desc} header argument defines the description (see 18482The @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,
18316uses the generated file name for both the ``link'' and 18484the @samp{file} value is used as the link description. When this
18317``description'' parts of the link. 18485argument is not present, the description is omitted.
18318 18486
18319@cindex @samp{sep}, header argument 18487@cindex @samp{sep}, header argument
18320By default, Org assumes that a table written to a file has 18488By default, Org assumes that a table written to a file has
18321TAB-delimited output. You can choose a different separator with 18489TAB-delimited output. You can choose a different separator with
18322the @samp{sep} header argument. 18490the @samp{sep} header argument.
18491
18492@cindex @samp{file-mode}, header argument
18493The @samp{file-mode} header argument defines the file permissions. To
18494make 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}
18352Result is a link to the file specified in @samp{:file} header argument. 18531When used along with @samp{file} type, the result is a link to the file
18353However, unlike plain @samp{:file}, nothing is written to the disk. The 18532specified in @samp{:file} header argument. However, unlike plain @samp{file}
18354block is used for its side-effects only, as in the following 18533type, nothing is written to the disk. The block is used for its
18355example: 18534side-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"
18359wget -c "http://example.com/download.tar.gz" 18538wget -c "http://example.com/download.tar.gz"
18360#+end_src 18539#+end_src
18361@end example 18540@end example
@@ -18557,7 +18736,7 @@ code.
18557When Org tangles code blocks, it expands, merges, and transforms them. 18736When Org tangles code blocks, it expands, merges, and transforms them.
18558Then Org recomposes them into one or more separate files, as 18737Then Org recomposes them into one or more separate files, as
18559configured through the options. During this tangling process, Org 18738configured through the options. During this tangling process, Org
18560expands variables in the source code, and resolves any Noweb style 18739expands variables in the source code, and resolves any noweb style
18561references (see @ref{Noweb Reference Syntax}). 18740references (see @ref{Noweb Reference Syntax}).
18562 18741
18563@anchor{Header arguments} 18742@anchor{Header arguments}
@@ -18615,7 +18794,7 @@ the source block.
18615Includes both @samp{link} and @samp{org} options. 18794Includes both @samp{link} and @samp{org} options.
18616 18795
18617@item @samp{noweb} 18796@item @samp{noweb}
18618Includes @samp{link} option, expands Noweb references (see @ref{Noweb Reference Syntax}), and wraps them in link comments inside the body 18797Includes @samp{link} option, expands noweb references (see @ref{Noweb Reference Syntax}), and wraps them in link comments inside the body
18619of the code block. 18798of 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}
18654header argument turns off such expansions. Note that one side-effect 18833header argument turns off such expansions. Note that one side-effect
18655of expansion by @code{org-babel-expand-src-block} also assigns values (see 18834of 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
18657Noweb references with their targets (see @ref{Noweb Reference Syntax}). 18836noweb references with their targets (see @ref{Noweb Reference Syntax}).
18658Some of these expansions may cause premature assignment, hence this 18837Some of these expansions may cause premature assignment, hence this
18659option. This option makes a difference only for tangling. It has no 18838option. This option makes a difference only for tangling. It has no
18660effect when exporting since code blocks for execution have to be 18839effect when exporting since code blocks for execution have to be
@@ -18715,7 +18894,7 @@ file.
18715 18894
18716Code blocks in the following languages are supported. 18895Code 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
18922Org supports named blocks in Noweb@footnote{For Noweb literate programming details, see 19101@cindex @samp{noweb-ref}, header argument
19102Source code blocks can include references to other source code blocks,
19103using 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
18930Org can replace the construct with the source code, or the results of 19111@noindent
18931evaluation, of the code block identified as @var{CODE-BLOCK-ID}. 19112where @var{CODE-BLOCK-ID} refers to either the @samp{NAME} of a single
19113source code block, or a collection of one or more source code blocks
19114sharing the same @samp{noweb-ref} header argument (see @ref{Using Header Arguments}). Org can replace such references with the source code of
19115the block or blocks being referenced, or, in the case of a single
19116source code block named with @samp{NAME}, with the results of an evaluation
19117of that block.
18932 19118
18933@cindex @samp{noweb}, header argument 19119@cindex @samp{noweb}, header argument
18934The @samp{noweb} header argument controls expansion of Noweb syntax 19120The @samp{noweb} header argument controls expansion of noweb syntax
18935references. Expansions occur when source code blocks are evaluated, 19121references. Expansions occur when source code blocks are evaluated,
18936tangled, or exported. 19122tangled, or exported.
18937 19123
18938@table @asis 19124@table @asis
18939@item @samp{no} 19125@item @samp{no}
18940Default. No expansion of Noweb syntax references in the body of the 19126Default. No expansion of noweb syntax references in the body of the
18941code when evaluating, tangling, or exporting. 19127code when evaluating, tangling, or exporting.
18942 19128
18943@item @samp{yes} 19129@item @samp{yes}
18944Expansion of Noweb syntax references in the body of the code block 19130Expansion of noweb syntax references in the body of the code block
18945when evaluating, tangling, or exporting. 19131when evaluating, tangling, or exporting.
18946 19132
18947@item @samp{tangle} 19133@item @samp{tangle}
18948Expansion of Noweb syntax references in the body of the code block 19134Expansion of noweb syntax references in the body of the code block
18949when tangling. No expansion when evaluating or exporting. 19135when tangling. No expansion when evaluating or exporting.
18950 19136
18951@item @samp{no-export} 19137@item @samp{no-export}
18952Expansion of Noweb syntax references in the body of the code block 19138Expansion of noweb syntax references in the body of the code block
18953when evaluating or tangling. No expansion when exporting. 19139when evaluating or tangling. No expansion when exporting.
18954 19140
18955@item @samp{strip-export} 19141@item @samp{strip-export}
18956Expansion of Noweb syntax references in the body of the code block 19142Expansion of noweb syntax references in the body of the code block
18957when expanding prior to evaluating or tangling. Removes Noweb 19143when expanding prior to evaluating or tangling. Removes noweb
18958syntax references when exporting. 19144syntax references when exporting.
18959 19145
18960@item @samp{eval} 19146@item @samp{eval}
18961Expansion of Noweb syntax references in the body of the code block 19147Expansion of noweb syntax references in the body of the code block
18962only before evaluating. 19148only before evaluating.
18963@end table 19149@end table
18964 19150
18965In the following example, 19151In the most simple case, the contents of a single source block is
19152inserted 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
18989Noweb insertions honor prefix characters that appear before the Noweb 19176You may also include the contents of multiple blocks sharing a common
18990syntax reference. This behavior is illustrated in the following 19177@samp{noweb-ref} header argument, which can be set at the file, sub-tree,
18991example. Because the @samp{<<example>>} Noweb reference appears behind the 19178or code block level. In the example Org file shown next, the body of
18992SQL comment syntax, each line of the expanded Noweb reference is 19179the source code in each block is extracted for concatenation to a pure
18993commented. With: 19180code 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
19004this code block:
19005
19006@example
19007#+BEGIN_SRC sql :noweb yes
19008 ---<<example>>
19009#+END_SRC
19010@end example
19011
19012@noindent
19013expands 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
19022Since this change does not affect Noweb replacement text without
19023newlines in them, inline Noweb references are acceptable.
19024
19025This feature can also be used for management of indentation in
19026exported 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
19041this 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
19053expands to:
19054
19055@example
19056if true:
19057 print('do things when true')
19058else:
19059 print('do things when false')
19060@end example
19061
19062@cindex @samp{noweb-ref}, header argument
19063When expanding Noweb style references, Org concatenates code blocks by
19064matching the reference name to either the code block name or, if none
19065is found, to the @samp{noweb-ref} header argument.
19066
19067For simple concatenation, set this @samp{noweb-ref} header argument at the
19068sub-tree or file level. In the example Org file shown next, the body
19069of the source code in each block is extracted for concatenation to
19070a 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
19098By default a newline separates each noweb reference concatenation. To 19208By default a newline separates each noweb reference concatenation. To
19099change this newline separator, edit the @samp{noweb-sep} header argument. 19209use a different separator, edit the @samp{noweb-sep} header argument.
19100 19210
19101Eventually, Org can include the results of a code block rather than 19211Alternatively, Org can include the results of evaluation of a single
19102its body. To that effect, append parentheses, possibly including 19212code block rather than its body. Evaluation occurs when parentheses,
19103arguments, to the code block name, as shown below. 19213possibly including arguments, are appended to the code block name, as
19214shown 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
19110Note that when using the above approach to a code block's results, the 19221Note that in this case, a code block name set by @samp{NAME} keyword is
19111code block name set by @samp{NAME} keyword is required; the reference set 19222required; the reference set by @samp{noweb-ref} will not work when
19112by @samp{noweb-ref} does not work in that case. 19223evaluation is desired.
19113 19224
19114Here is an example that demonstrates how the exported content changes 19225Here is an example that demonstrates how the exported content changes
19115when Noweb style references are used with parentheses versus without. 19226when noweb style references are used with parentheses versus without.
19116With: 19227Given:
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
19142Below, a similar Noweb style reference is used, but with parentheses, 19253Below, a similar noweb style reference is used, but with parentheses,
19143while setting a variable @samp{num} to 10: 19254while 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
19152Note that now the expansion contains the results of the code block 19263Note 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
19156100 19267100
19157@end example 19268@end example
19158 19269
19270
19271Noweb insertions honor prefix characters that appear before the noweb
19272syntax reference. This behavior is illustrated in the following
19273example. Because the @samp{<<example>>} noweb reference appears behind the
19274SQL comment syntax, each line of the expanded noweb reference is
19275commented. 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
19286this code block:
19287
19288@example
19289#+BEGIN_SRC sql :noweb yes
19290 ---<<example>>
19291#+END_SRC
19292@end example
19293
19294@noindent
19295expands 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
19304Since this change does not affect noweb replacement text without
19305newlines in them, inline noweb references are acceptable.
19306
19307This feature can also be used for management of indentation in
19308exported 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
19323this 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
19335expands to:
19336
19337@example
19338if true:
19339 print('do things when true')
19340else:
19341 print('do things when false')
19342@end example
19343
19344When in doubt about the outcome of a source code block expansion, you
19345can 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
19352Expand the current source code block according to its header
19353arguments 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.
19411After @samp{\}, complete @TeX{} symbols supported by the exporter. 19609After @samp{\}, complete @TeX{} symbols supported by the exporter.
19412 19610
19413@item 19611@item
19414After @samp{*}, complete headlines in the current buffer so that they
19415can be used in search links like: @samp{[[*find this headline]]}
19416
19417@item
19418After @samp{:} in a headline, complete tags. Org deduces the list of 19612After @samp{:} in a headline, complete tags. Org deduces the list of
19419tags from the @samp{TAGS} in-buffer option (see @ref{Setting Tags}), the 19613tags from the @samp{TAGS} in-buffer option (see @ref{Setting Tags}), the
19420variable @code{org-tag-alist}, or from all tags used in the current 19614variable @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
19426current buffer. 19620current buffer.
19427 19621
19428@item 19622@item
19429After @samp{[}, complete link abbreviations (see @ref{Link Abbreviations}). 19623After @samp{[[}, complete link abbreviations (see @ref{Link Abbreviations}).
19624
19625@item
19626After @samp{[[*}, complete headlines in the current buffer so that they
19627can be used in search links like: @samp{[[*find this headline]]}
19430 19628
19431@item 19629@item
19432After @samp{#+}, complete the special keywords like @samp{TYP_TODO} or 19630After @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
19581To make more horizontal space, the headlines are shifted by two 19779To make more horizontal space, the headlines are shifted by two
19582characters. Configure @code{org-indent-indentation-per-level} variable for 19780characters. Configure @code{org-indent-indentation-per-level} variable for
19583a different number. Only one star on each headline is visible, the 19781a different number.
19584rest 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
19785By default, Org Indent mode turns off @code{org-adapt-indentation} and does
19786hide leading stars by locally setting @code{org-hide-leading-stars} to @code{t}:
19787only one star on each headline is visible, the rest are masked with
19788the same font color as the background. If you want to customize this
19789default 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
19588To globally turn on Org Indent mode for all files, customize the 19793To 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,
19601if the bare ASCII file should have the indented look also outside 19806if the bare ASCII file should have the indented look also outside
19602Emacs@footnote{This works, but requires extra effort. Org Indent mode is 19807Emacs@footnote{This works, but requires extra effort. Org Indent mode is
19603more convenient for most applications.}. With Org's support, you have to indent all lines to 19808more convenient for most applications.}. With Org's support, you have to indent all lines to
19604line up with the outline headers. You would use these settings: 19809line up with the outline headers. You would use these
19810settings@footnote{@code{org-adapt-indentation} can also be set to @samp{'headline-data},
19811in 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
19633The third setting makes Org use only odd levels, 1, 3, 5, @dots{}, in 19840The third setting makes Org use only odd levels, 1, 3, 5, @dots{}, in
19634the outline to create more indentation. On a per-file level, 19841the outline to create more indentation. On a per-file level,
19635control this with: 19842control 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
19857When in an Org buffer and the region is active, some commands will
19858apply 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
19860successively prompt you for a new schedule date and time. To disable
19861this, set the option @code{org-loop-over-headlines-in-active-region} to
19862non-@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
19866option of the agenda buffer, where you can also use @ref{Bulk remote editing selected entries, , bulk editing of
19867selected entries}.
19868
19869Not all commands can loop in the active region and what subtrees or
19870headlines are considered can be refined: see the docstrings of these
19871options 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
19671You can control how the numbering is displayed by setting 19898You 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
19902You can also turn this mode globally for all Org files by setting the
19903option @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
19919If column view (see @ref{Column View}) is on, exit column view.
19920
19921@item
19687If any highlights shown in the buffer from the creation of a sparse 19922If any highlights shown in the buffer from the creation of a sparse
19688tree, or from clock display, remove such highlights. 19923tree, or from clock display, remove such highlights.
19689 19924
@@ -19753,7 +19988,7 @@ Closing and reopening the Org file in Emacs also activates the
19753changes. 19988changes.
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
19759Sets the archive location of the agenda file. The corresponding 19994Sets 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
19799This line sets the limits and the default for the priorities. All 20034This line sets the limits and the default for the priorities. All
19800three must be either letters A--Z or numbers 0--9. The highest 20035three must be either letters A--Z or numbers 0--9. The highest
19801priority must have a lower ASCII number than the lowest priority. 20036priority 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
19828The first set of options deals with the initial visibility of the 20063The first set of options deals with the initial visibility of the
19829outline tree. The corresponding variable for global default 20064outline tree. The corresponding variable for global default
19830settings is @code{org-startup-folded} with a default value of @code{t}, which 20065settings is @code{org-startup-folded} with a default value of
19831is 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
20093Dynamic 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
19858Aligns tables consistently upon visiting a file. The 20104Aligns tables consistently upon visiting a file. The
19859corresponding variable is @code{org-startup-align-all-tables} with 20105corresponding 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
20117You may sometimes want to write text that looks like Org syntax, but 20363You may sometimes want to write text that looks like Org syntax, but
20118should really read as plain text. Org may use a specific escape 20364should really read as plain text. Org may use a specific escape
20119character 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 20365character 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
20120width space. You can insert one with any of the following: 20366example blocks (see @ref{Literal Examples}). In the general case, however,
20367we suggest to use the zero width space. You can insert one with any
20368of the following:
20121 20369
20122@example 20370@example
20123C-x 8 <RET> zero width space <RET> 20371C-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
20619The capture template to be used can be specified in the bookmark (like 20867The 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
20622placeholders are available: 20870placeholders are available:
20623 20871
20624@example 20872@example
@@ -20778,13 +21026,11 @@ compatible with Org Mobile. It also describes synchronizing changes,
20778such as to notes, between the mobile application and the computer. 21026such as to notes, between the mobile application and the computer.
20779 21027
20780To change tags and TODO states in the mobile application, first 21028To change tags and TODO states in the mobile application, first
20781customize the variables @code{org-todo-keywords} and @code{org-tag-alist}. 21029customize the variables @code{org-todo-keywords}, @code{org-tag-alist} and
20782These should cover all the important tags and TODO keywords, even if 21030@code{org-tag-persistent-alist}. These should cover all the important tags
20783Org files use only some of them. Though the mobile application is 21031and TODO keywords, even if Org files use only some of them. Though
20784expected to support in-buffer settings, it is required to understand 21032the mobile application is expected to support in-buffer settings, it
20785TODO states @emph{sets} (see @ref{Per-file keywords}) and 21033is 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
20787these 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
20969The following @samp{org-man.el} file implements it 21215The 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.
21233PATH 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&section=all" link)) 21257 (let ((path (format "http://man.he.net/?topic=%s&section=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
21021file: 21272file:
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
21028A review of @samp{org-man.el}: 21279A review of @samp{ol-man.el}:
21029 21280
21030@enumerate 21281@enumerate
21031@item 21282@item
21032First, @samp{(require 'org)} ensures @samp{org.el} is loaded. 21283First, @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
21385Before updating a dynamic block, Org removes content between the 21636Before 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
21388previous content of the dynamic block becomes erased from the buffer 21639previous content of the dynamic block becomes erased from the buffer
21389and appended to the plist under @code{:content}. 21640and appended to the plist under @code{:content}.
21390 21641
@@ -21986,7 +22237,7 @@ a JavaScript program for displaying webpages derived from Org using
21986an Info-like or a folding interface with single-key navigation. 22237an Info-like or a folding interface with single-key navigation.
21987@end table 22238@end table
21988 22239
21989See below for the full list of contributions! Again, please let me 22240See below for the full list of contributions! Again, please let me
21990know what I am missing here! 22241know 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
22046Russel Adams came up with the idea for drawers. 22297Russell Adams came up with the idea for drawers.
22047 22298
22048@item 22299@item
22049Thomas Baumann wrote @samp{ol-bbdb.el} and @samp{ol-mhe.el}. 22300Thomas 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
4343Host * 4343Host *
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
4881I get an error @samp{Remote file error: Forbidden reentrant call of Tramp}
4882
4883Timers, process filters and sentinels, and other event based functions
4884can run at any time, when a remote file operation is still running.
4885This can cause @value{tramp} to block. When such a situation is
4886detected, this error is triggered. It shall be fixed in the
4887respective function (an error report will help), but for the time
4888being 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
4881How to disable other packages from calling @value{tramp}? 4900How to disable other packages from calling @value{tramp}?
4882 4901
4883There are packages that call @value{tramp} without the user ever 4902There 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
4988Sometimes, it is not convenient to open a new connection to a remote 5007Sometimes, 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
5005Keeping a local cache of remote file attributes in sync with the 5024Keeping a local cache of remote file attributes in sync with the
5006remote host is a time-consuming operation. Flushing and re-querying 5025remote 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
5064Timers run asynchronously at any time when Emacs is waiting for
5065sending a string to a process, or waiting for process output. They
5066can run any remote file operation, which would conflict with the
5067already running remote file operation, if the same connection is
5068affected. @value{tramp} detects this situation, and raises the
5069@code{remote-file-error} error. A timer function shall avoid this
5070situation. At least, it shall protect itself against this error, by
5071wrapping 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