summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2019-12-29 10:52:52 -0500
committerKyle Meyer <kyle@kyleam.com>2019-12-29 10:52:52 -0500
commit84f72ac69d19122bce566a395c5cf3032f496d45 (patch)
tree4ae8f9256175223b4391de1e3a76be24c6fcb46f
parentba228ee82e017c9339a8b15703df632ee30df655 (diff)
parent747c6a8b55df6936d25b35fd87be4e838efd4ed4 (diff)
downloadorg-mode-84f72ac69d19122bce566a395c5cf3032f496d45.tar.gz
Merge tag 'release_9.3.1' into emacs-sync
Org-Mode 9.3.1 # gpg: Signature made Thu 26 Dec 2019 01:16:41 PM EST # gpg: using RSA key 1BE15A5D08A9D5959581476B1437AC02F73F91A2 # gpg: Can't check signature: No public key
-rw-r--r--contrib/lisp/org-screen.el2
-rw-r--r--doc/org-manual.org496
-rw-r--r--etc/ORG-NEWS26
-rw-r--r--lisp/ob-eshell.el7
-rw-r--r--lisp/ob-plantuml.el9
-rw-r--r--lisp/ol.el43
-rw-r--r--lisp/org-agenda.el5
-rw-r--r--lisp/org-attach.el4
-rw-r--r--lisp/org-capture.el28
-rw-r--r--lisp/org-keys.el6
-rw-r--r--lisp/org-list.el1
-rw-r--r--lisp/org-table.el4
-rw-r--r--lisp/org.el58
-rw-r--r--lisp/ox-html.el17
-rw-r--r--lisp/ox-latex.el3
-rw-r--r--lisp/ox-odt.el2
-rw-r--r--lisp/ox.el2
-rw-r--r--mk/server.mk2
-rw-r--r--testing/lisp/test-ob-python.el83
-rw-r--r--testing/lisp/test-ol.el55
-rw-r--r--testing/lisp/test-org-clock.el184
-rw-r--r--testing/lisp/test-org.el4
-rw-r--r--testing/lisp/test-ox.el2
23 files changed, 521 insertions, 522 deletions
diff --git a/contrib/lisp/org-screen.el b/contrib/lisp/org-screen.el
index 6b870f2..948e93a 100644
--- a/contrib/lisp/org-screen.el
+++ b/contrib/lisp/org-screen.el
@@ -64,7 +64,7 @@
(interactive "MScreen name: ")
(save-excursion
(org-screen-helper name "-S"))
- (insert-string (concat "[[screen:" name "]]")))
+ (insert (concat "[[screen:" name "]]")))
(defun org-screen-buffer-name (name)
"Returns the buffer name corresponding to the screen name given."
diff --git a/doc/org-manual.org b/doc/org-manual.org
index 6476126..db38310 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -45,7 +45,7 @@ Markdown. New export backends can be derived from existing ones, or
defined from scratch.
Org files can include source code blocks, which makes Org uniquely
-suited for authoring technical documents with code examples. Org
+suited for authoring technical documents with code examples. Org
source code blocks are fully functional; they can be evaluated in
place and their results can be captured in the file. This makes it
possible to create a single file reproducible research compendium.
@@ -1040,7 +1040,7 @@ My favorite scenes are (in this order)
But in the end, no individual scenes matter but the film as a whole.
Important actors in this film are:
- Elijah Wood :: He plays Frodo
-- Sean Astin :: He plays Sam, Frodo's friend. I still remember him
+- Sean Astin :: He plays Sam, Frodo's friend. I still remember him
very well from his role as Mikey Walsh in /The Goonies/.
#+end_example
@@ -1290,7 +1290,7 @@ Org makes it easy to format tables in plain ASCII. Any line with =|=
as the first non-whitespace character is considered part of a table.
=|= is also the column separator[fn:17]. Moreover, a line starting
with =|-= is a horizontal rule. It separates rows explicitly. Rows
-before the first horizontal rule are header lines. A table might look
+before the first horizontal rule are header lines. A table might look
like this:
#+begin_example
@@ -1676,12 +1676,12 @@ several columns or display them with a fixed width, regardless of
content, as shown in the following example.
#+begin_example
-|---+---------------------+--------| |---+-------…|…|
+|---+---------------------+--------| |---+-------…+…|
| | <6> | | | | <6> …|…|
| 1 | one | some | ----\ | 1 | one …|…|
| 2 | two | boring | ----/ | 2 | two …|…|
| 3 | This is a long text | column | | 3 | This i…|…|
-|---+---------------------+--------| |---+-------…|…|
+|---+---------------------+--------| |---+-------…+…|
#+end_example
To set the width of a column, one field anywhere in the column may
@@ -1937,7 +1937,7 @@ and ~org-table-current-column~. Examples:
Copy text or values of each row of column 1 of the table named
{{{var(FOO)}}} into column 2 of the current table.
-- =@3 = 2 * remote(FOO, @@1$$#)= ::
+- =@3 = 2 * remote(FOO, @1$$#)= ::
Insert the doubled value of each column of row 1 of the table
named {{{var(FOO)}}} into row 3 of the current table.
@@ -2940,23 +2940,21 @@ or alternatively
#+cindex: escape syntax, for links
#+cindex: backslashes, in links
-Some =\= and =]= characters in the {{{var(LINK)}}} part need to be
-"escaped", i.e., preceded by another =\= character. More
-specifically, the following character categories, and only them, must
-be escaped, in order:
+Some =\=, =[= and =]= characters in the {{{var(LINK)}}} part need to
+be "escaped", i.e., preceded by another =\= character. More
+specifically, the following characters, and only them, must be
+escaped:
-1. all consecutive =\= characters at the end of the link,
-2. any =]= character at the very end of the link,
-3. all consecutive =\= characters preceding =][= or =]]= patterns,
-4. any =]= character followed by either =[= or =]=.
+1. all =[= and =]= characters,
+2. every =\= character preceding either =]= or =[=,
+3. every =\= character at the end of the link.
#+findex: org-link-escape
-Org takes for granted that such links are correctly escaped.
-Functions inserting links (see [[*Handling Links]]) take care of this.
-You only need to bother about those rules when inserting directly, or
-yanking, a URI within square brackets. When in doubt, you may use the
-function ~org-link-escape~, which turns a link string into its
-properly escaped form.
+Functions inserting links (see [[*Handling Links]]) properly escape
+ambiguous characters. You only need to bother about the rules above
+when inserting directly, or yanking, a URI within square brackets.
+When in doubt, you may use the function ~org-link-escape~, which turns
+a link string into its escaped form.
Once a link in the buffer is complete, with all brackets present, Org
changes the display so that =DESCRIPTION= is displayed instead of
@@ -2984,29 +2982,29 @@ Literal links.
:END:
#+cindex: internal links
#+cindex: links, internal
-#+cindex: targets, for links
-#+cindex: @samp{CUSTOM_ID}, property
-If the link does not look like a URL, it is considered to be internal
-in the current file. The most important case is a link like
-=[[#my-custom-id]]= which links to the entry with the =CUSTOM_ID= property
-=my-custom-id=. You are responsible yourself to make sure these
-custom IDs are unique in a file.
+A link that does not look like a URL---i.e., does not start with
+a known scheme or a file name---refers to the current document. You
+can follow it with {{{kbd(C-c C-o)}}} when point is on the link, or
+with a mouse click (see [[*Handling Links]]).
-Links such as =[[My Target]]= or =[[My Target][Find my target]]= lead to a text search in
-the current file.
+#+cindex: @samp{CUSTOM_ID}, property
+Org provides several refinements to internal navigation within
+a document. Most notably, a construct like =[[#my-custom-id]]=
+specifically targets the entry with the =CUSTOM_ID= property set to
+=my-custom-id=. Also, an internal link looking like =[[*Some
+section]]= points to a headline with the name =Some section=[fn:25].
-The link can be followed with {{{kbd(C-c C-o)}}} when point is on
-the link, or with a mouse click (see [[*Handling Links]]). Links to
-custom IDs point to the corresponding headline. The preferred match
-for a text link is a /dedicated target/: the same string in double
-angular brackets, like =<<My Target>>=.
+#+cindex: targets, for links
+When the link does not belong to any of the cases above, Org looks for
+a /dedicated target/: the same string in double angular brackets, like
+=<<My Target>>=.
#+cindex: @samp{NAME}, keyword
If no dedicated target exists, the link tries to match the exact name
-of an element within the buffer. Naming is done with the =NAME=
-keyword, which has to be put in the line before the element it refers
-to, as in the following example
+of an element within the buffer. Naming is done, unsurprisingly, with
+the =NAME= keyword, which has to be put in the line before the element
+it refers to, as in the following example
#+begin_example
,#+NAME: My Target
@@ -3015,9 +3013,15 @@ to, as in the following example
| of | four cells |
#+end_example
-If none of the above succeeds, Org searches for a headline that is
-exactly the link text but may also include a TODO keyword and
-tags[fn:25].
+#+vindex: org-link-search-must-match-exact-headline
+Ultimately, if none of the above succeeds, Org searches for a headline
+that is exactly the link text but may also include a TODO keyword and
+tags, or initiates a plain text search, according to the value of
+~org-link-search-must-match-exact-headline~.
+
+Note that you must make sure custom IDs, dedicated targets, and names
+are unique throughout the document. Org provides a linter to assist
+you in the process, if needed. See [[*Org Syntax]].
During export, internal links are used to mark objects and assign them
a number. Marked objects are then referenced by links pointing to
@@ -3176,7 +3180,7 @@ options:
| | =/ssh:me@some.where:papers/last.pdf= (same as above) |
| | =file:sometextfile::NNN= (jump to line number) |
| | =file:projects.org= |
-| | =file:projects.org::some words= (text search) [fn:27] |
+| | =file:projects.org::some words= (text search)[fn:27] |
| | =file:projects.org::*task title= (headline search) |
| | =file:projects.org::#custom-id= (headline search) |
| attachment | =attachment:projects.org= |
@@ -3303,7 +3307,7 @@ current buffer:
For any other file, the link points to the file, with a search
string (see [[*Search Options in File Links]]) pointing to the contents
of the current line. If there is an active region, the selected
- words form the basis of the search string. You can write custom Lisp
+ words form the basis of the search string. You can write custom Lisp
functions to select the search string and perform the search for
particular file types (see [[*Custom Searches]]).
@@ -7417,7 +7421,7 @@ going through the interactive template selection, you can create your
key binding like this:
#+begin_src emacs-lisp
-(define-key global-map "\C-cx"
+(define-key global-map (kbd "C-c x")
(lambda () (interactive) (org-capture nil "x")))
#+end_src
@@ -7540,9 +7544,12 @@ Now lets look at the elements of a template definition. Each entry in
The template for creating the capture item. If you leave this
empty, an appropriate default template will be used. Otherwise this
is a string with escape codes, which will be replaced depending on
- time and context of the capture call. The string with escapes may
- be loaded from a template file, using the special syntax =(file
- "template filename")=. See below for more details.
+ time and context of the capture call. You may also get this
+ template string from a file[fn:85], or dynamically, from a function
+ using either syntax:
+
+ : (file "/path/to/template-file")
+ : (function FUNCTION-RETURNING-THE-TEMPLATE)
- properties ::
@@ -7622,7 +7629,7 @@ Now lets look at the elements of a template definition. Each entry in
:DESCRIPTION: Filling in information about time and context.
:END:
-In the template itself, special "%-escapes"[fn:85] allow dynamic
+In the template itself, special "%-escapes"[fn:86] allow dynamic
insertion of content. The templates are expanded in the order given
here:
@@ -7749,7 +7756,7 @@ here:
After completing the template, position point here.
#+vindex: org-store-link-props
-For specific link types, the following keywords are defined[fn:86]:
+For specific link types, the following keywords are defined[fn:87]:
#+vindex: org-link-from-user-regexp
| Link type | Available keywords |
@@ -7762,7 +7769,7 @@ For specific link types, the following keywords are defined[fn:86]:
| | =%:date= (message date header field) |
| | =%:date-timestamp= (date as active timestamp) |
| | =%:date-timestamp-inactive= (date as inactive timestamp) |
-| | =%:fromto= (either "to NAME" or "from NAME")[fn:87] |
+| | =%:fromto= (either "to NAME" or "from NAME")[fn:88] |
| gnus | =%:group=, for messages also all email fields |
| w3, w3m | =%:url= |
| info | =%:file=, =%:node= |
@@ -7820,7 +7827,7 @@ By default, org-attach will use ID properties when adding attachments
to outline nodes. This makes working with attachments fully
automated. There is no decision needed for folder-name or location.
ID-based directories are by default located in the =data/= directory,
-which lives in the same directory where your Org file lives[fn:88].
+which lives in the same directory where your Org file lives[fn:89].
For more control over the setup, see [[*Attachment options]].
When attachments are made using ~org-attach~ a default tag =ATTACH= is
@@ -7955,7 +7962,7 @@ mentioning.
parents according to ~org-use-property-inheritance~. If one instead
want to set inheritance specifically for org-attach that can be done
using ~org-attach-use-inheritance~. Inheriting documents through
- the node hierarchy makes a lot of sense in most cases. Especially
+ the node hierarchy makes a lot of sense in most cases. Especially
since the introduction of [[* Attachment links]]. The following example
shows one use case for attachment inheritance:
@@ -7977,14 +7984,14 @@ mentioning.
Inheritance works the same way for both =ID= and =DIR= property. If
both properties are defined on the same headline then =DIR= takes
- precedance. This is also true if inheritance is enabled. If =DIR=
+ precedence. This is also true if inheritance is enabled. If =DIR=
is inherited from a parent node in the outline, that property still
takes precedence over an =ID= property defined on the node itself.
- ~org-attach-method~ ::
#+vindex: org-attach-method
When attaching files using the dispatcher {{{kbd(C-c C-a)}}} it
- defaults to copying files. The behaviour can be changed by
+ defaults to copying files. The behavior can be changed by
customizing ~org-attach-method~. Options are Copy, Move/Rename,
Hard link or Symbolic link.
@@ -8199,12 +8206,12 @@ the window configuration is restored when the agenda exits:
#+vindex: org-agenda-files
The information to be shown is normally collected from all /agenda
-files/, the files listed in the variable ~org-agenda-files~[fn:89].
+files/, the files listed in the variable ~org-agenda-files~[fn:90].
If a directory is part of this list, all files with the extension
=.org= in this directory are part of the list.
Thus, even if you only work with a single Org file, that file should
-be put into the list[fn:90]. You can customize ~org-agenda-files~,
+be put into the list[fn:91]. You can customize ~org-agenda-files~,
but the easiest way to maintain it is through the following commands
#+attr_texinfo: :sep and
@@ -8337,7 +8344,7 @@ commands:
- {{{kbd(<)}}} ::
#+kindex: < @r{(Agenda dispatcher)}
- Restrict an agenda command to the current buffer[fn:91]. If
+ Restrict an agenda command to the current buffer[fn:92]. If
narrowing is in effect restrict to the narrowed part of the buffer.
After pressing {{{kbd(<)}}}, you still need to press the character
selecting the command.
@@ -8347,7 +8354,7 @@ commands:
#+kindex: < < @r{(Agenda dispatcher)}
If there is an active region, restrict the following agenda command
to the region. Otherwise, restrict it to the current
- subtree[fn:92]. After pressing {{{kbd(< <)}}}, you still need to
+ subtree[fn:93]. After pressing {{{kbd(< <)}}}, you still need to
press the character selecting the command.
- {{{kbd(*)}}} ::
@@ -8397,7 +8404,7 @@ a paper agenda, showing all the tasks for the current week or day.
#+cindex: org-agenda, command
Compile an agenda for the current week from a list of Org files.
The agenda shows the entries for each day. With a numeric prefix
- argument[fn:93]---like {{{kbd(C-u 2 1 M-x org-agenda a)}}}---you may
+ argument[fn:94]---like {{{kbd(C-u 2 1 M-x org-agenda a)}}}---you may
set the number of days to be displayed.
#+vindex: org-agenda-span
@@ -8456,7 +8463,7 @@ move the entries into an Org file. Org mode evaluates diary-style
expression entries, and does it faster because there is no overhead
for first creating the diary display. Note that the expression
entries must start at the left margin, no whitespace is allowed before
-them, as seen in the following segment of an Org file:[fn:94]
+them, as seen in the following segment of an Org file:[fn:95]
#+begin_example
,* Holidays
@@ -8958,7 +8965,7 @@ Time ranges can be specified with two timestamps:
#+vindex: org-agenda-search-headline-for-time
In the headline of the entry itself, a time(range)---like =12:45= or
-a =8:30-1pm=---may also appear as plain text[fn:95].
+a =8:30-1pm=---may also appear as plain text[fn:96].
If the agenda integrates the Emacs diary (see [[*Weekly/daily agenda]]),
time specifications in diary entries are recognized as well.
@@ -9048,7 +9055,7 @@ filters and limits allow to flexibly narrow down the list of agenda
entries.
/Filters/ only change the visibility of items, are very fast and are
-mostly used interactively[fn:96]. You can switch quickly between
+mostly used interactively[fn:97]. You can switch quickly between
different filters without having to recreate the agenda. /Limits/ on
the other hand take effect before the agenda buffer is populated, so
they are mostly useful when defined as local variables within custom
@@ -9099,7 +9106,7 @@ filter elements are accumulated.
#+findex: org-agenda-filter-by-regexp
Filter the agenda view by a regular expression: only show agenda
- entries matching the regular expression the user entered. To clear
+ entries matching the regular expression the user entered. To clear
the filter, call the command again by pressing {{{kbd(=)}}}.
- {{{kbd(_)}}} (~org-agenda-filter-by-effort~) ::
@@ -9140,21 +9147,19 @@ filter elements are accumulated.
described above. At the prompt, specify different filter elements
in a single string, with full completion support. For example,
- #+begin_example
- +work-John+<0:10-/plot/
- #+end_example
+ : +work-John+<0:10-/plot/
- selects entries with category `work' and effort estimates below 10
- minutes, and deselects entries with tag `John' or matching the
- regexp `plot'. `+' can be left out if that does not lead to
+ selects entries with category =work= and effort estimates below 10
+ minutes, and deselects entries with tag =John= or matching the
+ regexp =plot=. You can leave =+= out if that does not lead to
ambiguities. The sequence of elements is arbitrary. The filter
- syntax assumes that there is no overlap between categories and tags
- (tags will take priority). If you reply to the prompt with the
+ syntax assumes that there is no overlap between categories and tags.
+ Otherwise, tags take priority. If you reply to the prompt with the
empty string, all filtering is removed. If a filter is specified,
- it replaces all current filters. But if you call the command with a
- double prefix argument, or if you add an additional `+'
- (e.g. `++work') to the front of the string, the new filter elements
- are added to the active ones. A single prefix argument applies the
+ it replaces all current filters. But if you call the command with
+ a double prefix argument, or if you add an additional =+= (e.g.,
+ =++work=) to the front of the string, the new filter elements are
+ added to the active ones. A single prefix argument applies the
entire filter in a negative sense.
- {{{kbd(|)}}} (~org-agenda-filter-remove-all~) ::
@@ -9167,35 +9172,34 @@ filter elements are accumulated.
:END:
#+vindex: org-agenda-auto-exclude-function
-If the variable ~org-agenda-auto-exclude-function~ is set to a
-user-defined function, that function can select tags that should be
+If the variable ~org-agenda-auto-exclude-function~ is set to
+a user-defined function, that function can select tags that should be
used as a tag filter when requested. The function will be called with
-lower-case versions of all tags represented in the current view. The
-function should the return ="-tag"= if the filter should remove
+lower-case versions of all tags represented in the current view. The
+function should return ="-tag"= if the filter should remove
entries with that tag, ="+tag"= if only entries with this tag should
-be kept, or =nil= if that tag is irrelevant. For example, let's say
+be kept, or =nil= if that tag is irrelevant. For example, let's say
you use a =Net= tag to identify tasks which need network access, an
=Errand= tag for errands in town, and a =Call= tag for making phone
calls. You could auto-exclude these tags based on the availability of
the Internet, and outside of business hours, with something like this:
#+begin_src emacs-lisp
- (defun org-my-auto-exclude-fn (tag)
- (if (cond
- ((string= tag "net")
- (/= 0 (call-process "/sbin/ping" nil nil nil
- "-c1" "-q" "-t1" "mail.gnu.org")))
- ((member tag '("errand" "call"))
- (let ((hr (nth 2 (decode-time))))
- (or (< hr 8) (> hr 21)))))
- (concat "-" tag)))
-
- (setq org-agenda-auto-exclude-function 'org-my-auto-exclude-fn)
+(defun my-auto-exclude-fn (tag)
+ (when (cond ((string= tag "net")
+ (/= 0 (call-process "/sbin/ping" nil nil nil
+ "-c1" "-q" "-t1" "mail.gnu.org")))
+ ((member tag '("errand" "call"))
+ (let ((hr (nth 2 (decode-time))))
+ (or (< hr 8) (> hr 21)))))
+ (concat "-" tag)))
+
+(setq org-agenda-auto-exclude-function #'my-auto-exclude-fn)
#+end_src
-You can apply this self-adapting filter by using a double prefix
-argument to ~org-agenda-filter~, i.e. press {{{kbd(C-u C-u /)}}}, or
-by pressing {{{kbd(RET)}}} in ~org-agenda-filter-by-tag~.
+You can apply this self-adapting filter by using a triple prefix
+argument to ~org-agenda-filter~, i.e.\nbsp{}press {{{kbd(C-u C-u C-u /)}}},
+or by pressing {{{kbd(RET)}}} in ~org-agenda-filter-by-tag~.
**** Setting limits for the agenda
:PROPERTIES:
@@ -9516,7 +9520,7 @@ the other commands, point needs to be in the desired line.
variable ~org-agenda-start-with-clockreport-mode~. By using
a prefix argument when toggling this mode (i.e., {{{kbd(C-u R)}}}),
the clock table does not show contributions from entries that are
- hidden by agenda filtering[fn:97]. See also the variable
+ hidden by agenda filtering[fn:98]. See also the variable
~org-clock-report-include-clocking-task~.
- {{{kbd(v c)}}} ::
@@ -9633,7 +9637,7 @@ the other commands, point needs to be in the desired line.
#+kindex: t
#+findex: org-agenda-todo
Change the TODO state of the item, both in the agenda and in the
- original Org file. A prefix arg is passed through to the ~org-todo~
+ original Org file. A prefix arg is passed through to the ~org-todo~
command, so for example a {{{kbd(C-u)}}} prefix are will trigger
taking a note to document the state change.
@@ -9955,7 +9959,7 @@ the other commands, point needs to be in the desired line.
- {{{kbd(f)}}} ::
#+vindex: org-agenda-bulk-custom-functions
- Apply a function[fn:98] to marked entries. For example, the
+ Apply a function[fn:99] to marked entries. For example, the
function below sets the =CATEGORY= property of the entries to
=web=.
@@ -9995,7 +9999,7 @@ the other commands, point needs to be in the desired line.
#+cindex: diary entries, creating from agenda
Insert a new entry into the diary, using the date at point and (for
block entries) the date at the mark. This adds to the Emacs diary
- file[fn:99], in a way similar to the {{{kbd(i)}}} command in the
+ file[fn:100], in a way similar to the {{{kbd(i)}}} command in the
calendar. The diary file pops up in another window, where you can
add the entry.
@@ -10121,13 +10125,13 @@ after the dispatcher command in order to access the command. Usually
this is just a single character, but if you have many similar
commands, you can also define two-letter combinations where the first
character is the same in several combinations and serves as a prefix
-key[fn:100]. The second parameter is the search type, followed by the
+key[fn:101]. The second parameter is the search type, followed by the
string or regular expression to be used for the matching. The example
above will therefore define:
- {{{kbd(x)}}} ::
- as a global search for agenda entries planned[fn:101] this week/day.
+ as a global search for agenda entries planned[fn:102] this week/day.
- {{{kbd(y)}}} ::
@@ -10307,8 +10311,8 @@ See the docstring of the variable for more information.
If you are away from your computer, it can be very useful to have
a printed version of some agenda views to carry around. Org mode can
-export custom agenda views as plain text, HTML[fn:102], Postscript,
-PDF[fn:103], and iCalendar files. If you want to do this only
+export custom agenda views as plain text, HTML[fn:103], Postscript,
+PDF[fn:104], and iCalendar files. If you want to do this only
occasionally, use the following command:
- {{{kbd(C-x C-w)}}} (~org-agenda-write~) ::
@@ -10322,7 +10326,7 @@ occasionally, use the following command:
If you need to export certain agenda views frequently, you can
associate any custom agenda command with a list of output file
-names[fn:104]. Here is an example that first defines custom commands
+names[fn:105]. Here is an example that first defines custom commands
for the agenda and the global TODO list, together with a number of
files to which to export them. Then we define two block agenda
commands and specify file names for them as well. File names can be
@@ -10410,7 +10414,7 @@ emacs -eval (org-batch-store-agenda-views) -kill
#+end_src
#+texinfo: @noindent
-or, if you need to modify some parameters[fn:105]
+or, if you need to modify some parameters[fn:106]
#+begin_src shell
emacs -eval '(org-batch-store-agenda-views \
@@ -10654,7 +10658,7 @@ becomes =&nbsp;= in HTML and =~= in LaTeX.
#+cindex: special symbols, in-buffer display
If you would like to see entities displayed as UTF-8 characters, use
-the following command[fn:106]:
+the following command[fn:107]:
- {{{kbd(C-c C-x \)}}} (~org-toggle-pretty-entities~) ::
#+kindex: C-c C-x \
@@ -10668,7 +10672,7 @@ the following command[fn:106]:
#+cindex: dash, special symbol
#+cindex: ellipsis, special symbol
In addition to regular entities defined above, Org exports in
-a special way[fn:107] the following commonly used character
+a special way[fn:108] the following commonly used character
combinations: =\-= is treated as a shy hyphen, =--= and =---= are
converted into dashes, and =...= becomes a compact set of dots.
@@ -10681,7 +10685,7 @@ converted into dashes, and =...= becomes a compact set of dots.
Plain ASCII is normally sufficient for almost all note taking.
Exceptions include scientific notes, which often require mathematical
-symbols and the occasional formula. LaTeX[fn:108] is widely used to
+symbols and the occasional formula. LaTeX[fn:109] is widely used to
typeset scientific documents. Org mode supports embedding LaTeX code
into its files, because many academics are used to writing and reading
LaTeX source code, and because it can be readily processed to produce
@@ -10703,7 +10707,7 @@ into images (see [[*Previewing LaTeX fragments]]).
LaTeX fragments do not need any special marking at all. The following
snippets are identified as LaTeX source code:
-- Environments of any kind[fn:109]. The only requirement is that the
+- Environments of any kind[fn:110]. The only requirement is that the
=\begin= statement appears on a new line, preceded by only
whitespace.
@@ -10747,7 +10751,7 @@ lines:
#+vindex: org-preview-latex-default-process
If you have a working LaTeX installation and =dvipng=, =dvisvgm= or
-=convert= installed[fn:110], LaTeX fragments can be processed to
+=convert= installed[fn:111], LaTeX fragments can be processed to
produce images of the typeset expressions to be used for inclusion
while exporting to HTML (see [[*LaTeX fragments]]), or for inline
previewing within Org mode.
@@ -10818,7 +10822,7 @@ more details see the documentation of CDLaTeX mode):
#+kindex: TAB
The {{{kbd(TAB)}}} key expands the template if point is inside
- a LaTeX fragment[fn:111]. For example, {{{kbd(TAB)}}} expands =fr=
+ a LaTeX fragment[fn:112]. For example, {{{kbd(TAB)}}} expands =fr=
to =\frac{}{}= and position point correctly inside the first brace.
Another {{{kbd(TAB)}}} gets you into the second brace.
@@ -10901,9 +10905,9 @@ Here is an example
#+vindex: org-latex-listings
If the example is source code from a programming language, or any
other text that can be marked up by Font Lock in Emacs, you can ask
-for the example to look like the fontified Emacs buffer[fn:112]. This
+for the example to look like the fontified Emacs buffer[fn:113]. This
is done with the code block, where you also need to specify the name
-of the major mode that should be used to fontify the example[fn:113],
+of the major mode that should be used to fontify the example[fn:114],
see [[*Structure Templates]] for shortcuts to easily insert code blocks.
#+cindex: @samp{BEGIN_SRC}
@@ -10944,7 +10948,7 @@ In HTML, hovering the mouse over such a link remote-highlights the
corresponding code line, which is kind of cool.
You can also add a =-r= switch which /removes/ the labels from the
-source code[fn:114]. With the =-n= switch, links to these references
+source code[fn:115]. With the =-n= switch, links to these references
are labeled by the line numbers from the code listing. Otherwise
links use the labels with no parentheses. Here is an example:
@@ -10989,7 +10993,7 @@ a shortcut is provided (see [[*Structure Templates]]).
need to exit by pressing {{{kbd(C-c ')}}} again. The edited version
then replaces the old version in the Org buffer. Fixed-width
regions---where each line starts with a colon followed by
- a space---are edited using Artist mode[fn:115] to allow creating
+ a space---are edited using Artist mode[fn:116] to allow creating
ASCII drawings easily. Using this command in an empty line creates
a new fixed-width region.
@@ -11008,7 +11012,7 @@ the end of the current line. Then the label is stored as a link
#+cindex: inlining images
#+cindex: images, markup rules
-An image is a link to an image file[fn:116] that does not have
+An image is a link to an image file[fn:117] that does not have
a description part, for example
: ./img/cat.jpg
@@ -11036,7 +11040,7 @@ command:
a prefix argument, also display images that do have a link
description. You can ask for inline images to be displayed at
startup by configuring the variable
- ~org-startup-with-inline-images~[fn:117].
+ ~org-startup-with-inline-images~[fn:118].
** Captions
:PROPERTIES:
@@ -11128,7 +11132,7 @@ The following command handles footnotes:
#+vindex: org-footnote-define-inline
#+vindex: org-footnote-section
Otherwise, create a new footnote. Depending on the variable
- ~org-footnote-define-inline~[fn:118], the definition is placed right
+ ~org-footnote-define-inline~[fn:119], the definition is placed right
into the text as part of the reference, or separately into the
location determined by the variable ~org-footnote-section~.
@@ -11143,7 +11147,7 @@ The following command handles footnotes:
| {{{kbd(d)}}} | Delete the footnote at point, including definition and references. |
#+vindex: org-footnote-auto-adjust
- Depending on the variable ~org-footnote-auto-adjust~[fn:119],
+ Depending on the variable ~org-footnote-auto-adjust~[fn:120],
renumbering and sorting footnotes can be automatic after each
insertion or deletion.
@@ -11192,7 +11196,7 @@ back-ends:
- /man/ (Man page format)
Users can install libraries for additional formats from the Emacs
-packaging system. For easy discovery, these packages have a common
+packaging system. For easy discovery, these packages have a common
naming scheme: ~ox-NAME~, where {{{var(NAME)}}} is a format. For
example, ~ox-koma-letter~ for /koma-letter/ back-end. More libraries
can be found in the =contrib/= directory (see [[*Installation]]).
@@ -11333,7 +11337,7 @@ global variables, include:
#+cindex: @samp{DATE}, keyword
#+vindex: org-export-date-timestamp-format
- A date or a time-stamp[fn:120].
+ A date or a time-stamp[fn:121].
- =EMAIL= ::
@@ -11348,7 +11352,7 @@ global variables, include:
Language to use for translating certain strings
(~org-export-default-language~). With =#+LANGUAGE: fr=, for
example, Org translates =Table of contents= to the French =Table des
- matières=[fn:121].
+ matières=[fn:122].
- =SELECT_TAGS= ::
@@ -11625,7 +11629,7 @@ keyword:
#+cindex: excluding entries from table of contents
#+cindex: table of contents, exclude entries
Org includes both numbered and unnumbered headlines in the table of
-contents[fn:122]. If you need to exclude an unnumbered headline,
+contents[fn:123]. If you need to exclude an unnumbered headline,
along with all its children, set the =UNNUMBERED= property to =notoc=
value.
@@ -11744,7 +11748,7 @@ be omitted to use the obvious defaults.
| =#+INCLUDE: "~/.emacs" :lines "10-"= | Include lines from 10 to EOF |
Inclusions may specify a file-link to extract an object matched by
-~org-link-search~[fn:123] (see [[*Search Options in File Links]]). The
+~org-link-search~[fn:124] (see [[*Search Options in File Links]]). The
ranges for =:lines= keyword are relative to the requested element.
Therefore,
@@ -11784,7 +11788,7 @@ following syntax:
: #+MACRO: name replacement text; $1, $2 are arguments
#+texinfo: @noindent
-which can be referenced using ={{{name(arg1, arg2)}}}=[fn:124]. For
+which can be referenced using ={{{name(arg1, arg2)}}}=[fn:125]. For
example
#+begin_example
@@ -11903,7 +11907,7 @@ are not exported.
Finally, a =COMMENT= keyword at the beginning of an entry, but after
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
-is executed either[fn:125]. The command below helps changing the
+is executed either[fn:126]. The command below helps changing the
comment status of a headline.
- {{{kbd(C-c ;)}}} (~org-toggle-comment~) ::
@@ -12175,7 +12179,7 @@ should in principle be exportable as a Beamer presentation.
- Org exports a Beamer frame's objects as block environments. Org can
enforce wrapping in special block types when =BEAMER_ENV= property
- is set[fn:126]. For valid values see
+ is set[fn:127]. For valid values see
~org-beamer-environments-default~. To add more values, see
~org-beamer-environments-extra~.
#+vindex: org-beamer-environments-default
@@ -12760,7 +12764,7 @@ as-is.
#+vindex: org-html-mathjax-options~
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]],
-which should work out of the box with Org[fn:127][fn:128]. Some MathJax
+which should work out of the box with Org[fn:128][fn:129]. Some MathJax
display options can be configured via ~org-html-mathjax-options~, or
in the buffer. For example, with the following settings,
@@ -12772,7 +12776,7 @@ in the buffer. For example, with the following settings,
#+texinfo: @noindent
equation labels are displayed on the left margin and equations are
five em from the left margin. In addition, it loads the two MathJax
-extensions =cancel.js= and =noErrors.js=[fn:129].
+extensions =cancel.js= and =noErrors.js=[fn:130].
#+vindex: org-html-mathjax-template
See the docstring of ~org-html-mathjax-options~ for all supported
@@ -12835,7 +12839,7 @@ line.
#+vindex: org-export-html-todo-kwd-class-prefix
#+vindex: org-export-html-tag-class-prefix
You can modify the CSS style definitions for the exported file. The
-HTML exporter assigns the following special CSS classes[fn:130] to
+HTML exporter assigns the following special CSS classes[fn:131] to
appropriate parts of the document---your style specifications may
change these, in addition to any of the standard classes like for
headlines, tables, etc.
@@ -13074,7 +13078,7 @@ LaTeX export back-end finds the compiler version to use from
Org file. See the docstring for the
~org-latex-default-packages-alist~ for loading packages with certain
compilers. Also see ~org-latex-bibtex-compiler~ to set the
-bibliography compiler[fn:131].
+bibliography compiler[fn:132].
*** LaTeX specific export settings
:PROPERTIES:
@@ -13696,7 +13700,7 @@ a limit to a level before the absolute limit (see [[*Export Settings]]).
The ODT export back-end handles creating of OpenDocument Text (ODT)
format. Documents created by this exporter use the
-{{{cite(OpenDocument-v1.2 specification)}}}[fn:132] and are compatible
+{{{cite(OpenDocument-v1.2 specification)}}}[fn:133] and are compatible
with LibreOffice 3.4.
*** Pre-requisites for ODT export
@@ -14097,7 +14101,7 @@ document in one of the following ways:
variables ~org-latex-to-mathml-convert-command~ and
~org-latex-to-mathml-jar-file~.
- If you prefer to use MathToWeb[fn:133] as your converter, you can
+ If you prefer to use MathToWeb[fn:134] as your converter, you can
configure the above variables as shown below.
#+begin_src emacs-lisp
@@ -14108,7 +14112,7 @@ document in one of the following ways:
#+end_src
#+texinfo: @noindent
- or, to use LaTeX​ML[fn:134] instead,
+ or, to use LaTeX​ML[fn:135] instead,
#+begin_src emacs-lisp
(setq org-latex-to-mathml-convert-command
@@ -14427,7 +14431,7 @@ with the =#+ATTR_ODT= line. For a discussion on default formatting of
tables, see [[*Tables in ODT export]].
This feature closely mimics the way table templates are defined in the
-OpenDocument-v1.2 specification[fn:135].
+OpenDocument-v1.2 specification[fn:136].
#+vindex: org-odt-table-styles
For quick preview of this feature, install the settings below and export the
@@ -14461,7 +14465,7 @@ templates, define new styles there.
To use this feature proceed as follows:
-1. Create a table template[fn:136].
+1. Create a table template[fn:137].
A table template is set of =table-cell= and =paragraph= styles for
each of the following table cell categories:
@@ -14500,7 +14504,7 @@ To use this feature proceed as follows:
=</office:automatic-styles>= element of the content template file
(see [[x-orgodtcontenttemplate-xml][Factory styles]]).
-2. Define a table style[fn:137].
+2. Define a table style[fn:138].
#+vindex: org-odt-table-styles
To define a table style, create an entry for the style in the
@@ -15588,7 +15592,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
publishing directory. If you want a htmlized version of this file,
set the parameter ~:htmlized-source~ to ~t~. It produces
-=file.org.html= in the publishing directory[fn:138].
+=file.org.html= in the publishing directory[fn:139].
Other files like images only need to be copied to the publishing
destination; for this you can use ~org-publish-attachment~. For
@@ -16961,13 +16965,13 @@ See [[*Languages]] to enable other languages.
#+kindex: C-c C-v e
#+findex: org-babel-execute-src-block
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:139] calls the
+{{{kbd(C-c C-v e)}}} with the point on a code block[fn:140] calls the
~org-babel-execute-src-block~ function, which executes the code in the
block, collects the results, and inserts them in the buffer.
#+cindex: @samp{CALL}, keyword
#+vindex: org-babel-inline-result-wrap
-By calling a named code block[fn:140] from an Org mode buffer or
+By calling a named code block[fn:141] from an Org mode buffer or
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]]).
@@ -16994,7 +16998,7 @@ variable ~org-babel-inline-result-wrap~, which by default is set to
This is the name of the code block (see [[*Structure of Code Blocks]])
to be evaluated in the current document. If the block is located in
another file, start =<name>= with the file name followed by
- a colon. For example, in order to execute a block named =clear-data=
+ a colon. For example, in order to execute a block named =clear-data=
in =file.org=, you can write the following:
: #+CALL: file.org:clear-data()
@@ -17179,7 +17183,7 @@ they are mutually exclusive.
When evaluating the code block in a session (see [[*Environment of
a Code Block]]), Org passes the code to an interpreter running as an
- interactive Emacs inferior process. Org gets the value from the
+ interactive Emacs inferior process. Org gets the value from the
source code interpreter's last statement output. Org has to use
language-specific methods to obtain the value. For example, from
the variable ~_~ in Python and Ruby, and the value of ~.Last.value~
@@ -17768,10 +17772,10 @@ Code blocks in the following languages are supported.
| Asymptote | =asymptote= | Lisp | =lisp= |
| Awk | =awk= | Lua | =lua= |
| C | =C= | MATLAB | =matlab= |
-| C++ | =C++=[fn:141] | Mscgen | =mscgen= |
+| C++ | =C++=[fn:142] | Mscgen | =mscgen= |
| Clojure | =clojure= | Objective Caml | =ocaml= |
| CSS | =css= | Octave | =octave= |
-| D | =D=[fn:142] | Org mode | =org= |
+| D | =D=[fn:143] | Org mode | =org= |
| ditaa | =ditaa= | Oz | =oz= |
| Emacs Calc | =calc= | Perl | =perl= |
| Emacs Lisp | =emacs-lisp= | Plantuml | =plantuml= |
@@ -17900,7 +17904,7 @@ for Python and Emacs Lisp languages.
#+cindex: syntax, Noweb
#+cindex: source code, Noweb reference
-Org supports named blocks in Noweb[fn:143] style syntax:
+Org supports named blocks in Noweb[fn:144] style syntax:
: <<CODE-BLOCK-ID>>
@@ -18396,7 +18400,7 @@ Org Tempo expands snippets to structures defined in
~org-structure-template-alist~ and ~org-tempo-keywords-alist~. For
example, {{{kbd(< s TAB)}}} creates a code block. Enable it by
customizing ~org-modules~ or add =(require 'org-tempo)= to your Emacs
-init file[fn:144].
+init file[fn:145].
#+attr_texinfo: :columns 0.1 0.9
| {{{kbd(a)}}} | =#+BEGIN_EXPORT ascii= ... =#+END_EXPORT= |
@@ -18476,13 +18480,13 @@ in the desired amount with hard spaces and hiding leading stars.
To display the buffer in the indented view, activate Org Indent minor
mode, using {{{kbd(M-x org-indent-mode)}}}. Text lines that are not
headlines are prefixed with virtual spaces to vertically align with
-the headline text[fn:145].
+the headline text[fn:146].
#+vindex: org-indent-indentation-per-level
To make more horizontal space, the headlines are shifted by two
characters. Configure ~org-indent-indentation-per-level~ variable for
a different number. Only one star on each headline is visible, the
-rest are masked with the same font color as the background[fn:146].
+rest are masked with the same font color as the background[fn:147].
#+vindex: org-startup-indented
To globally turn on Org Indent mode for all files, customize the
@@ -18496,7 +18500,7 @@ use =STARTUP= keyword as follows:
It is possible to use hard spaces to achieve the indentation instead,
if the bare ASCII file should have the indented look also outside
-Emacs[fn:147]. With Org's support, you have to indent all lines to
+Emacs[fn:148]. With Org's support, you have to indent all lines to
line up with the outline headers. You would use these settings:
#+begin_src emacs-lisp
@@ -18735,7 +18739,7 @@ changes.
#+vindex: org-startup-indented
Dynamic virtual indentation is controlled by the variable
- ~org-startup-indented~[fn:148].
+ ~org-startup-indented~[fn:149].
| =indent= | Start with Org Indent mode turned on. |
| =noindent= | Start with Org Indent mode turned off. |
@@ -18931,10 +18935,11 @@ using it on a headline displays "Document Structure" section.
#+cindex: zero width space
You may sometimes want to write text that looks like Org syntax, but
should really read as plain text. Org may use a specific escape
-character in some situations, e.g., a backslash in macros (see [[*Macro
-Replacement]]) or a comma in source and example blocks (see [[*Literal
-Examples]]). In the general case, however, we suggest to use the zero
-width space. You can insert one with any of the following:
+character in some situations, i.e., a backslash in macros (see [[*Macro
+Replacement]]) and links (see [[*Link Format]]), or a comma in source and
+example blocks (see [[*Literal Examples]]). In the general case, however,
+we suggest to use the zero width space. You can insert one with any
+of the following:
: C-x 8 <RET> zero width space <RET>
: C-x 8 <RET> 200B <RET>
@@ -19364,8 +19369,8 @@ javascript:location.href='org-protocol://capture?template=x'+
#+vindex: org-protocol-default-template-key
The capture template to be used can be specified in the bookmark (like
-=X= above). If unspecified, the template key is set in the variable
-~org-protocol-default-template-key~. The following template
+=X= above). If unspecified, the template key is set in the variable
+~org-protocol-default-template-key~. The following template
placeholders are available:
#+begin_example
@@ -19543,7 +19548,7 @@ these variables.
#+vindex: org-mobile-directory
The mobile application needs access to a file directory on
-a server[fn:149] to interact with Emacs. Pass its location through
+a server[fn:150] to interact with Emacs. Pass its location through
the ~org-mobile-directory~ variable. If you can mount that directory
locally just set the variable to point to that directory:
@@ -19564,7 +19569,7 @@ With a public server, consider encrypting the files. Org also
requires OpenSSL installed on the local computer. To turn on
encryption, set the same password in the mobile application and in
Emacs. Set the password in the variable
-~org-mobile-use-encryption~[fn:150]. Note that even after the mobile
+~org-mobile-use-encryption~[fn:151]. Note that even after the mobile
application encrypts the file contents, the file name remains visible
on the file systems of the local computer, the server, and the mobile
device.
@@ -19580,15 +19585,15 @@ The command ~org-mobile-push~ copies files listed in
~org-mobile-files~ into the staging area. Files include agenda files
(as listed in ~org-agenda-files~). Customize ~org-mobile-files~ to
add other files. File names are staged with paths relative to
-~org-directory~, so all files should be inside this directory[fn:151].
+~org-directory~, so all files should be inside this directory[fn:152].
Push creates a special Org file =agendas.org= with custom agenda views
-defined by the user[fn:152].
+defined by the user[fn:153].
Finally, Org writes the file =index.org=, containing links to other
files. The mobile application reads this file first from the server
to determine what other files to download for agendas. For faster
-downloads, it is expected to only read files whose checksums[fn:153]
+downloads, it is expected to only read files whose checksums[fn:154]
have changed.
*** Pulling from the mobile application
@@ -19605,7 +19610,7 @@ data in an inbox file format, through the following steps:
1.
#+vindex: org-mobile-inbox-for-pull
- Org moves all entries found in =mobileorg.org=[fn:154] and appends
+ Org moves all entries found in =mobileorg.org=[fn:155] and appends
them to the file pointed to by the variable
~org-mobile-inbox-for-pull~. It should reside neither in the
staging area nor on the server. Each captured entry and each
@@ -19896,9 +19901,9 @@ of these strategies:
#+cindex: @LaTeX{}, and Orgtbl mode
To wrap a source table in LaTeX, use the =comment= environment
-provided by =comment.sty=[fn:155]. To activate it, put
+provided by =comment.sty=[fn:156]. To activate it, put
~\usepackage{comment}~ in the document header. Orgtbl mode inserts
-a radio table skeleton[fn:156] with the command {{{kbd(M-x
+a radio table skeleton[fn:157] with the command {{{kbd(M-x
orgtbl-insert-radio-table)}}}, which prompts for a table name. For
example, if =salesfigures= is the name, the template inserts:
@@ -19917,7 +19922,7 @@ The line =#+ORGTBL: SEND= tells Orgtbl mode to use the function
~orgtbl-to-latex~ to convert the table to LaTeX format, then insert
the table at the target (receive) location named =salesfigures=. Now
the table is ready for data entry. It can even use spreadsheet
-features[fn:157]:
+features[fn:158]:
#+begin_example
% BEGIN RECEIVE ORGTBL salesfigures
@@ -20089,11 +20094,11 @@ These commands update dynamic blocks:
Before updating a dynamic block, Org removes content between the
=BEGIN= and =END= markers. Org then reads the parameters on the
-=BEGIN= line for passing to the writer function as a plist. The
+=BEGIN= line for passing to the writer function as a plist. The
previous content of the dynamic block becomes erased from the buffer
and appended to the plist under ~:content~.
-The syntax for naming a writer function with a dynamic block labelled
+The syntax for naming a writer function with a dynamic block labeled
=myblock= is: ~org-dblock-write:myblock~.
The following is an example of a dynamic block and a block writer function
@@ -20133,7 +20138,7 @@ Dynamic blocks, like any other block, can be narrowed with
#+vindex: org-agenda-skip-function
#+vindex: org-agenda-skip-function-global
Org provides a special hook to further limit items in agenda views:
-~agenda~, ~agenda*~[fn:158], ~todo~, ~alltodo~, ~tags~, ~tags-todo~,
+~agenda~, ~agenda*~[fn:159], ~todo~, ~alltodo~, ~tags~, ~tags-todo~,
~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
needed.
@@ -20176,7 +20181,7 @@ meaningful string suitable for the agenda view.
#+vindex: org-agenda-skip-function
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
-include all levels, use =LEVEL>0=[fn:159]. Then to selectively pick
+include all levels, use =LEVEL>0=[fn:160]. Then to selectively pick
the matched entries, use ~org-agenda-skip-function~, which also
accepts Lisp forms, such as ~org-agenda-skip-entry-if~ and
~org-agenda-skip-subtree-if~. For example:
@@ -20698,7 +20703,7 @@ Before I get to this list, a few special mentions are in order:
a JavaScript program for displaying webpages derived from Org using
an Info-like or a folding interface with single-key navigation.
-See below for the full list of contributions! Again, please let me
+See below for the full list of contributions! Again, please let me
know what I am missing here!
** From Bastien
@@ -21375,48 +21380,51 @@ properties. Please rewrite your date/week-tree targets using
level, months or ISO weeks as sublevels and then dates on the lowest
level. Tags are allowed in the tree structure.
-[fn:85] If you need one of these sequences literally, escape the =%=
+[fn:85] When the file name is not absolute, Org assumes it is relative
+to ~org-directory~.
+
+[fn:86] If you need one of these sequences literally, escape the =%=
with a backslash.
-[fn:86] If you define your own link types (see [[*Adding Hyperlink
+[fn:87] If you define your own link types (see [[*Adding Hyperlink
Types]]), any property you store with ~org-store-link-props~ can be
accessed in capture templates in a similar way.
-[fn:87] This is always the other, not the user. See the variable
+[fn:88] This is always the other, not the user. See the variable
~org-link-from-user-regexp~.
-[fn:88] If you move entries or Org files from one directory to
+[fn:89] If you move entries or Org files from one directory to
another, you may want to configure ~org-attach-id-dir~ to contain
an absolute path.
-[fn:89] If the value of that variable is not a list, but a single file
+[fn:90] If the value of that variable is not a list, but a single file
name, then the list of agenda files in maintained in that external
file.
-[fn:90] When using the dispatcher, pressing {{{kbd(<)}}} before
+[fn:91] When using the dispatcher, pressing {{{kbd(<)}}} before
selecting a command actually limits the command to the current file,
and ignores ~org-agenda-files~ until the next dispatcher command.
-[fn:91] For backward compatibility, you can also press {{{kbd(1)}}} to
+[fn:92] For backward compatibility, you can also press {{{kbd(1)}}} to
restrict to the current buffer.
-[fn:92] For backward compatibility, you can also press {{{kbd(0)}}} to
+[fn:93] For backward compatibility, you can also press {{{kbd(0)}}} to
restrict to the current region/subtree.
-[fn:93] For backward compatibility, the universal prefix argument
+[fn:94] For backward compatibility, the universal prefix argument
{{{kbd(C-u)}}} causes all TODO entries to be listed before the agenda.
This feature is deprecated, use the dedicated TODO list, or a block
agenda instead (see [[*Block agenda]]).
-[fn:94] The variable ~org-anniversary~ used in the example is just
+[fn:95] The variable ~org-anniversary~ used in the example is just
like ~diary-anniversary~, but the argument order is always according
to ISO and therefore independent of the value of
~calendar-date-style~.
-[fn:95] You can, however, disable this by setting
+[fn:96] You can, however, disable this by setting
~org-agenda-search-headline-for-time~ variable to a ~nil~ value.
-[fn:96] Custom agenda commands can preset a filter by binding one of
+[fn:97] Custom agenda commands can preset a filter by binding one of
the variables ~org-agenda-tag-filter-preset~,
~org-agenda-category-filter-preset~, ~org-agenda-effort-filter-preset~
or ~org-agenda-regexp-filter-preset~ as an option. This filter is
@@ -21426,223 +21434,223 @@ property of the entire agenda view---in a block agenda, you should
only set this in the global options section, not in the section of an
individual block.
-[fn:97] Only tags filtering is respected here, effort filtering is
+[fn:98] Only tags filtering is respected here, effort filtering is
ignored.
-[fn:98] You can also create persistent custom functions through
+[fn:99] You can also create persistent custom functions through
~org-agenda-bulk-custom-functions~.
-[fn:99] This file is parsed for the agenda when
+[fn:100] This file is parsed for the agenda when
~org-agenda-include-diary~ is set.
-[fn:100] You can provide a description for a prefix key by inserting
+[fn:101] You can provide a description for a prefix key by inserting
a cons cell with the prefix and the description.
-[fn:101] /Planned/ means here that these entries have some planning
+[fn:102] /Planned/ means here that these entries have some planning
information attached to them, like a time-stamp, a scheduled or
a deadline string. See ~org-agenda-entry-types~ on how to set what
planning information is taken into account.
-[fn:102] For HTML you need to install Hrvoje Nikšić's =htmlize.el=
+[fn:103] For HTML you need to install Hrvoje Nikšić's =htmlize.el=
as an Emacs package from MELPA or from [[https://github.com/hniksic/emacs-htmlize][Hrvoje Nikšić's repository]].
-[fn:103] To create PDF output, the Ghostscript ps2pdf utility must be
+[fn:104] To create PDF output, the Ghostscript ps2pdf utility must be
installed on the system. Selecting a PDF file also creates the
postscript file.
-[fn:104] If you want to store standard views like the weekly agenda or
+[fn:105] If you want to store standard views like the weekly agenda or
the global TODO list as well, you need to define custom commands for
them in order to be able to specify file names.
-[fn:105] Quoting depends on the system you use, please check the FAQ
+[fn:106] Quoting depends on the system you use, please check the FAQ
for examples.
-[fn:106] You can turn this on by default by setting the variable
+[fn:107] You can turn this on by default by setting the variable
~org-pretty-entities~, or on a per-file base with the =STARTUP= option
=entitiespretty=.
-[fn:107] This behavior can be disabled with =-= export setting (see
+[fn:108] This behavior can be disabled with =-= export setting (see
[[*Export Settings]]).
-[fn:108] LaTeX is a macro system based on Donald\nbsp{}E.\nbsp{}Knuth's TeX
+[fn:109] LaTeX is a macro system based on Donald\nbsp{}E.\nbsp{}Knuth's TeX
system. Many of the features described here as "LaTeX" are really
from TeX, but for simplicity I am blurring this distinction.
-[fn:109] When MathJax is used, only the environments recognized by
+[fn:110] When MathJax is used, only the environments recognized by
MathJax are processed. When dvipng, dvisvgm, or ImageMagick suite is
used to create images, any LaTeX environment is handled.
-[fn:110] These are respectively available at
+[fn:111] These are respectively available at
[[http://sourceforge.net/projects/dvipng/]], [[http://dvisvgm.bplaced.net/]]
and from the ImageMagick suite. Choose the converter by setting the
variable ~org-preview-latex-default-process~ accordingly.
-[fn:111] Org mode has a method to test if point is inside such
+[fn:112] Org mode has a method to test if point is inside such
a fragment, see the documentation of the function
~org-inside-LaTeX-fragment-p~.
-[fn:112] This works automatically for the HTML backend (it requires
+[fn:113] This works automatically for the HTML backend (it requires
version 1.34 of the =htmlize.el= package, which you need to install).
Fontified code chunks in LaTeX can be achieved using either the
[[https://www.ctan.org/pkg/listings][listings]] package or the [[https://www.ctan.org/pkg/minted][minted]] package. Refer to
~org-export-latex-listings~ for details.
-[fn:113] Source code in code blocks may also be evaluated either
+[fn:114] Source code in code blocks may also be evaluated either
interactively or on export. See [[*Working with Source Code]] for more
information on evaluating code blocks.
-[fn:114] Adding =-k= to =-n -r= /keeps/ the labels in the source code
+[fn:115] Adding =-k= to =-n -r= /keeps/ the labels in the source code
while using line numbers for the links, which might be useful to
explain those in an Org mode example code.
-[fn:115] You may select a different mode with the variable
+[fn:116] You may select a different mode with the variable
~org-edit-fixed-width-region-mode~.
-[fn:116] What Emacs considers to be an image depends on
+[fn:117] What Emacs considers to be an image depends on
~image-file-name-extensions~ and ~image-file-name-regexps~.
-[fn:117] The variable ~org-startup-with-inline-images~ can be set
+[fn:118] The variable ~org-startup-with-inline-images~ can be set
within a buffer with the =STARTUP= options =inlineimages= and
=noinlineimages=.
-[fn:118] The corresponding in-buffer setting is: =#+STARTUP: fninline=
+[fn:119] The corresponding in-buffer setting is: =#+STARTUP: fninline=
or =#+STARTUP: nofninline=.
-[fn:119] The corresponding in-buffer options are =#+STARTUP: fnadjust=
+[fn:120] The corresponding in-buffer options are =#+STARTUP: fnadjust=
and =#+STARTUP: nofnadjust=.
-[fn:120] The variable ~org-export-date-timestamp-format~ defines how
+[fn:121] The variable ~org-export-date-timestamp-format~ defines how
this timestamp are exported.
-[fn:121] For export to LaTeX format---or LaTeX-related formats such as
+[fn:122] 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]].
+configuration. See [[LaTeX specific export settings]].
-[fn:122] At the moment, some export back-ends do not obey this
+[fn:123] At the moment, some export back-ends do not obey this
specification. For example, LaTeX export excludes every unnumbered
headline from the table of contents.
-[fn:123] Note that ~org-link-search-must-match-exact-headline~ is
+[fn:124] Note that ~org-link-search-must-match-exact-headline~ is
locally bound to non-~nil~. Therefore, ~org-link-search~ only matches
headlines and named elements.
-[fn:124] Since commas separate the arguments, commas within arguments
+[fn:125] Since commas separate the arguments, commas within arguments
have to be escaped with the backslash character. So only those
backslash characters before a comma need escaping with another
backslash character.
-[fn:125] For a less drastic behavior, consider using a select tag (see
+[fn:126] For a less drastic behavior, consider using a select tag (see
[[*Export Settings]]) instead.
-[fn:126] If =BEAMER_ENV= is set, Org export adds =B_environment= tag
+[fn:127] 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
semantic relevance.
-[fn:127] By default Org loads MathJax from [[https://cdnjs.com][cdnjs.com]] as recommended by
+[fn:128] By default Org loads MathJax from [[https://cdnjs.com][cdnjs.com]] as recommended by
[[http://www.mathjax.org][MathJax]].
-[fn:128] Please note that exported formulas are part of an HTML
+[fn:129] Please note that exported formulas are part of an HTML
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]].
-[fn:129] 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:130] 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.
-[fn:130] If the classes on TODO keywords and tags lead to conflicts,
+[fn:131] If the classes on TODO keywords and tags lead to conflicts,
use the variables ~org-html-todo-kwd-class-prefix~ and
~org-html-tag-class-prefix~ to make them unique.
-[fn:131] This does not allow setting different bibliography compilers
+[fn:132] This does not allow setting different bibliography compilers
for different files. However, "smart" LaTeX compilation systems, such
as latexmk, can select the correct bibliography compiler.
-[fn:132] See [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][Open Document Format for Office Applications
+[fn:133] See [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][Open Document Format for Office Applications
(OpenDocument) Version 1.2]].
-[fn:133] See [[http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl][MathToWeb]].
+[fn:134] See [[http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl][MathToWeb]].
-[fn:134] See [[http://dlmf.nist.gov/LaTeXML/]].
+[fn:135] See [[http://dlmf.nist.gov/LaTeXML/]].
-[fn:135] [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][OpenDocument-v1.2 Specification]]
+[fn:136] [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][OpenDocument-v1.2 Specification]]
-[fn:136] See the =<table:table-template>= element of the
+[fn:137] See the =<table:table-template>= element of the
OpenDocument-v1.2 specification.
-[fn:137] See the attributes =table:template-name=,
+[fn:138] See the attributes =table:template-name=,
=table:use-first-row-styles=, =table:use-last-row-styles=,
=table:use-first-column-styles=, =table:use-last-column-styles=,
=table:use-banding-rows-styles=, and =table:use-banding-column-styles=
of the =<table:table>= element in the OpenDocument-v1.2 specification.
-[fn:138] If the publishing directory is the same as the source
+[fn:139] If the publishing directory is the same as the source
directory, =file.org= is exported as =file.org.org=, so you probably
do not want to do this.
-[fn:139] The option ~org-babel-no-eval-on-ctrl-c-ctrl-c~ can be used
+[fn:140] 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.
-[fn:140] Actually, the constructs =call_<name>()= and =src_<lang>{}=
+[fn:141] Actually, the constructs =call_<name>()= and =src_<lang>{}=
are not evaluated when they appear in a keyword (see [[*Summary of
In-Buffer Settings]]).
-[fn:141] C++ language is handled in =ob-C.el=. Even though the
+[fn:142] C++ language is handled in =ob-C.el=. Even though the
identifier for such source blocks is =C++=, you activate it by loading
the C language.
-[fn:142] D language is handled in =ob-C.el=. Even though the
+[fn:143] D language is handled in =ob-C.el=. Even though the
identifier for such source blocks is =D=, you activate it by loading
the C language.
-[fn:143] For Noweb literate programming details, see
+[fn:144] For Noweb literate programming details, see
http://www.cs.tufts.edu/~nr/noweb/.
-[fn:144] For more information, please refer to the commentary section
+[fn:145] For more information, please refer to the commentary section
in =org-tempo.el=.
-[fn:145] Org Indent mode also sets ~wrap-prefix~ correctly for
+[fn:146] Org Indent mode also sets ~wrap-prefix~ correctly for
indenting and wrapping long lines of headlines or text. This minor
mode also handles Visual Line mode and directly applied settings
through ~word-wrap~.
-[fn:146] Note that turning on Org Indent mode sets
+[fn:147] Note that turning on Org Indent mode sets
~org-hide-leading-stars~ to ~t~ and ~org-adapt-indentation~ to ~nil~.
-[fn:147] This works, but requires extra effort. Org Indent mode is
+[fn:148] This works, but requires extra effort. Org Indent mode is
more convenient for most applications.
-[fn:148] Note that Org Indent mode also sets the ~wrap-prefix~
+[fn:149] Note that Org Indent mode also sets the ~wrap-prefix~
property, such that Visual Line mode (or purely setting ~word-wrap~)
wraps long lines, including headlines, correctly indented.
-[fn:149] For a server to host files, consider using a WebDAV server,
+[fn:150] 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]].
-[fn:150] If Emacs is configured for safe storing of passwords, then
+[fn:151] If Emacs is configured for safe storing of passwords, then
configure the variable ~org-mobile-encryption-password~; please read
the docstring of that variable.
-[fn:151] Symbolic links in ~org-directory~ need to have the same name
+[fn:152] Symbolic links in ~org-directory~ need to have the same name
as their targets.
-[fn:152] While creating the agendas, Org mode forces =ID= properties
+[fn:153] While creating the agendas, Org mode forces =ID= properties
on all referenced entries, so that these entries can be uniquely
identified if Org Mobile flags them for further action. To avoid
setting properties configure the variable
~org-mobile-force-id-on-agenda-items~ to ~nil~. Org mode then relies
on outline paths, assuming they are unique.
-[fn:153] Checksums are stored automatically in the file
+[fn:154] Checksums are stored automatically in the file
=checksums.dat=.
-[fn:154] The file will be empty after this operation.
+[fn:155] The file will be empty after this operation.
-[fn:155] https://www.ctan.org/pkg/comment
+[fn:156] https://www.ctan.org/pkg/comment
-[fn:156] By default this works only for LaTeX, HTML, and Texinfo.
+[fn:157] By default this works only for LaTeX, HTML, and Texinfo.
Configure the variable ~orgtbl-radio-table-templates~ to install
templates for other modes.
-[fn:157] If the =TBLFM= keyword contains an odd number of dollar
+[fn:158] If the =TBLFM= keyword contains an odd number of dollar
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
the =comment= environment that is used to balance the dollar
@@ -21650,9 +21658,9 @@ expressions. If you are using AUCTeX with the font-latex library,
a much better solution is to add the =comment= environment to the
variable ~LaTeX-verbatim-environments~.
-[fn:158] The ~agenda*~ view is the same as ~agenda~ except that it
+[fn:159] The ~agenda*~ view is the same as ~agenda~ except that it
only considers /appointments/, i.e., scheduled and deadline items that
have a time specification =[h]h:mm= in their time-stamps.
-[fn:159] Note that, for ~org-odd-levels-only~, a level number
+[fn:160] Note that, for ~org-odd-levels-only~, a level number
corresponds to order in the hierarchy, not to the number of stars.
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index c9722aa..bf422e9 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -19,15 +19,11 @@ Org used to percent-encode sensitive characters in the URI part of the
bracket links.
Now, escaping mechanism uses the usual backslash character, according
-to the following rules, applied in order:
+to the following rules:
-1. All consecutive =\= characters at the end of the link must be
- escaped;
-2. Any =]= character at the very end of the link must be escaped;
-3. All consecutive =\= characters preceding =][= or =]]= patterns must
- be escaped;
-4. Any =]= character followed by either =[= or =]= must be escaped;
-5. Others =]= and =\= characters need not be escaped.
+1. All =[= and =]= characters in the URI must be escaped;
+2. Every =\= character preceding either =[= or =]= must be escaped;
+3. Every =\= character at the end of the URI must be escaped.
When in doubt, use the function ~org-link-escape~ in order to turn
a link string into its properly escaped form.
@@ -92,7 +88,7 @@ the message to 30 characters in order to build the description of the
link. This behavior was considered as too surprising. As
a consequence, Org no longer truncates subjects.
-You can get the old behaviour back with the following:
+You can get the old behavior back with the following:
: (setq org-email-link-description-format "Email %c: %.30s")
@@ -170,7 +166,7 @@ From now on inheritance requires no extra property and will adhere to
customized to always be activated or never be activated in
~org-attach-use-inheritance~.
-The ATTACH_DIR property is deprecated in favour of the shorter
+The ATTACH_DIR property is deprecated in favor of the shorter
property DIR. Links to folders inside the DIR property can now be
declared as relative links. This is not enabled by default, but can
be set in ~org-attach-dir-relative~.
@@ -178,7 +174,7 @@ be set in ~org-attach-dir-relative~.
When adding new attachment to the outline node the preferred way of
doing so can be customized. Take a look at
~org-attach-preferred-new-method~. It defaults to using ID since that
-was the behaviour before this change.
+was the behavior before this change.
If both DIR and ID properties are set on the same node, DIR has
precedence and will be used.
@@ -311,7 +307,7 @@ matches the same structures than 'latex but it calls
org-src-font-lock-fontify-block instead, thus bringing about full
LaTeX font locking.
-*** ~org-clone-subtree-with-time-shift~ learnt to shift backward in time
+*** ~org-clone-subtree-with-time-shift~ learned to shift backward in time
=<C-c C-x c>= (~org-clone-subtree-with-time-shift~) now takes a
negative value as a valid repeater to shift time stamps in backward
@@ -335,7 +331,7 @@ parameters in ~sql-connection-alist~.
The builtin "latex" exporters now accept and use a =:scale= attribute,
which scales an image by a given factor.
-This attribute is wrapped adound the =scale= parameter of LaTeX's
+This attribute is wrapped around the =scale= parameter of LaTeX's
=\includegraphics= (bitmap images) or a TiKZ's =\scalebox=.
Therefore, its value should be some string palatable to LaTeX as
a positive float Its default value is an empty string (i.e. disabled).
@@ -386,7 +382,7 @@ You can install it back from MELPA.
*** ~org-capture-insert-template-here~
*** ~org-attach-directory~
-It has been deprecated in favour of ~org-attach-id-dir~ which is less
+It has been deprecated in favor of ~org-attach-id-dir~ which is less
ambiguous given the restructured org-attach.
*** ~org-enable-fixed-width-editor~
@@ -612,7 +608,7 @@ document, use =shrink= value instead, or in addition to align:
Function ~org-get-tags~ used to return local tags to the current
headline. It now returns all the inherited tags in addition to the
-local tags. In order to get the old behaviour back, you can use:
+local tags. In order to get the old behavior back, you can use:
: (org-get-tags nil t)
diff --git a/lisp/ob-eshell.el b/lisp/ob-eshell.el
index 1090bef..bfb24f8 100644
--- a/lisp/ob-eshell.el
+++ b/lisp/ob-eshell.el
@@ -29,6 +29,13 @@
(require 'ob)
(require 'eshell)
+(declare-function eshell-send-input "esh-mode"
+ (&optional use-region queue-p no-newline))
+
+(defvar eshell-last-output-start)
+(defvar eshell-last-output-end)
+(defvar eshell-last-input-end)
+
(defvar org-babel-default-header-args:eshell '())
(defun org-babel-execute:eshell (body params)
diff --git a/lisp/ob-plantuml.el b/lisp/ob-plantuml.el
index 09c9a33..28c7b85 100644
--- a/lisp/ob-plantuml.el
+++ b/lisp/ob-plantuml.el
@@ -69,10 +69,11 @@ function to convert variables to PlantUML assignments.
If BODY does not contain @startXXX ... @endXXX clauses, @startuml
... @enduml will be added."
- (let ((assignments (org-babel-variable-assignments:plantuml params)))
- (if (string-prefix-p "@start" body t) assignments
- (format "@startuml\n%s\n@enduml"
- (org-babel-expand-body:generic body params assignments)))))
+ (let ((full-body
+ (org-babel-expand-body:generic
+ body params (org-babel-variable-assignments:plantuml params))))
+ (if (string-prefix-p "@start" body t) full-body
+ (format "@startuml\n%s\n@enduml" full-body))))
(defun org-babel-execute:plantuml (body params)
"Execute a block of plantuml code with org-babel.
diff --git a/lisp/ol.el b/lisp/ol.el
index 4d3a821..e292bd1 100644
--- a/lisp/ol.el
+++ b/lisp/ol.el
@@ -716,12 +716,10 @@ This should be called after the variable `org-link-parameters' has changed."
(rx (seq "[["
;; URI part: match group 1.
(group
- ;; Allow an even number of backslashes right
- ;; before the closing bracket.
- (or (one-or-more "\\\\")
- (and (*? anything)
- (not (any "\\"))
- (zero-or-more "\\\\"))))
+ (one-or-more
+ (or (not (any "[]\\"))
+ (and "\\" (zero-or-more "\\\\") (any "[]"))
+ (and (one-or-more "\\") (not (any "[]"))))))
"]"
;; Description (optional): match group 2.
(opt "[" (group (+? anything)) "]")
@@ -838,30 +836,21 @@ E.g. \"%C3%B6\" becomes the german o-Umlaut."
(defun org-link-escape (link)
"Backslash-escape sensitive characters in string LINK."
- ;; Escape closing square brackets followed by another square bracket
- ;; or at the end of the link. Also escape final backslashes so that
- ;; we do not escape inadvertently URI's closing bracket.
- (with-temp-buffer
- (insert link)
- (insert (make-string (- (skip-chars-backward "\\\\"))
- ?\\))
- (while (search-backward "\]" nil t)
- (when (looking-at-p "\\]\\(?:[][]\\|\\'\\)")
- (insert (make-string (1+ (- (skip-chars-backward "\\\\")))
- ?\\))))
- (buffer-string)))
+ (replace-regexp-in-string
+ (rx (seq (group (zero-or-more "\\")) (group (or string-end (any "[]")))))
+ (lambda (m)
+ (concat (match-string 1 m)
+ (match-string 1 m)
+ (and (/= (match-beginning 2) (match-end 2)) "\\")))
+ link nil t 1))
(defun org-link-unescape (link)
"Remove escaping backslash characters from string LINK."
- (with-temp-buffer
- (save-excursion (insert link))
- (while (re-search-forward "\\(\\\\+\\)\\]\\(?:[][]\\|\\'\\)" nil t)
- (replace-match (make-string (/ (- (match-end 1) (match-beginning 1)) 2)
- ?\\)
- nil t nil 1))
- (goto-char (point-max))
- (delete-char (/ (- (skip-chars-backward "\\\\")) 2))
- (buffer-string)))
+ (replace-regexp-in-string
+ (rx (group (one-or-more "\\")) (or string-end (any "[]")))
+ (lambda (_)
+ (concat (make-string (/ (- (match-end 1) (match-beginning 1)) 2) ?\\)))
+ link nil t 1))
(defun org-link-make-string (link &optional description)
"Make a bracket link, consisting of LINK and DESCRIPTION.
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index a0736e3..e24945f 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5135,6 +5135,7 @@ of what a project is and how to check if it stuck, customize the variable
(cons 'org-diary-default-entry diary-list-entries-hook))
(diary-file-name-prefix nil) ; turn this feature off
(diary-modify-entry-list-string-function 'org-modify-diary-entry-string)
+ (diary-time-regexp (concat "^" diary-time-regexp))
entries
(org-disable-agenda-to-diary t))
(save-excursion
@@ -7636,7 +7637,7 @@ and deselects entries with tag `John' or matching the regexp `plot'.
During entry of the filter, completion for tags, categories and effort
values is offered. Since the syntax for categories and tags is identical
-there should be no overlap between categoroes and tags. If there is, tags
+there should be no overlap between categories and tags. If there is, tags
get priority.
A single `\\[universal-argument]' prefix arg STRIP-OR-ACCUMULATE will negate the
@@ -7670,7 +7671,7 @@ the variable `org-agenda-auto-exclude-function'."
(if negate "Negative filter" "Filter")
" [+cat-tag<0:10-/regexp/]: ")
'org-agenda-filter-completion-function))
- (keep (or (if (string-match "^+[-+]" f-string)
+ (keep (or (if (string-match "^\\+[+-]" f-string)
(progn (setq f-string (substring f-string 1)) t))
(equal strip-or-accumulate '(16))))
(fc (if keep org-agenda-category-filter))
diff --git a/lisp/org-attach.el b/lisp/org-attach.el
index bc49be7..d3e1c78 100644
--- a/lisp/org-attach.el
+++ b/lisp/org-attach.el
@@ -187,7 +187,7 @@ attachment folders based on ID."
"Hook that is invoked by `org-attach-open'.
Created mostly to be compatible with org-attach-git after removing
-git-funtionality from this file.")
+git-functionality from this file.")
(defcustom org-attach-commands
'(((?a ?\C-a) org-attach-attach
@@ -231,7 +231,7 @@ directory in dired and delete from there.\n")
Each entry in this list is a list of three elements:
- A list of keys (characters) to select the command (the fist
character in the list is shown in the attachment dispatcher's
- splash buffer and minubuffer prompt).
+ splash buffer and minibuffer prompt).
- A command that is called interactively when one of these keys
is pressed.
- A docstring for this command in the attachment dispatcher's
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 4f97e17..3f37812 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -698,21 +698,19 @@ of the day at point (if any) or the current HH:MM time."
(defun org-capture-get-template ()
"Get the template from a file or a function if necessary."
- (let ((txt (org-capture-get :template)) file)
- (cond
- ((and (listp txt) (eq (car txt) 'file))
- (if (file-exists-p
- (setq file (expand-file-name (nth 1 txt) org-directory)))
- (setq txt (org-file-contents file))
- (setq txt (format "* Template file %s not found" (nth 1 txt)))))
- ((and (listp txt) (eq (car txt) 'function))
- (if (fboundp (nth 1 txt))
- (setq txt (funcall (nth 1 txt)))
- (setq txt (format "* Template function %s not found" (nth 1 txt)))))
- ((not txt) (setq txt ""))
- ((stringp txt))
- (t (setq txt "* Invalid capture template")))
- (org-capture-put :template txt)))
+ (org-capture-put
+ :template
+ (pcase (org-capture-get :template)
+ (`nil "")
+ ((and (pred stringp) template) template)
+ (`(file ,file)
+ (let ((filename (expand-file-name file org-directory)))
+ (if (file-exists-p filename) (org-file-contents filename)
+ (format "* Template file %S not found" file))))
+ (`(function ,f)
+ (if (functionp f) (funcall f)
+ (format "* Template function %S not found" f)))
+ (_ "* Invalid capture template"))))
(defun org-capture-finalize (&optional stay-with-capture)
"Finalize the capture process.
diff --git a/lisp/org-keys.el b/lisp/org-keys.el
index daad26d..3b8fa5f 100644
--- a/lisp/org-keys.el
+++ b/lisp/org-keys.el
@@ -27,6 +27,8 @@
;;; Code:
+(require 'cl-lib)
+
(defvar org-outline-regexp)
(declare-function org-add-note "org" ())
@@ -218,6 +220,8 @@
(defvar org-mode-map (make-sparse-keymap)
"Keymap fo Org mode.")
+(defvaralias 'org-CUA-compatible 'org-replace-disputed-keys)
+
(defcustom org-replace-disputed-keys nil
"Non-nil means use alternative key bindings for some keys.
@@ -244,8 +248,6 @@ loading Org."
:type 'boolean
:safe #'booleanp)
-(defvaralias 'org-CUA-compatible 'org-replace-disputed-keys)
-
(defcustom org-disputed-keys
'(([(shift up)] . [(meta p)])
([(shift down)] . [(meta n)])
diff --git a/lisp/org-list.el b/lisp/org-list.el
index c4aef32..a6186a3 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -86,7 +86,6 @@
(defvar org-clock-string)
(defvar org-closed-string)
(defvar org-deadline-string)
-(defvar org-description-max-indent)
(defvar org-done-keywords)
(defvar org-drawer-regexp)
(defvar org-element-all-objects)
diff --git a/lisp/org-table.el b/lisp/org-table.el
index a21587a..a2e77e0 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -1709,7 +1709,7 @@ The function assumes `org-table-copy-increment' is non-nil."
(number-suffix-regexp (rx (and (one-or-more digit) string-end)))
(analyze
(lambda (field)
- ;; Analyse string FIELD and return information related to
+ ;; Analyze string FIELD and return information related to
;; increment or nil. When non-nil, return value has the
;; following scheme: (TYPE VALUE PATTERN) where
;; - TYPE is a symbol among `number', `prefix', `suffix'
@@ -4642,7 +4642,7 @@ blank, and the content is appended to the field above."
(skip-chars-backward " ")
(insert " " (org-trim s))
(org-table-align)))
- ((looking-at "\\([^|]+\\)+|") ; Split field.
+ ((looking-at "\\([^|]+\\)|") ; Split field.
(let ((s (match-string 1)))
(replace-match " |")
(goto-char (match-beginning 0))
diff --git a/lisp/org.el b/lisp/org.el
index b4858a4..de03fa7 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6,7 +6,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: https://orgmode.org
-;; Version: 9.3
+;; Version: 9.3.1
;;
;; This file is part of GNU Emacs.
;;
@@ -4955,7 +4955,8 @@ The following commands are available:
("8.3" . "26.1")
("9.0" . "26.1")
("9.1" . "26.1")
- ("9.2" . "27.1")))
+ ("9.2" . "27.1")
+ ("9.3" . "27.1")))
(defvar org-mode-transpose-word-syntax-table
(let ((st (make-syntax-table text-mode-syntax-table)))
@@ -5249,7 +5250,15 @@ by a #."
"Fontify #+ lines and blocks."
(let ((case-fold-search t))
(when (re-search-forward
- "^\\([ \t]*#\\(\\(\\+[a-zA-Z]+:?\\| \\|$\\)\\(_\\([a-zA-Z]+\\)\\)?\\)[ \t]*\\(\\([^ \t\n]*\\)[ \t]*\\(.*\\)\\)\\)"
+ (rx bol (group (zero-or-more blank) "#"
+ (group (group (or (seq "+" (one-or-more (any "a-zA-Z")) (optional ":"))
+ space
+ eol))
+ (optional (group "_" (group (one-or-more (any "a-zA-Z"))))))
+ (zero-or-more blank)
+ (group (group (zero-or-more (not (any " \t\n"))))
+ (zero-or-more blank)
+ (group (zero-or-more any)))))
limit t)
(let ((beg (match-beginning 0))
(end-of-beginline (match-end 0))
@@ -5267,7 +5276,12 @@ by a #."
(setq block-type (downcase (match-string 5))
quoting (member block-type org-protecting-blocks)) ; src, example, export, maybe more
(when (re-search-forward
- (concat "^[ \t]*#\\+end" (match-string 4) "\\>.*")
+ (rx-to-string `(group bol (or (seq (one-or-more "*") space)
+ (seq (zero-or-more blank)
+ "#+end"
+ ,(match-string 4)
+ word-end
+ (zero-or-more any)))))
nil t) ;; on purpose, we look further than LIMIT
;; We do have a matching #+end line
(setq beg-of-endline (match-beginning 0)
@@ -5306,10 +5320,14 @@ by a #."
(add-text-properties
beg (if whole-blockline bol-after-beginline end-of-beginline)
'(face org-block-begin-line))
- (add-text-properties
- beg-of-endline
- (min (point-max) (if whole-blockline (min (point-max) (1+ end-of-endline)) end-of-endline))
- '(face org-block-end-line))
+ (unless (string-prefix-p "*" (match-string 1))
+ (add-text-properties
+ beg-of-endline
+ (if whole-blockline
+ (let ((beg-of-next-line (1+ end-of-endline)))
+ (min (point-max) beg-of-next-line))
+ (min (point-max) end-of-endline))
+ '(face org-block-end-line)))
t))
((member dc1 '("+title:" "+author:" "+email:" "+date:"))
(org-remove-flyspell-overlays-in
@@ -5332,7 +5350,11 @@ by a #."
;; Handle short captions.
(save-excursion
(beginning-of-line)
- (looking-at "\\([ \t]*#\\+caption\\(?:\\[.*\\]\\)?:\\)[ \t]*"))
+ (looking-at (rx (group (zero-or-more blank)
+ "#+caption"
+ (optional "[" (zero-or-more any) "]")
+ ":")
+ (zero-or-more blank))))
(add-text-properties (line-beginning-position) (match-end 1)
'(font-lock-fontified t face org-meta-line))
(add-text-properties (match-end 0) (line-end-position)
@@ -7825,7 +7847,7 @@ with the original repeater."
""))) ;No time shift
(doshift
(and (org-string-nw-p shift)
- (or (string-match "\\`[ \t]*\\([\\+\\-]?[0-9]+\\)\\([dwmy]\\)[ \t]*\\'"
+ (or (string-match "\\`[ \t]*\\([+-]?[0-9]+\\)\\([dwmy]\\)[ \t]*\\'"
shift)
(user-error "Invalid shift specification %s" shift)))))
(goto-char end-of-tree)
@@ -9854,9 +9876,9 @@ Elements of length one have a tab appended. Elements of length
two are kept as is. Longer elements are truncated to length two.
If an element cannot be made unique, an error is raised."
- (let ((orderd-keys (cl-sort (copy-sequence keys) #'< :key #'length))
+ (let ((ordered-keys (cl-sort (copy-sequence keys) #'< :key #'length))
menu-keys)
- (dolist (key orderd-keys)
+ (dolist (key ordered-keys)
(let ((potential-key
(cl-case (length key)
(1 (concat key "\t"))
@@ -10008,7 +10030,7 @@ By default the available states are \"TODO\" and \"DONE\". So, for this
example: when the item starts with TODO, it is changed to DONE.
When it starts with DONE, the DONE is removed. And when neither TODO nor
DONE are present, add TODO at the beginning of the heading.
-You can set up single-charcter keys to fast-select the new state. See the
+You can set up single-character keys to fast-select the new state. See the
`org-todo-keywords' and `org-use-fast-todo-selection' for details.
With `\\[universal-argument]' prefix ARG, force logging the state change \
@@ -16499,12 +16521,16 @@ a HTML file."
(setq bg (org-latex-color :background))
(setq bg (org-latex-color-format
(if (string= bg "Transparent") "white" bg))))
+ ;; Remove TeX \par at end of snippet to avoid trailing space.
+ (if (string-suffix-p string "\n")
+ (aset string (1- (length string)) ?%)
+ (setq string (concat string "%")))
(with-temp-file texfile
(insert latex-header)
(insert "\n\\begin{document}\n"
- "\\definecolor{fg}{rgb}{" fg "}\n"
- "\\definecolor{bg}{rgb}{" bg "}\n"
- "\n\\pagecolor{bg}\n"
+ "\\definecolor{fg}{rgb}{" fg "}%\n"
+ "\\definecolor{bg}{rgb}{" bg "}%\n"
+ "\n\\pagecolor{bg}%\n"
"\n{\\color{fg}\n"
string
"\n}\n"
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 83d0fd2..4b5f307 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2903,6 +2903,12 @@ used as a predicate for `org-export-get-ordinal' or a value to
(string-match-p org-latex-math-environments-re
(org-element-property :value element)))
+(defun org-html--latex-environment-numbered-p (element)
+ "Non-nil when ELEMENT contains a numbered LaTeX math environment.
+Starred and \"displaymath\" environments are not numbered."
+ (not (string-match-p "\\`[ \t]*\\\\begin{\\(.*\\*\\|displaymath\\)}"
+ (org-element-property :value element))))
+
(defun org-html--unlabel-latex-environment (latex-frag)
"Change environment in LATEX-FRAG string to an unnumbered one.
For instance, change an 'equation' environment to 'equation*'."
@@ -2923,10 +2929,13 @@ CONTENTS is nil. INFO is a plist holding contextual information."
(attributes (org-export-read-attribute :attr_html latex-environment))
(label (and (org-element-property :name latex-environment)
(org-export-get-reference latex-environment info)))
- (caption (number-to-string
- (org-export-get-ordinal
- latex-environment info nil
- #'org-html--math-environment-p))))
+ (caption (and (org-html--latex-environment-numbered-p latex-environment)
+ (number-to-string
+ (org-export-get-ordinal
+ latex-environment info nil
+ (lambda (l _)
+ (and (org-html--math-environment-p l)
+ (org-html--latex-environment-numbered-p l))))))))
(cond
((memq processing-type '(t mathjax))
(org-html-format-latex
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 65f40fb..ddf9a3d 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -2425,7 +2425,8 @@ used as a communication channel."
(format "\\resizebox{%s}{%s}{%s}"
(if (org-string-nw-p width) width "!")
(if (org-string-nw-p height) height "!")
- image-code)))))
+ image-code))
+ (t image-code))))
;; For other images:
;; - add scale, or width and height to options.
;; - include the image with \includegraphics.
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index f9c4a93..1ffdf31 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -1383,6 +1383,8 @@ original parsed data. INFO is a plist holding export options."
;; create a manifest entry for styles.xml
(org-odt-create-manifest-file-entry "text/xml" "styles.xml")
+ ;; Ensure we have write permissions to this file.
+ (set-file-modes (concat org-odt-zip-dir "styles.xml") #o600)
;; FIXME: Who is opening an empty styles.xml before this point?
(with-current-buffer
diff --git a/lisp/ox.el b/lisp/ox.el
index 5b4134e..10286e1 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -6929,7 +6929,7 @@ options as CDR."
(org-export--dispatch-ui options first-key expertp))
;; q key at first level aborts export. At second level, cancel
;; first key instead.
- ((eq key ?q) (if (not first-key) (error "Export aborted")
+ ((eq key ?q) (if (not first-key) (user-error "Export aborted")
(org-export--dispatch-ui options nil expertp)))
;; Help key: Switch back to standard interface if expert UI was
;; active.
diff --git a/mk/server.mk b/mk/server.mk
index 94818bb..2c52945 100644
--- a/mk/server.mk
+++ b/mk/server.mk
@@ -38,7 +38,7 @@ ORGFULL = README COPYING lisp/ \
etc/ contrib/ doc/ testing/
ORGFULL := $(ORGFULL:%/=%/*)
ORGELPA = README_ELPA COPYING etc/ORG-NEWS lisp/ \
- doc/dir doc/org doc/orgcard.pdf \
+ doc/dir doc/org doc/orgguide doc/orgcard.pdf \
etc/styles/ org-pkg.el
ORGELPA := $(ORGELPA:%/=%/*)
ORGELPAPLUS := $(ORGELPA:org-pkg%=org-plus-contrib-pkg%)
diff --git a/testing/lisp/test-ob-python.el b/testing/lisp/test-ob-python.el
index ab2f7aa..48ca3d6 100644
--- a/testing/lisp/test-ob-python.el
+++ b/testing/lisp/test-ob-python.el
@@ -24,7 +24,9 @@
(signal 'missing-test-dependency "Support for Python code blocks"))
(ert-deftest test-ob-python/colnames-yes-header-argument ()
- (org-test-with-temp-text "#+name: eg
+ (should
+ (equal '(("col") hline ("a") ("b"))
+ (org-test-with-temp-text "#+name: eg
| col |
|-----|
| a |
@@ -32,30 +34,30 @@
#+header: :colnames yes
#+header: :var x = eg
-#+begin_src python
+<point>#+begin_src python
return x
#+end_src"
- (org-babel-next-src-block)
- (should (equal '(("col") hline ("a") ("b"))
- (org-babel-execute-src-block)))))
+ (org-babel-execute-src-block)))))
(ert-deftest test-ob-python/colnames-yes-header-argument-again ()
- (org-test-with-temp-text "#+name: less-cols
+ (should
+ (equal '(("a") hline ("b*") ("c*"))
+ (org-test-with-temp-text "#+name: less-cols
| a |
|---|
| b |
| c |
#+header: :colnames yes
-#+begin_src python :var tab=less-cols
+<point>#+begin_src python :var tab=less-cols
return [[val + '*' for val in row] for row in tab]
#+end_src"
- (org-babel-next-src-block)
- (should (equal '(("a") hline ("b*") ("c*"))
- (org-babel-execute-src-block)))))
+ (org-babel-execute-src-block)))))
(ert-deftest test-ob-python/colnames-nil-header-argument ()
- (org-test-with-temp-text "#+name: eg
+ (should
+ (equal '(("col") hline ("a") ("b"))
+ (org-test-with-temp-text "#+name: eg
| col |
|-----|
| a |
@@ -63,30 +65,30 @@ return x
#+header: :colnames nil
#+header: :var x = eg
-#+begin_src python
+<point>#+begin_src python
return x
#+end_src"
- (org-babel-next-src-block)
- (should (equal '(("col") hline ("a") ("b"))
- (org-babel-execute-src-block)))))
+ (org-babel-execute-src-block)))))
(ert-deftest test-ob-python/colnames-no-header-argument-again ()
- (org-test-with-temp-text "#+name: less-cols
+ (should
+ (equal '(("a*") ("b*") ("c*"))
+ (org-test-with-temp-text "#+name: less-cols
| a |
|---|
| b |
| c |
#+header: :colnames no
-#+begin_src python :var tab=less-cols
+<point>#+begin_src python :var tab=less-cols
return [[val + '*' for val in row] for row in tab]
#+end_src"
- (org-babel-next-src-block)
- (should (equal '(("a*") ("b*") ("c*"))
- (org-babel-execute-src-block)))))
+ (org-babel-execute-src-block)))))
(ert-deftest test-ob-python/colnames-no-header-argument ()
- (org-test-with-temp-text "#+name: eg
+ (should
+ (equal '(("col") ("a") ("b"))
+ (org-test-with-temp-text "#+name: eg
| col |
|-----|
| a |
@@ -94,19 +96,18 @@ return x
#+header: :colnames no
#+header: :var x = eg
-#+begin_src python
+<point>#+begin_src python
return x
#+end_src"
- (org-babel-next-src-block)
- (should (equal '(("col") ("a") ("b"))
- (org-babel-execute-src-block)))))
+ (org-babel-execute-src-block)))))
(ert-deftest test-ob-python/session-multiline ()
;; FIXME workaround to prevent starting prompt leaking into output
(run-python)
(sleep-for 0 10)
- (org-test-with-temp-text "
-#+begin_src python :session :results output
+ (should
+ (equal "20"
+ (org-test-with-temp-text "#+begin_src python :session :results output
foo = 0
for _ in range(10):
foo += 1
@@ -115,26 +116,28 @@ return x
print(foo)
#+end_src"
- (org-babel-next-src-block)
- (should (equal "20" (org-babel-execute-src-block)))))
+ (org-babel-execute-src-block)))))
(ert-deftest test-ob-python/insert-necessary-blank-line-when-sending-code-to-interpreter ()
- (org-test-with-temp-text "#+begin_src python :session :results value
+ (should
+ (equal 2 (org-test-with-temp-text "#+begin_src python :session :results value
if True:
1
2
#+end_src"
- ;; Previously, while adding `:session' to a normal code block, also need to add extra blank lines
- ;; to end indent block or indicate logical sections. Now, the `org-babel-python-evaluate-session'
- ;; can do it automatically:
- ;; >>> if True:
- ;; >>> 1
- ;; >>> <insert_blank_line_here>
- ;; >>> 2
- (org-babel-execute-maybe)
- (should (equal 2 (org-babel-execute-src-block)))))
+ ;; Previously, while adding `:session' to a normal code
+ ;; block, also need to add extra blank lines to end
+ ;; indent block or indicate logical sections. Now, the
+ ;; `org-babel-python-evaluate-session' can do it
+ ;; automatically:
+ ;;
+ ;; >>> if True:
+ ;; >>> 1
+ ;; >>> <insert_blank_line_here>
+ ;; >>> 2
+ (org-babel-execute-maybe)
+ (org-babel-execute-src-block)))))
(provide 'test-ob-python)
;;; test-ob-python.el ends here
-
diff --git a/testing/lisp/test-ol.el b/testing/lisp/test-ol.el
index fd735dc..2643f35 100644
--- a/testing/lisp/test-ol.el
+++ b/testing/lisp/test-ol.el
@@ -55,49 +55,48 @@
(ert-deftest test-ol/escape ()
"Test `org-link-escape' specifications."
- ;; No-op when there is no backslash or closing square bracket.
- (should (string= "foo[" (org-link-escape "foo[")))
- ;; Escape closing square bracket at the end of the link.
- (should (string= "[foo\\]" (org-link-escape "[foo]")))
- ;; Escape closing square brackets followed by another square
- ;; bracket.
- (should (string= "foo\\][bar" (org-link-escape "foo][bar")))
- (should (string= "foo\\]]bar" (org-link-escape "foo]]bar")))
- ;; However, escaping closing square bracket at the end of the link
- ;; has precedence over the previous rule.
- (should (string= "foo]\\]" (org-link-escape "foo]]")))
+ ;; No-op when there is no backslash or square bracket.
+ (should (string= "foo" (org-link-escape "foo")))
+ ;; Escape square brackets at boundaries of the link.
+ (should (string= "\\[foo\\]" (org-link-escape "[foo]")))
+ ;; Escape square brackets followed by another square bracket.
+ (should (string= "foo\\]\\[bar" (org-link-escape "foo][bar")))
+ (should (string= "foo\\]\\]bar" (org-link-escape "foo]]bar")))
+ (should (string= "foo\\[\\[bar" (org-link-escape "foo[[bar")))
+ (should (string= "foo\\[\\]bar" (org-link-escape "foo[]bar")))
;; Escape backslashes at the end of the link.
(should (string= "foo\\\\" (org-link-escape "foo\\")))
;; Escape backslashes that could be confused with escaping
;; characters.
(should (string= "foo\\\\\\]" (org-link-escape "foo\\]")))
- (should (string= "foo\\\\\\][" (org-link-escape "foo\\][")))
- (should (string= "foo\\\\\\]]bar" (org-link-escape "foo\\]]bar")))
+ (should (string= "foo\\\\\\]\\[" (org-link-escape "foo\\][")))
+ (should (string= "foo\\\\\\]\\]bar" (org-link-escape "foo\\]]bar")))
;; Do not escape backslash characters when unnecessary.
(should (string= "foo\\bar" (org-link-escape "foo\\bar")))
- (should (string= "foo\\]bar" (org-link-escape "foo\\]bar")))
;; Pathological cases: consecutive closing square brackets.
- (should (string= "[[[foo\\]]\\]" (org-link-escape "[[[foo]]]")))
- (should (string= "[[[foo]\\]] bar" (org-link-escape "[[[foo]]] bar"))))
+ (should (string= "\\[\\[\\[foo\\]\\]\\]" (org-link-escape "[[[foo]]]")))
+ (should (string= "\\[\\[foo\\]\\] bar" (org-link-escape "[[foo]] bar"))))
(ert-deftest test-ol/unescape ()
"Test `org-link-unescape' specifications."
;; No-op if there is no backslash.
- (should (string= "foo[" (org-link-unescape "foo[")))
+ (should (string= "foo" (org-link-unescape "foo")))
;; No-op if backslashes are not escaping backslashes.
(should (string= "foo\\bar" (org-link-unescape "foo\\bar")))
- (should (string= "foo\\]bar" (org-link-unescape "foo\\]bar")))
- ;;
+ ;; Unescape backslashes before square brackets.
+ (should (string= "foo]bar" (org-link-unescape "foo\\]bar")))
(should (string= "foo\\]" (org-link-unescape "foo\\\\\\]")))
(should (string= "foo\\][" (org-link-unescape "foo\\\\\\][")))
- (should (string= "foo\\]]bar" (org-link-unescape "foo\\\\\\]]bar")))
+ (should (string= "foo\\]]bar" (org-link-unescape "foo\\\\\\]\\]bar")))
+ (should (string= "foo\\[[bar" (org-link-unescape "foo\\\\\\[\\[bar")))
+ (should (string= "foo\\[]bar" (org-link-unescape "foo\\\\\\[\\]bar")))
;; Unescape backslashes at the end of the link.
(should (string= "foo\\" (org-link-unescape "foo\\\\")))
- ;; Unescape closing square bracket at the end of the link.
- (should (string= "[foo]" (org-link-unescape "[foo\\]")))
+ ;; Unescape closing square bracket at boundaries of the link.
+ (should (string= "[foo]" (org-link-unescape "\\[foo\\]")))
;; Pathological cases: consecutive closing square brackets.
- (should (string= "[[[foo]]]" (org-link-unescape "[[[foo\\]]\\]")))
- (should (string= "[[[foo]]] bar" (org-link-unescape "[[[foo]\\]] bar"))))
+ (should (string= "[[[foo]]]" (org-link-unescape "\\[\\[\\[foo\\]\\]\\]")))
+ (should (string= "[[foo]] bar" (org-link-unescape "\\[\\[foo\\]\\] bar"))))
(ert-deftest test-ol/make-string ()
"Test `org-link-make-string' specifications."
@@ -204,11 +203,11 @@
;; Store file link to non-Org buffer, with context.
(should
(let ((org-stored-links nil)
- (org-context-in-file-links t))
+ (org-link-context-for-files t))
(org-test-with-temp-text-in-file "one\n<point>two"
(fundamental-mode)
(let ((file (buffer-file-name)))
- (equal (format "[[file:%s::one]]" file)
+ (equal (format "[[file:%s::two]]" file)
(org-store-link nil))))))
;; Store file link to non-Org buffer, without context.
(should
@@ -223,11 +222,11 @@
;; buffer.
(should
(let ((org-stored-links nil)
- (org-context-in-file-links nil))
+ (org-link-context-for-files nil))
(org-test-with-temp-text-in-file "one\n<point>two"
(fundamental-mode)
(let ((file (buffer-file-name)))
- (equal (format "[[file:%s::one]]" file)
+ (equal (format "[[file:%s::two]]" file)
(org-store-link '(4)))))))
;; A C-u C-u does *not* reverse `org-context-in-file-links' in
;; non-Org buffer.
diff --git a/testing/lisp/test-org-clock.el b/testing/lisp/test-org-clock.el
index b4afe69..daca229 100644
--- a/testing/lisp/test-org-clock.el
+++ b/testing/lisp/test-org-clock.el
@@ -576,129 +576,87 @@ CLOCK: [2016-12-28 Wed 13:09]--[2016-12-28 Wed 15:09] => 2:00"
"Test \":link\" parameter in Clock table."
;; If there is no file attached to the document, link directly to
;; the headline.
- (let (org-link-descriptive)
- (should
- (equal
- "| Headline | Time |
-|--------------+---------|
-| *Total time* | *26:00* |
-|--------------+---------|
-| [[Foo][Foo]] | 26:00 |"
- (org-test-with-temp-text
- "* Foo
+ (should
+ (string-match-p "| +\\[\\[Foo]\\[Foo]] +| 26:00 +|"
+ (org-test-with-temp-text
+ "* Foo
CLOCK: [2016-12-27 Wed 13:09]--[2016-12-28 Wed 15:09] => 26:00"
- (test-org-clock-clocktable-contents ":link t"))))
- ;; Otherwise, link to the headline in the current file.
- (should
- (equal
- "| Headline | Time |
-|-----------------------------+---------|
-| *Total time* | *26:00* |
-|-----------------------------+---------|
-| [[file:filename::Foo][Foo]] | 26:00 |"
- (org-test-with-temp-text
- (org-test-with-temp-text-in-file
- "* Foo
+ (test-org-clock-clocktable-contents ":link t"))))
+ ;; Otherwise, link to the headline in the current file.
+ (should
+ (string-match-p
+ "| \\[\\[file:filename::Foo]\\[Foo]] +| 26:00 +|"
+ (org-test-with-temp-text
+ (org-test-with-temp-text-in-file
+ "* Foo
CLOCK: [2016-12-27 Wed 13:09]--[2016-12-28 Wed 15:09] => 26:00"
- (let ((file (buffer-file-name)))
- (replace-regexp-in-string
- (regexp-quote file) "filename"
- (test-org-clock-clocktable-contents ":link t :lang en"))))
- (org-table-align)
- (buffer-substring-no-properties (point-min) (point-max)))))
- ;; Ignore TODO keyword, priority cookie, COMMENT and tags in
- ;; headline.
- (should
- (equal
- "| Headline | Time |
-|--------------+---------|
-| *Total time* | *26:00* |
-|--------------+---------|
-| [[Foo][Foo]] | 26:00 |"
- (org-test-with-temp-text
- "* TODO Foo
+ (let ((file (buffer-file-name)))
+ (replace-regexp-in-string
+ (regexp-quote file) "filename"
+ (test-org-clock-clocktable-contents ":link t :lang en"))))
+ (org-table-align)
+ (buffer-substring-no-properties (point-min) (point-max)))))
+ ;; Ignore TODO keyword, priority cookie, COMMENT and tags in
+ ;; headline.
+ (should
+ (string-match-p
+ "| \\[\\[Foo]\\[Foo]] +| 26:00 +|"
+ (org-test-with-temp-text
+ "* TODO Foo
CLOCK: [2016-12-27 Wed 13:09]--[2016-12-28 Wed 15:09] => 26:00"
- (test-org-clock-clocktable-contents ":link t :lang en"))))
- (should
- (equal
- "| Headline | Time |
-|--------------+---------|
-| *Total time* | *26:00* |
-|--------------+---------|
-| [[Foo][Foo]] | 26:00 |"
- (org-test-with-temp-text
- "* [#A] Foo
+ (test-org-clock-clocktable-contents ":link t :lang en"))))
+ (should
+ (string-match-p
+ "| \\[\\[Foo]\\[Foo]] +| 26:00 +|"
+ (org-test-with-temp-text
+ "* [#A] Foo
CLOCK: [2016-12-27 Wed 13:09]--[2016-12-28 Wed 15:09] => 26:00"
- (test-org-clock-clocktable-contents ":link t :lang en"))))
- (should
- (equal
- "| Headline | Time |
-|--------------+---------|
-| *Total time* | *26:00* |
-|--------------+---------|
-| [[Foo][Foo]] | 26:00 |"
- (org-test-with-temp-text
- "* COMMENT Foo
+ (test-org-clock-clocktable-contents ":link t :lang en"))))
+ (should
+ (string-match-p
+ "| \\[\\[Foo]\\[Foo]] +| 26:00 +|"
+ (org-test-with-temp-text
+ "* COMMENT Foo
CLOCK: [2016-12-27 Wed 13:09]--[2016-12-28 Wed 15:09] => 26:00"
- (test-org-clock-clocktable-contents ":link t"))))
- (should
- (equal
- "| Headline | Time |
-|--------------+---------|
-| *Total time* | *26:00* |
-|--------------+---------|
-| [[Foo][Foo]] | 26:00 |"
- (org-test-with-temp-text
- "* Foo :tag:
+ (test-org-clock-clocktable-contents ":link t"))))
+ (should
+ (string-match-p
+ "| \\[\\[Foo]\\[Foo]] +| 26:00 +|"
+ (org-test-with-temp-text
+ "* Foo :tag:
CLOCK: [2016-12-27 Wed 13:09]--[2016-12-28 Wed 15:09] => 26:00"
- (test-org-clock-clocktable-contents ":link t :lang en"))))
- ;; Remove statistics cookie from headline description.
- (should
- (equal
- "| Headline | Time |
-|--------------+---------|
-| *Total time* | *26:00* |
-|--------------+---------|
-| [[Foo][Foo]] | 26:00 |"
- (org-test-with-temp-text
- "* Foo [50%]
+ (test-org-clock-clocktable-contents ":link t :lang en"))))
+ ;; Remove statistics cookie from headline description.
+ (should
+ (string-match-p
+ "| \\[\\[Foo]\\[Foo]] +| 26:00 +|"
+ (org-test-with-temp-text
+ "* Foo [50%]
CLOCK: [2016-12-27 Wed 13:09]--[2016-12-28 Wed 15:09] => 26:00"
- (test-org-clock-clocktable-contents ":link t :lang en"))))
- (should
- (equal
- "| Headline | Time |
-|--------------+---------|
-| *Total time* | *26:00* |
-|--------------+---------|
-| [[Foo][Foo]] | 26:00 |"
- (org-test-with-temp-text
- "* Foo [1/2]
+ (test-org-clock-clocktable-contents ":link t :lang en"))))
+ (should
+ (string-match-p
+ "| \\[\\[Foo]\\[Foo]] +| 26:00 +|"
+ (org-test-with-temp-text
+ "* Foo [1/2]
CLOCK: [2016-12-27 Wed 13:09]--[2016-12-28 Wed 15:09] => 26:00"
- (test-org-clock-clocktable-contents ":link t :lang en"))))
- ;; Replace links with their description, or turn them into plain
- ;; links if there is no description.
- (should
- (equal
- "| Headline | Time |
-|-----------------------------------------------------------+---------|
-| *Total time* | *26:00* |
-|-----------------------------------------------------------+---------|
-| [[Foo [[https://orgmode.org\\][Org mode]\\]][Foo Org mode]] | 26:00 |"
- (org-test-with-temp-text
- "* Foo [[https://orgmode.org][Org mode]]
+ (test-org-clock-clocktable-contents ":link t :lang en"))))
+ ;; Replace links with their description, or turn them into plain
+ ;; links if there is no description.
+ (should
+ (string-match-p
+ "| \\[\\[Foo \\\\\\[\\\\\\[https://orgmode\\.org\\\\]\\\\\\[Org mode\\\\]\\\\]]\\[Foo Org mode]] +| 26:00 +|"
+ (org-test-with-temp-text
+ "* Foo [[https://orgmode.org][Org mode]]
CLOCK: [2016-12-27 Wed 13:09]--[2016-12-28 Wed 15:09] => 26:00"
- (test-org-clock-clocktable-contents ":link t :lang en"))))
- (should
- (equal
- "| Headline | Time |
-|-----------------------------------------------------------+---------|
-| *Total time* | *26:00* |
-|-----------------------------------------------------------+---------|
-| [[Foo [[https://orgmode.org]\\]][Foo https://orgmode.org]] | 26:00 |"
- (org-test-with-temp-text
- "* Foo [[https://orgmode.org]]
+ (test-org-clock-clocktable-contents ":link t :lang en"))))
+ (should
+ (string-match-p
+ "| \\[\\[Foo \\\\\\[\\\\\\[https://orgmode\\.org\\\\]\\\\]]\\[Foo https://orgmode\\.org]] +| 26:00 +|"
+ (org-test-with-temp-text
+ "* Foo [[https://orgmode.org]]
CLOCK: [2016-12-27 Wed 13:09]--[2016-12-28 Wed 15:09] => 26:00"
- (test-org-clock-clocktable-contents ":link t :lang en"))))))
+ (test-org-clock-clocktable-contents ":link t :lang en")))))
(ert-deftest test-org-clock/clocktable/compact ()
"Test \":compact\" parameter in Clock table."
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index 29c6ed7..d5c8593 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -2331,7 +2331,7 @@ SCHEDULED: <2014-03-04 tue.>"
;; Handle escape characters.
(should
(org-test-with-temp-text
- "* H1\n:PROPERTIES:\n:CUSTOM_ID: [%]\n:END:\n* H2\n[[#[%\\]<point>]]"
+ "* H1\n:PROPERTIES:\n:CUSTOM_ID: [%]\n:END:\n* H2\n[[#\\[%\\]<point>]]"
(org-open-at-point)
(looking-at-p "\\* H1")))
;; Throw an error on false positives.
@@ -2427,7 +2427,7 @@ Foo Bar
(looking-at "\\* TODO COMMENT Test")))
;; Correctly un-escape fuzzy links.
(should
- (org-test-with-temp-text "* [foo]\n[[*[foo\\]][With escaped characters]]"
+ (org-test-with-temp-text "* [foo]\n[[*\\[foo\\]][With escaped characters]]"
(org-open-at-point)
(bobp)))
;; Match search strings containing newline characters, including
diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
index 81f557a..b942f4e 100644
--- a/testing/lisp/test-ox.el
+++ b/testing/lisp/test-ox.el
@@ -3555,7 +3555,7 @@ Another text. (ref:text)
(org-element-map tree 'link 'identity info t) info)))))
;; Handle escaped fuzzy links.
(should
- (org-test-with-parsed-data "* [foo]\n[[[foo\\]]]"
+ (org-test-with-parsed-data "* [foo]\n[[\\[foo\\]]]"
(org-export-resolve-fuzzy-link
(org-element-map tree 'link #'identity info t) info))))