summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2019-01-13 15:14:37 -0500
committerKyle Meyer <kyle@kyleam.com>2019-01-13 15:14:37 -0500
commitba321d0e44b34840466dd386223f702615ff8562 (patch)
treeb12093148842f75072a9a57680f14fe6d802e83c
parent067c8dc6c461e42cd12e3c269c18fc02533ffc03 (diff)
parent3b7293a86b8d47e689b0205e28e16470a77eb790 (diff)
downloadorg-mode-ba321d0e44b34840466dd386223f702615ff8562.tar.gz
Merge branch 'maint'
-rw-r--r--doc/org-manual.org333
-rw-r--r--lisp/ob-core.el5
-rw-r--r--lisp/ob-eval.el2
-rw-r--r--lisp/org-agenda.el36
-rw-r--r--lisp/org-attach.el2
-rw-r--r--lisp/org-clock.el27
-rw-r--r--lisp/org-colview.el9
-rw-r--r--lisp/org-compat.el30
-rw-r--r--lisp/org-ctags.el5
-rw-r--r--lisp/org-element.el6
-rw-r--r--lisp/org-footnote.el2
-rw-r--r--lisp/org-habit.el4
-rw-r--r--lisp/org-id.el4
-rw-r--r--lisp/org-indent.el29
-rw-r--r--lisp/org-macro.el3
-rw-r--r--lisp/org-macs.el5
-rw-r--r--lisp/org-protocol.el15
-rw-r--r--lisp/org-timer.el10
-rw-r--r--lisp/org.el42
-rw-r--r--lisp/ox-html.el9
-rw-r--r--lisp/ox-odt.el4
-rw-r--r--lisp/ox-publish.el13
-rw-r--r--lisp/ox.el2
23 files changed, 331 insertions, 266 deletions
diff --git a/doc/org-manual.org b/doc/org-manual.org
index a0c254c..0913bb1 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -102,10 +102,8 @@ visited, i.e., where no Org built-in function have been loaded.
Otherwise autoload Org functions will mess up the installation.
#+end_quote
-Then, to make sure your Org configuration is taken into account,
-initialize the package system with =(package-initialize)= in your
-Emacs init file before setting any Org option. If you want to use
-Org's package repository, check out the [[https://orgmode.org/elpa.html][Org ELPA page]].
+If you want to use Org's package repository, check out the [[https://orgmode.org/elpa.html][Org ELPA
+page]].
*** Downloading Org as an archive
:PROPERTIES:
@@ -6594,7 +6592,7 @@ be selected:
| =thisweek=, =lastweek=, =thisweek-N= | a relative week |
| =thismonth=, =lastmonth=, =thismonth-N= | a relative month |
| =thisyear=, =lastyear=, =thisyear-N= | a relative year |
- | =untilnow= | all clocked time ever |
+ | =untilnow=[fn:77] | all clocked time ever |
#+vindex: org-clock-display-default-range
When this option is not set, Org falls back to the value in
@@ -6655,7 +6653,7 @@ using the =:formatter= parameter.
- =:lang= ::
- Language[fn:77] to use for descriptive cells like "Task".
+ Language[fn:78] to use for descriptive cells like "Task".
- =:link= ::
@@ -6730,7 +6728,7 @@ day, you could write:
#+end_example
#+texinfo: @noindent
-To use a specific time range you could write[fn:78]
+To use a specific time range you could write[fn:79]
#+begin_example
,#+BEGIN: clocktable :tstart "<2006-08-10 Thu 10:00>"
@@ -6786,7 +6784,7 @@ current clock, or applying it to another one.
#+vindex: org-clock-x11idle-program-name
By customizing the variable ~org-clock-idle-time~ to some integer,
such as 10 or 15, Emacs can alert you when you get back to your
-computer after being idle for that many minutes[fn:79], and ask what
+computer after being idle for that many minutes[fn:80], and ask what
you want to do with the idle time. There will be a question waiting
for you when you get back, indicating how much idle time has passed
constantly updated with the current amount, as well as a set of
@@ -6932,7 +6930,7 @@ displayed.
#+vindex: org-agenda-columns-add-appointments-to-effort-sum
If you switch to column view in the daily/weekly agenda, the effort
-column summarizes the estimated work effort for each day[fn:80], and
+column summarizes the estimated work effort for each day[fn:81], and
you can use this to find space in your schedule. To get an overview
of the entire part of the day that is committed, you can set the
option ~org-agenda-columns-add-appointments-to-effort-sum~. The
@@ -7283,7 +7281,7 @@ Now lets look at the elements of a template definition. Each entry in
- =(file+olp+datetree "filename" [ "Level 1 heading" ...])= ::
- This target[fn:81] creates a heading in a date tree[fn:82] for
+ This target[fn:82] creates a heading in a date tree[fn:83] for
today's date. If the optional outline path is given, the tree
will be built under the node it is pointing to, instead of at
top level. Check out the ~:time-prompt~ and ~:tree-type~
@@ -7390,7 +7388,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:83] allow dynamic
+In the template itself, special "%-escapes"[fn:84] allow dynamic
insertion of content. The templates are expanded in the order given
here:
@@ -7517,7 +7515,7 @@ here:
After completing the template, position point here.
#+vindex: org-store-link-props
-For specific link types, the following keywords are defined[fn:84]:
+For specific link types, the following keywords are defined[fn:85]:
#+vindex: org-from-is-user-regexp
| Link type | Available keywords |
@@ -7530,7 +7528,7 @@ For specific link types, the following keywords are defined[fn:84]:
| | =%: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:85] |
+| | =%:fromto= (either "to NAME" or "from NAME")[fn:86] |
| gnus | =%:group=, for messages also all email fields |
| w3, w3m | =%:url= |
| info | =%:file=, =%:node= |
@@ -7580,7 +7578,7 @@ Another method is /attachments/, which are files located in
a directory belonging to an outline node. Org uses directories named
by the unique ID of each entry. These directories are located in the
=data/= directory which lives in the same directory where your Org
-file lives[fn:86]. If you initialize this directory with =git init=,
+file lives[fn:87]. If you initialize this directory with =git init=,
Org automatically commits changes when it sees them. The attachment
system has been contributed to Org by John Wiegley.
@@ -8006,7 +8004,7 @@ special command:
~org-outline-path-complete-in-steps~. If you would like to be
able to create new nodes as new parents for refiling on the fly,
check the variable ~org-refile-allow-creating-parent-nodes~.
- When the variable ~org-log-refile~[fn:87] is set, a timestamp or
+ When the variable ~org-log-refile~[fn:88] is set, a timestamp or
a note is recorded whenever an entry is refiled.
- {{{kbd(C-u C-c C-w)}}} ::
@@ -8266,12 +8264,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:88].
+files/, the files listed in the variable ~org-agenda-files~[fn:89].
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:89]. You can customize ~org-agenda-files~,
+be put into the list[fn:90]. You can customize ~org-agenda-files~,
but the easiest way to maintain it is through the following commands
#+attr_texinfo: :sep and
@@ -8404,7 +8402,7 @@ commands:
- {{{kbd(<)}}} ::
#+kindex: < @r{(Agenda dispatcher)}
- Restrict an agenda command to the current buffer[fn:90]. After
+ Restrict an agenda command to the current buffer[fn:91]. After
pressing {{{kbd(<)}}}, you still need to press the character
selecting the command.
@@ -8413,7 +8411,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:91]. After pressing {{{kbd(< <)}}}, you still need to
+ subtree[fn:92]. After pressing {{{kbd(< <)}}}, you still need to
press the character selecting the command.
- {{{kbd(*)}}} ::
@@ -8464,7 +8462,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:92]---like {{{kbd(C-u 2 1 M-x org-agenda a)}}}---you
+ argument[fn:93]---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
@@ -8523,7 +8521,7 @@ the entries into an Org file. Org mode evaluates diary-style sexp
entries, and does it faster because there is no overhead for first
creating the diary display. Note that the sexp entries must start at
the left margin, no whitespace is allowed before them, as seen in the
-following segment of an Org file:[fn:93]
+following segment of an Org file:[fn:94]
#+begin_example
,* Holidays
@@ -9027,7 +9025,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:94].
+a =8:30-1pm=---may also appear as plain text[fn:95].
If the agenda integrates the Emacs diary (see [[*Weekly/daily agenda]]),
time specifications in diary entries are recognized as well.
@@ -9136,7 +9134,7 @@ custom agenda commands.
estimates. The difference between this and a custom agenda
command is that filtering is very fast, so that you can switch
quickly between different filters without having to recreate the
- agenda.[fn:95]
+ agenda.[fn:96]
You are prompted for a tag selection letter; {{{kbd(SPC)}}} means
any tag at all. Pressing {{{kbd(TAB)}}} at that prompt offers
@@ -9565,7 +9563,7 @@ the other commands, point needs to be in the desired line.
with the 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:96]. See also the
+ that are hidden by agenda filtering[fn:97]. See also the
variable ~org-clock-report-include-clocking-task~.
- {{{kbd(v c)}}} ::
@@ -10003,7 +10001,7 @@ the other commands, point needs to be in the desired line.
- {{{kbd(f)}}} ::
#+vindex: org-agenda-bulk-custom-functions
- Apply a function[fn:97] to marked entries. For example, the
+ Apply a function[fn:98] to marked entries. For example, the
function below sets the =CATEGORY= property of the entries to
=web=.
@@ -10044,7 +10042,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:98], in a way similar to the {{{kbd(i)}}} command
+ diary file[fn:99], 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.
@@ -10172,13 +10170,13 @@ after the dispatcher command in order to access the command. Usually
this will be 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:99]. The second parameter is the search type, followed by the
+key[fn:100]. 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:100] this
+ as a global search for agenda entries planned[fn:101] this
week/day.
- {{{kbd(y)}}} ::
@@ -10360,8 +10358,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:101], Postscript,
-PDF[fn:102], and iCalendar files. If you want to do this only
+export custom agenda views as plain text, HTML[fn:102], Postscript,
+PDF[fn:103], and iCalendar files. If you want to do this only
occasionally, use the following command:
- {{{kbd(C-x C-w)}}} (~org-agenda-write~) ::
@@ -10375,7 +10373,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:103]. Here is an example that first defines custom commands
+names[fn:104]. 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
@@ -10463,7 +10461,7 @@ emacs -eval (org-batch-store-agenda-views) -kill
#+end_src
#+texinfo: @noindent
-or, if you need to modify some parameters[fn:104]
+or, if you need to modify some parameters[fn:105]
#+begin_src shell
emacs -eval '(org-batch-store-agenda-views \
@@ -10704,7 +10702,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:105]:
+the following command[fn:106]:
- {{{kbd(C-c C-x \)}}} (~org-toggle-pretty-entities~) ::
#+kindex: C-c C-x \
@@ -10718,7 +10716,7 @@ the following command[fn:105]:
#+cindex: dash, special symbol
#+cindex: ellipsis, special symbol
In addition to regular entities defined above, Org exports in
-a special way[fn:106] the following commonly used character
+a special way[fn:107] the following commonly used character
combinations: =\-= is treated as a shy hyphen, =--= and =---= are
converted into dashes, and =...= becomes a compact set of dots.
@@ -10731,7 +10729,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:107] is widely used to
+symbols and the occasional formula. LaTeX[fn:108] 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
@@ -10753,7 +10751,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:108]. The only requirement is that the
+- Environments of any kind[fn:109]. The only requirement is that the
=\begin= statement appears on a new line, preceded by only
whitespace.
@@ -10797,7 +10795,7 @@ lines:
#+vindex: org-preview-latex-default-process
If you have a working LaTeX installation and =dvipng=, =dvisvgm= or
-=convert= installed[fn:109], LaTeX fragments can be processed to
+=convert= installed[fn:110], 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.
@@ -10865,7 +10863,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:110]. For example, {{{kbd(TAB)}}} expands
+ a LaTeX fragment[fn:111]. 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.
@@ -10937,9 +10935,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:111]. This
+for the example to look like the fontified Emacs buffer[fn:112]. 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:112],
+of the major mode that should be used to fontify the example[fn:113],
see [[*Structure Templates]] for shortcuts to easily insert code blocks.
#+cindex: @samp{BEGIN_SRC}
@@ -10980,7 +10978,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:113]. With the =-n= switch, links to these references
+source code[fn:114]. 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:
@@ -11018,10 +11016,10 @@ a shortcut is provided (see [[*Structure Templates]]).
#+findex: org-edit-special
Edit the source code example at point in its native mode. This
works by switching to a temporary buffer with the source code.
- You need to exit by pressing {{{kbd(C-c ')}}} again[fn:114]. The
+ You need to exit by pressing {{{kbd(C-c ')}}} again[fn:115]. 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
+ followed by 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.
@@ -11040,7 +11038,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
@@ -11069,7 +11067,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:
@@ -11276,7 +11274,7 @@ global variables, include:
#+cindex: @samp{DATE}, keyword
#+vindex: org-export-date-timestamp-format
- A date or a time-stamp[fn:118].
+ A date or a time-stamp[fn:119].
- =EMAIL= ::
@@ -11291,7 +11289,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:119].
+ des matières=[fn:120].
- =SELECT_TAGS= ::
@@ -11570,7 +11568,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:120]. If you need to exclude an unnumbered headline,
+contents[fn:121]. If you need to exclude an unnumbered headline,
along with all its children, set the =UNNUMBERED= property to =notoc=
value.
@@ -11673,7 +11671,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:121] (see [[*Search Options in File Links]]). The
+~org-link-search~[fn:122] (see [[*Search Options in File Links]]). The
ranges for =:lines= keyword are relative to the requested element.
Therefore,
@@ -11714,7 +11712,7 @@ following syntax:
: #+MACRO: name replacement text; $1, $2 are arguments
#+texinfo: @noindent
-which can be referenced using ={{{name(arg1, arg2)}}}=[fn:122]. For
+which can be referenced using ={{{name(arg1, arg2)}}}=[fn:123]. For
example
#+begin_example
@@ -11833,7 +11831,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:123]. The command below helps changing the
+is executed either[fn:124]. The command below helps changing the
comment status of a headline.
- {{{kbd(C-c ;)}}} (~org-toggle-comment~) ::
@@ -12104,7 +12102,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:124]. For valid values see
+ is set[fn:125]. For valid values see
~org-beamer-environments-default~. To add more values, see
~org-beamer-environments-extra~.
#+vindex: org-beamer-environments-default
@@ -12694,7 +12692,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:125][fn:126]. Some MathJax
+which should work out of the box with Org[fn:126][fn:127]. Some MathJax
display options can be configured via ~org-html-mathjax-options~, or
in the buffer. For example, with the following settings,
@@ -12706,7 +12704,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:127].
+extensions =cancel.js= and =noErrors.js=[fn:128].
#+vindex: org-html-mathjax-template
See the docstring of ~org-html-mathjax-options~ for all supported
@@ -12769,7 +12767,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:128] to
+HTML exporter assigns the following special CSS classes[fn:129] 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.
@@ -13010,7 +13008,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:129].
+bibliography compiler[fn:130].
*** LaTeX specific export settings
:PROPERTIES:
@@ -13636,7 +13634,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:130] and are compatible
+{{{cite(OpenDocument-v1.2 specification)}}}[fn:131] and are compatible
with LibreOffice 3.4.
*** Pre-requisites for ODT export
@@ -14037,7 +14035,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:131] as your converter, you can
+ If you prefer to use MathToWeb[fn:132] as your converter, you can
configure the above variables as shown below.
#+begin_src emacs-lisp
@@ -14048,7 +14046,7 @@ document in one of the following ways:
#+end_src
#+texinfo: @noindent
- or, to use LaTeX​ML[fn:132] instead,
+ or, to use LaTeX​ML[fn:133] instead,
#+begin_src emacs-lisp
(setq org-latex-to-mathml-convert-command
@@ -14368,7 +14366,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:133].
+OpenDocument-v1.2 specification[fn:134].
#+vindex: org-odt-table-styles
For quick preview of this feature, install the settings below and export the
@@ -14402,7 +14400,7 @@ templates, define new styles there.
To use this feature proceed as follows:
-1. Create a table template[fn:134].
+1. Create a table template[fn:135].
A table template is set of =table-cell= and =paragraph= styles for
each of the following table cell categories:
@@ -14441,7 +14439,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:135].
+2. Define a table style[fn:136].
#+vindex: org-odt-table-styles
To define a table style, create an entry for the style in the
@@ -15518,7 +15516,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:136].
+=file.org.html= in the publishing directory[fn:137].
Other files like images only need to be copied to the publishing
destination; for this you can use ~org-publish-attachment~. For
@@ -16893,13 +16891,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:137] calls the
+{{{kbd(C-c C-v e)}}} with the point on a code block[fn:138] 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:138] from an Org mode buffer or
+By calling a named code block[fn:139] 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]]).
@@ -17257,7 +17255,7 @@ default behavior is to automatically determine the result type.
If =file= is missing, Org generates the base name of the output
file from the name of the code block, and its extension from the
=file-ext= header argument. In that case, both the name and the
- extension are mandatory[fn:139].
+ extension are mandatory[fn:140].
#+begin_example
,#+name: circle
@@ -17706,10 +17704,10 @@ Code blocks in the following languages are supported.
| Asymptote | =asymptote= | Lisp | =lisp= |
| Awk | =awk= | Lua | =lua= |
| C | =C= | MATLAB | =matlab= |
-| C++ | =C++=[fn:140] | Mscgen | =mscgen= |
+| C++ | =C++=[fn:141] | Mscgen | =mscgen= |
| Clojure | =clojure= | Objective Caml | =ocaml= |
| CSS | =css= | Octave | =octave= |
-| D | =D=[fn:141] | Org mode | =org= |
+| D | =D=[fn:142] | Org mode | =org= |
| ditaa | =ditaa= | Oz | =oz= |
| Emacs Calc | =calc= | Perl | =perl= |
| Emacs Lisp | =emacs-lisp= | Plantuml | =plantuml= |
@@ -17838,7 +17836,7 @@ for Python and Emacs Lisp languages.
#+cindex: syntax, Noweb
#+cindex: source code, Noweb reference
-Org supports named blocks in Noweb[fn:142] style syntax:
+Org supports named blocks in Noweb[fn:143] style syntax:
: <<CODE-BLOCK-ID>>
@@ -18338,7 +18336,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:143].
+init file[fn:144].
#+attr_texinfo: :columns 0.1 0.9
| {{{kbd(a)}}} | =#+BEGIN_EXPORT ascii= ... =#+END_EXPORT= |
@@ -18611,7 +18609,7 @@ changes.
#+vindex: org-startup-indented
Dynamic virtual indentation is controlled by the variable
- ~org-startup-indented~[fn:144].
+ ~org-startup-indented~[fn:145].
- =indent= ::
@@ -18942,7 +18940,7 @@ uses only one star and indents text to line with the heading:
#+findex: org-indent-mode
To turn this mode on, use the minor mode, ~org-indent-mode~. Text
lines that are not headlines are prefixed with spaces to vertically
-align with the headline text[fn:145].
+align with the headline text[fn:146].
#+vindex: org-indent-indentation-per-level
To make more horizontal space, the headlines are shifted by two stars.
@@ -18977,7 +18975,7 @@ headings as shown in examples below.
#+vindex: org-adapt-indentation
Org supports this with paragraph filling, line wrapping, and
structure editing, preserving or adapting the indentation as
- appropriate[fn:146].
+ appropriate[fn:147].
- /Hiding leading stars/ ::
@@ -19010,7 +19008,7 @@ headings as shown in examples below.
#+vindex: org-odd-levels-only
Using stars for only odd levels, 1, 3, 5, ..., can also clean up
- the clutter. This removes two stars from each level[fn:147].
+ the clutter. This removes two stars from each level[fn:148].
For Org to properly handle this cleaner structure during edits
and exports, configure the variable ~org-odd-levels-only~. To
set this per-file, use either one of the following lines:
@@ -19411,7 +19409,7 @@ these variables.
#+vindex: org-mobile-directory
The mobile application needs access to a file directory on
-a server[fn:148] to interact with Emacs. Pass its location through
+a server[fn:149] 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:
@@ -19432,7 +19430,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:149]. Note that even after the mobile
+~org-mobile-use-encryption~[fn:150]. 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.
@@ -19448,15 +19446,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:150].
+~org-directory~, so all files should be inside this directory[fn:151].
Push creates a special Org file =agendas.org= with custom agenda views
-defined by the user[fn:151].
+defined by the user[fn:152].
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:152]
+downloads, it is expected to only read files whose checksums[fn:153]
have changed.
*** Pulling from the mobile application
@@ -19473,7 +19471,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:153] and appends
+ Org moves all entries found in =mobileorg.org=[fn:154] 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
@@ -19809,9 +19807,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:154]. To activate it, put
+provided by =comment.sty=[fn:155]. To activate it, put
~\usepackage{comment}~ in the document header. Orgtbl mode inserts
-a radio table skeleton[fn:147] with the command {{{kbd(M-x
+a radio table skeleton[fn:148] 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:
@@ -19830,7 +19828,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:155]:
+features[fn:156]:
#+begin_example
% BEGIN RECEIVE ORGTBL salesfigures
@@ -20049,7 +20047,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:156], ~todo~, ~alltodo~, ~tags~, ~tags-todo~,
+~agenda~, ~agenda*~[fn:157], ~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.
@@ -20092,7 +20090,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:157]. Then to selectively pick
+include all levels, use =LEVEL>0=[fn:158]. 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:
@@ -21298,13 +21296,16 @@ property.
[fn:76] The corresponding in-buffer setting is: =#+STARTUP:
lognoteclock-out=.
-[fn:77] Language terms can be set through the variable
+[fn:77] When using ~:step~, ~untilnow~ starts from the beginning of
+2003, not the beginning of time.
+
+[fn:78] Language terms can be set through the variable
~org-clock-clocktable-language-setup~.
-[fn:78] Note that all parameters must be specified in a single
+[fn:79] Note that all parameters must be specified in a single
line---the line is broken here only to fit it into the manual.
-[fn:79] On computers using macOS, idleness is based on actual user
+[fn:80] On computers using macOS, idleness is based on actual user
idleness, not just Emacs' idle time. For X11, you can install
a utility program =x11idle.c=, available in the =contrib/scripts/=
directory of the Org Git distribution, or install the xprintidle
@@ -21312,229 +21313,229 @@ package and set it to the variable ~org-clock-x11idle-program-name~ if
you are running Debian, to get the same general treatment of idleness.
On other systems, idle time refers to Emacs idle time only.
-[fn:80] Please note the pitfalls of summing hierarchical data in
+[fn:81] Please note the pitfalls of summing hierarchical data in
a flat list (see [[*Using Column View in the Agenda]]).
-[fn:81] Org used to offer four different targets for date/week tree
+[fn:82] Org used to offer four different targets for date/week tree
capture. Now, Org automatically translates these to use
~file+olp+datetree~, applying the ~:time-prompt~ and ~:tree-type~
properties. Please rewrite your date/week-tree targets using
~file+olp+datetree~ since the older targets are now deprecated.
-[fn:82] A date tree is an outline structure with years on the highest
+[fn:83] A date tree is an outline structure with years on the highest
level, months or ISO weeks as sublevels and then dates on the lowest
level. Tags are allowed in the tree structure.
-[fn:83] If you need one of these sequences literally, escape the =%=
+[fn:84] If you need one of these sequences literally, escape the =%=
with a backslash.
-[fn:84] If you define your own link types (see [[*Adding Hyperlink
+[fn:85] 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:85] This is always the other, not the user. See the variable
+[fn:86] This is always the other, not the user. See the variable
~org-from-is-user-regexp~.
-[fn:86] If you move entries or Org files from one directory to
+[fn:87] If you move entries or Org files from one directory to
another, you may want to configure ~org-attach-directory~ to contain
an absolute path.
-[fn:87] Note the corresponding =STARTUP= options =logrefile=,
+[fn:88] Note the corresponding =STARTUP= options =logrefile=,
=lognoterefile=, and =nologrefile=.
-[fn:88] If the value of that variable is not a list, but a single file
+[fn:89] 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:89] When using the dispatcher, pressing {{{kbd(<)}}} before
+[fn:90] 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:90] For backward compatibility, you can also press {{{kbd(1)}}} to
+[fn:91] For backward compatibility, you can also press {{{kbd(1)}}} to
restrict to the current buffer.
-[fn:91] For backward compatibility, you can also press {{{kbd(0)}}} to
+[fn:92] For backward compatibility, you can also press {{{kbd(0)}}} to
restrict to the current region/subtree.
-[fn:92] For backward compatibility, the universal prefix argument
+[fn:93] 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:93] The variable ~org-anniversary~ used in the example is just
+[fn:94] 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:94] You can, however, disable this by setting
+[fn:95] You can, however, disable this by setting
~org-agenda-search-headline-for-time~ variable to a ~nil~ value.
-[fn:95] Custom commands can preset a filter by binding the variable
+[fn:96] Custom commands can preset a filter by binding the variable
~org-agenda-tag-filter-preset~ as an option. This filter is then
applied to the view and persists as a basic filter through refreshes
and more secondary filtering. The filter is a global 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:96] Only tags filtering is respected here, effort filtering is
+[fn:97] Only tags filtering is respected here, effort filtering is
ignored.
-[fn:97] You can also create persistent custom functions through
+[fn:98] You can also create persistent custom functions through
~org-agenda-bulk-custom-functions~.
-[fn:98] This file is parsed for the agenda when
+[fn:99] This file is parsed for the agenda when
~org-agenda-include-diary~ is set.
-[fn:99] You can provide a description for a prefix key by inserting
+[fn:100] You can provide a description for a prefix key by inserting
a cons cell with the prefix and the description.
-[fn:100] /Planned/ means here that these entries have some planning
+[fn:101] /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:101] For HTML you need to install Hrvoje Niksic's =htmlize.el=
+[fn:102] For HTML you need to install Hrvoje Niksic's =htmlize.el=
from [[https://github.com/hniksic/emacs-htmlize][Hrvoje Niksic's repository]].
-[fn:102] To create PDF output, the Ghostscript ps2pdf utility must be
+[fn:103] To create PDF output, the Ghostscript ps2pdf utility must be
installed on the system. Selecting a PDF file also creates the
postscript file.
-[fn:103] If you want to store standard views like the weekly agenda or
+[fn:104] 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:104] Quoting depends on the system you use, please check the FAQ
+[fn:105] Quoting depends on the system you use, please check the FAQ
for examples.
-[fn:105] You can turn this on by default by setting the variable
+[fn:106] 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:106] This behavior can be disabled with =-= export setting (see
+[fn:107] This behavior can be disabled with =-= export setting (see
[[*Export Settings]]).
-[fn:107] LaTeX is a macro system based on Donald\nbsp{}E.\nbsp{}Knuth's TeX
+[fn:108] 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:108] When MathJax is used, only the environments recognized by
+[fn:109] 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:109] These are respectively available at
+[fn:110] 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:110] Org mode has a method to test if point is inside such
+[fn:111] 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:111] This works automatically for the HTML backend (it requires
+[fn:112] 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:112] Source code in code blocks may also be evaluated either
+[fn:113] 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:113] Adding =-k= to =-n -r= /keeps/ the labels in the source code
+[fn:114] 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:114] Upon exit, lines starting with =*=, =,*=, =#+= and =,#+= get
+[fn:115] Upon exit, lines starting with =*=, =,*=, =#+= and =,#+= get
a comma prepended, to keep them from being interpreted by Org as
outline nodes or special syntax. These commas are stripped when
editing with {{{kbd(C-c ')}}}, and also before export.
-[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 variable ~org-export-date-timestamp-format~ defines how
+[fn:119] The variable ~org-export-date-timestamp-format~ defines how
this timestamp are exported.
-[fn:119] For export to LaTeX format---or LaTeX-related formats such as
+[fn:120] For export to LaTeX format---or LaTeX-related formats such as
Beamer---, the =org-latex-package-alist= variable needs further
configuration. See [[LaTeX specific export settings]].
-[fn:120] At the moment, some export back-ends do not obey this
+[fn:121] 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:121] Note that ~org-link-search-must-match-exact-headline~ is
+[fn:122] 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:122] Since commas separate the arguments, commas within arguments
+[fn:123] 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:123] For a less drastic behavior, consider using a select tag (see
+[fn:124] For a less drastic behavior, consider using a select tag (see
[[*Export Settings]]) instead.
-[fn:124] If =BEAMER_ENV= is set, Org export adds =B_environment= tag
+[fn:125] 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:125] By default Org loads MathJax from [[https://cdnjs.com][cdnjs.com]] as recommended by
+[fn:126] By default Org loads MathJax from [[https://cdnjs.com][cdnjs.com]] as recommended by
[[http://www.mathjax.org][MathJax]].
-[fn:126] Please note that exported formulas are part of an HTML
+[fn:127] 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:127] See [[http://docs.mathjax.org/en/latest/tex.html#tex-extensions][TeX and LaTeX extensions]] in the [[http://docs.mathjax.org][MathJax manual]] to learn
+[fn:128] 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:128] If the classes on TODO keywords and tags lead to conflicts,
+[fn:129] 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:129] This does not allow setting different bibliography compilers
+[fn:130] 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:130] See [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][Open Document Format for Office Applications
+[fn:131] See [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][Open Document Format for Office Applications
(OpenDocument) Version 1.2]].
-[fn:131] See [[http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl][MathToWeb]].
+[fn:132] See [[http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl][MathToWeb]].
-[fn:132] See [[http://dlmf.nist.gov/LaTeXML/]].
+[fn:133] See [[http://dlmf.nist.gov/LaTeXML/]].
-[fn:133] [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][OpenDocument-v1.2 Specification]]
+[fn:134] [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][OpenDocument-v1.2 Specification]]
-[fn:134] See the =<table:table-template>= element of the
+[fn:135] See the =<table:table-template>= element of the
OpenDocument-v1.2 specification.
-[fn:135] See the attributes =table:template-name=,
+[fn:136] 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:136] If the publishing directory is the same as the source
+[fn:137] 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:137] The option ~org-babel-no-eval-on-ctrl-c-ctrl-c~ can be used
+[fn:138] 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:138] Actually, the constructs =call_<name>()= and =src_<lang>{}=
+[fn:139] Actually, the constructs =call_<name>()= and =src_<lang>{}=
are not evaluated when they appear in a keyword (see [[*Summary of
In-Buffer Settings]]).
-[fn:139] Due to the way this header argument is implemented, it
+[fn:140] Due to the way this header argument is implemented, it
implies ":results file". Therefore if it is set for multiple blocks
at once (by a subtree or buffer property for example), all blocks are
forced to produce file results. This is seldom desired behavior, so
@@ -21542,59 +21543,59 @@ it is recommended to set this header only on a per-block basis. It is
possible that this aspect of the implementation might change in the
future.
-[fn:140] C++ language is handled in =ob-C.el=. Even though the
+[fn:141] 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:141] D language is handled in =ob-C.el=. Even though the
+[fn:142] 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:142] For Noweb literate programming details, see
+[fn:143] For Noweb literate programming details, see
http://www.cs.tufts.edu/~nr/noweb/.
-[fn:143] For more information, please refer to the commentary section
+[fn:144] For more information, please refer to the commentary section
in =org-tempo.el=.
-[fn:144] Note that ~org-indent-mode~ also sets the ~wrap-prefix~
+[fn:145] 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:145] The ~org-indent-mode~ also sets the ~wrap-prefix~ correctly
+[fn:146] The ~org-indent-mode~ also sets the ~wrap-prefix~ correctly
for indenting and wrapping long lines of headlines or text. This
minor mode handles ~visual-line-mode~ and directly applied settings
through ~word-wrap~.
-[fn:146] Also see the variable ~org-adapt-indentation~.
+[fn:147] Also see the variable ~org-adapt-indentation~.
-[fn:147] Because =LEVEL=2= has 3 stars, =LEVEL=3= has 4 stars, and so
+[fn:148] Because =LEVEL=2= has 3 stars, =LEVEL=3= has 4 stars, and so
on.
-[fn:148] For a server to host files, consider using a WebDAV server,
+[fn:149] 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:149] If Emacs is configured for safe storing of passwords, then
+[fn:150] 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:150] Symbolic links in ~org-directory~ need to have the same name
+[fn:151] Symbolic links in ~org-directory~ need to have the same name
as their targets.
-[fn:151] While creating the agendas, Org mode forces =ID= properties
+[fn:152] 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:152] Checksums are stored automatically in the file
+[fn:153] Checksums are stored automatically in the file
=checksums.dat=.
-[fn:153] The file will be empty after this operation.
+[fn:154] The file will be empty after this operation.
-[fn:154] https://www.ctan.org/pkg/comment
+[fn:155] https://www.ctan.org/pkg/comment
-[fn:155] If the =TBLFM= keyword contains an odd number of dollar
+[fn:156] 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
@@ -21602,9 +21603,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:156] The ~agenda*~ view is the same as ~agenda~ except that it
+[fn:157] 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:157] Note that, for ~org-odd-levels-only~, a level number
+[fn:158] 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/lisp/ob-core.el b/lisp/ob-core.el
index 688c559..5b942ee 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2308,10 +2308,9 @@ INFO may provide the values of these header arguments (in the
(lambda (r)
;; Non-nil when result R can be turned into
;; a table.
- (and (listp r)
- (null (cdr (last r)))
+ (and (proper-list-p r)
(cl-every
- (lambda (e) (or (atom e) (null (cdr (last e)))))
+ (lambda (e) (or (atom e) (proper-list-p e)))
result)))))
;; insert results based on type
(cond
diff --git a/lisp/ob-eval.el b/lisp/ob-eval.el
index 0587851..8d5b7ed 100644
--- a/lisp/ob-eval.el
+++ b/lisp/ob-eval.el
@@ -120,7 +120,7 @@ function in various versions of Emacs.
(delete-file input-file))
(when (and error-file (file-exists-p error-file))
- (when (< 0 (nth 7 (file-attributes error-file)))
+ (when (< 0 (file-attribute-size (file-attributes error-file)))
(with-current-buffer (get-buffer-create error-buffer)
(let ((pos-from-end (- (point-max) (point))))
(or (bobp)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index b25a8e9..489ecec 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -1401,6 +1401,9 @@ current display in the agenda."
:group 'org-agenda-daily/weekly
:type 'plist)
+(defvaralias 'org-agenda-search-view-search-words-only
+ 'org-agenda-search-view-always-boolean)
+
(defcustom org-agenda-search-view-always-boolean nil
"Non-nil means the search string is interpreted as individual parts.
@@ -1429,9 +1432,6 @@ boolean search."
:version "24.1"
:type 'boolean)
-(defvaralias 'org-agenda-search-view-search-words-only
- 'org-agenda-search-view-always-boolean)
-
(defcustom org-agenda-search-view-force-full-words nil
"Non-nil means, search words must be matches as complete words.
When nil, they may also match part of a word."
@@ -1873,6 +1873,9 @@ Nil means don't hide any tags."
(const :tag "Hide none" nil)
(string :tag "Regexp ")))
+(defvaralias 'org-agenda-remove-tags-when-in-prefix
+ 'org-agenda-remove-tags)
+
(defcustom org-agenda-remove-tags nil
"Non-nil means remove the tags from the headline copy in the agenda.
When this is the symbol `prefix', only remove tags when
@@ -1883,8 +1886,7 @@ When this is the symbol `prefix', only remove tags when
(const :tag "Never" nil)
(const :tag "When prefix format contains %T" prefix)))
-(defvaralias 'org-agenda-remove-tags-when-in-prefix
- 'org-agenda-remove-tags)
+(defvaralias 'org-agenda-align-tags-to-column 'org-agenda-tags-column)
(defcustom org-agenda-tags-column 'auto
"Shift tags in agenda items to this column.
@@ -1902,8 +1904,6 @@ character screen."
:package-version '(Org . "9.1")
:version "26.1")
-(defvaralias 'org-agenda-align-tags-to-column 'org-agenda-tags-column)
-
(defcustom org-agenda-fontify-priorities 'cookies
"Non-nil means highlight low and high priorities in agenda.
When t, the highest priority entries are bold, lowest priority italic.
@@ -2084,9 +2084,9 @@ evaluate to a string."
;;; Define the org-agenda-mode
+(defvaralias 'org-agenda-keymap 'org-agenda-mode-map)
(defvar org-agenda-mode-map (make-sparse-keymap)
"Keymap for `org-agenda-mode'.")
-(defvaralias 'org-agenda-keymap 'org-agenda-mode-map)
(defvar org-agenda-menu) ; defined later in this file.
(defvar org-agenda-restrict nil) ; defined later in this file.
@@ -2229,10 +2229,14 @@ The following commands are available:
(add-hook 'post-command-hook 'org-agenda-update-agenda-type nil 'local)
(add-hook 'pre-command-hook 'org-unhighlight nil 'local)
;; Make sure properties are removed when copying text
- (add-hook 'filter-buffer-substring-functions
- (lambda (fun start end delete)
- (substring-no-properties (funcall fun start end delete)))
- nil t)
+ (if (boundp 'filter-buffer-substring-functions)
+ (add-hook 'filter-buffer-substring-functions
+ (lambda (fun start end delete)
+ (substring-no-properties (funcall fun start end delete)))
+ nil t)
+ ;; Emacs >= 24.4.
+ (add-function :filter-return (local 'filter-buffer-substring-function)
+ #'substring-no-properties))
(unless org-agenda-keep-modes
(setq org-agenda-follow-mode org-agenda-start-with-follow-mode
org-agenda-entry-text-mode org-agenda-start-with-entry-text-mode
@@ -7014,15 +7018,15 @@ When TYPE is \"scheduled\", \"deadline\", \"timestamp\" or
\"timestamp_ia\", compare within each of these type. When TYPE
is the empty string, compare all timestamps without respect of
their type."
- (let* ((def (if org-sort-agenda-notime-is-late most-positive-fixnum -1))
+ (let* ((def (and (not org-sort-agenda-notime-is-late) -1))
(ta (or (and (string-match type (or (get-text-property 1 'type a) ""))
(get-text-property 1 'ts-date a))
def))
(tb (or (and (string-match type (or (get-text-property 1 'type b) ""))
(get-text-property 1 'ts-date b))
def)))
- (cond ((< ta tb) -1)
- ((< tb ta) +1))))
+ (cond ((if ta (and tb (< ta tb)) tb) -1)
+ ((if tb (and ta (< tb ta)) ta) +1))))
(defsubst org-cmp-habit-p (a b)
"Compare the todo states of strings A and B."
@@ -10201,7 +10205,7 @@ to override `appt-message-warning-time'."
;; time and without date as argument, so it may pass wrong
;; information otherwise
(today (org-date-to-gregorian
- (time-to-days (current-time))))
+ (time-to-days nil)))
(org-agenda-restrict nil)
(files (org-agenda-files 'unrestricted)) entries file
(org-agenda-buffer nil))
diff --git a/lisp/org-attach.el b/lisp/org-attach.el
index 97f795f..fc7067e 100644
--- a/lisp/org-attach.el
+++ b/lisp/org-attach.el
@@ -356,7 +356,7 @@ This checks for the existence of a \".git\" directory in that directory."
(shell-command-to-string
"git ls-files -zmo --exclude-standard") "\0" t))
(if (and use-annex
- (>= (nth 7 (file-attributes new-or-modified))
+ (>= (file-attribute-size (file-attributes new-or-modified))
org-attach-git-annex-cutoff))
(call-process "git" nil nil nil "annex" "add" new-or-modified)
(call-process "git" nil nil nil "add" new-or-modified))
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 4eac314..ebea1bd 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -943,7 +943,7 @@ CLOCK is a cons cell of the form (MARKER START-TIME)."
(org-clock-clock-out clock fail-quietly))
((org-is-active-clock clock) nil)
(t (org-clock-clock-in clock t))))
- ((pred (time-less-p (current-time)))
+ ((pred (time-less-p nil))
(error "RESOLVE-TO must refer to a time in the past"))
(_
(when restart (error "RESTART is not valid here"))
@@ -1043,7 +1043,7 @@ to be CLOCKED OUT."))))
(and (not (memq char-pressed '(?i ?q))) char-pressed)))))
(default
(floor (/ (float-time
- (time-subtract (current-time) last-valid)) 60)))
+ (time-subtract nil last-valid)) 60)))
(keep
(and (memq ch '(?k ?K))
(read-number "Keep how many minutes? " default)))
@@ -1080,8 +1080,7 @@ to be CLOCKED OUT."))))
(keep
(time-add last-valid (seconds-to-time (* 60 keep))))
(gotback
- (time-subtract (current-time)
- (seconds-to-time (* 60 gotback))))
+ (time-subtract nil (seconds-to-time (* 60 gotback))))
(t
(error "Unexpected, please report this as a bug")))
(and gotback last-valid)
@@ -1163,7 +1162,7 @@ so long."
org-clock-marker (marker-buffer org-clock-marker))
(let* ((org-clock-user-idle-seconds (org-user-idle-seconds))
(org-clock-user-idle-start
- (time-subtract (current-time)
+ (time-subtract nil
(seconds-to-time org-clock-user-idle-seconds)))
(org-clock-resolving-clocks-due-to-idleness t))
(if (> org-clock-user-idle-seconds (* 60 org-clock-idle-time))
@@ -1173,8 +1172,7 @@ so long."
(lambda (_)
(format "Clocked in & idle for %.1f mins"
(/ (float-time
- (time-subtract (current-time)
- org-clock-user-idle-start))
+ (time-subtract nil org-clock-user-idle-start))
60.0)))
org-clock-user-idle-start)))))
@@ -2130,7 +2128,8 @@ The return value is a list containing two internal times, one for
the beginning of the range and one for its end, like the ones
returned by `current-time' or `encode-time' and a string used to
display information. If AS-STRINGS is non-nil, the returned
-times will be formatted strings.
+times will be formatted strings. Note that the first element is
+always nil when KEY is `untilnow'.
If WSTART is non-nil, use this number to specify the starting day
of a week (monday is 1). If MSTART is non-nil, use this number
@@ -2247,9 +2246,7 @@ have priority."
;; Format start and end times according to AS-STRINGS.
(let* ((start (pcase key
(`interactive (org-read-date nil t nil "Range start? "))
- ;; In theory, all clocks started after the dawn of
- ;; humanity.
- (`untilnow (encode-time 0 0 0 0 0 -50000))
+ (`untilnow nil)
(_ (encode-time 0 m h d month y))))
(end (pcase key
(`interactive (org-read-date nil t nil "Range end? "))
@@ -2273,7 +2270,7 @@ have priority."
(`untilnow "now"))))
(if (not as-strings) (list start end text)
(let ((f (cdr org-time-stamp-formats)))
- (list (format-time-string f start)
+ (list (and start (format-time-string f start))
(format-time-string f end)
text))))))
@@ -2717,7 +2714,11 @@ a number of clock tables."
((and (pred numberp) n)
(pcase-let ((`(,m ,d ,y) (calendar-gregorian-from-absolute n)))
(apply #'encode-time (list 0 0 org-extend-today-until d m y))))
- (timestamp (seconds-to-time (org-matcher-time timestamp)))))
+ (timestamp
+ (seconds-to-time
+ (org-matcher-time (or timestamp
+ ;; The year Org was born.
+ "<2003-01-01 Thu 00:00>"))))))
(end
(pcase (if range (nth 1 range) (plist-get params :tend))
((and (pred numberp) n)
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index a4d1f89..168f8cd 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -572,7 +572,7 @@ Where possible, use the standard interface for changing this line."
(eol (line-end-position))
(pom (or (get-text-property bol 'org-hd-marker) (point)))
(key (or key (get-char-property (point) 'org-columns-key)))
- (org-columns--time (float-time (current-time)))
+ (org-columns--time (float-time))
(action
(pcase key
("CLOCKSUM"
@@ -823,7 +823,7 @@ When COLUMNS-FMT-STRING is non-nil, use it as the column format."
(org-columns-goto-top-level)
;; Initialize `org-columns-current-fmt' and
;; `org-columns-current-fmt-compiled'.
- (let ((org-columns--time (float-time (current-time))))
+ (let ((org-columns--time (float-time)))
(org-columns-get-format columns-fmt-string)
(unless org-columns-inhibit-recalculation (org-columns-compute-all))
(save-restriction
@@ -1208,6 +1208,9 @@ column specification."
"Compute all columns that have operators defined."
(with-silent-modifications
(remove-text-properties (point-min) (point-max) '(org-summaries t)))
+ ;; Pass `current-time' result to `float-time' (instead of calling
+ ;; without arguments) so that only `current-time' has to be
+ ;; overridden in tests.
(let ((org-columns--time (float-time (current-time)))
seen)
(dolist (spec org-columns-current-fmt-compiled)
@@ -1551,7 +1554,7 @@ PARAMS is a property list of parameters:
(if (markerp org-columns-begin-marker)
(move-marker org-columns-begin-marker (point))
(setq org-columns-begin-marker (point-marker)))
- (let* ((org-columns--time (float-time (current-time)))
+ (let* ((org-columns--time (float-time))
(fmt
(cond
((bound-and-true-p org-agenda-overriding-columns-format))
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 0b896a1..6788a70 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -74,6 +74,13 @@
;; The misspelled variant was made obsolete in Emacs 27.1
(defalias 'pcomplete-uniquify-list 'pcomplete-uniqify-list))
+(defun org-current-time-as-list ()
+ "Compatibility wrapper for `current-time'.
+As of Emacs 27.1, `current-time' callers should not assume a list
+return value."
+ (or (ignore-errors (encode-time nil 'list))
+ (current-time)))
+
;;; Emacs < 26.1 compatibility
@@ -85,6 +92,20 @@
(defalias 'org-buffer-hash 'buffer-hash)
(defun org-buffer-hash () (md5 (current-buffer))))
+(unless (fboundp 'file-attribute-modification-time)
+ (defsubst file-attribute-modification-time (attributes)
+ "The modification time in ATTRIBUTES returned by `file-attributes'.
+This is the time of the last change to the file's contents, and
+is a list of integers (HIGH LOW USEC PSEC) in the same style
+as (current-time)."
+ (nth 5 attributes)))
+
+(unless (fboundp 'file-attribute-size)
+ (defsubst file-attribute-size (attributes)
+ "The size (in bytes) in ATTRIBUTES returned by `file-attributes'.
+This is a floating point number if the size is too large for an integer."
+ (nth 7 attributes)))
+
;;; Emacs < 25.1 compatibility
@@ -602,6 +623,15 @@ attention to case differences."
(eq t (compare-strings suffix nil nil
string start-pos nil ignore-case))))))
+(unless (fboundp 'proper-list-p)
+ ;; `proper-list-p' was added in Emacs 27.1. The function below is
+ ;; taken from Emacs subr.el 200195e824b^.
+ (defun proper-list-p (object)
+ "Return OBJECT's length if it is a proper list, nil otherwise.
+A proper list is neither circular nor dotted (i.e., its last cdr
+is nil)."
+ (and (listp object) (ignore-errors (length object)))))
+
;;; Integration with and fixes for other packages
diff --git a/lisp/org-ctags.el b/lisp/org-ctags.el
index 7dc8dd5..111be37 100644
--- a/lisp/org-ctags.el
+++ b/lisp/org-ctags.el
@@ -137,6 +137,7 @@
;;; Code:
+(eval-when-compile (require 'cl-lib))
(require 'org)
(defgroup org-ctags nil
@@ -235,7 +236,7 @@ buffer position where the tag is found."
(with-current-buffer (get-file-buffer tags-file-name)
(goto-char (point-min))
(cond
- ((re-search-forward (format "^.*%s\\([0-9]+\\),\\([0-9]+\\)$"
+ ((re-search-forward (format "^.*\^?%s\^A\\([0-9]+\\),\\([0-9]+\\)$"
(regexp-quote tag)) nil t)
(let ((line (string-to-number (match-string 1)))
(pos (string-to-number (match-string 2))))
@@ -260,7 +261,7 @@ Return the list."
(visit-tags-table-buffer 'same)
(with-current-buffer (get-file-buffer tags-file-name)
(goto-char (point-min))
- (while (re-search-forward "^.*\\(.*\\)\\([0-9]+\\),\\([0-9]+\\)$"
+ (while (re-search-forward "^.*\^?\\(.*\\)\^A\\([0-9]+\\),\\([0-9]+\\)$"
nil t)
(push (substring-no-properties (match-string 1)) taglist)))
taglist)))
diff --git a/lisp/org-element.el b/lisp/org-element.el
index 0a11570..8d16aa5 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -4906,7 +4906,7 @@ table is cleared once the synchronization is complete."
(defun org-element--cache-generate-key (lower upper)
"Generate a key between LOWER and UPPER.
-LOWER and UPPER are integers or lists, possibly empty.
+LOWER and UPPER are fixnums or lists of same, possibly empty.
If LOWER and UPPER are equals, return LOWER. Otherwise, return
a unique key, as an integer or a list of integers, according to
@@ -5114,7 +5114,7 @@ Assume ELEMENT belongs to cache and that a cache is active."
TIME-LIMIT is a time value or nil."
(and time-limit
(or (input-pending-p)
- (time-less-p time-limit (current-time)))))
+ (time-less-p time-limit nil))))
(defsubst org-element--cache-shift-positions (element offset &optional props)
"Shift ELEMENT properties relative to buffer positions by OFFSET.
@@ -5168,7 +5168,7 @@ updated before current modification are actually submitted."
(and next (aref next 0))
threshold
(and (not threshold)
- (time-add (current-time)
+ (time-add nil
org-element-cache-sync-duration))
future-change)
;; Request processed. Merge current and next offsets and
diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
index 7147a31..4a296b1 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -654,7 +654,7 @@ or new, let the user edit the definition of the footnote."
(let* ((all (org-footnote-all-labels))
(label
(if (eq org-footnote-auto-label 'random)
- (format "%x" (random most-positive-fixnum))
+ (format "%x" (abs (random)))
(org-footnote-normalize-label
(let ((propose (org-footnote-unique-label all)))
(if (eq org-footnote-auto-label t) propose
diff --git a/lisp/org-habit.el b/lisp/org-habit.el
index 06429d7..d19075d 100644
--- a/lisp/org-habit.el
+++ b/lisp/org-habit.el
@@ -288,7 +288,7 @@ Habits are assigned colors on the following basis:
(deadline (if scheduled-days
(+ scheduled-days (- d-repeat s-repeat))
(org-habit-deadline habit)))
- (m-days (or now-days (time-to-days (current-time)))))
+ (m-days (or now-days (time-to-days nil))))
(cond
((< m-days scheduled)
'(org-habit-clear-face . org-habit-clear-future-face))
@@ -406,7 +406,7 @@ current time."
"Insert consistency graph for any habitual tasks."
(let ((inhibit-read-only t)
(buffer-invisibility-spec '(org-link))
- (moment (time-subtract (current-time)
+ (moment (time-subtract nil
(list 0 (* 3600 org-extend-today-until) 0))))
(save-excursion
(goto-char (if line (point-at-bol) (point-min)))
diff --git a/lisp/org-id.el b/lisp/org-id.el
index bbf761c..f4c737f 100644
--- a/lisp/org-id.el
+++ b/lisp/org-id.el
@@ -358,7 +358,7 @@ So a typical ID could look like \"Org:4nd91V40HI\"."
"Return string with random (version 4) UUID."
(let ((rnd (md5 (format "%s%s%s%s%s%s%s"
(random)
- (current-time)
+ (org-current-time-as-list)
(user-uid)
(emacs-pid)
(user-full-name)
@@ -417,7 +417,7 @@ The input I may be a character, or a single-letter string."
"Encode TIME as a 10-digit string.
This string holds the time to micro-second accuracy, and can be decoded
using `org-id-decode'."
- (setq time (or time (current-time)))
+ (setq time (or time (org-current-time-as-list)))
(concat (org-id-int-to-b36 (nth 0 time) 4)
(org-id-int-to-b36 (nth 1 time) 4)
(org-id-int-to-b36 (or (nth 2 time) 0) 4)))
diff --git a/lisp/org-indent.el b/lisp/org-indent.el
index ecdac54..650a62f 100644
--- a/lisp/org-indent.el
+++ b/lisp/org-indent.el
@@ -184,11 +184,15 @@ during idle time."
org-hide-leading-stars)
(setq-local org-hide-leading-stars t))
(org-indent--compute-prefixes)
- (add-hook 'filter-buffer-substring-functions
- (lambda (fun start end delete)
- (org-indent-remove-properties-from-string
- (funcall fun start end delete)))
- nil t)
+ (if (boundp 'filter-buffer-substring-functions)
+ (add-hook 'filter-buffer-substring-functions
+ (lambda (fun start end delete)
+ (org-indent-remove-properties-from-string
+ (funcall fun start end delete)))
+ nil t)
+ ;; Emacs >= 24.4.
+ (add-function :filter-return (local 'filter-buffer-substring-function)
+ #'org-indent-remove-properties-from-string))
(add-hook 'after-change-functions 'org-indent-refresh-maybe nil 'local)
(add-hook 'before-change-functions
'org-indent-notify-modified-headline nil 'local)
@@ -212,10 +216,13 @@ during idle time."
(when (boundp 'org-hide-leading-stars-before-indent-mode)
(setq-local org-hide-leading-stars
org-hide-leading-stars-before-indent-mode))
- (remove-hook 'filter-buffer-substring-functions
- (lambda (fun start end delete)
- (org-indent-remove-properties-from-string
- (funcall fun start end delete))))
+ (if (boundp 'filter-buffer-substring-functions)
+ (remove-hook 'filter-buffer-substring-functions
+ (lambda (fun start end delete)
+ (org-indent-remove-properties-from-string
+ (funcall fun start end delete))))
+ (remove-function (local 'filter-buffer-substring-function)
+ #'org-indent-remove-properties-from-string))
(remove-hook 'after-change-functions 'org-indent-refresh-maybe 'local)
(remove-hook 'before-change-functions
'org-indent-notify-modified-headline 'local)
@@ -326,7 +333,7 @@ stopped."
(let* ((case-fold-search t)
(limited-re (org-get-limited-outline-regexp))
(level (or (org-current-level) 0))
- (time-limit (and delay (time-add (current-time) delay))))
+ (time-limit (and delay (time-add nil delay))))
;; For each line, set `line-prefix' and `wrap-prefix'
;; properties depending on the type of line (headline, inline
;; task, item or other).
@@ -339,7 +346,7 @@ stopped."
;; In asynchronous mode, take a break of
;; `org-indent-agent-resume-delay' every DELAY to avoid
;; blocking any other idle timer or process output.
- ((and delay (time-less-p time-limit (current-time)))
+ ((and delay (time-less-p time-limit nil))
(setq org-indent-agent-resume-timer
(run-with-idle-timer
(time-add (current-idle-time) org-indent-agent-resume-delay)
diff --git a/lisp/org-macro.el b/lisp/org-macro.el
index 164a415..c14703c 100644
--- a/lisp/org-macro.el
+++ b/lisp/org-macro.el
@@ -158,7 +158,8 @@ a file, \"input-file\" and \"modification-time\"."
'%s)))"
(prin1-to-string visited-file)
(prin1-to-string
- (nth 5 (file-attributes visited-file))))))))
+ (file-attribute-modification-time
+ (file-attributes visited-file))))))))
;; Install built-in macros.
(list
'("n" . "(eval (org-macro--counter-increment $1 $2))")
diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index a057ae5..d3e5932 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -31,6 +31,7 @@
;;; Code:
+(require 'cl-lib)
(require 'format-spec)
(declare-function org-string-collate-lessp "org-compat" (s1 s2 &optional locale ignore-case))
@@ -1112,7 +1113,9 @@ nil, just return 0."
If time is not given, defaults to 0:00. However, with optional
NODEFAULT, hour and minute fields are nil if not given.
-Throw an error if S in not a valid Org time string.
+Throw an error if S does not contain a valid Org time string.
+Note that the first match for YYYY-MM-DD will be used (e.g.,
+\"-52000-02-03\" will be taken as \"2000-02-03\").
This should be a lot faster than the `parse-time-string'."
(unless (string-match org-ts-regexp0 s)
diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el
index d20c66f..9245aa0 100644
--- a/lisp/org-protocol.el
+++ b/lisp/org-protocol.el
@@ -350,17 +350,20 @@ returned list."
ret)
l)))
-(defun org-protocol-flatten (list)
- "Transform LIST into a flat list.
+(defalias 'org-protocol-flatten
+ (if (fboundp 'flatten-tree) 'flatten-tree
+ (lambda (list)
+ "Transform LIST into a flat list.
Greedy handlers might receive a list like this from emacsclient:
\((\"/dir/org-protocol:/greedy:/~/path1\" (23 . 12)) (\"/dir/param\"))
where \"/dir/\" is the absolute path to emacsclients working directory.
This function transforms it into a flat list."
- (if (null list) ()
- (if (listp list)
- (append (org-protocol-flatten (car list)) (org-protocol-flatten (cdr list)))
- (list list))))
+ (if list
+ (if (consp list)
+ (append (org-protocol-flatten (car list))
+ (org-protocol-flatten (cdr list)))
+ (list list))))))
(defun org-protocol-parse-parameters (info &optional new-style default-order)
"Return a property list of parameters from INFO.
diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index 17d85d2..b8aa0be 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -163,6 +163,9 @@ With prefix arg STOP, stop it entirely."
(org-timer-pause-time
(let ((start-secs (float-time org-timer-start-time))
(pause-secs (float-time org-timer-pause-time)))
+ ;; Note: We pass the result of `current-time' to `time-add' and
+ ;; `float-time' below so that we can easily override the value
+ ;; in tests.
(if org-timer-countdown-timer
(let ((new-secs (- start-secs pause-secs)))
(setq org-timer-countdown-timer
@@ -171,9 +174,6 @@ With prefix arg STOP, stop it entirely."
(setq org-timer-start-time
(time-add (current-time) (seconds-to-time new-secs))))
(setq org-timer-start-time
- ;; Pass `current-time' result to `float-time' (instead
- ;; of calling without arguments) so that only
- ;; `current-time' has to be overridden in tests.
(seconds-to-time (- (float-time (current-time))
(- pause-secs start-secs)))))
(setq org-timer-pause-time nil)
@@ -402,7 +402,7 @@ VALUE can be `on', `off', or `paused'."
(message "No timer set")
(let* ((rtime (decode-time
(time-subtract (timer--time org-timer-countdown-timer)
- (current-time))))
+ nil)))
(rsecs (nth 0 rtime))
(rmins (nth 1 rtime)))
(message "%d minute(s) %d seconds left before next time out"
@@ -467,6 +467,8 @@ using three `C-u' prefix arguments."
(org-timer--run-countdown-timer
secs org-timer-countdown-timer-title))
(run-hooks 'org-timer-set-hook)
+ ;; Pass `current-time' result to `add-time' (instead nil) so
+ ;; that only `current-time' has to be overridden in tests.
(setq org-timer-start-time
(time-add (current-time) (seconds-to-time secs)))
(setq org-timer-pause-time nil)
diff --git a/lisp/org.el b/lisp/org.el
index dda91d2..0b090ee 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -258,7 +258,8 @@ byte-compiled before it is loaded."
(interactive "fFile to load: \nP")
(let* ((tangled-file (concat (file-name-sans-extension file) ".el")))
;; Tangle only if the Org file is newer than the Elisp file.
- (unless (org-file-newer-than-p tangled-file (nth 5 (file-attributes file)))
+ (unless (org-file-newer-than-p tangled-file
+ (file-attribute-modification-time file))
(org-babel-tangle-file file tangled-file "emacs-lisp"))
(if compile
(progn
@@ -1439,6 +1440,8 @@ time in Emacs."
:type 'boolean
:safe #'booleanp)
+(defvaralias 'org-special-ctrl-a 'org-special-ctrl-a/e)
+
(defcustom org-special-ctrl-a/e nil
"Non-nil means `C-a' and `C-e' behave specially in headlines and items.
@@ -1476,7 +1479,6 @@ This may also be a cons cell where the behavior for `C-a' and
(const :tag "off" nil)
(const :tag "on: before tags first" t)
(const :tag "reversed: after tags first" reversed)))))
-(defvaralias 'org-special-ctrl-a 'org-special-ctrl-a/e)
(defcustom org-special-ctrl-k nil
"Non-nil means `C-k' will behave specially in headlines.
@@ -2890,6 +2892,8 @@ because Agenda Log mode depends on the format of these entries."
(unless (assq 'note org-log-note-headings)
(push '(note . "%t") org-log-note-headings))
+(defvaralias 'org-log-state-notes-into-drawer 'org-log-into-drawer)
+
(defcustom org-log-into-drawer nil
"Non-nil means insert state change notes and time stamps into a drawer.
When nil, state changes notes will be inserted after the headline and
@@ -2921,8 +2925,6 @@ function `org-log-into-drawer' instead."
(const :tag "LOGBOOK" t)
(string :tag "Other")))
-(defvaralias 'org-log-state-notes-into-drawer 'org-log-into-drawer)
-
(defun org-log-into-drawer ()
"Name of the log drawer, as a string, or nil.
This is the value of `org-log-into-drawer'. However, if the
@@ -3231,6 +3233,9 @@ This display will be in an overlay, in the minibuffer."
:group 'org-time
:type 'boolean)
+(defvaralias 'org-popup-calendar-for-date-prompt
+ 'org-read-date-popup-calendar)
+
(defcustom org-read-date-popup-calendar t
"Non-nil means pop up a calendar when prompting for a date.
In the calendar, the date can be selected with mouse-1. However, the
@@ -3238,8 +3243,6 @@ minibuffer will also be active, and you can simply enter the date as well.
When nil, only the minibuffer will be available."
:group 'org-time
:type 'boolean)
-(defvaralias 'org-popup-calendar-for-date-prompt
- 'org-read-date-popup-calendar)
(defcustom org-extend-today-until 0
"The hour when your day really ends. Must be an integer.
@@ -3687,6 +3690,9 @@ regular expression will be included."
:group 'org-agenda
:type 'regexp)
+(defvaralias 'org-agenda-multi-occur-extra-files
+ 'org-agenda-text-search-extra-files)
+
(defcustom org-agenda-text-search-extra-files nil
"List of extra files to be searched by text search commands.
These files will be searched in addition to the agenda files by the
@@ -3704,9 +3710,6 @@ scope."
(const :tag "Agenda Archives" agenda-archives)
(repeat :inline t (file))))
-(defvaralias 'org-agenda-multi-occur-extra-files
- 'org-agenda-text-search-extra-files)
-
(defcustom org-agenda-skip-unavailable-files nil
"Non-nil means to just skip non-reachable files in `org-agenda-files'.
A nil value means to remove them, after a query, from the list."
@@ -5491,15 +5494,14 @@ the rounding returns a past time."
(apply 'encode-time
(append (list 0 (* r (floor (+ .5 (/ (float (nth 1 time)) r)))))
(nthcdr 2 time))))
- (if (and past (< (float-time (time-subtract (current-time) res)) 0))
+ (if (and past (< (float-time (time-subtract nil res)) 0))
(seconds-to-time (- (float-time res) (* r 60)))
res))))
(defun org-today ()
"Return today date, considering `org-extend-today-until'."
(time-to-days
- (time-subtract (current-time)
- (list 0 (* 3600 org-extend-today-until) 0))))
+ (time-subtract nil (list 0 (* 3600 org-extend-today-until) 0))))
;;;; Font-Lock stuff, including the activators
@@ -9488,7 +9490,7 @@ Note: this function also decodes single byte encodings like
(cons 6 128))))
(when (>= val 192) (setq eat (car shift-xor)))
(setq val (logxor val (cdr shift-xor)))
- (setq sum (+ (lsh sum (car shift-xor)) val))
+ (setq sum (+ (ash sum (car shift-xor)) val))
(when (> eat 0) (setq eat (- eat 1)))
(cond
((= 0 eat) ;multi byte
@@ -12673,8 +12675,7 @@ This function is run automatically after each state change to a DONE state."
(while (re-search-forward org-clock-line-re end t)
(when (org-at-clock-log-p) (throw :clock t))))))
(org-entry-put nil "LAST_REPEAT" (format-time-string
- (org-time-stamp-format t t)
- (current-time))))
+ (org-time-stamp-format t t))))
(when org-log-repeat
(if (or (memq 'org-add-log-note (default-value 'post-command-hook))
(memq 'org-add-log-note post-command-hook))
@@ -12729,7 +12730,7 @@ This function is run automatically after each state change to a DONE state."
(let ((nshiftmax 10)
(nshift 0))
(while (or (= nshift 0)
- (not (time-less-p (current-time) time)))
+ (not (time-less-p nil time)))
(when (= nshiftmax (cl-incf nshift))
(or (y-or-n-p
(format "%d repeater intervals were not \
@@ -16382,7 +16383,7 @@ user."
; (when (and org-read-date-prefer-future
; (not iso-year)
; (< (calendar-absolute-from-gregorian iso-date)
- ; (time-to-days (current-time))))
+ ; (time-to-days nil)))
; (setq year (1+ year)
; iso-date (calendar-gregorian-from-absolute
; (calendar-iso-to-absolute
@@ -16870,7 +16871,7 @@ signaled."
YEAR is expanded into one of the 30 next years, if possible, or
into a past one. Any year larger than 99 is returned unchanged."
(if (>= year 100) year
- (let* ((current (string-to-number (format-time-string "%Y" (current-time))))
+ (let* ((current (string-to-number (format-time-string "%Y")))
(century (/ current 100))
(offset (- year (% current 100))))
(cond ((> offset 30) (+ (* (1- century) 100) year))
@@ -17367,7 +17368,7 @@ A prefix ARG can be used to force the current date."
diff)
(when (or (org-at-timestamp-p 'lax)
(org-match-line (concat ".*" org-ts-regexp)))
- (let ((d1 (time-to-days (current-time)))
+ (let ((d1 (time-to-days nil))
(d2 (time-to-days (org-time-string-to-time (match-string 1)))))
(setq diff (- d2 d1))))
(calendar)
@@ -18529,6 +18530,9 @@ INCLUDE-LINKED is passed to `org-display-inline-images'."
(org-toggle-inline-images)
(org-toggle-inline-images)))
+;; For without-x builds.
+(declare-function image-refresh "image" (spec &optional frame))
+
(defun org-display-inline-images (&optional include-linked refresh beg end)
"Display inline images.
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index ebebd92..4158bb0 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -235,7 +235,7 @@ property on the headline itself.")
@licstart The following is the entire license notice for the
JavaScript code in this tag.
-Copyright (C) 2012-2018 Free Software Foundation, Inc.
+Copyright (C) 2012-2019 Free Software Foundation, Inc.
The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
@@ -538,7 +538,7 @@ means to use the maximum value consistent with other options."
* @licstart The following is the entire license notice for the
* JavaScript code in %SCRIPT_PATH.
*
- * Copyright (C) 2012-2018 Free Software Foundation, Inc.
+ * Copyright (C) 2012-2019 Free Software Foundation, Inc.
*
*
* The JavaScript code in this tag is free software: you can
@@ -567,7 +567,7 @@ means to use the maximum value consistent with other options."
@licstart The following is the entire license notice for the
JavaScript code in this tag.
-Copyright (C) 2012-2018 Free Software Foundation, Inc.
+Copyright (C) 2012-2019 Free Software Foundation, Inc.
The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
@@ -1961,7 +1961,8 @@ INFO is a plist used as a communication channel."
(?c . ,(plist-get info :creator))
(?C . ,(let ((file (plist-get info :input-file)))
(format-time-string timestamp-format
- (and file (nth 5 (file-attributes file))))))
+ (and file (file-attribute-modification-time
+ (file-attributes file))))))
(?v . ,(or (plist-get info :html-validation-link) "")))))
(defun org-html--build-pre/postamble (type info)
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 96a5846..d450d50 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -2196,6 +2196,10 @@ SHORT-CAPTION are strings."
(org-odt-create-manifest-file-entry media-type target-file)
target-file))
+;; For --without-x builds.
+(declare-function clear-image-cache "image.c" (&optional filter))
+(declare-function image-size "image.c" (spec &optional pixels frame))
+
(defun org-odt--image-size
(file info &optional user-width user-height scale dpi embed-as)
(let* ((--pixels-to-cms
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index 1ef9031..d9fc8d2 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -794,8 +794,8 @@ Default for SITEMAP-FILENAME is `sitemap.org'."
((or `anti-chronologically `chronologically)
(let* ((adate (org-publish-find-date a project))
(bdate (org-publish-find-date b project))
- (A (+ (lsh (car adate) 16) (cadr adate)))
- (B (+ (lsh (car bdate) 16) (cadr bdate))))
+ (A (+ (ash (car adate) 16) (cadr adate)))
+ (B (+ (ash (car bdate) 16) (cadr bdate))))
(setq retval
(if (eq sort-files 'chronologically)
(<= A B)
@@ -881,7 +881,8 @@ time in `current-time' format."
(or (org-publish-cache-get-file-property file :date nil t)
(org-publish-cache-set-file-property
file :date
- (if (file-directory-p file) (nth 5 (file-attributes file))
+ (if (file-directory-p file)
+ (file-attribute-modification-time (file-attributes file))
(let ((date (org-publish-find-property file :date project)))
;; DATE is a secondary string. If it contains
;; a time-stamp, convert it to internal format.
@@ -891,7 +892,8 @@ time in `current-time' format."
(let ((value (org-element-interpret-data ts)))
(and (org-string-nw-p value)
(org-time-string-to-time value))))))
- ((file-exists-p file) (nth 5 (file-attributes file)))
+ ((file-exists-p file)
+ (file-attribute-modification-time (file-attributes file)))
(t (error "No such file: \"%s\"" file)))))))))
(defun org-publish-sitemap-default-entry (entry style project)
@@ -1364,8 +1366,7 @@ does not exist."
(expand-file-name (or (file-symlink-p file) file)
(file-name-directory file)))))
(if (not attr) (error "No such file: \"%s\"" file)
- (+ (lsh (car (nth 5 attr)) 16)
- (cadr (nth 5 attr))))))
+ (floor (float-time (file-attribute-modification-time attr))))))
(provide 'ox-publish)
diff --git a/lisp/ox.el b/lisp/ox.el
index 0df7396..04c7a9d 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -3230,7 +3230,7 @@ locally for the subtree through node properties."
(let ((val (cond ((equal (car key) "DATE")
(or (cdr key)
(with-temp-buffer
- (org-insert-time-stamp (current-time)))))
+ (org-insert-time-stamp nil))))
((equal (car key) "TITLE")
(or (let ((visited-file
(buffer-file-name (buffer-base-buffer))))