Merge branch 'master' of code.orgmode.org:bzg/org-mode

This commit is contained in:
Bastien 2018-12-07 07:40:35 +01:00
commit 094cb8ecdc
4 changed files with 148 additions and 112 deletions

View File

@ -11247,7 +11247,7 @@ global variables, include:
Language to use for translating certain strings Language to use for translating certain strings
(~org-export-default-language~). With =#+LANGUAGE: fr=, for (~org-export-default-language~). With =#+LANGUAGE: fr=, for
example, Org translates =Table of contents= to the French =Table example, Org translates =Table of contents= to the French =Table
des matières=. des matières=[fn:119].
- =SELECT_TAGS= :: - =SELECT_TAGS= ::
@ -11526,7 +11526,7 @@ keyword:
#+cindex: excluding entries from table of contents #+cindex: excluding entries from table of contents
#+cindex: table of contents, exclude entries #+cindex: table of contents, exclude entries
Org includes both numbered and unnumbered headlines in the table of Org includes both numbered and unnumbered headlines in the table of
contents[fn:119]. If you need to exclude an unnumbered headline, contents[fn:120]. If you need to exclude an unnumbered headline,
along with all its children, set the =UNNUMBERED= property to =notoc= along with all its children, set the =UNNUMBERED= property to =notoc=
value. value.
@ -11629,7 +11629,7 @@ be omitted to use the obvious defaults.
| =#+INCLUDE: "~/.emacs" :lines "10-"= | Include lines from 10 to EOF | | =#+INCLUDE: "~/.emacs" :lines "10-"= | Include lines from 10 to EOF |
Inclusions may specify a file-link to extract an object matched by Inclusions may specify a file-link to extract an object matched by
~org-link-search~[fn:120] (see [[*Search Options in File Links]]). The ~org-link-search~[fn:121] (see [[*Search Options in File Links]]). The
ranges for =:lines= keyword are relative to the requested element. ranges for =:lines= keyword are relative to the requested element.
Therefore, Therefore,
@ -11670,7 +11670,7 @@ following syntax:
: #+MACRO: name replacement text; $1, $2 are arguments : #+MACRO: name replacement text; $1, $2 are arguments
#+texinfo: @noindent #+texinfo: @noindent
which can be referenced using ={{{name(arg1, arg2)}}}=[fn:121]. For which can be referenced using ={{{name(arg1, arg2)}}}=[fn:122]. For
example example
#+begin_example #+begin_example
@ -11789,7 +11789,7 @@ are not exported.
Finally, a =COMMENT= keyword at the beginning of an entry, but after Finally, a =COMMENT= keyword at the beginning of an entry, but after
any other keyword or priority cookie, comments out the entire subtree. any other keyword or priority cookie, comments out the entire subtree.
In this case, the subtree is not exported and no code block within it In this case, the subtree is not exported and no code block within it
is executed either[fn:122]. The command below helps changing the is executed either[fn:123]. The command below helps changing the
comment status of a headline. comment status of a headline.
- {{{kbd(C-c ;)}}} (~org-toggle-comment~) :: - {{{kbd(C-c ;)}}} (~org-toggle-comment~) ::
@ -12060,7 +12060,7 @@ should in principle be exportable as a Beamer presentation.
- Org exports a Beamer frame's objects as block environments. Org can - Org exports a Beamer frame's objects as block environments. Org can
enforce wrapping in special block types when =BEAMER_ENV= property enforce wrapping in special block types when =BEAMER_ENV= property
is set[fn:123]. For valid values see is set[fn:124]. For valid values see
~org-beamer-environments-default~. To add more values, see ~org-beamer-environments-default~. To add more values, see
~org-beamer-environments-extra~. ~org-beamer-environments-extra~.
#+vindex: org-beamer-environments-default #+vindex: org-beamer-environments-default
@ -12635,7 +12635,7 @@ as-is.
#+vindex: org-html-mathjax-options~ #+vindex: org-html-mathjax-options~
LaTeX math snippets (see [[*LaTeX fragments]]) can be displayed in two LaTeX math snippets (see [[*LaTeX fragments]]) can be displayed in two
different ways on HTML pages. The default is to use the [[http://www.mathjax.org][MathJax]], different ways on HTML pages. The default is to use the [[http://www.mathjax.org][MathJax]],
which should work out of the box with Org[fn:124][fn:125]. Some MathJax which should work out of the box with Org[fn:125][fn:126]. Some MathJax
display options can be configured via ~org-html-mathjax-options~, or display options can be configured via ~org-html-mathjax-options~, or
in the buffer. For example, with the following settings, in the buffer. For example, with the following settings,
@ -12647,7 +12647,7 @@ in the buffer. For example, with the following settings,
#+texinfo: @noindent #+texinfo: @noindent
equation labels are displayed on the left margin and equations are equation labels are displayed on the left margin and equations are
five em from the left margin. In addition, it loads the two MathJax five em from the left margin. In addition, it loads the two MathJax
extensions =cancel.js= and =noErrors.js=[fn:126]. extensions =cancel.js= and =noErrors.js=[fn:127].
#+vindex: org-html-mathjax-template #+vindex: org-html-mathjax-template
See the docstring of ~org-html-mathjax-options~ for all supported See the docstring of ~org-html-mathjax-options~ for all supported
@ -12710,7 +12710,7 @@ line.
#+vindex: org-export-html-todo-kwd-class-prefix #+vindex: org-export-html-todo-kwd-class-prefix
#+vindex: org-export-html-tag-class-prefix #+vindex: org-export-html-tag-class-prefix
You can modify the CSS style definitions for the exported file. The You can modify the CSS style definitions for the exported file. The
HTML exporter assigns the following special CSS classes[fn:127] to HTML exporter assigns the following special CSS classes[fn:128] to
appropriate parts of the document---your style specifications may appropriate parts of the document---your style specifications may
change these, in addition to any of the standard classes like for change these, in addition to any of the standard classes like for
headlines, tables, etc. headlines, tables, etc.
@ -12949,7 +12949,7 @@ LaTeX export back-end finds the compiler version to use from
Org file. See the docstring for the Org file. See the docstring for the
~org-latex-default-packages-alist~ for loading packages with certain ~org-latex-default-packages-alist~ for loading packages with certain
compilers. Also see ~org-latex-bibtex-compiler~ to set the compilers. Also see ~org-latex-bibtex-compiler~ to set the
bibliography compiler[fn:128]. bibliography compiler[fn:129].
*** LaTeX specific export settings *** LaTeX specific export settings
:PROPERTIES: :PROPERTIES:
@ -12973,6 +12973,22 @@ general options (see [[*Export Settings]]).
the document's front matter. Use multiple =DESCRIPTION= keywords the document's front matter. Use multiple =DESCRIPTION= keywords
for long descriptions. for long descriptions.
- =LANGUAGE= ::
#+cindex: @samp{LANGUAGE}, keyword
#+vindex: org-latex-package-alist
In order to be effective, the =babel= or =polyglossia=
packages---according to the LaTeX compiler used---must be loaded
with the appropriate language as argument. This can be
accomplished by modifying the =org-latex-package-alist= variable,
e.g., with the following snippet:
#+begin_src emacs-lisp
(add-to-list org-latex-package-alist
'("AUTO" "babel" t ("pdflatex")))
(add-to-list org-latex-package-alist
'("AUTO" "polyglossia" t ("xelatex" "lualatex")))
#+end_src
- =LATEX_CLASS= :: - =LATEX_CLASS= ::
#+cindex: @samp{LATEX_CLASS}, keyword #+cindex: @samp{LATEX_CLASS}, keyword
@ -13559,7 +13575,7 @@ a limit to a level before the absolute limit (see [[*Export Settings]]).
The ODT export back-end handles creating of OpenDocument Text (ODT) The ODT export back-end handles creating of OpenDocument Text (ODT)
format. Documents created by this exporter use the format. Documents created by this exporter use the
{{{cite(OpenDocument-v1.2 specification)}}}[fn:129] and are compatible {{{cite(OpenDocument-v1.2 specification)}}}[fn:130] and are compatible
with LibreOffice 3.4. with LibreOffice 3.4.
*** Pre-requisites for ODT export *** Pre-requisites for ODT export
@ -13960,7 +13976,7 @@ document in one of the following ways:
variables ~org-latex-to-mathml-convert-command~ and variables ~org-latex-to-mathml-convert-command~ and
~org-latex-to-mathml-jar-file~. ~org-latex-to-mathml-jar-file~.
If you prefer to use MathToWeb[fn:130] as your converter, you can If you prefer to use MathToWeb[fn:131] as your converter, you can
configure the above variables as shown below. configure the above variables as shown below.
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -13970,7 +13986,8 @@ document in one of the following ways:
"/path/to/mathtoweb.jar") "/path/to/mathtoweb.jar")
#+end_src #+end_src
To use LaTeXML[fn:131] use #+texinfo: @noindent
or, to use LaTeXML[fn:132] instead,
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq org-latex-to-mathml-convert-command (setq org-latex-to-mathml-convert-command
@ -14290,7 +14307,7 @@ with the =#+ATTR_ODT= line. For a discussion on default formatting of
tables, see [[*Tables in ODT export]]. tables, see [[*Tables in ODT export]].
This feature closely mimics the way table templates are defined in the This feature closely mimics the way table templates are defined in the
OpenDocument-v1.2 specification.[fn:132] OpenDocument-v1.2 specification[fn:133].
#+vindex: org-odt-table-styles #+vindex: org-odt-table-styles
For quick preview of this feature, install the settings below and export the For quick preview of this feature, install the settings below and export the
@ -14324,7 +14341,7 @@ templates, define new styles there.
To use this feature proceed as follows: To use this feature proceed as follows:
1. Create a table template[fn:133]. 1. Create a table template[fn:134].
A table template is set of =table-cell= and =paragraph= styles for A table template is set of =table-cell= and =paragraph= styles for
each of the following table cell categories: each of the following table cell categories:
@ -14363,7 +14380,7 @@ To use this feature proceed as follows:
=</office:automatic-styles>= element of the content template file =</office:automatic-styles>= element of the content template file
(see [[x-orgodtcontenttemplate-xml][Factory styles]]). (see [[x-orgodtcontenttemplate-xml][Factory styles]]).
2. Define a table style[fn:134]. 2. Define a table style[fn:135].
#+vindex: org-odt-table-styles #+vindex: org-odt-table-styles
To define a table style, create an entry for the style in the To define a table style, create an entry for the style in the
@ -15428,7 +15445,7 @@ If you want to publish the Org file as an =.org= file but with
~org-publish-org-to-org~. This produces =file.org= and put it in the ~org-publish-org-to-org~. This produces =file.org= and put it in the
publishing directory. If you want a htmlized version of this file, publishing directory. If you want a htmlized version of this file,
set the parameter ~:htmlized-source~ to ~t~. It produces set the parameter ~:htmlized-source~ to ~t~. It produces
=file.org.html= in the publishing directory[fn:135]. =file.org.html= in the publishing directory[fn:136].
Other files like images only need to be copied to the publishing Other files like images only need to be copied to the publishing
destination; for this you can use ~org-publish-attachment~. For destination; for this you can use ~org-publish-attachment~. For
@ -16802,13 +16819,13 @@ See [[*Languages]] to enable other languages.
#+kindex: C-c C-v e #+kindex: C-c C-v e
#+findex: org-babel-execute-src-block #+findex: org-babel-execute-src-block
Org provides many ways to execute code blocks. {{{kbd(C-c C-c)}}} or Org provides many ways to execute code blocks. {{{kbd(C-c C-c)}}} or
{{{kbd(C-c C-v e)}}} with the point on a code block[fn:136] calls the {{{kbd(C-c C-v e)}}} with the point on a code block[fn:137] calls the
~org-babel-execute-src-block~ function, which executes the code in the ~org-babel-execute-src-block~ function, which executes the code in the
block, collects the results, and inserts them in the buffer. block, collects the results, and inserts them in the buffer.
#+cindex: @samp{CALL}, keyword #+cindex: @samp{CALL}, keyword
#+vindex: org-babel-inline-result-wrap #+vindex: org-babel-inline-result-wrap
By calling a named code block[fn:137] from an Org mode buffer or By calling a named code block[fn:138] from an Org mode buffer or
a table. Org can call the named code blocks from the current Org mode a table. Org can call the named code blocks from the current Org mode
buffer or from the "Library of Babel" (see [[*Library of Babel]]). buffer or from the "Library of Babel" (see [[*Library of Babel]]).
@ -17166,7 +17183,7 @@ default behavior is to automatically determine the result type.
If =file= is missing, Org generates the base name of the output If =file= is missing, Org generates the base name of the output
file from the name of the code block, and its extension from the file from the name of the code block, and its extension from the
=file-ext= header argument. In that case, both the name and the =file-ext= header argument. In that case, both the name and the
extension are mandatory[fn:138]. extension are mandatory[fn:139].
#+begin_example #+begin_example
,#+name: circle ,#+name: circle
@ -17615,10 +17632,10 @@ Code blocks in the following languages are supported.
| Asymptote | =asymptote= | Lua | =lua= | | Asymptote | =asymptote= | Lua | =lua= |
| Awk | =awk= | MATLAB | =matlab= | | Awk | =awk= | MATLAB | =matlab= |
| C | =C= | Mscgen | =mscgen= | | C | =C= | Mscgen | =mscgen= |
| C++ | =C++=[fn:139] | OCaml | =ocaml= | | C++ | =C++=[fn:140] | OCaml | =ocaml= |
| Clojure | =clojure= | Octave | =octave= | | Clojure | =clojure= | Octave | =octave= |
| CSS | =css= | Org mode | =org= | | CSS | =css= | Org mode | =org= |
| D | =D=[fn:140] | Oz | =oz= | | D | =D=[fn:141] | Oz | =oz= |
| ditaa | =ditaa= | Perl | =perl= | | ditaa | =ditaa= | Perl | =perl= |
| Emacs Calc | =calc= | Plantuml | =plantuml= | | Emacs Calc | =calc= | Plantuml | =plantuml= |
| Emacs Lisp | =emacs-lisp= | Processing.js | =processing= | | Emacs Lisp | =emacs-lisp= | Processing.js | =processing= |
@ -17747,7 +17764,7 @@ for Python and Emacs Lisp languages.
#+cindex: syntax, Noweb #+cindex: syntax, Noweb
#+cindex: source code, Noweb reference #+cindex: source code, Noweb reference
Org supports named blocks in Noweb[fn:141] style syntax: Org supports named blocks in Noweb[fn:142] style syntax:
: <<CODE-BLOCK-ID>> : <<CODE-BLOCK-ID>>
@ -18247,7 +18264,7 @@ Org Tempo expands snippets to structures defined in
~org-structure-template-alist~ and ~org-tempo-keywords-alist~. For ~org-structure-template-alist~ and ~org-tempo-keywords-alist~. For
example, {{{kbd(< s TAB)}}} creates a code block. Enable it by example, {{{kbd(< s TAB)}}} creates a code block. Enable it by
customizing ~org-modules~ or add ~(require 'org-tempo)~ to your Emacs customizing ~org-modules~ or add ~(require 'org-tempo)~ to your Emacs
init file[fn:142]. init file[fn:143].
#+attr_texinfo: :columns 0.1 0.9 #+attr_texinfo: :columns 0.1 0.9
| {{{kbd(a)}}} | =#+BEGIN_EXPORT ascii= ... =#+END_EXPORT= | | {{{kbd(a)}}} | =#+BEGIN_EXPORT ascii= ... =#+END_EXPORT= |
@ -18520,7 +18537,7 @@ changes.
#+vindex: org-startup-indented #+vindex: org-startup-indented
Dynamic virtual indentation is controlled by the variable Dynamic virtual indentation is controlled by the variable
~org-startup-indented~[fn:143]. ~org-startup-indented~[fn:144].
- =indent= :: - =indent= ::
@ -18851,7 +18868,7 @@ uses only one star and indents text to line with the heading:
#+findex: org-indent-mode #+findex: org-indent-mode
To turn this mode on, use the minor mode, ~org-indent-mode~. Text To turn this mode on, use the minor mode, ~org-indent-mode~. Text
lines that are not headlines are prefixed with spaces to vertically lines that are not headlines are prefixed with spaces to vertically
align with the headline text[fn:144]. align with the headline text[fn:145].
#+vindex: org-indent-indentation-per-level #+vindex: org-indent-indentation-per-level
To make more horizontal space, the headlines are shifted by two stars. To make more horizontal space, the headlines are shifted by two stars.
@ -18886,7 +18903,7 @@ headings as shown in examples below.
#+vindex: org-adapt-indentation #+vindex: org-adapt-indentation
Org supports this with paragraph filling, line wrapping, and Org supports this with paragraph filling, line wrapping, and
structure editing, preserving or adapting the indentation as structure editing, preserving or adapting the indentation as
appropriate[fn:145]. appropriate[fn:146].
- /Hiding leading stars/ :: - /Hiding leading stars/ ::
@ -18919,7 +18936,7 @@ headings as shown in examples below.
#+vindex: org-odd-levels-only #+vindex: org-odd-levels-only
Using stars for only odd levels, 1, 3, 5, ..., can also clean up Using stars for only odd levels, 1, 3, 5, ..., can also clean up
the clutter. This removes two stars from each level[fn:146]. the clutter. This removes two stars from each level[fn:147].
For Org to properly handle this cleaner structure during edits For Org to properly handle this cleaner structure during edits
and exports, configure the variable ~org-odd-levels-only~. To and exports, configure the variable ~org-odd-levels-only~. To
set this per-file, use either one of the following lines: set this per-file, use either one of the following lines:
@ -19290,7 +19307,7 @@ these variables.
#+vindex: org-mobile-directory #+vindex: org-mobile-directory
The mobile application needs access to a file directory on The mobile application needs access to a file directory on
a server[fn:147] to interact with Emacs. Pass its location through a server[fn:148] to interact with Emacs. Pass its location through
the ~org-mobile-directory~ variable. If you can mount that directory the ~org-mobile-directory~ variable. If you can mount that directory
locally just set the variable to point to that directory: locally just set the variable to point to that directory:
@ -19311,7 +19328,7 @@ With a public server, consider encrypting the files. Org also
requires OpenSSL installed on the local computer. To turn on requires OpenSSL installed on the local computer. To turn on
encryption, set the same password in the mobile application and in encryption, set the same password in the mobile application and in
Emacs. Set the password in the variable Emacs. Set the password in the variable
~org-mobile-use-encryption~[fn:148]. Note that even after the mobile ~org-mobile-use-encryption~[fn:149]. Note that even after the mobile
application encrypts the file contents, the file name remains visible application encrypts the file contents, the file name remains visible
on the file systems of the local computer, the server, and the mobile on the file systems of the local computer, the server, and the mobile
device. device.
@ -19327,15 +19344,15 @@ The command ~org-mobile-push~ copies files listed in
~org-mobile-files~ into the staging area. Files include agenda files ~org-mobile-files~ into the staging area. Files include agenda files
(as listed in ~org-agenda-files~). Customize ~org-mobile-files~ to (as listed in ~org-agenda-files~). Customize ~org-mobile-files~ to
add other files. File names are staged with paths relative to add other files. File names are staged with paths relative to
~org-directory~, so all files should be inside this directory[fn:149]. ~org-directory~, so all files should be inside this directory[fn:150].
Push creates a special Org file =agendas.org= with custom agenda views Push creates a special Org file =agendas.org= with custom agenda views
defined by the user[fn:150]. defined by the user[fn:151].
Finally, Org writes the file =index.org=, containing links to other Finally, Org writes the file =index.org=, containing links to other
files. The mobile application reads this file first from the server files. The mobile application reads this file first from the server
to determine what other files to download for agendas. For faster to determine what other files to download for agendas. For faster
downloads, it is expected to only read files whose checksums[fn:151] downloads, it is expected to only read files whose checksums[fn:152]
have changed. have changed.
*** Pulling from the mobile application *** Pulling from the mobile application
@ -19352,7 +19369,7 @@ data in an inbox file format, through the following steps:
1. 1.
#+vindex: org-mobile-inbox-for-pull #+vindex: org-mobile-inbox-for-pull
Org moves all entries found in =mobileorg.org=[fn:152] and appends Org moves all entries found in =mobileorg.org=[fn:153] and appends
them to the file pointed to by the variable them to the file pointed to by the variable
~org-mobile-inbox-for-pull~. It should reside neither in the ~org-mobile-inbox-for-pull~. It should reside neither in the
staging area nor on the server. Each captured entry and each staging area nor on the server. Each captured entry and each
@ -19688,9 +19705,9 @@ of these strategies:
#+cindex: @LaTeX{}, and Orgtbl mode #+cindex: @LaTeX{}, and Orgtbl mode
To wrap a source table in LaTeX, use the =comment= environment To wrap a source table in LaTeX, use the =comment= environment
provided by =comment.sty=[fn:153]. To activate it, put provided by =comment.sty=[fn:154]. To activate it, put
~\usepackage{comment}~ in the document header. Orgtbl mode inserts ~\usepackage{comment}~ in the document header. Orgtbl mode inserts
a radio table skeleton[fn:146] with the command {{{kbd(M-x a radio table skeleton[fn:147] with the command {{{kbd(M-x
orgtbl-insert-radio-table)}}}, which prompts for a table name. For orgtbl-insert-radio-table)}}}, which prompts for a table name. For
example, if =salesfigures= is the name, the template inserts: example, if =salesfigures= is the name, the template inserts:
@ -19709,7 +19726,7 @@ The line =#+ORGTBL: SEND= tells Orgtbl mode to use the function
~orgtbl-to-latex~ to convert the table to LaTeX format, then insert ~orgtbl-to-latex~ to convert the table to LaTeX format, then insert
the table at the target (receive) location named =salesfigures=. Now the table at the target (receive) location named =salesfigures=. Now
the table is ready for data entry. It can even use spreadsheet the table is ready for data entry. It can even use spreadsheet
features[fn:154]: features[fn:155]:
#+begin_example #+begin_example
% BEGIN RECEIVE ORGTBL salesfigures % BEGIN RECEIVE ORGTBL salesfigures
@ -19923,7 +19940,7 @@ Dynamic blocks, like any other block, can be narrowed with
#+vindex: org-agenda-skip-function #+vindex: org-agenda-skip-function
#+vindex: org-agenda-skip-function-global #+vindex: org-agenda-skip-function-global
Org provides a special hook to further limit items in agenda views: Org provides a special hook to further limit items in agenda views:
~agenda~, ~agenda*~[fn:155], ~todo~, ~alltodo~, ~tags~, ~tags-todo~, ~agenda~, ~agenda*~[fn:156], ~todo~, ~alltodo~, ~tags~, ~tags-todo~,
~tags-tree~. Specify a custom function that tests inclusion of every ~tags-tree~. Specify a custom function that tests inclusion of every
matched item in the view. This function can also skip as much as is matched item in the view. This function can also skip as much as is
needed. needed.
@ -19966,7 +19983,7 @@ meaningful string suitable for the agenda view.
#+vindex: org-agenda-skip-function #+vindex: org-agenda-skip-function
Search for entries with a limit set on levels for the custom search. Search for entries with a limit set on levels for the custom search.
This is a general approach to creating custom searches in Org. To This is a general approach to creating custom searches in Org. To
include all levels, use =LEVEL>0=[fn:156]. Then to selectively pick include all levels, use =LEVEL>0=[fn:157]. Then to selectively pick
the matched entries, use ~org-agenda-skip-function~, which also the matched entries, use ~org-agenda-skip-function~, which also
accepts Lisp forms, such as ~org-agenda-skip-entry-if~ and accepts Lisp forms, such as ~org-agenda-skip-entry-if~ and
~org-agenda-skip-subtree-if~. For example: ~org-agenda-skip-subtree-if~. For example:
@ -21337,74 +21354,78 @@ within a buffer with the =STARTUP= options =inlineimages= and
[fn:118] The variable ~org-export-date-timestamp-format~ defines how [fn:118] The variable ~org-export-date-timestamp-format~ defines how
this timestamp are exported. this timestamp are exported.
[fn:119] At the moment, some export back-ends do not obey this [fn:119] For export to LaTeX format---or LaTeX-related formats such as
Beamer---, the =org-latex-package-alist= variable needs further
configuration. See [[LaTeX specific export settings]].
[fn:120] At the moment, some export back-ends do not obey this
specification. For example, LaTeX export excludes every unnumbered specification. For example, LaTeX export excludes every unnumbered
headline from the table of contents. headline from the table of contents.
[fn:120] Note that ~org-link-search-must-match-exact-headline~ is [fn:121] Note that ~org-link-search-must-match-exact-headline~ is
locally bound to non-~nil~. Therefore, ~org-link-search~ only matches locally bound to non-~nil~. Therefore, ~org-link-search~ only matches
headlines and named elements. headlines and named elements.
[fn:121] Since commas separate the arguments, commas within arguments [fn:122] Since commas separate the arguments, commas within arguments
have to be escaped with the backslash character. So only those have to be escaped with the backslash character. So only those
backslash characters before a comma need escaping with another backslash characters before a comma need escaping with another
backslash character. backslash character.
[fn:122] For a less drastic behavior, consider using a select tag (see [fn:123] For a less drastic behavior, consider using a select tag (see
[[*Export Settings]]) instead. [[*Export Settings]]) instead.
[fn:123] If =BEAMER_ENV= is set, Org export adds =B_environment= tag [fn:124] If =BEAMER_ENV= is set, Org export adds =B_environment= tag
to make it visible. The tag serves as a visual aid and has no to make it visible. The tag serves as a visual aid and has no
semantic relevance. semantic relevance.
[fn:124] By default Org loads MathJax from [[https://cdnjs.com][cdnjs.com]] as recommended by [fn:125] By default Org loads MathJax from [[https://cdnjs.com][cdnjs.com]] as recommended by
[[http://www.mathjax.org][MathJax]]. [[http://www.mathjax.org][MathJax]].
[fn:125] Please note that exported formulas are part of an HTML [fn:126] Please note that exported formulas are part of an HTML
document, and that signs such as =<=, =>=, or =&= have special document, and that signs such as =<=, =>=, or =&= have special
meanings. See [[http://docs.mathjax.org/en/latest/tex.html#tex-and-latex-in-html-documents][MathJax TeX and LaTeX support]]. meanings. See [[http://docs.mathjax.org/en/latest/tex.html#tex-and-latex-in-html-documents][MathJax TeX and LaTeX support]].
[fn:126] See [[http://docs.mathjax.org/en/latest/tex.html#tex-extensions][TeX and LaTeX extensions]] in the [[http://docs.mathjax.org][MathJax manual]] to learn [fn:127] See [[http://docs.mathjax.org/en/latest/tex.html#tex-extensions][TeX and LaTeX extensions]] in the [[http://docs.mathjax.org][MathJax manual]] to learn
about extensions. about extensions.
[fn:127] If the classes on TODO keywords and tags lead to conflicts, [fn:128] If the classes on TODO keywords and tags lead to conflicts,
use the variables ~org-html-todo-kwd-class-prefix~ and use the variables ~org-html-todo-kwd-class-prefix~ and
~org-html-tag-class-prefix~ to make them unique. ~org-html-tag-class-prefix~ to make them unique.
[fn:128] This does not allow setting different bibliography compilers [fn:129] This does not allow setting different bibliography compilers
for different files. However, "smart" LaTeX compilation systems, such for different files. However, "smart" LaTeX compilation systems, such
as latexmk, can select the correct bibliography compiler. as latexmk, can select the correct bibliography compiler.
[fn:129] See [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][Open Document Format for Office Applications [fn:130] See [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][Open Document Format for Office Applications
(OpenDocument) Version 1.2]]. (OpenDocument) Version 1.2]].
[fn:130] See [[http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl][MathToWeb]]. [fn:131] See [[http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl][MathToWeb]].
[fn:131] See [[http://dlmf.nist.gov/LaTeXML/]]. [fn:132] See [[http://dlmf.nist.gov/LaTeXML/]].
[fn:132] [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][OpenDocument-v1.2 Specification]] [fn:133] [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][OpenDocument-v1.2 Specification]]
[fn:133] See the =<table:table-template>= element of the [fn:134] See the =<table:table-template>= element of the
OpenDocument-v1.2 specification. OpenDocument-v1.2 specification.
[fn:134] See the attributes =table:template-name=, [fn:135] See the attributes =table:template-name=,
=table:use-first-row-styles=, =table:use-last-row-styles=, =table:use-first-row-styles=, =table:use-last-row-styles=,
=table:use-first-column-styles=, =table:use-last-column-styles=, =table:use-first-column-styles=, =table:use-last-column-styles=,
=table:use-banding-rows-styles=, and =table:use-banding-column-styles= =table:use-banding-rows-styles=, and =table:use-banding-column-styles=
of the =<table:table>= element in the OpenDocument-v1.2 specification. of the =<table:table>= element in the OpenDocument-v1.2 specification.
[fn:135] If the publishing directory is the same as the source [fn:136] If the publishing directory is the same as the source
directory, =file.org= is exported as =file.org.org=, so you probably directory, =file.org= is exported as =file.org.org=, so you probably
do not want to do this. do not want to do this.
[fn:136] The option ~org-babel-no-eval-on-ctrl-c-ctrl-c~ can be used [fn:137] The option ~org-babel-no-eval-on-ctrl-c-ctrl-c~ can be used
to remove code evaluation from the {{{kbd(C-c C-c)}}} key binding. to remove code evaluation from the {{{kbd(C-c C-c)}}} key binding.
[fn:137] Actually, the constructs =call_<name>()= and =src_<lang>{}= [fn:138] Actually, the constructs =call_<name>()= and =src_<lang>{}=
are not evaluated when they appear in a keyword (see [[*Summary of are not evaluated when they appear in a keyword (see [[*Summary of
In-Buffer Settings]]). In-Buffer Settings]]).
[fn:138] Due to the way this header argument is implemented, it [fn:139] Due to the way this header argument is implemented, it
implies ":results file". Therefore if it is set for multiple blocks implies ":results file". Therefore if it is set for multiple blocks
at once (by a subtree or buffer property for example), all blocks are at once (by a subtree or buffer property for example), all blocks are
forced to produce file results. This is seldom desired behavior, so forced to produce file results. This is seldom desired behavior, so
@ -21412,59 +21433,59 @@ it is recommended to set this header only on a per-block basis. It is
possible that this aspect of the implementation might change in the possible that this aspect of the implementation might change in the
future. future.
[fn:139] C++ language is handled in =ob-C.el=. Even though the [fn:140] C++ language is handled in =ob-C.el=. Even though the
identifier for such source blocks is =C++=, you activate it by loading identifier for such source blocks is =C++=, you activate it by loading
the C language. the C language.
[fn:140] D language is handled in =ob-C.el=. Even though the [fn:141] D language is handled in =ob-C.el=. Even though the
identifier for such source blocks is =D=, you activate it by loading identifier for such source blocks is =D=, you activate it by loading
the C language. the C language.
[fn:141] For Noweb literate programming details, see [fn:142] For Noweb literate programming details, see
http://www.cs.tufts.edu/~nr/noweb/. http://www.cs.tufts.edu/~nr/noweb/.
[fn:142] For more information, please refer to the commentary section [fn:143] For more information, please refer to the commentary section
in =org-tempo.el=. in =org-tempo.el=.
[fn:143] Note that ~org-indent-mode~ also sets the ~wrap-prefix~ [fn:144] Note that ~org-indent-mode~ also sets the ~wrap-prefix~
property, such that ~visual-line-mode~ (or purely setting ~word-wrap~) property, such that ~visual-line-mode~ (or purely setting ~word-wrap~)
wraps long lines (including headlines) correctly indented. wraps long lines (including headlines) correctly indented.
[fn:144] The ~org-indent-mode~ also sets the ~wrap-prefix~ correctly [fn:145] The ~org-indent-mode~ also sets the ~wrap-prefix~ correctly
for indenting and wrapping long lines of headlines or text. This for indenting and wrapping long lines of headlines or text. This
minor mode handles ~visual-line-mode~ and directly applied settings minor mode handles ~visual-line-mode~ and directly applied settings
through ~word-wrap~. through ~word-wrap~.
[fn:145] Also see the variable ~org-adapt-indentation~. [fn:146] Also see the variable ~org-adapt-indentation~.
[fn:146] Because =LEVEL=2= has 3 stars, =LEVEL=3= has 4 stars, and so [fn:147] Because =LEVEL=2= has 3 stars, =LEVEL=3= has 4 stars, and so
on. on.
[fn:147] For a server to host files, consider using a WebDAV server, [fn:148] For a server to host files, consider using a WebDAV server,
such as [[https://nextcloud.com][Nextcloud]]. Additional help is at this [[https://orgmode.org/worg/org-faq.html#mobileorg_webdav][FAQ entry]]. such as [[https://nextcloud.com][Nextcloud]]. Additional help is at this [[https://orgmode.org/worg/org-faq.html#mobileorg_webdav][FAQ entry]].
[fn:148] If Emacs is configured for safe storing of passwords, then [fn:149] If Emacs is configured for safe storing of passwords, then
configure the variable ~org-mobile-encryption-password~; please read configure the variable ~org-mobile-encryption-password~; please read
the docstring of that variable. the docstring of that variable.
[fn:149] Symbolic links in ~org-directory~ need to have the same name [fn:150] Symbolic links in ~org-directory~ need to have the same name
as their targets. as their targets.
[fn:150] While creating the agendas, Org mode forces ID properties on [fn:151] While creating the agendas, Org mode forces ID properties on
all referenced entries, so that these entries can be uniquely all referenced entries, so that these entries can be uniquely
identified if Org Mobile flags them for further action. To avoid identified if Org Mobile flags them for further action. To avoid
setting properties configure the variable setting properties configure the variable
~org-mobile-force-id-on-agenda-items~ to ~nil~. Org mode then relies ~org-mobile-force-id-on-agenda-items~ to ~nil~. Org mode then relies
on outline paths, assuming they are unique. on outline paths, assuming they are unique.
[fn:151] Checksums are stored automatically in the file [fn:152] Checksums are stored automatically in the file
=checksums.dat=. =checksums.dat=.
[fn:152] The file will be empty after this operation. [fn:153] The file will be empty after this operation.
[fn:153] https://www.ctan.org/pkg/comment [fn:154] https://www.ctan.org/pkg/comment
[fn:154] If the =TBLFM= keyword contains an odd number of dollar [fn:155] If the =TBLFM= keyword contains an odd number of dollar
characters, this may cause problems with Font Lock in LaTeX mode. As characters, this may cause problems with Font Lock in LaTeX mode. As
shown in the example you can fix this by adding an extra line inside shown in the example you can fix this by adding an extra line inside
the =comment= environment that is used to balance the dollar the =comment= environment that is used to balance the dollar
@ -21472,9 +21493,9 @@ expressions. If you are using AUCTeX with the font-latex library,
a much better solution is to add the =comment= environment to the a much better solution is to add the =comment= environment to the
variable ~LaTeX-verbatim-environments~. variable ~LaTeX-verbatim-environments~.
[fn:155] The ~agenda*~ view is the same as ~agenda~ except that it [fn:156] The ~agenda*~ view is the same as ~agenda~ except that it
only considers /appointments/, i.e., scheduled and deadline items that only considers /appointments/, i.e., scheduled and deadline items that
have a time specification =[h]h:mm= in their time-stamps. have a time specification =[h]h:mm= in their time-stamps.
[fn:156] Note that, for ~org-odd-levels-only~, a level number [fn:157] Note that, for ~org-odd-levels-only~, a level number
corresponds to order in the hierarchy, not to the number of stars. corresponds to order in the hierarchy, not to the number of stars.

View File

@ -1133,9 +1133,9 @@ may have been stored before."
(let ((origin (point))) (let ((origin (point)))
(unless (bolp) (insert "\n")) (unless (bolp) (insert "\n"))
(org-capture-empty-lines-before) (org-capture-empty-lines-before)
(org-capture-position-for-last-stored (point))
(let ((beg (point))) (let ((beg (point)))
(org-paste-subtree level template 'for-yank) (org-paste-subtree level template 'for-yank)
(org-capture-position-for-last-stored beg)
(let ((end (if (org-at-heading-p) (line-end-position 0) (point)))) (let ((end (if (org-at-heading-p) (line-end-position 0) (point))))
(org-capture-empty-lines-after) (org-capture-empty-lines-after)
(unless (org-at-heading-p) (outline-next-heading)) (unless (org-at-heading-p) (outline-next-heading))

View File

@ -917,39 +917,42 @@ If necessary, clock-out of the currently active clock."
(defvar org-clock-resolving-clocks nil) (defvar org-clock-resolving-clocks nil)
(defvar org-clock-resolving-clocks-due-to-idleness nil) (defvar org-clock-resolving-clocks-due-to-idleness nil)
(defun org-clock-resolve-clock (clock resolve-to clock-out-time (defun org-clock-resolve-clock
&optional close-p restart-p fail-quietly) (clock resolve-to clock-out-time close restart fail-quietly)
"Resolve `CLOCK' given the time `RESOLVE-TO', and the present. "Resolve CLOCK given the time RESOLVE-TO, and the present.
`CLOCK' is a cons cell of the form (MARKER START-TIME)." CLOCK is a cons cell of the form (MARKER START-TIME)."
(let ((org-clock-resolving-clocks t)) (let ((org-clock-resolving-clocks t)
(cond ;; If the clocked entry contained only a clock and possibly
((null resolve-to) ;; the associated drawer, and we either cancel it or clock it
(org-clock-clock-cancel clock) ;; out, `org-clock-out-remove-zero-time-clocks' may clear all
(if (and restart-p (not org-clock-clocking-in)) ;; contents, and leave point on the /next/ headline. We store
(org-clock-clock-in clock))) ;; the current entry location to be able to get back here when
;; we need to clock in again the previously clocked task.
((eq resolve-to 'now) (heading (org-with-point-at (car clock) (org-back-to-heading t))))
(if restart-p (pcase resolve-to
(error "RESTART-P is not valid here")) (`nil
(if (or close-p org-clock-clocking-in) (org-clock-clock-cancel clock)
(org-clock-clock-out clock fail-quietly) (when (and restart (not org-clock-clocking-in))
(unless (org-is-active-clock clock) (org-with-point-at heading (org-clock-in))))
(org-clock-clock-in clock t)))) (`now
(cond
((not (time-less-p resolve-to (current-time))) (restart (error "RESTART is not valid here"))
(error "RESOLVE-TO must refer to a time in the past")) ((or close org-clock-clocking-in)
(org-clock-clock-out clock fail-quietly))
(t ((org-is-active-clock clock) nil)
(if restart-p (t (org-clock-clock-in clock t))))
(error "RESTART-P is not valid here")) ((pred (time-less-p (current-time)))
(org-clock-clock-out clock fail-quietly (or clock-out-time (error "RESOLVE-TO must refer to a time in the past"))
resolve-to)) (_
(unless org-clock-clocking-in (when restart (error "RESTART is not valid here"))
(if close-p (org-clock-clock-out clock fail-quietly (or clock-out-time resolve-to))
(setq org-clock-leftover-time (and (null clock-out-time) (cond
resolve-to)) (org-clock-clocking-in nil)
(org-clock-clock-in clock nil (and clock-out-time (close
resolve-to)))))))) (setq org-clock-leftover-time (and (null clock-out-time) resolve-to)))
(t
(org-with-point-at heading
(org-clock-in nil (and clock-out-time resolve-to)))))))))
(defun org-clock-jump-to-current-clock (&optional effective-clock) (defun org-clock-jump-to-current-clock (&optional effective-clock)
"When an Org clock is running, jump to it." "When an Org clock is running, jump to it."

View File

@ -206,7 +206,19 @@
(goto-char (point-max)) (goto-char (point-max))
(insert "Capture text") (insert "Capture text")
(org-capture-finalize)) (org-capture-finalize))
(buffer-string))))) (buffer-string))))
;; Correctly save position of inserted entry.
(should
(equal
"** H"
(org-test-with-temp-text-in-file "* A"
(let* ((file (buffer-file-name))
(org-capture-templates
`(("t" "Test" entry (file+headline ,file "A") "** H\nFoo"
:immediate-finish t))))
(org-capture nil "t")
(org-capture '(16))
(buffer-substring (point) (line-end-position)))))))
(ert-deftest test-org-capture/item () (ert-deftest test-org-capture/item ()
"Test `item' type in capture template." "Test `item' type in capture template."