forked from mirrors/org-mode
Merge branch 'maint' into emacs-sync
This commit is contained in:
commit
de7522661d
|
@ -44,7 +44,7 @@
|
|||
(org-babel-eval cmd body)))
|
||||
|
||||
;;;###autoload
|
||||
(eval-after-load "org"
|
||||
(eval-after-load 'org
|
||||
'(add-to-list 'org-src-lang-modes '("php" . php)))
|
||||
|
||||
(defvar org-babel-default-header-args:php '())
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
))
|
||||
|
||||
;;;###autoload
|
||||
(eval-after-load "org"
|
||||
(eval-after-load 'org
|
||||
'(add-to-list 'org-src-lang-modes '("redis" . redis)))
|
||||
|
||||
(provide 'ob-redis)
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
;; TODO: temporary can't find way to let sclang output to stdout for org-babel.
|
||||
(:output . "none")))
|
||||
|
||||
(eval-after-load "org"
|
||||
(eval-after-load 'org
|
||||
'(progn
|
||||
(add-to-list 'org-src-lang-modes '("sclang" . sclang))))
|
||||
|
||||
|
|
|
@ -104,9 +104,10 @@ googlegroups otherwise."
|
|||
(defvar elmo-nntp-default-server)
|
||||
|
||||
(defconst org-wl-folder-types
|
||||
'(("%" . imap) ("-" . nntp) ("+" . mh) ("=" . spool)
|
||||
("$" . archive) ("&" . pop) ("@" . shimbun) ("[" . search)
|
||||
("*" . multi) ("/" . filter) ("|" . pipe) ("'" . internal))
|
||||
'(("%" . imap) ("-" . nntp) ("+" . mh) ("." . maildir)
|
||||
("=" . spool) ("$" . archive) ("&" . pop) ("@" . shimbun)
|
||||
("rss" . rss) ("[" . search) ("*" . multi) ("/" . filter)
|
||||
("|" . pipe) ("'" . internal) )
|
||||
"List of folder indicators. See Wanderlust manual, section 3.")
|
||||
|
||||
;; Install the link type
|
||||
|
|
|
@ -479,7 +479,7 @@ NEW-MARK and OLD-MARK are the text of the new and old marks."
|
|||
|
||||
;;; Setting it all up
|
||||
|
||||
(eval-after-load "org"
|
||||
(eval-after-load 'org
|
||||
'(progn
|
||||
(add-to-list 'org-todo-setup-filter-hook
|
||||
#'org-choose-setup-filter)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; org-eldoc.el --- display org header and src block info using eldoc
|
||||
;;; org-eldoc.el --- display org header and src block info using eldoc -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (c) 2014-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -114,11 +114,18 @@
|
|||
doc-func)
|
||||
(if (eq 'empty cached-func)
|
||||
(when (fboundp mode-func)
|
||||
(with-temp-buffer
|
||||
(funcall mode-func)
|
||||
(setq doc-func (and eldoc-documentation-function
|
||||
(symbol-value 'eldoc-documentation-function)))
|
||||
(puthash lang doc-func org-eldoc-local-functions-cache))
|
||||
(with-temp-buffer
|
||||
(funcall mode-func)
|
||||
(setq doc-func (if (boundp 'eldoc-documentation-functions)
|
||||
(let ((doc-funs eldoc-documentation-functions))
|
||||
(lambda (callback)
|
||||
(let ((eldoc-documentation-functions doc-funs))
|
||||
(run-hook-with-args-until-success
|
||||
'eldoc-documentation-functions
|
||||
callback))))
|
||||
(and eldoc-documentation-function
|
||||
(symbol-value 'eldoc-documentation-function))))
|
||||
(puthash lang doc-func org-eldoc-local-functions-cache))
|
||||
doc-func)
|
||||
cached-func)))
|
||||
|
||||
|
@ -127,7 +134,7 @@
|
|||
(declare-function php-eldoc-function "php-eldoc" ())
|
||||
(declare-function go-eldoc--documentation-function "go-eldoc" ())
|
||||
|
||||
(defun org-eldoc-documentation-function (&rest _ignored)
|
||||
(defun org-eldoc-documentation-function (&rest args)
|
||||
"Return breadcrumbs when on a headline, args for src block header-line,
|
||||
calls other documentation functions depending on lang when inside src body."
|
||||
(or
|
||||
|
@ -160,8 +167,12 @@
|
|||
(string= lang "go")
|
||||
(string= lang "golang")) (when (require 'go-eldoc nil t)
|
||||
(go-eldoc--documentation-function)))
|
||||
(t (let ((doc-fun (org-eldoc-get-mode-local-documentation-function lang)))
|
||||
(when (functionp doc-fun) (funcall doc-fun))))))))
|
||||
(t (let ((doc-fun (org-eldoc-get-mode-local-documentation-function lang))
|
||||
(callback (car args)))
|
||||
(when (functionp doc-fun)
|
||||
(if (functionp callback)
|
||||
(funcall doc-fun callback)
|
||||
(funcall doc-fun)))))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun org-eldoc-load ()
|
||||
|
|
|
@ -841,8 +841,8 @@ a unique id will be associated to it."
|
|||
(priority
|
||||
(let ((pri (org-element-property :priority task)))
|
||||
(and pri
|
||||
(max 1 (/ (* 1000 (- org-lowest-priority pri))
|
||||
(- org-lowest-priority org-highest-priority)))))))
|
||||
(max 1 (/ (* 1000 (- org-priority-lowest pri))
|
||||
(- org-priority-lowest org-priority-highest)))))))
|
||||
(concat
|
||||
;; Opening task.
|
||||
(format "task %s \"%s\" {\n"
|
||||
|
|
|
@ -1649,6 +1649,11 @@ you, configure the option ~org-table-auto-blank-field~.
|
|||
the buffer. You can activate this minor mode by default by setting
|
||||
the option ~org-table-header-line-p~ to ~t~.
|
||||
|
||||
- {{{kbd(M-x org-table-transpose-table-at-point)}}} ::
|
||||
|
||||
#+findex: org-table-transpose-table-at-point
|
||||
Transpose the table at point and eliminate hlines.
|
||||
|
||||
** Column Width and Alignment
|
||||
:PROPERTIES:
|
||||
:DESCRIPTION: Overrule the automatic settings.
|
||||
|
@ -6281,7 +6286,7 @@ organize such tasks using a so-called repeater in a =DEADLINE=,
|
|||
the =+1m= is a repeater; the intended interpretation is that the task
|
||||
has a deadline on =<2005-10-01>= and repeats itself every (one) month
|
||||
starting from that time. You can use yearly, monthly, weekly, daily
|
||||
and hourly repeat cookies by using the =y=, =w=, =m=, =d= and =h=
|
||||
and hourly repeat cookies by using the =y=, =m=, =w=, =d= and =h=
|
||||
letters. If you need both a repeater and a special warning period in
|
||||
a deadline entry, the repeater should come first and the warning
|
||||
period last
|
||||
|
@ -7717,7 +7722,7 @@ Now lets look at the elements of a template definition. Each entry in
|
|||
|
||||
Use ~week~ to make a week tree instead of the month-day tree,
|
||||
i.e., place the headings for each day under a heading with the
|
||||
current ISO week. Use @code{month} to group entries by month
|
||||
current ISO week. Use ~month~ to group entries by month
|
||||
only. Default is to group entries by day.
|
||||
|
||||
- ~:unnarrowed~ ::
|
||||
|
@ -7945,7 +7950,7 @@ By default, Org attach uses 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:89].
|
||||
lives in the same directory where your Org file lives[fn:90].
|
||||
|
||||
When attachments are made using ~org-attach~ a default tag =ATTACH= is
|
||||
added to the node that gets the attachments.
|
||||
|
@ -8342,12 +8347,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:90].
|
||||
files/, the files listed in the variable ~org-agenda-files~[fn:91].
|
||||
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:91]. You can customize ~org-agenda-files~,
|
||||
be put into the list[fn:92]. You can customize ~org-agenda-files~,
|
||||
but the easiest way to maintain it is through the following commands
|
||||
|
||||
#+attr_texinfo: :sep and
|
||||
|
@ -8484,7 +8489,7 @@ commands:
|
|||
- {{{kbd(<)}}} ::
|
||||
|
||||
#+kindex: < @r{(Agenda dispatcher)}
|
||||
Restrict an agenda command to the current buffer[fn:92]. If
|
||||
Restrict an agenda command to the current buffer[fn:93]. 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.
|
||||
|
@ -8494,7 +8499,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:93]. After pressing {{{kbd(< <)}}}, you still need to
|
||||
subtree[fn:94]. After pressing {{{kbd(< <)}}}, you still need to
|
||||
press the character selecting the command.
|
||||
|
||||
- {{{kbd(*)}}} ::
|
||||
|
@ -8544,7 +8549,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:94]---like {{{kbd(C-u 2 1 M-x org-agenda a)}}}---you may
|
||||
argument[fn:95]---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
|
||||
|
@ -8603,7 +8608,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:95]
|
||||
them, as seen in the following segment of an Org file:[fn:96]
|
||||
|
||||
#+begin_example
|
||||
,* Holidays
|
||||
|
@ -9105,7 +9110,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:96].
|
||||
a =8:30-1pm=---may also appear as plain text[fn:97].
|
||||
|
||||
If the agenda integrates the Emacs diary (see [[*Weekly/daily agenda]]),
|
||||
time specifications in diary entries are recognized as well.
|
||||
|
@ -9195,7 +9200,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:97]. You can switch quickly between
|
||||
mostly used interactively[fn:98]. 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
|
||||
|
@ -9660,7 +9665,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:98]. See also the variable
|
||||
hidden by agenda filtering[fn:99]. See also the variable
|
||||
~org-clock-report-include-clocking-task~.
|
||||
|
||||
- {{{kbd(v c)}}} ::
|
||||
|
@ -9881,6 +9886,13 @@ the other commands, point needs to be in the desired line.
|
|||
#+findex: org-agenda-priority-down
|
||||
Decrease the priority of the current item.
|
||||
|
||||
- {{{kbd(C-c C-x e)}}} or short {{{kbd(e)}}} (~org-agenda-set-effort~) ::
|
||||
|
||||
#+kindex: e
|
||||
#+kindex: C-c C-x e
|
||||
#+findex: org-agenda-set-effort
|
||||
Set the effort property for the current item.
|
||||
|
||||
- {{{kbd(C-c C-z)}}} or short {{{kbd(z)}}} (~org-agenda-add-note~) ::
|
||||
|
||||
#+kindex: z
|
||||
|
@ -10093,7 +10105,7 @@ the other commands, point needs to be in the desired line.
|
|||
- {{{kbd(f)}}} ::
|
||||
|
||||
#+vindex: org-agenda-bulk-custom-functions
|
||||
Apply a function[fn:99] to marked entries. For example, the
|
||||
Apply a function[fn:100] to marked entries. For example, the
|
||||
function below sets the =CATEGORY= property of the entries to
|
||||
=web=.
|
||||
|
||||
|
@ -10133,7 +10145,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:100], in a way similar to the {{{kbd(i)}}} command in the
|
||||
file[fn:101], 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.
|
||||
|
||||
|
@ -10259,13 +10271,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:101]. The second parameter is the search type, followed by the
|
||||
key[fn:102]. 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:102] this week/day.
|
||||
as a global search for agenda entries planned[fn:103] this week/day.
|
||||
|
||||
- {{{kbd(y)}}} ::
|
||||
|
||||
|
@ -10447,8 +10459,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:103], Postscript,
|
||||
PDF[fn:104], and iCalendar files. If you want to do this only
|
||||
export custom agenda views as plain text, HTML[fn:104], Postscript,
|
||||
PDF[fn:105], and iCalendar files. If you want to do this only
|
||||
occasionally, use the following command:
|
||||
|
||||
- {{{kbd(C-x C-w)}}} (~org-agenda-write~) ::
|
||||
|
@ -10462,7 +10474,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:105]. Here is an example that first defines custom commands
|
||||
names[fn:106]. 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
|
||||
|
@ -10550,7 +10562,7 @@ emacs -eval (org-batch-store-agenda-views) -kill
|
|||
#+end_src
|
||||
|
||||
#+texinfo: @noindent
|
||||
or, if you need to modify some parameters[fn:106]
|
||||
or, if you need to modify some parameters[fn:107]
|
||||
|
||||
#+begin_src shell
|
||||
emacs -eval '(org-batch-store-agenda-views \
|
||||
|
@ -10808,7 +10820,7 @@ becomes = = 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:107]:
|
||||
the following command[fn:108]:
|
||||
|
||||
- {{{kbd(C-c C-x \)}}} (~org-toggle-pretty-entities~) ::
|
||||
#+kindex: C-c C-x \
|
||||
|
@ -10822,7 +10834,7 @@ the following command[fn:107]:
|
|||
#+cindex: dash, special symbol
|
||||
#+cindex: ellipsis, special symbol
|
||||
In addition to regular entities defined above, Org exports in
|
||||
a special way[fn:108] the following commonly used character
|
||||
a special way[fn:109] the following commonly used character
|
||||
combinations: =\-= is treated as a shy hyphen, =--= and =---= are
|
||||
converted into dashes, and =...= becomes a compact set of dots.
|
||||
|
||||
|
@ -10835,7 +10847,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:109] is widely used to
|
||||
symbols and the occasional formula. LaTeX[fn:110] 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
|
||||
|
@ -10857,7 +10869,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:110]. The only requirement is that the
|
||||
- Environments of any kind[fn:111]. The only requirement is that the
|
||||
=\begin= statement appears on a new line, preceded by only
|
||||
whitespace.
|
||||
|
||||
|
@ -10901,7 +10913,7 @@ lines:
|
|||
|
||||
#+vindex: org-preview-latex-default-process
|
||||
If you have a working LaTeX installation and =dvipng=, =dvisvgm= or
|
||||
=convert= installed[fn:111], LaTeX fragments can be processed to
|
||||
=convert= installed[fn:112], 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.
|
||||
|
@ -10972,7 +10984,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:112]. For example, {{{kbd(TAB)}}} expands =fr=
|
||||
a LaTeX fragment[fn:113]. 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.
|
||||
|
||||
|
@ -11055,9 +11067,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:113]. This
|
||||
for the example to look like the fontified Emacs buffer[fn:114]. 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:114],
|
||||
of the major mode that should be used to fontify the example[fn:115],
|
||||
see [[*Structure Templates]] for shortcuts to easily insert code blocks.
|
||||
|
||||
#+cindex: @samp{BEGIN_SRC}
|
||||
|
@ -11098,7 +11110,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:115]. With the =-n= switch, links to these references
|
||||
source code[fn:116]. 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:
|
||||
|
||||
|
@ -11143,7 +11155,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:116] to allow creating
|
||||
a space---are edited using Artist mode[fn:117] to allow creating
|
||||
ASCII drawings easily. Using this command in an empty line creates
|
||||
a new fixed-width region.
|
||||
|
||||
|
@ -11162,7 +11174,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:117] that does not have
|
||||
An image is a link to an image file[fn:118] that does not have
|
||||
a description part, for example
|
||||
|
||||
: ./img/cat.jpg
|
||||
|
@ -11190,7 +11202,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:118].
|
||||
~org-startup-with-inline-images~[fn:119].
|
||||
|
||||
** Captions
|
||||
:PROPERTIES:
|
||||
|
@ -11282,7 +11294,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:119], the definition is placed right
|
||||
~org-footnote-define-inline~[fn:120], 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~.
|
||||
|
||||
|
@ -11297,7 +11309,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:120],
|
||||
Depending on the variable ~org-footnote-auto-adjust~[fn:121],
|
||||
renumbering and sorting footnotes can be automatic after each
|
||||
insertion or deletion.
|
||||
|
||||
|
@ -11487,7 +11499,7 @@ global variables, include:
|
|||
|
||||
#+cindex: @samp{DATE}, keyword
|
||||
#+vindex: org-export-date-timestamp-format
|
||||
A date or a time-stamp[fn:121].
|
||||
A date or a time-stamp[fn:122].
|
||||
|
||||
- =EMAIL= ::
|
||||
|
||||
|
@ -11502,7 +11514,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:122].
|
||||
matières=[fn:123].
|
||||
|
||||
- =SELECT_TAGS= ::
|
||||
|
||||
|
@ -11779,7 +11791,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:123]. If you need to exclude an unnumbered headline,
|
||||
contents[fn:124]. If you need to exclude an unnumbered headline,
|
||||
along with all its children, set the =UNNUMBERED= property to =notoc=
|
||||
value.
|
||||
|
||||
|
@ -11898,7 +11910,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:124] (see [[*Search Options in File Links]]). The
|
||||
~org-link-search~[fn:125] (see [[*Search Options in File Links]]). The
|
||||
ranges for =:lines= keyword are relative to the requested element.
|
||||
Therefore,
|
||||
|
||||
|
@ -11938,7 +11950,7 @@ following syntax:
|
|||
: #+MACRO: name replacement text; $1, $2 are arguments
|
||||
|
||||
#+texinfo: @noindent
|
||||
which can be referenced using ={{{name(arg1, arg2)}}}=[fn:125]. For
|
||||
which can be referenced using ={{{name(arg1, arg2)}}}=[fn:126]. For
|
||||
example
|
||||
|
||||
#+begin_example
|
||||
|
@ -12057,7 +12069,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:126]. The command below helps changing the
|
||||
is executed either[fn:127]. The command below helps changing the
|
||||
comment status of a headline.
|
||||
|
||||
- {{{kbd(C-c ;)}}} (~org-toggle-comment~) ::
|
||||
|
@ -12329,7 +12341,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:127]. For valid values see
|
||||
is set[fn:128]. For valid values see
|
||||
~org-beamer-environments-default~. To add more values, see
|
||||
~org-beamer-environments-extra~.
|
||||
#+vindex: org-beamer-environments-default
|
||||
|
@ -12914,7 +12926,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:128][fn:129]. Some MathJax
|
||||
which should work out of the box with Org[fn:129][fn:130]. Some MathJax
|
||||
display options can be configured via ~org-html-mathjax-options~, or
|
||||
in the buffer. For example, with the following settings,
|
||||
|
||||
|
@ -12926,7 +12938,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:130].
|
||||
extensions =cancel.js= and =noErrors.js=[fn:131].
|
||||
|
||||
#+vindex: org-html-mathjax-template
|
||||
See the docstring of ~org-html-mathjax-options~ for all supported
|
||||
|
@ -12989,7 +13001,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:131] to
|
||||
HTML exporter assigns the following special CSS classes[fn:132] 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.
|
||||
|
@ -13226,7 +13238,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:132].
|
||||
bibliography compiler[fn:133].
|
||||
|
||||
*** LaTeX specific export settings
|
||||
:PROPERTIES:
|
||||
|
@ -13848,7 +13860,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:133] and are compatible
|
||||
{{{cite(OpenDocument-v1.2 specification)}}}[fn:134] and are compatible
|
||||
with LibreOffice 3.4.
|
||||
|
||||
*** Pre-requisites for ODT export
|
||||
|
@ -14249,7 +14261,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:134] as your converter, you can
|
||||
If you prefer to use MathToWeb[fn:135] as your converter, you can
|
||||
configure the above variables as shown below.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -14260,7 +14272,7 @@ document in one of the following ways:
|
|||
#+end_src
|
||||
|
||||
#+texinfo: @noindent
|
||||
or, to use LaTeXML[fn:135] instead,
|
||||
or, to use LaTeXML[fn:136] instead,
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq org-latex-to-mathml-convert-command
|
||||
|
@ -14579,7 +14591,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:136].
|
||||
OpenDocument-v1.2 specification[fn:137].
|
||||
|
||||
#+vindex: org-odt-table-styles
|
||||
For quick preview of this feature, install the settings below and export the
|
||||
|
@ -14613,7 +14625,7 @@ templates, define new styles there.
|
|||
|
||||
To use this feature proceed as follows:
|
||||
|
||||
1. Create a table template[fn:137].
|
||||
1. Create a table template[fn:138].
|
||||
|
||||
A table template is set of =table-cell= and =paragraph= styles for
|
||||
each of the following table cell categories:
|
||||
|
@ -14652,7 +14664,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:138].
|
||||
2. Define a table style[fn:139].
|
||||
|
||||
#+vindex: org-odt-table-styles
|
||||
To define a table style, create an entry for the style in the
|
||||
|
@ -15766,7 +15778,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:139].
|
||||
=file.org.html= in the publishing directory[fn:140].
|
||||
|
||||
Other files like images only need to be copied to the publishing
|
||||
destination; for this you can use ~org-publish-attachment~. For
|
||||
|
@ -17144,13 +17156,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:140] calls the
|
||||
{{{kbd(C-c C-v e)}}} with the point on a code block[fn:141] 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:141] from an Org mode buffer or
|
||||
By calling a named code block[fn:142] 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]]).
|
||||
|
||||
|
@ -17352,7 +17364,7 @@ they are mutually exclusive.
|
|||
|
||||
- =value= ::
|
||||
|
||||
Default for most Babel libraries[fn:141]. Functional mode. Org
|
||||
Default for most Babel libraries[fn:142]. Functional mode. Org
|
||||
gets the value by wrapping the code in a function definition in the
|
||||
language of the source block. That is why when using =:results
|
||||
value=, code should execute like a function and return a value. For
|
||||
|
@ -17926,10 +17938,10 @@ Code blocks in the following languages are supported.
|
|||
| Asymptote | =asymptote= | Lisp | =lisp= |
|
||||
| Awk | =awk= | Lua | =lua= |
|
||||
| C | =C= | MATLAB | =matlab= |
|
||||
| C++ | =C++=[fn:142] | Mscgen | =mscgen= |
|
||||
| C++ | =C++=[fn:143] | Mscgen | =mscgen= |
|
||||
| Clojure | =clojure= | Objective Caml | =ocaml= |
|
||||
| CSS | =css= | Octave | =octave= |
|
||||
| D | =D=[fn:143] | Org mode | =org= |
|
||||
| D | =D=[fn:144] | Org mode | =org= |
|
||||
| ditaa | =ditaa= | Oz | =oz= |
|
||||
| Emacs Calc | =calc= | Perl | =perl= |
|
||||
| Emacs Lisp | =emacs-lisp= | Plantuml | =plantuml= |
|
||||
|
@ -18060,7 +18072,7 @@ for Python and Emacs Lisp languages.
|
|||
|
||||
#+cindex: @samp{noweb-ref}, header argument
|
||||
Source code blocks can include references to other source code blocks,
|
||||
using a noweb[fn:144] style syntax:
|
||||
using a noweb[fn:145] style syntax:
|
||||
|
||||
: <<CODE-BLOCK-ID>>
|
||||
|
||||
|
@ -18571,7 +18583,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:145].
|
||||
init file[fn:146].
|
||||
|
||||
#+attr_texinfo: :columns 0.1 0.9
|
||||
| {{{kbd(a)}}} | =#+BEGIN_EXPORT ascii= ... =#+END_EXPORT= |
|
||||
|
@ -18651,7 +18663,7 @@ 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:146].
|
||||
the headline text[fn:147].
|
||||
|
||||
#+vindex: org-indent-indentation-per-level
|
||||
To make more horizontal space, the headlines are shifted by two
|
||||
|
@ -18679,9 +18691,9 @@ 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[fn:148]:
|
||||
settings[fn:149]:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq org-adapt-indentation t
|
||||
|
@ -18948,7 +18960,7 @@ changes.
|
|||
|
||||
#+vindex: org-startup-indented
|
||||
Dynamic virtual indentation is controlled by the variable
|
||||
~org-startup-indented~[fn:149].
|
||||
~org-startup-indented~[fn:150].
|
||||
|
||||
| =indent= | Start with Org Indent mode turned on. |
|
||||
| =noindent= | Start with Org Indent mode turned off. |
|
||||
|
@ -19767,7 +19779,7 @@ Tags]]) only for those set in these variables.
|
|||
|
||||
#+vindex: org-mobile-directory
|
||||
The mobile application needs access to a file directory on
|
||||
a server[fn:150] to interact with Emacs. Pass its location through
|
||||
a server[fn:151] 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:
|
||||
|
||||
|
@ -19788,7 +19800,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:151]. Note that even after the mobile
|
||||
~org-mobile-use-encryption~[fn:152]. 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.
|
||||
|
@ -19804,15 +19816,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:152].
|
||||
~org-directory~, so all files should be inside this directory[fn:153].
|
||||
|
||||
Push creates a special Org file =agendas.org= with custom agenda views
|
||||
defined by the user[fn:153].
|
||||
defined by the user[fn:154].
|
||||
|
||||
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:154]
|
||||
downloads, it is expected to only read files whose checksums[fn:155]
|
||||
have changed.
|
||||
|
||||
*** Pulling from the mobile application
|
||||
|
@ -19829,7 +19841,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:155] and appends
|
||||
Org moves all entries found in =mobileorg.org=[fn:156] 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
|
||||
|
@ -20125,9 +20137,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:156]. To activate it, put
|
||||
provided by =comment.sty=[fn:157]. To activate it, put
|
||||
~\usepackage{comment}~ in the document header. Orgtbl mode inserts
|
||||
a radio table skeleton[fn:157] with the command {{{kbd(M-x
|
||||
a radio table skeleton[fn:158] 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:
|
||||
|
||||
|
@ -20146,7 +20158,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:158]:
|
||||
features[fn:159]:
|
||||
|
||||
#+begin_example
|
||||
% BEGIN RECEIVE ORGTBL salesfigures
|
||||
|
@ -20362,7 +20374,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:159], ~todo~, ~alltodo~, ~tags~, ~tags-todo~,
|
||||
~agenda~, ~agenda*~[fn:160], ~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.
|
||||
|
@ -20405,7 +20417,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:160]. Then to selectively pick
|
||||
include all levels, use =LEVEL>0=[fn:161]. 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:
|
||||
|
@ -21622,34 +21634,38 @@ accessed in capture templates in a similar way.
|
|||
[fn:89] This is always the other, not the user. See the variable
|
||||
~org-link-from-user-regexp~.
|
||||
|
||||
[fn:90] If the value of that variable is not a list, but a single file
|
||||
[fn:90] 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:91] 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:91] When using the dispatcher, pressing {{{kbd(<)}}} before
|
||||
[fn:92] 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:92] For backward compatibility, you can also press {{{kbd(1)}}} to
|
||||
[fn:93] For backward compatibility, you can also press {{{kbd(1)}}} to
|
||||
restrict to the current buffer.
|
||||
|
||||
[fn:93] For backward compatibility, you can also press {{{kbd(0)}}} to
|
||||
[fn:94] For backward compatibility, you can also press {{{kbd(0)}}} to
|
||||
restrict to the current region/subtree.
|
||||
|
||||
[fn:94] For backward compatibility, the universal prefix argument
|
||||
[fn:95] 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:95] The variable ~org-anniversary~ used in the example is just
|
||||
[fn:96] 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:96] You can, however, disable this by setting
|
||||
[fn:97] You can, however, disable this by setting
|
||||
~org-agenda-search-headline-for-time~ variable to a ~nil~ value.
|
||||
|
||||
[fn:97] Custom agenda commands can preset a filter by binding one of
|
||||
[fn:98] 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
|
||||
|
@ -21659,221 +21675,221 @@ 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:98] Only tags filtering is respected here, effort filtering is
|
||||
[fn:99] Only tags filtering is respected here, effort filtering is
|
||||
ignored.
|
||||
|
||||
[fn:99] You can also create persistent custom functions through
|
||||
[fn:100] You can also create persistent custom functions through
|
||||
~org-agenda-bulk-custom-functions~.
|
||||
|
||||
[fn:100] This file is parsed for the agenda when
|
||||
[fn:101] This file is parsed for the agenda when
|
||||
~org-agenda-include-diary~ is set.
|
||||
|
||||
[fn:101] You can provide a description for a prefix key by inserting
|
||||
[fn:102] You can provide a description for a prefix key by inserting
|
||||
a cons cell with the prefix and the description.
|
||||
|
||||
[fn:102] /Planned/ means here that these entries have some planning
|
||||
[fn:103] /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:103] For HTML you need to install Hrvoje Nikšić's =htmlize.el=
|
||||
[fn:104] 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:104] To create PDF output, the Ghostscript ps2pdf utility must be
|
||||
[fn:105] To create PDF output, the Ghostscript ps2pdf utility must be
|
||||
installed on the system. Selecting a PDF file also creates the
|
||||
postscript file.
|
||||
|
||||
[fn:105] If you want to store standard views like the weekly agenda or
|
||||
[fn:106] 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:106] Quoting depends on the system you use, please check the FAQ
|
||||
[fn:107] Quoting depends on the system you use, please check the FAQ
|
||||
for examples.
|
||||
|
||||
[fn:107] You can turn this on by default by setting the variable
|
||||
[fn:108] 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:108] This behavior can be disabled with =-= export setting (see
|
||||
[fn:109] This behavior can be disabled with =-= export setting (see
|
||||
[[*Export Settings]]).
|
||||
|
||||
[fn:109] LaTeX is a macro system based on Donald\nbsp{}E.\nbsp{}Knuth's TeX
|
||||
[fn:110] 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:110] When MathJax is used, only the environments recognized by
|
||||
[fn:111] 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:111] These are respectively available at
|
||||
[fn:112] 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:112] Org mode has a method to test if point is inside such
|
||||
[fn:113] 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:113] This works automatically for the HTML backend (it requires
|
||||
[fn:114] 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:114] Source code in code blocks may also be evaluated either
|
||||
[fn:115] 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:115] Adding =-k= to =-n -r= /keeps/ the labels in the source code
|
||||
[fn:116] 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:116] You may select a different mode with the variable
|
||||
[fn:117] You may select a different mode with the variable
|
||||
~org-edit-fixed-width-region-mode~.
|
||||
|
||||
[fn:117] What Emacs considers to be an image depends on
|
||||
[fn:118] What Emacs considers to be an image depends on
|
||||
~image-file-name-extensions~ and ~image-file-name-regexps~.
|
||||
|
||||
[fn:118] The variable ~org-startup-with-inline-images~ can be set
|
||||
[fn:119] The variable ~org-startup-with-inline-images~ can be set
|
||||
within a buffer with the =STARTUP= options =inlineimages= and
|
||||
=noinlineimages=.
|
||||
|
||||
[fn:119] The corresponding in-buffer setting is: =#+STARTUP: fninline=
|
||||
[fn:120] The corresponding in-buffer setting is: =#+STARTUP: fninline=
|
||||
or =#+STARTUP: nofninline=.
|
||||
|
||||
[fn:120] The corresponding in-buffer options are =#+STARTUP: fnadjust=
|
||||
[fn:121] The corresponding in-buffer options are =#+STARTUP: fnadjust=
|
||||
and =#+STARTUP: nofnadjust=.
|
||||
|
||||
[fn:121] The variable ~org-export-date-timestamp-format~ defines how
|
||||
[fn:122] The variable ~org-export-date-timestamp-format~ defines how
|
||||
this timestamp are exported.
|
||||
|
||||
[fn:122] DEFINITION NOT FOUND.
|
||||
[fn:123] DEFINITION NOT FOUND.
|
||||
|
||||
[fn:123] At the moment, some export back-ends do not obey this
|
||||
[fn:124] 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:124] Note that ~org-link-search-must-match-exact-headline~ is
|
||||
[fn:125] 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:125] Since commas separate the arguments, commas within arguments
|
||||
[fn:126] 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:126] For a less drastic behavior, consider using a select tag (see
|
||||
[fn:127] For a less drastic behavior, consider using a select tag (see
|
||||
[[*Export Settings]]) instead.
|
||||
|
||||
[fn:127] If =BEAMER_ENV= is set, Org export adds =B_environment= tag
|
||||
[fn:128] 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:128] By default Org loads MathJax from [[https://cdnjs.com][cdnjs.com]] as recommended by
|
||||
[fn:129] By default Org loads MathJax from [[https://cdnjs.com][cdnjs.com]] as recommended by
|
||||
[[http://www.mathjax.org][MathJax]].
|
||||
|
||||
[fn:129] Please note that exported formulas are part of an HTML
|
||||
[fn:130] 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: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
|
||||
[fn:131] 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:131] If the classes on TODO keywords and tags lead to conflicts,
|
||||
[fn:132] 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:132] This does not allow setting different bibliography compilers
|
||||
[fn:133] 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:133] See [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][Open Document Format for Office Applications
|
||||
[fn:134] See [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][Open Document Format for Office Applications
|
||||
(OpenDocument) Version 1.2]].
|
||||
|
||||
[fn:134] See [[http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl][MathToWeb]].
|
||||
[fn:135] See [[http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl][MathToWeb]].
|
||||
|
||||
[fn:135] See [[http://dlmf.nist.gov/LaTeXML/]].
|
||||
[fn:136] See [[http://dlmf.nist.gov/LaTeXML/]].
|
||||
|
||||
[fn:136] [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][OpenDocument-v1.2 Specification]]
|
||||
[fn:137] [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][OpenDocument-v1.2 Specification]]
|
||||
|
||||
[fn:137] See the =<table:table-template>= element of the
|
||||
[fn:138] See the =<table:table-template>= element of the
|
||||
OpenDocument-v1.2 specification.
|
||||
|
||||
[fn:138] See the attributes =table:template-name=,
|
||||
[fn:139] 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:139] If the publishing directory is the same as the source
|
||||
[fn:140] 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:140] The option ~org-babel-no-eval-on-ctrl-c-ctrl-c~ can be used
|
||||
[fn:141] 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:141] Actually, the constructs =call_<name>()= and =src_<lang>{}=
|
||||
[fn:142] Actually, the constructs =call_<name>()= and =src_<lang>{}=
|
||||
are not evaluated when they appear in a keyword (see [[*Summary of
|
||||
In-Buffer Settings]]).
|
||||
|
||||
[fn:142] C++ language is handled in =ob-C.el=. Even though the
|
||||
[fn:143] 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:143] D language is handled in =ob-C.el=. Even though the
|
||||
[fn:144] 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:144] For noweb literate programming details, see
|
||||
[fn:145] For noweb literate programming details, see
|
||||
http://www.cs.tufts.edu/~nr/noweb/.
|
||||
|
||||
[fn:145] For more information, please refer to the commentary section
|
||||
[fn:146] For more information, please refer to the commentary section
|
||||
in =org-tempo.el=.
|
||||
|
||||
[fn:146] Org Indent mode also sets ~wrap-prefix~ correctly for
|
||||
[fn:147] 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: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] ~org-adapt-indentation~ can also be set to ='headline-data=,
|
||||
[fn:149] ~org-adapt-indentation~ can also be set to ='headline-data=,
|
||||
in which case only data lines below the headline will be indented.
|
||||
|
||||
[fn:149] Note that Org Indent mode also sets the ~wrap-prefix~
|
||||
[fn:150] 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:150] For a server to host files, consider using a WebDAV server,
|
||||
[fn:151] 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:151] If Emacs is configured for safe storing of passwords, then
|
||||
[fn:152] 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:152] Symbolic links in ~org-directory~ need to have the same name
|
||||
[fn:153] Symbolic links in ~org-directory~ need to have the same name
|
||||
as their targets.
|
||||
|
||||
[fn:153] While creating the agendas, Org mode forces =ID= properties
|
||||
[fn:154] 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:154] Checksums are stored automatically in the file
|
||||
[fn:155] Checksums are stored automatically in the file
|
||||
=checksums.dat=.
|
||||
|
||||
[fn:155] The file will be empty after this operation.
|
||||
[fn:156] The file will be empty after this operation.
|
||||
|
||||
[fn:156] https://www.ctan.org/pkg/comment
|
||||
[fn:157] https://www.ctan.org/pkg/comment
|
||||
|
||||
[fn:157] By default this works only for LaTeX, HTML, and Texinfo.
|
||||
[fn:158] By default this works only for LaTeX, HTML, and Texinfo.
|
||||
Configure the variable ~orgtbl-radio-table-templates~ to install
|
||||
templates for other modes.
|
||||
|
||||
[fn:158] If the =TBLFM= keyword contains an odd number of dollar
|
||||
[fn:159] 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
|
||||
|
@ -21881,13 +21897,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:159] The ~agenda*~ view is the same as ~agenda~ except that it
|
||||
[fn:160] 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:160] Note that, for ~org-odd-levels-only~, a level number
|
||||
[fn:161] Note that, for ~org-odd-levels-only~, a level number
|
||||
corresponds to order in the hierarchy, not to the number of stars.
|
||||
|
||||
[fn:161] 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.
|
||||
|
|
|
@ -234,6 +234,10 @@ explicitly:
|
|||
(add-hook 'org-mode-hook (lambda () (electric-indent-local-mode -1)))
|
||||
#+end_src
|
||||
|
||||
Alternatively, if you wish to keep =RET= as the "smart-return" key,
|
||||
but dislike Org's default indentation of sections, you may prefer to
|
||||
customize ~org-adapt-indentation~ to either =nil= or ='headline-data=.
|
||||
|
||||
*** =ob-C.el= allows the inclusion of non-system header files
|
||||
|
||||
In C and C++ blocks, ~:includes~ arguments that do not start with a
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: William Waites
|
||||
;; Keywords: literate programming, music
|
||||
;; Homepage: http://www.tardis.ed.ac.uk/wwaites
|
||||
;; Homepage: https://www.tardis.ed.ac.uk/~wwaites
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
;; session evaluation is supported. Requires both coq.el and
|
||||
;; coq-inferior.el, both of which are distributed with Coq.
|
||||
;;
|
||||
;; http://coq.inria.fr/
|
||||
;; https://coq.inria.fr/
|
||||
|
||||
;;; Code:
|
||||
(require 'ob)
|
||||
|
|
|
@ -2781,7 +2781,7 @@ block but are passed literally to the \"example-block\"."
|
|||
(lang (nth 0 info))
|
||||
(body (nth 1 info))
|
||||
(comment (string= "noweb" (cdr (assq :comments (nth 2 info)))))
|
||||
(noweb-re (format "^\\(.*?\\)\\(%s\\)"
|
||||
(noweb-re (format "\\(.*?\\)\\(%s\\)"
|
||||
(with-current-buffer parent-buffer
|
||||
(org-babel-noweb-wrap))))
|
||||
(cache nil)
|
||||
|
|
|
@ -405,8 +405,7 @@ inhibit insertion of results into the buffer."
|
|||
(`lob
|
||||
(save-excursion
|
||||
(goto-char (nth 5 info))
|
||||
(let (org-confirm-babel-evaluate)
|
||||
(org-babel-execute-src-block nil info)))))))))
|
||||
(org-babel-execute-src-block nil info))))))))
|
||||
|
||||
(provide 'ob-exp)
|
||||
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
|
||||
;;; Requirements:
|
||||
|
||||
;; - a non-browser javascript engine such as node.js http://nodejs.org/
|
||||
;; or mozrepl http://wiki.github.com/bard/mozrepl/
|
||||
;; - a non-browser javascript engine such as node.js https://nodejs.org/
|
||||
;; or mozrepl https://wiki.github.com/bard/mozrepl/
|
||||
;;
|
||||
;; - for session based evaluation mozrepl and moz.el are required see
|
||||
;; http://wiki.github.com/bard/mozrepl/emacs-integration for
|
||||
;; https://wiki.github.com/bard/mozrepl/emacs-integration for
|
||||
;; configuration instructions
|
||||
|
||||
;;; Code:
|
||||
|
|
|
@ -111,11 +111,11 @@ This function is called by `org-babel-execute-src-block'."
|
|||
(cond
|
||||
((or (member "code" result-params)
|
||||
(member "pp" result-params))
|
||||
(format "(pretty (out \"/dev/null\" %s))" full-body))
|
||||
(format "(pretty (out \"%s\" %s))" null-device full-body))
|
||||
((and (member "value" result-params) (not session))
|
||||
(format "(print (out \"/dev/null\" %s))" full-body))
|
||||
(format "(print (out \"%s\" %s))" null-device full-body))
|
||||
((member "value" result-params)
|
||||
(format "(out \"/dev/null\" %s)" full-body))
|
||||
(format "(out \"%s\" %s)" null-device full-body))
|
||||
(t full-body)))
|
||||
(result
|
||||
(if (not (string= session-name "none"))
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
;; Org-Babel support for evaluating plantuml script.
|
||||
;;
|
||||
;; Inspired by Ian Yang's org-export-blocks-format-plantuml
|
||||
;; http://www.emacswiki.org/emacs/org-export-blocks-format-plantuml.el
|
||||
;; https://www.emacswiki.org/emacs/org-export-blocks-format-plantuml.el
|
||||
|
||||
;;; Requirements:
|
||||
|
||||
|
|
|
@ -241,8 +241,8 @@ def main():
|
|||
open('%s', 'w').write( pprint.pformat(main()) )")
|
||||
|
||||
(defconst org-babel-python--exec-tmpfile "\
|
||||
with open('%s') as f:
|
||||
exec(compile(f.read(), f.name, 'exec'))"
|
||||
with open('%s') as __org_babel_python_tmpfile:
|
||||
exec(compile(__org_babel_python_tmpfile.read(), __org_babel_python_tmpfile.name, 'exec'))"
|
||||
"Template for Python session command with output results.
|
||||
|
||||
Has a single %s escape, the tempfile containing the source code
|
||||
|
@ -253,20 +253,20 @@ to evaluate.")
|
|||
"Return Python code to evaluate SRC-FILE and write result to RESULT-FILE."
|
||||
(format "\
|
||||
import ast
|
||||
with open('%s') as f:
|
||||
__org_babel_python_ast = ast.parse(f.read())
|
||||
with open('%s') as __org_babel_python_tmpfile:
|
||||
__org_babel_python_ast = ast.parse(__org_babel_python_tmpfile.read())
|
||||
__org_babel_python_final = __org_babel_python_ast.body[-1]
|
||||
if isinstance(__org_babel_python_final, ast.Expr):
|
||||
__org_babel_python_ast.body = __org_babel_python_ast.body[:-1]
|
||||
exec(compile(__org_babel_python_ast, '<string>', 'exec'))
|
||||
__org_babel_python_final = eval(compile(ast.Expression(
|
||||
__org_babel_python_final.value), '<string>', 'eval'))
|
||||
with open('%s', 'w') as f:
|
||||
with open('%s', 'w') as __org_babel_python_tmpfile:
|
||||
if %s:
|
||||
import pprint
|
||||
f.write(pprint.pformat(__org_babel_python_final))
|
||||
__org_babel_python_tmpfile.write(pprint.pformat(__org_babel_python_final))
|
||||
else:
|
||||
f.write(str(__org_babel_python_final))
|
||||
__org_babel_python_tmpfile.write(str(__org_babel_python_final))
|
||||
else:
|
||||
exec(compile(__org_babel_python_ast, '<string>', 'exec'))
|
||||
__org_babel_python_final = None"
|
||||
|
|
|
@ -30,16 +30,17 @@
|
|||
;; - ruby and irb executables :: http://www.ruby-lang.org/
|
||||
;;
|
||||
;; - ruby-mode :: Can be installed through ELPA, or from
|
||||
;; http://github.com/eschulte/rinari/raw/master/util/ruby-mode.el
|
||||
;; https://github.com/eschulte/rinari/raw/master/util/ruby-mode.el
|
||||
;;
|
||||
;; - inf-ruby mode :: Can be installed through ELPA, or from
|
||||
;; http://github.com/eschulte/rinari/raw/master/util/inf-ruby.el
|
||||
;; https://github.com/eschulte/rinari/raw/master/util/inf-ruby.el
|
||||
|
||||
;;; Code:
|
||||
(require 'ob)
|
||||
(require 'org-macs)
|
||||
|
||||
(declare-function run-ruby "ext:inf-ruby" (&optional command name))
|
||||
(declare-function run-ruby-or-pop-to-buffer "ext:inf-ruby" (command &optional name buffer))
|
||||
(declare-function inf-ruby-buffer "ext:inf-ruby" ())
|
||||
(declare-function xmp "ext:rcodetools" (&optional option))
|
||||
|
||||
(defvar inf-ruby-default-implementation)
|
||||
|
@ -51,7 +52,8 @@
|
|||
(defvar org-babel-default-header-args:ruby '())
|
||||
|
||||
(defvar org-babel-ruby-command "ruby"
|
||||
"Name of command to use for executing ruby code.")
|
||||
"Name of command to use for executing ruby code.
|
||||
It's possible to override it by using a header argument `:ruby'")
|
||||
|
||||
(defcustom org-babel-ruby-hline-to "nil"
|
||||
"Replace hlines in incoming tables with this when translating to ruby."
|
||||
|
@ -71,9 +73,12 @@
|
|||
"Execute a block of Ruby code with Babel.
|
||||
This function is called by `org-babel-execute-src-block'."
|
||||
(let* ((session (org-babel-ruby-initiate-session
|
||||
(cdr (assq :session params))))
|
||||
(cdr (assq :session params)) params))
|
||||
(result-params (cdr (assq :result-params params)))
|
||||
(result-type (cdr (assq :result-type params)))
|
||||
(org-babel-ruby-command
|
||||
(or (cdr (assq :ruby params))
|
||||
org-babel-ruby-command))
|
||||
(full-body (org-babel-expand-body:generic
|
||||
body params (org-babel-variable-assignments:ruby params)))
|
||||
(result (if (member "xmp" result-params)
|
||||
|
@ -148,17 +153,21 @@ Emacs-lisp table, otherwise return the results as a string."
|
|||
res)
|
||||
res)))
|
||||
|
||||
(defun org-babel-ruby-initiate-session (&optional session _params)
|
||||
(defun org-babel-ruby-initiate-session (&optional session params)
|
||||
"Initiate a ruby session.
|
||||
If there is not a current inferior-process-buffer in SESSION
|
||||
then create one. Return the initialized session."
|
||||
(unless (string= session "none")
|
||||
(require 'inf-ruby)
|
||||
(let* ((cmd (cdr (assoc inf-ruby-default-implementation
|
||||
inf-ruby-implementations)))
|
||||
(let* ((cmd (cdr (or (assq :ruby params)
|
||||
(assoc inf-ruby-default-implementation
|
||||
inf-ruby-implementations))))
|
||||
(buffer (get-buffer (format "*%s*" session)))
|
||||
(session-buffer (or buffer (save-window-excursion
|
||||
(run-ruby cmd session)
|
||||
(run-ruby-or-pop-to-buffer
|
||||
cmd (or session "ruby")
|
||||
(unless session
|
||||
(inf-ruby-buffer)))
|
||||
(current-buffer)))))
|
||||
(if (org-babel-comint-buffer-livep session-buffer)
|
||||
(progn (sit-for .25) session-buffer)
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
;;; Requirements:
|
||||
|
||||
;; - sass-mode :: http://github.com/nex3/haml/blob/master/extra/sass-mode.el
|
||||
;; - sass-mode :: https://github.com/nex3/haml/blob/master/extra/sass-mode.el
|
||||
|
||||
;;; Code:
|
||||
(require 'ob)
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
In case you want to use a different screen than one selected by your $PATH")
|
||||
|
||||
(defvar org-babel-default-header-args:screen
|
||||
'((:results . "silent") (:session . "default") (:cmd . "sh")
|
||||
(:terminal . "xterm") (:screenrc . "/dev/null"))
|
||||
`((:results . "silent") (:session . "default") (:cmd . "sh")
|
||||
(:terminal . "xterm") (:screenrc . ,null-device))
|
||||
"Default arguments to use when running screen source blocks.")
|
||||
|
||||
(defun org-babel-execute:screen (body params)
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
;; For more information and usage examples, visit
|
||||
;; https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-stan.html
|
||||
;;
|
||||
;; [1] http://mc-stan.org/
|
||||
;; [1] https://mc-stan.org/
|
||||
|
||||
;;; Code:
|
||||
(require 'ob)
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
;;; Commentary:
|
||||
|
||||
;; ob-vala.el provides Babel support for the Vala language
|
||||
;; (see http://live.gnome.org/Vala for details)
|
||||
;; (see https://live.gnome.org/Vala for details)
|
||||
|
||||
;;; Requirements:
|
||||
|
||||
|
|
|
@ -1173,10 +1173,9 @@ of matched result, which is either `dedicated' or `fuzzy'."
|
|||
(catch :name-match
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward name nil t)
|
||||
(let ((element (org-element-at-point)))
|
||||
(when (equal words
|
||||
(split-string
|
||||
(org-element-property :name element)))
|
||||
(let* ((element (org-element-at-point))
|
||||
(name (org-element-property :name element)))
|
||||
(when (and name (equal words (split-string name)))
|
||||
(setq type 'dedicated)
|
||||
(beginning-of-line)
|
||||
(throw :name-match t))))
|
||||
|
|
|
@ -2269,7 +2269,6 @@ The following commands are available:
|
|||
(setq mode-name "Org-Agenda")
|
||||
(setq indent-tabs-mode nil)
|
||||
(use-local-map org-agenda-mode-map)
|
||||
(easy-menu-add org-agenda-menu)
|
||||
(when org-startup-truncated (setq truncate-lines t))
|
||||
(setq-local line-move-visual nil)
|
||||
(add-hook 'post-command-hook 'org-agenda-update-agenda-type nil 'local)
|
||||
|
@ -3760,6 +3759,14 @@ generating a new one."
|
|||
;; does not have org variables local
|
||||
org-agenda-this-buffer-is-sticky))))
|
||||
|
||||
(defvar org-agenda-buffer-tmp-name nil)
|
||||
|
||||
(defun org-agenda--get-buffer-name (sticky-name)
|
||||
(or org-agenda-buffer-tmp-name
|
||||
(and org-agenda-doing-sticky-redo org-agenda-buffer-name)
|
||||
sticky-name
|
||||
"*Org Agenda*"))
|
||||
|
||||
(defun org-agenda-prepare-window (abuf filter-alist)
|
||||
"Setup agenda buffer in the window.
|
||||
ABUF is the buffer for the agenda window.
|
||||
|
@ -3987,7 +3994,7 @@ agenda display, configure `org-agenda-finalize-hook'."
|
|||
p (string-to-char (match-string 2))
|
||||
b (match-beginning 1)
|
||||
e (if (eq org-agenda-fontify-priorities 'cookies)
|
||||
(match-end 1)
|
||||
(1+ (match-end 2))
|
||||
(point-at-eol))
|
||||
ov (make-overlay b e))
|
||||
(overlay-put
|
||||
|
@ -4127,8 +4134,8 @@ functions do."
|
|||
|
||||
(defun org-agenda-new-marker (&optional pos)
|
||||
"Return a new agenda marker.
|
||||
Maker is at point, or at POS if non-nil. Org mode keeps a list of
|
||||
these markers and resets them when they are no longer in use."
|
||||
Marker is at point, or at POS if non-nil. Org mode keeps a list
|
||||
of these markers and resets them when they are no longer in use."
|
||||
(let ((m (copy-marker (or pos (point)) t)))
|
||||
(setq org-agenda-last-marker-time (float-time))
|
||||
(if org-agenda-buffer
|
||||
|
@ -4210,7 +4217,6 @@ See the docstring of `org-read-date' for details.")
|
|||
(defvar org-starting-day nil) ; local variable in the agenda buffer
|
||||
(defvar org-arg-loc nil) ; local variable
|
||||
|
||||
(defvar org-agenda-buffer-tmp-name nil)
|
||||
;;;###autoload
|
||||
(defun org-agenda-list (&optional arg start-day span with-hour)
|
||||
"Produce a daily/weekly view from all files in variable `org-agenda-files'.
|
||||
|
@ -4238,15 +4244,13 @@ items if they have an hour specification like [h]h:mm."
|
|||
(user-error "Agenda creation impossible for this span(=%d days)." span)))
|
||||
(catch 'exit
|
||||
(setq org-agenda-buffer-name
|
||||
(or org-agenda-buffer-tmp-name
|
||||
(and org-agenda-doing-sticky-redo org-agenda-buffer-name)
|
||||
(when org-agenda-sticky
|
||||
(org-agenda--get-buffer-name
|
||||
(and org-agenda-sticky
|
||||
(cond ((and org-keys (stringp org-match))
|
||||
(format "*Org Agenda(%s:%s)*" org-keys org-match))
|
||||
(org-keys
|
||||
(format "*Org Agenda(%s)*" org-keys))
|
||||
(t "*Org Agenda(a)*")))
|
||||
"*Org Agenda*"))
|
||||
(t "*Org Agenda(a)*")))))
|
||||
(org-agenda-prepare "Day/Week")
|
||||
(setq start-day (or start-day org-agenda-start-day))
|
||||
(when (stringp start-day)
|
||||
|
@ -4536,12 +4540,15 @@ is active."
|
|||
(edit-at string))
|
||||
'org-agenda-search-history)))
|
||||
(catch 'exit
|
||||
(when org-agenda-sticky
|
||||
(setq org-agenda-buffer-name
|
||||
(if (stringp string)
|
||||
(format "*Org Agenda(%s:%s)*"
|
||||
(or org-keys (or (and todo-only "S") "s")) string)
|
||||
(format "*Org Agenda(%s)*" (or (and todo-only "S") "s")))))
|
||||
(setq org-agenda-buffer-name
|
||||
(org-agenda--get-buffer-name
|
||||
(and org-agenda-sticky
|
||||
(if (stringp string)
|
||||
(format "*Org Agenda(%s:%s)*"
|
||||
(or org-keys (or (and todo-only "S") "s"))
|
||||
string)
|
||||
(format "*Org Agenda(%s)*"
|
||||
(or (and todo-only "S") "s"))))))
|
||||
(org-agenda-prepare "SEARCH")
|
||||
(org-compile-prefix-format 'search)
|
||||
(org-set-sorting-strategy 'search)
|
||||
|
@ -4788,12 +4795,13 @@ for a keyword. A numeric prefix directly selects the Nth keyword in
|
|||
(completion-ignore-case t)
|
||||
kwds org-select-this-todo-keyword rtn rtnall files file pos)
|
||||
(catch 'exit
|
||||
(when org-agenda-sticky
|
||||
(setq org-agenda-buffer-name
|
||||
(if (stringp org-select-this-todo-keyword)
|
||||
(format "*Org Agenda(%s:%s)*" (or org-keys "t")
|
||||
org-select-this-todo-keyword)
|
||||
(format "*Org Agenda(%s)*" (or org-keys "t")))))
|
||||
(setq org-agenda-buffer-name
|
||||
(org-agenda--get-buffer-name
|
||||
(and org-agenda-sticky
|
||||
(if (stringp org-select-this-todo-keyword)
|
||||
(format "*Org Agenda(%s:%s)*" (or org-keys "t")
|
||||
org-select-this-todo-keyword)
|
||||
(format "*Org Agenda(%s)*" (or org-keys "t"))))))
|
||||
(org-agenda-prepare "TODO")
|
||||
(setq kwds org-todo-keywords-for-agenda
|
||||
org-select-this-todo-keyword (if (stringp arg) arg
|
||||
|
@ -4880,13 +4888,15 @@ The prefix arg TODO-ONLY limits the search to TODO entries."
|
|||
(when (and (stringp match) (not (string-match "\\S-" match)))
|
||||
(setq match nil))
|
||||
(catch 'exit
|
||||
;; TODO: this code is repeated a lot...
|
||||
(when org-agenda-sticky
|
||||
(setq org-agenda-buffer-name
|
||||
(if (stringp match)
|
||||
(format "*Org Agenda(%s:%s)*"
|
||||
(or org-keys (or (and todo-only "M") "m")) match)
|
||||
(format "*Org Agenda(%s)*" (or (and todo-only "M") "m")))))
|
||||
(setq org-agenda-buffer-name
|
||||
(org-agenda--get-buffer-name
|
||||
(and org-agenda-sticky
|
||||
(if (stringp match)
|
||||
(format "*Org Agenda(%s:%s)*"
|
||||
(or org-keys (or (and todo-only "M") "m"))
|
||||
match)
|
||||
(format "*Org Agenda(%s)*"
|
||||
(or (and todo-only "M") "m"))))))
|
||||
(setq matcher (org-make-tags-matcher match))
|
||||
;; Prepare agendas (and `org-tag-alist-for-agenda') before
|
||||
;; expanding tags within `org-make-tags-matcher'
|
||||
|
@ -8609,7 +8619,10 @@ log items, nothing else."
|
|||
When called with a prefix argument, include all archive files as well."
|
||||
(interactive "P")
|
||||
(setq org-agenda-archives-mode
|
||||
(if with-files t (if org-agenda-archives-mode nil 'trees)))
|
||||
(cond ((and with-files (eq org-agenda-archives-mode t)) nil)
|
||||
(with-files t)
|
||||
(org-agenda-archives-mode nil)
|
||||
(t 'trees)))
|
||||
(org-agenda-set-mode-name)
|
||||
(org-agenda-redo)
|
||||
(message
|
||||
|
@ -9329,7 +9342,7 @@ the same tree node, and the headline of the tree node in the Org file."
|
|||
(save-window-excursion
|
||||
(org-agenda-change-all-lines newhead hdmarker 'fixface just-one))
|
||||
(when (bound-and-true-p org-clock-out-when-done)
|
||||
(string-match (concat "^" (regexp-opt org-done-keywords-for-agenda))
|
||||
(string-match (concat "^" (regexp-opt org-done-keywords-for-agenda))
|
||||
newhead)
|
||||
(org-agenda-unmark-clocking-task))
|
||||
(org-move-to-column col)
|
||||
|
|
|
@ -249,12 +249,20 @@ direct children of this heading."
|
|||
((find-buffer-visiting afile))
|
||||
((find-file-noselect afile))
|
||||
(t (error "Cannot access file \"%s\"" afile))))
|
||||
(org-odd-levels-only
|
||||
(if (local-variable-p 'org-odd-levels-only (current-buffer))
|
||||
org-odd-levels-only
|
||||
tr-org-odd-levels-only))
|
||||
level datetree-date datetree-subheading-p)
|
||||
(when (string-match "\\`datetree/" heading)
|
||||
;; Replace with ***, to represent the 3 levels of headings the
|
||||
;; datetree has.
|
||||
(setq heading (replace-regexp-in-string "\\`datetree/" "***" heading))
|
||||
(setq datetree-subheading-p (> (length heading) 3))
|
||||
(when (string-match "\\`datetree/\\(\\**\\)" heading)
|
||||
;; "datetree/" corresponds to 3 levels of headings.
|
||||
(let ((nsub (length (match-string 1 heading))))
|
||||
(setq heading (concat (make-string
|
||||
(+ (if org-odd-levels-only 5 3)
|
||||
(* (org-level-increment) nsub))
|
||||
?*)
|
||||
(substring heading (match-end 0))))
|
||||
(setq datetree-subheading-p (> nsub 0)))
|
||||
(setq datetree-date (org-date-to-gregorian
|
||||
(or (org-entry-get nil "CLOSED" t) time))))
|
||||
(if (and (> (length heading) 0)
|
||||
|
@ -309,11 +317,7 @@ direct children of this heading."
|
|||
(org-todo-kwd-alist tr-org-todo-kwd-alist)
|
||||
(org-done-keywords tr-org-done-keywords)
|
||||
(org-todo-regexp tr-org-todo-regexp)
|
||||
(org-todo-line-regexp tr-org-todo-line-regexp)
|
||||
(org-odd-levels-only
|
||||
(if (local-variable-p 'org-odd-levels-only (current-buffer))
|
||||
org-odd-levels-only
|
||||
tr-org-odd-levels-only)))
|
||||
(org-todo-line-regexp tr-org-todo-line-regexp))
|
||||
(goto-char (point-min))
|
||||
(org-show-all '(headings blocks))
|
||||
(if (and heading (not (and datetree-date (not datetree-subheading-p))))
|
||||
|
|
|
@ -270,7 +270,9 @@ properties are:
|
|||
:time-prompt Prompt for a date/time to be used for date/week trees
|
||||
and when filling the template.
|
||||
|
||||
:tree-type When `week', make a week tree instead of the month tree.
|
||||
:tree-type When `week', make a week tree instead of the month-day
|
||||
tree. When `month', make a month tree instead of the
|
||||
month-day tree.
|
||||
|
||||
:unnarrowed Do not narrow the target buffer, simply show the
|
||||
full buffer. Default is to narrow it so that you
|
||||
|
@ -1147,10 +1149,11 @@ may have been stored before."
|
|||
(insert-here?
|
||||
;; FIXME: level should probably set directly within (let ...).
|
||||
(setq level (org-get-valid-level
|
||||
(if (or (org-at-heading-p)
|
||||
(ignore-errors (org-back-to-heading t)))
|
||||
(org-outline-level)
|
||||
1))))
|
||||
(if (or (org-at-heading-p)
|
||||
(ignore-errors
|
||||
(save-excursion (org-back-to-heading t))))
|
||||
(org-outline-level)
|
||||
1))))
|
||||
;; Insert as a child of the current entry.
|
||||
((org-capture-get :target-entry-p)
|
||||
(setq level (org-get-valid-level
|
||||
|
|
|
@ -1586,6 +1586,7 @@ PARAMS is a property list of parameters:
|
|||
(move-marker org-columns-begin-marker (point))
|
||||
(setq org-columns-begin-marker (point-marker)))
|
||||
(let* ((org-columns--time (float-time))
|
||||
(org-done-keywords org-done-keywords-for-agenda)
|
||||
(fmt
|
||||
(cond
|
||||
((bound-and-true-p org-overriding-columns-format))
|
||||
|
|
|
@ -914,7 +914,7 @@ This also applied for speedbar access."
|
|||
(setq last-level level)))))
|
||||
(aref subs 1))))
|
||||
|
||||
(eval-after-load "imenu"
|
||||
(eval-after-load 'imenu
|
||||
'(progn
|
||||
(add-hook 'imenu-after-jump-hook
|
||||
(lambda ()
|
||||
|
@ -976,7 +976,7 @@ To get rid of the restriction, use `\\[org-agenda-remove-restriction-lock]'."
|
|||
|
||||
(defvar speedbar-file-key-map)
|
||||
(declare-function speedbar-add-supported-extension "speedbar" (extension))
|
||||
(eval-after-load "speedbar"
|
||||
(eval-after-load 'speedbar
|
||||
'(progn
|
||||
(speedbar-add-supported-extension ".org")
|
||||
(define-key speedbar-file-key-map "<" 'org-speedbar-set-agenda-restriction)
|
||||
|
@ -1086,7 +1086,7 @@ ELEMENT is the element at point."
|
|||
(flyspell-delete-region-overlays beg end)))
|
||||
|
||||
(defvar flyspell-delayed-commands)
|
||||
(eval-after-load "flyspell"
|
||||
(eval-after-load 'flyspell
|
||||
'(add-to-list 'flyspell-delayed-commands 'org-self-insert-command))
|
||||
|
||||
;;;; Bookmark
|
||||
|
@ -1100,7 +1100,7 @@ ELEMENT is the element at point."
|
|||
(org-show-context 'bookmark-jump)))
|
||||
|
||||
;; Make `bookmark-jump' shows the jump location if it was hidden.
|
||||
(eval-after-load "bookmark"
|
||||
(eval-after-load 'bookmark
|
||||
'(if (boundp 'bookmark-after-jump-hook)
|
||||
;; We can use the hook
|
||||
(add-hook 'bookmark-after-jump-hook 'org-bookmark-jump-unhide)
|
||||
|
@ -1154,13 +1154,13 @@ key."
|
|||
(local-set-key org-calendar-insert-diary-entry-key
|
||||
#'org-agenda-diary-entry)))
|
||||
|
||||
(eval-after-load "calendar"
|
||||
(eval-after-load 'calendar
|
||||
'(add-hook 'calendar-mode-hook #'org--setup-calendar-bindings))
|
||||
|
||||
;;;; Saveplace
|
||||
|
||||
;; Make sure saveplace shows the location if it was hidden
|
||||
(eval-after-load "saveplace"
|
||||
(eval-after-load 'saveplace
|
||||
'(defadvice save-place-find-file-hook (after org-make-visible activate)
|
||||
"Make the position visible."
|
||||
(org-bookmark-jump-unhide)))
|
||||
|
@ -1168,7 +1168,7 @@ key."
|
|||
;;;; Ecb
|
||||
|
||||
;; Make sure ecb shows the location if it was hidden
|
||||
(eval-after-load "ecb"
|
||||
(eval-after-load 'ecb
|
||||
'(defadvice ecb-method-clicked (after esf/org-show-context activate)
|
||||
"Make hierarchy visible when jumping into location from ECB tree buffer."
|
||||
(when (derived-mode-p 'org-mode)
|
||||
|
@ -1182,17 +1182,17 @@ key."
|
|||
(org-invisible-p))
|
||||
(org-show-context 'mark-goto)))
|
||||
|
||||
(eval-after-load "simple"
|
||||
(eval-after-load 'simple
|
||||
'(defadvice pop-to-mark-command (after org-make-visible activate)
|
||||
"Make the point visible with `org-show-context'."
|
||||
(org-mark-jump-unhide)))
|
||||
|
||||
(eval-after-load "simple"
|
||||
(eval-after-load 'simple
|
||||
'(defadvice exchange-point-and-mark (after org-make-visible activate)
|
||||
"Make the point visible with `org-show-context'."
|
||||
(org-mark-jump-unhide)))
|
||||
|
||||
(eval-after-load "simple"
|
||||
(eval-after-load 'simple
|
||||
'(defadvice pop-global-mark (after org-make-visible activate)
|
||||
"Make the point visible with `org-show-context'."
|
||||
(org-mark-jump-unhide)))
|
||||
|
@ -1201,7 +1201,7 @@ key."
|
|||
|
||||
;; Make "session.el" ignore our circular variable.
|
||||
(defvar session-globals-exclude)
|
||||
(eval-after-load "session"
|
||||
(eval-after-load 'session
|
||||
'(add-to-list 'session-globals-exclude 'org-mark-ring))
|
||||
|
||||
(provide 'org-compat)
|
||||
|
|
|
@ -4133,7 +4133,9 @@ If STRING is the empty string or nil, return nil."
|
|||
(dolist (v local-variables)
|
||||
(ignore-errors
|
||||
(if (symbolp v) (makunbound v)
|
||||
(set (make-local-variable (car v)) (cdr v)))))
|
||||
;; Don't set file name to avoid mishandling hooks (bug#44524)
|
||||
(unless (memq (car v) '(buffer-file-name buffer-file-truename))
|
||||
(set (make-local-variable (car v)) (cdr v))))))
|
||||
;; Transferring local variables may put the temporary buffer
|
||||
;; into a read-only state. Make sure we can insert STRING.
|
||||
(let ((inhibit-read-only t)) (insert string))
|
||||
|
@ -4324,7 +4326,7 @@ located inside the current one. "
|
|||
(if parent?
|
||||
(pcase type
|
||||
(`headline 'section)
|
||||
((and `section (guard (eq mode 'first-section))) 'top-comment)
|
||||
((and (guard (eq mode 'first-section)) `section) 'top-comment)
|
||||
(`inlinetask 'planning)
|
||||
(`plain-list 'item)
|
||||
(`property-drawer 'node-property)
|
||||
|
|
|
@ -386,7 +386,7 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
|
|||
("exists" "\\exists" t "∃" "[there exists]" "[there exists]" "∃")
|
||||
("nexist" "\\nexists" t "∃" "[there does not exists]" "[there does not exists]" "∄")
|
||||
("nexists" "\\nexists" t "∃" "[there does not exists]" "[there does not exists]" "∄")
|
||||
("empty" "\\empty" t "∅" "[empty set]" "[empty set]" "∅")
|
||||
("empty" "\\emptyset" t "∅" "[empty set]" "[empty set]" "∅")
|
||||
("emptyset" "\\emptyset" t "∅" "[empty set]" "[empty set]" "∅")
|
||||
("isin" "\\in" t "∈" "[element of]" "[element of]" "∈")
|
||||
("in" "\\in" t "∈" "[element of]" "[element of]" "∈")
|
||||
|
|
|
@ -22,27 +22,8 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(require 'org-macs)
|
||||
(require 'org-compat)
|
||||
|
||||
(declare-function org-at-heading-p "org" (&optional ignored))
|
||||
(declare-function org-beginning-of-line "org" (&optional n))
|
||||
(declare-function org-defkey "org" (keymap key def))
|
||||
(declare-function org-mark-ring-push "org" (&optional pos buffer))
|
||||
(declare-function org-overview "org" ())
|
||||
(declare-function org-refile-check-position "org" (refile-pointer))
|
||||
(declare-function org-refile-get-location "org" (&optional prompt default-buffer new-nodes))
|
||||
(declare-function org-show-context "org" (&optional key))
|
||||
(declare-function org-show-set-visibility "org" (detail))
|
||||
|
||||
(defvar org-complex-heading-regexp)
|
||||
(defvar org-startup-align-all-tables)
|
||||
(defvar org-startup-folded)
|
||||
(defvar org-startup-truncated)
|
||||
(defvar org-special-ctrl-a/e)
|
||||
(defvar org-refile-target-verify-function)
|
||||
(defvar org-refile-use-outline-path)
|
||||
(defvar org-refile-targets)
|
||||
(require 'org)
|
||||
(require 'org-refile)
|
||||
|
||||
(defvar org-goto-exit-command nil)
|
||||
(defvar org-goto-map nil)
|
||||
|
|
|
@ -574,15 +574,16 @@ Use :header-args: instead"
|
|||
(let* ((path (org-element-property :path l))
|
||||
(file (if (string= type "file")
|
||||
path
|
||||
(org-attach-expand path))))
|
||||
(org-with-point-at (org-element-property :begin l)
|
||||
(org-attach-expand path)))))
|
||||
(and (not (file-remote-p file))
|
||||
(not (file-exists-p file))
|
||||
(list (org-element-property :begin l)
|
||||
(format (if (org-element-lineage l '(link))
|
||||
"Link to non-existent image file %S \
|
||||
in description"
|
||||
"Link to non-existent local file %S"
|
||||
file))))))
|
||||
"Link to non-existent local file %S")
|
||||
file)))))
|
||||
(_ nil))))))
|
||||
|
||||
(defun org-lint-non-existent-setupfile-parameter (ast)
|
||||
|
|
|
@ -414,7 +414,16 @@ being set to t and copy to the target location, don't move it.
|
|||
Beware that keeping refiled entries may result in duplicated ID
|
||||
properties.
|
||||
|
||||
RFLOC can be a refile location obtained in a different way.
|
||||
RFLOC can be a refile location obtained in a different way. It
|
||||
should be a list with the following 4 elements:
|
||||
|
||||
1. Name - an identifier for the refile location, typically the
|
||||
headline text
|
||||
2. File - the file the refile location is in
|
||||
3. nil - used for generating refile location candidates, not
|
||||
needed when passing RFLOC
|
||||
4. Position - the position in the specified file of the
|
||||
headline to refile under
|
||||
|
||||
MSG is a string to replace \"Refile\" in the default prompt with
|
||||
another verb. E.g. `org-copy' sets this parameter to \"Copy\".
|
||||
|
|
|
@ -935,7 +935,7 @@ lines. It can have the following values:
|
|||
- regexp When a regular expression, use it to match the separator."
|
||||
(interactive "f\nP")
|
||||
(when (and (called-interactively-p 'any)
|
||||
(not (string-match-p "\.\\(?:[tc]sv\\|txt\\)$" file)))
|
||||
(not (string-match-p (rx "." (or "txt" "tsv" "csv") eos) file)))
|
||||
(user-error "Cannot import such file"))
|
||||
(unless (bolp) (insert "\n"))
|
||||
(let ((beg (point))
|
||||
|
@ -3342,7 +3342,6 @@ Parameters get priority."
|
|||
(setq-local org-selected-window sel-win)
|
||||
(use-local-map org-table-fedit-map)
|
||||
(add-hook 'post-command-hook #'org-table-fedit-post-command t t)
|
||||
(easy-menu-add org-table-fedit-menu)
|
||||
(setq startline (org-current-line))
|
||||
(dolist (entry eql)
|
||||
(let* ((type (cond
|
||||
|
@ -5173,15 +5172,13 @@ When LOCAL is non-nil, show references for the table at point."
|
|||
orgtbl-line-start-regexp))
|
||||
(when (fboundp 'font-lock-add-keywords)
|
||||
(font-lock-add-keywords nil orgtbl-extra-font-lock-keywords)
|
||||
(org-restart-font-lock))
|
||||
(easy-menu-add orgtbl-mode-menu))
|
||||
(org-restart-font-lock)))
|
||||
(t
|
||||
(setq auto-fill-inhibit-regexp org-old-auto-fill-inhibit-regexp)
|
||||
(remove-hook 'before-change-functions 'org-before-change-function t)
|
||||
(when (fboundp 'font-lock-remove-keywords)
|
||||
(font-lock-remove-keywords nil orgtbl-extra-font-lock-keywords)
|
||||
(org-restart-font-lock))
|
||||
(easy-menu-remove orgtbl-mode-menu)
|
||||
(force-mode-line-update 'all))))
|
||||
|
||||
(defun orgtbl-make-binding (fun n &rest keys)
|
||||
|
@ -6203,7 +6200,7 @@ which will prompt for the width."
|
|||
;; Here are two examples of different styles.
|
||||
|
||||
;; Unicode block characters are used to give a smooth effect.
|
||||
;; See http://en.wikipedia.org/wiki/Block_Elements
|
||||
;; See https://en.wikipedia.org/wiki/Block_Elements
|
||||
;; Use one of those drawing functions
|
||||
;; - orgtbl-ascii-draw (the default ascii)
|
||||
;; - orgtbl-uc-draw-grid (unicode with a grid effect)
|
||||
|
@ -6217,7 +6214,7 @@ which will prompt for the width."
|
|||
It is a variant of orgtbl-ascii-draw with Unicode block
|
||||
characters, for a smooth display. Bars appear as grids (to the
|
||||
extent the font allows)."
|
||||
;; http://en.wikipedia.org/wiki/Block_Elements
|
||||
;; https://en.wikipedia.org/wiki/Block_Elements
|
||||
;; best viewed with the "DejaVu Sans Mono" font.
|
||||
(orgtbl-ascii-draw value min max width
|
||||
" \u258F\u258E\u258D\u258C\u258B\u258A\u2589"))
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
;;
|
||||
;; Author: Rasmus Pank Roulund <emacs at pank dot eu>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://orgmode.org
|
||||
;; Homepage: https://orgmode.org
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
|
133
lisp/org.el
133
lisp/org.el
|
@ -8,7 +8,7 @@
|
|||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: https://orgmode.org
|
||||
|
||||
;; Version: 9.4
|
||||
;; Version: 9.4.1
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -232,7 +232,8 @@ byte-compiled before it is loaded."
|
|||
(org-babel-tangle-file file tangled-file "emacs-lisp\\|elisp"))
|
||||
(if compile
|
||||
(progn
|
||||
(byte-compile-file tangled-file 'load)
|
||||
(byte-compile-file tangled-file)
|
||||
(load tangled-file)
|
||||
(message "Compiled and loaded %s" tangled-file))
|
||||
(load-file tangled-file)
|
||||
(message "Loaded %s" tangled-file))))
|
||||
|
@ -662,6 +663,7 @@ defined in org-duration.el.")
|
|||
(defvar org-modules-loaded nil
|
||||
"Have the modules been loaded already?")
|
||||
|
||||
;;;###autoload
|
||||
(defun org-load-modules-maybe (&optional force)
|
||||
"Load all extensions listed in `org-modules'."
|
||||
(when (or force (not org-modules-loaded))
|
||||
|
@ -1167,7 +1169,7 @@ are matched against file names, and values."
|
|||
"Alist between context and visibility span when revealing a location.
|
||||
|
||||
\\<org-mode-map>Some actions may move point into invisible
|
||||
locations. As a consequence, Org always expose a neighborhood
|
||||
locations. As a consequence, Org always exposes a neighborhood
|
||||
around point. How much is shown depends on the initial action,
|
||||
or context. Valid contexts are
|
||||
|
||||
|
@ -4279,10 +4281,10 @@ related expressions."
|
|||
(setq org-current-tag-alist
|
||||
(org--tag-add-to-alist
|
||||
org-tag-persistent-alist
|
||||
(let ((tags (mapconcat #'identity
|
||||
(cdr (assoc "TAGS" alist))
|
||||
"\n")))
|
||||
(if (org-string-nw-p tags) (org-tag-string-to-alist tags)
|
||||
(let ((tags (cdr (assoc "TAGS" alist))))
|
||||
(if tags
|
||||
(org-tag-string-to-alist
|
||||
(mapconcat #'identity tags "\n"))
|
||||
org-tag-alist))))
|
||||
(setq org-tag-groups-alist
|
||||
(org-tag-alist-to-groups org-current-tag-alist))
|
||||
|
@ -4334,9 +4336,9 @@ related expressions."
|
|||
(let ((value (cdr (assoc "PRIORITIES" alist))))
|
||||
(pcase (and value (split-string value))
|
||||
(`(,high ,low ,default . ,_)
|
||||
(setq-local org-highest-priority (org-priority-to-value high))
|
||||
(setq-local org-lowest-priority (org-priority-to-value low))
|
||||
(setq-local org-default-priority (org-priority-to-value default)))))
|
||||
(setq-local org-priority-highest (org-priority-to-value high))
|
||||
(setq-local org-priority-lowest (org-priority-to-value low))
|
||||
(setq-local org-priority-default (org-priority-to-value default)))))
|
||||
;; Scripts.
|
||||
(let ((value (cdr (assoc "OPTIONS" alist))))
|
||||
(dolist (option value)
|
||||
|
@ -4754,7 +4756,6 @@ This is for getting out of special buffers like capture.")
|
|||
(require 'time-date)
|
||||
(unless (fboundp 'time-subtract) (defalias 'time-subtract 'subtract-time))
|
||||
(require 'easymenu)
|
||||
(autoload 'easy-menu-add "easymenu")
|
||||
(require 'overlay)
|
||||
|
||||
(require 'org-entities)
|
||||
|
@ -4972,8 +4973,6 @@ the rounding returns a past time."
|
|||
|
||||
;;;; Font-Lock stuff, including the activators
|
||||
|
||||
(require 'font-lock)
|
||||
|
||||
(defconst org-match-sexp-depth 3
|
||||
"Number of stacked braces for sub/superscript matching.")
|
||||
|
||||
|
@ -5219,14 +5218,14 @@ by a #."
|
|||
"Fontify #+ lines and blocks."
|
||||
(let ((case-fold-search t))
|
||||
(when (re-search-forward
|
||||
(rx bol (group (zero-or-more blank) "#"
|
||||
(rx bol (group (zero-or-more (any " \t")) "#"
|
||||
(group (group (or (seq "+" (one-or-more (any "a-zA-Z")) (optional ":"))
|
||||
space
|
||||
(any " \t")
|
||||
eol))
|
||||
(optional (group "_" (group (one-or-more (any "a-zA-Z"))))))
|
||||
(zero-or-more blank)
|
||||
(zero-or-more (any " \t"))
|
||||
(group (group (zero-or-more (not (any " \t\n"))))
|
||||
(zero-or-more blank)
|
||||
(zero-or-more (any " \t"))
|
||||
(group (zero-or-more any)))))
|
||||
limit t)
|
||||
(let ((beg (match-beginning 0))
|
||||
|
@ -5249,7 +5248,7 @@ by a #."
|
|||
quoting (member block-type org-protecting-blocks))
|
||||
(when (re-search-forward
|
||||
(rx-to-string `(group bol (or (seq (one-or-more "*") space)
|
||||
(seq (zero-or-more blank)
|
||||
(seq (zero-or-more (any " \t"))
|
||||
"#+end"
|
||||
,(match-string 4)
|
||||
word-end
|
||||
|
@ -5323,11 +5322,11 @@ by a #."
|
|||
;; Handle short captions
|
||||
(save-excursion
|
||||
(beginning-of-line)
|
||||
(looking-at (rx (group (zero-or-more blank)
|
||||
(looking-at (rx (group (zero-or-more (any " \t"))
|
||||
"#+caption"
|
||||
(optional "[" (zero-or-more any) "]")
|
||||
":")
|
||||
(zero-or-more blank))))
|
||||
(zero-or-more (any " \t")))))
|
||||
(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)
|
||||
|
@ -5843,7 +5842,7 @@ If TAG is a number, get the corresponding match group."
|
|||
"Add the special priority faces."
|
||||
(while (re-search-forward org-priority-regexp limit t)
|
||||
(add-text-properties
|
||||
(match-beginning 1) (match-end 1)
|
||||
(match-beginning 1) (1+ (match-end 2))
|
||||
(list 'face (org-get-priority-face (string-to-char (match-string 2)))
|
||||
'font-lock-fontified t))))
|
||||
|
||||
|
@ -6352,8 +6351,7 @@ Use `\\[org-edit-special]' to edit table.el tables"))
|
|||
(= (line-beginning-position)
|
||||
(org-element-property :post-affiliated
|
||||
item)))))
|
||||
(save-excursion (beginning-of-line 1)
|
||||
(looking-at org-outline-regexp)))
|
||||
(org-match-line org-outline-regexp))
|
||||
(or (bolp) (not (eq org-cycle-emulate-tab 'exc-hl-bol))))
|
||||
(org-cycle-internal-local))
|
||||
;; From there: TAB emulation and template completion.
|
||||
|
@ -6463,7 +6461,8 @@ Use `\\[org-edit-special]' to edit table.el tables"))
|
|||
(goto-char eos)
|
||||
(outline-next-heading)
|
||||
(when (org-invisible-p) (org-flag-heading nil))))
|
||||
((and (>= eol eos)
|
||||
((and (or (>= eol eos)
|
||||
(not (string-match "\\S-" (buffer-substring eol eos))))
|
||||
(or has-children
|
||||
(not (setq children-skipped
|
||||
org-cycle-skip-children-state-if-no-children))))
|
||||
|
@ -6616,19 +6615,23 @@ With numerical argument N, show content up to level N."
|
|||
"Adjust the window after a change in outline visibility.
|
||||
This function is the default value of the hook `org-cycle-hook'."
|
||||
(when (get-buffer-window (current-buffer))
|
||||
(cond
|
||||
((eq state 'content) nil)
|
||||
((eq state 'all) nil)
|
||||
((and (eq state 'folded) (eq last-command this-command))
|
||||
(set-window-start nil org-scroll-position-to-restore))
|
||||
((eq state 'folded) nil)
|
||||
((eq state 'children)
|
||||
(setq org-scroll-position-to-restore (window-start))
|
||||
(or (org-subtree-end-visible-p) (recenter 1)))
|
||||
((eq state 'subtree)
|
||||
(when (not (eq last-command this-command))
|
||||
(setq org-scroll-position-to-restore (window-start)))
|
||||
(or (org-subtree-end-visible-p) (recenter 1))))))
|
||||
(let ((repeat (eq last-command this-command)))
|
||||
(unless repeat
|
||||
(setq org-scroll-position-to-restore nil))
|
||||
(cond
|
||||
((eq state 'content) nil)
|
||||
((eq state 'all) nil)
|
||||
((and org-scroll-position-to-restore repeat
|
||||
(eq state 'folded))
|
||||
(set-window-start nil org-scroll-position-to-restore))
|
||||
((eq state 'folded) nil)
|
||||
((eq state 'children)
|
||||
(setq org-scroll-position-to-restore (window-start))
|
||||
(or (org-subtree-end-visible-p) (recenter 1)))
|
||||
((eq state 'subtree)
|
||||
(unless repeat
|
||||
(setq org-scroll-position-to-restore (window-start)))
|
||||
(or (org-subtree-end-visible-p) (recenter 1)))))))
|
||||
|
||||
(defun org-clean-visibility-after-subtree-move ()
|
||||
"Fix visibility issues after moving a subtree."
|
||||
|
@ -7383,10 +7386,11 @@ Assume point is at a heading or an inlinetask beginning."
|
|||
(org-indent-region (match-beginning 0) (match-end 0)))
|
||||
(when (looking-at org-logbook-drawer-re)
|
||||
(let ((end-marker (move-marker (make-marker) (match-end 0)))
|
||||
(ci (current-indentation)))
|
||||
(while (and (not (> (point) end-marker)) (>= ci diff))
|
||||
(indent-line-to (+ ci diff))
|
||||
(forward-line))))
|
||||
(col (+ (current-indentation) diff)))
|
||||
(when (wholenump col)
|
||||
(while (< (point) end-marker)
|
||||
(indent-line-to col)
|
||||
(forward-line)))))
|
||||
(catch 'no-shift
|
||||
(when (or (zerop diff) (not (eq org-adapt-indentation t)))
|
||||
(throw 'no-shift nil))
|
||||
|
@ -8049,7 +8053,7 @@ If JUST-RETURN-STRING is non-nil, return a string, don't display a message."
|
|||
(and file bfn (concat (file-name-nondirectory bfn) separator))
|
||||
separator))
|
||||
(add-face-text-property 0 (length res)
|
||||
`((t :height ,(face-attribute 'default :height)))
|
||||
`(:height ,(face-attribute 'default :height))
|
||||
nil res)
|
||||
(if just-return-string
|
||||
res
|
||||
|
@ -10685,8 +10689,8 @@ WHAT entry will also be removed."
|
|||
;; If there is nothing more to add and no more keyword is
|
||||
;; left, remove the line completely.
|
||||
(if (and (looking-at-p "[ \t]*$") (not what))
|
||||
(delete-region (line-beginning-position)
|
||||
(line-beginning-position 2))
|
||||
(delete-region (line-end-position 0)
|
||||
(line-end-position))
|
||||
;; If we removed last keyword, do not leave trailing white
|
||||
;; space at the end of line.
|
||||
(let ((p (point)))
|
||||
|
@ -11695,7 +11699,7 @@ See also `org-scan-tags'."
|
|||
(cons match0 `(lambda (todo tags-list level) ,matcher)))))
|
||||
|
||||
(defun org--tags-expand-group (group tag-groups expanded)
|
||||
"Recursively Expand all tags in GROUP, according to TAG-GROUPS.
|
||||
"Recursively expand all tags in GROUP, according to TAG-GROUPS.
|
||||
TAG-GROUPS is the list of groups used for expansion. EXPANDED is
|
||||
an accumulator used in recursive calls."
|
||||
(dolist (tag group)
|
||||
|
@ -11743,7 +11747,9 @@ When DOWNCASED is non-nil, expand downcased TAGS."
|
|||
(if (not downcased) g
|
||||
(mapcar (lambda (s) (mapcar #'downcase s)) g)))))
|
||||
(cond
|
||||
(single-as-list (org--tags-expand-group (list match) tag-groups nil))
|
||||
(single-as-list (org--tags-expand-group
|
||||
(list (if downcased (downcase match) match))
|
||||
tag-groups nil))
|
||||
(org-group-tags
|
||||
(let* ((case-fold-search t)
|
||||
(tag-syntax org-mode-syntax-table)
|
||||
|
@ -16563,7 +16569,7 @@ overwritten, and the table is not marked as requiring realignment."
|
|||
(1+ org-self-insert-command-undo-counter))))))))
|
||||
|
||||
(defun org-check-before-invisible-edit (kind)
|
||||
"Check is editing if kind KIND would be dangerous with invisible text around.
|
||||
"Check if editing kind KIND would be dangerous with invisible text around.
|
||||
The detailed reaction depends on the user option `org-catch-invisible-edits'."
|
||||
;; First, try to get out of here as quickly as possible, to reduce overhead
|
||||
(when (and org-catch-invisible-edits
|
||||
|
@ -18192,8 +18198,7 @@ an argument, unconditionally call `org-insert-heading'."
|
|||
("Customize"
|
||||
["Browse Org Group" org-customize t]
|
||||
"--"
|
||||
["Expand This Menu" org-create-customize-menu
|
||||
(fboundp 'customize-menu-create)])
|
||||
["Expand This Menu" org-create-customize-menu t])
|
||||
["Send bug report" org-submit-bug-report t]
|
||||
"--"
|
||||
("Refresh/Reload"
|
||||
|
@ -18439,20 +18444,17 @@ With prefix arg UNCOMPILED, load the uncompiled versions."
|
|||
(interactive)
|
||||
(org-load-modules-maybe)
|
||||
(org-require-autoloaded-modules)
|
||||
(if (fboundp 'customize-menu-create)
|
||||
(progn
|
||||
(easy-menu-change
|
||||
'("Org") "Customize"
|
||||
`(["Browse Org group" org-customize t]
|
||||
"--"
|
||||
,(customize-menu-create 'org)
|
||||
["Set" Custom-set t]
|
||||
["Save" Custom-save t]
|
||||
["Reset to Current" Custom-reset-current t]
|
||||
["Reset to Saved" Custom-reset-saved t]
|
||||
["Reset to Standard Settings" Custom-reset-standard t]))
|
||||
(message "\"Org\"-menu now contains full customization menu"))
|
||||
(error "Cannot expand menu (outdated version of cus-edit.el)")))
|
||||
(easy-menu-change
|
||||
'("Org") "Customize"
|
||||
`(["Browse Org group" org-customize t]
|
||||
"--"
|
||||
,(customize-menu-create 'org)
|
||||
["Set" Custom-set t]
|
||||
["Save" Custom-save t]
|
||||
["Reset to Current" Custom-reset-current t]
|
||||
["Reset to Saved" Custom-reset-saved t]
|
||||
["Reset to Standard Settings" Custom-reset-standard t]))
|
||||
(message "\"Org\"-menu now contains full customization menu"))
|
||||
|
||||
;;;; Miscellaneous stuff
|
||||
|
||||
|
@ -20280,10 +20282,9 @@ This function also checks ancestors of the current headline,
|
|||
unless optional argument NO-INHERITANCE is non-nil."
|
||||
(cond
|
||||
((org-before-first-heading-p) nil)
|
||||
((let ((tags (nth 5 (org-heading-components))))
|
||||
((let ((tags (org-get-tags nil 'local)))
|
||||
(and tags
|
||||
(let ((case-fold-search nil))
|
||||
(string-match-p org-archive-tag tags)))))
|
||||
(cl-some (apply-partially #'string= org-archive-tag) tags))))
|
||||
(no-inheritance nil)
|
||||
(t
|
||||
(save-excursion (and (org-up-heading-safe) (org-in-archived-heading-p))))))
|
||||
|
|
|
@ -2200,16 +2200,15 @@ SHORT-CAPTION are strings."
|
|||
(defun org-odt--image-size
|
||||
(file info &optional user-width user-height scale dpi embed-as)
|
||||
(let* ((--pixels-to-cms
|
||||
(function (lambda (pixels dpi)
|
||||
(let ((cms-per-inch 2.54)
|
||||
(inches (/ pixels dpi)))
|
||||
(* cms-per-inch inches)))))
|
||||
(lambda (pixels dpi)
|
||||
(let ((cms-per-inch 2.54)
|
||||
(inches (/ pixels dpi)))
|
||||
(* cms-per-inch inches))))
|
||||
(--size-in-cms
|
||||
(function
|
||||
(lambda (size-in-pixels dpi)
|
||||
(and size-in-pixels
|
||||
(cons (funcall --pixels-to-cms (car size-in-pixels) dpi)
|
||||
(funcall --pixels-to-cms (cdr size-in-pixels) dpi))))))
|
||||
(lambda (size-in-pixels dpi)
|
||||
(and size-in-pixels
|
||||
(cons (funcall --pixels-to-cms (car size-in-pixels) dpi)
|
||||
(funcall --pixels-to-cms (cdr size-in-pixels) dpi)))))
|
||||
(dpi (or dpi (plist-get info :odt-pixels-per-inch)))
|
||||
(anchor-type (or embed-as "paragraph"))
|
||||
(user-width (and (not scale) user-width))
|
||||
|
@ -2948,7 +2947,7 @@ channel."
|
|||
(when scheduled
|
||||
(concat
|
||||
(format "<text:span text:style-name=\"%s\">%s</text:span>"
|
||||
"OrgScheduledKeyword" org-deadline-string)
|
||||
"OrgScheduledKeyword" org-scheduled-string)
|
||||
(org-odt-timestamp scheduled contents info)))))))
|
||||
|
||||
|
||||
|
@ -4242,7 +4241,7 @@ Return output file's name."
|
|||
`((?i . ,(shell-quote-argument in-file))
|
||||
(?I . ,(browse-url-file-url in-file))
|
||||
(?f . ,out-fmt)
|
||||
(?o . ,out-file)
|
||||
(?o . ,(shell-quote-argument out-file))
|
||||
(?O . ,(browse-url-file-url out-file))
|
||||
(?d . , (shell-quote-argument out-dir))
|
||||
(?D . ,(browse-url-file-url out-dir))
|
||||
|
|
|
@ -5377,7 +5377,7 @@ transcoding it."
|
|||
(apostrophe :utf-8 "’" :html "’"))
|
||||
("da"
|
||||
;; one may use: »...«, "...", ›...‹, or '...'.
|
||||
;; http://sproget.dk/raad-og-regler/retskrivningsregler/retskrivningsregler/a7-40-60/a7-58-anforselstegn/
|
||||
;; https://sproget.dk/raad-og-regler/retskrivningsregler/retskrivningsregler/a7-40-60/a7-58-anforselstegn/
|
||||
;; LaTeX quotes require Babel!
|
||||
(primary-opening
|
||||
:utf-8 "»" :html "»" :latex ">>" :texinfo "@guillemetright{}")
|
||||
|
@ -5482,7 +5482,7 @@ transcoding it."
|
|||
:texinfo "@guillemetright{}")
|
||||
(apostrophe :utf-8 "’" :html "’"))
|
||||
("ru"
|
||||
;; http://ru.wikipedia.org/wiki/%D0%9A%D0%B0%D0%B2%D1%8B%D1%87%D0%BA%D0%B8#.D0.9A.D0.B0.D0.B2.D1.8B.D1.87.D0.BA.D0.B8.2C_.D0.B8.D1.81.D0.BF.D0.BE.D0.BB.D1.8C.D0.B7.D1.83.D0.B5.D0.BC.D1.8B.D0.B5_.D0.B2_.D1.80.D1.83.D1.81.D1.81.D0.BA.D0.BE.D0.BC_.D1.8F.D0.B7.D1.8B.D0.BA.D0.B5
|
||||
;; https://ru.wikipedia.org/wiki/%D0%9A%D0%B0%D0%B2%D1%8B%D1%87%D0%BA%D0%B8#.D0.9A.D0.B0.D0.B2.D1.8B.D1.87.D0.BA.D0.B8.2C_.D0.B8.D1.81.D0.BF.D0.BE.D0.BB.D1.8C.D0.B7.D1.83.D0.B5.D0.BC.D1.8B.D0.B5_.D0.B2_.D1.80.D1.83.D1.81.D1.81.D0.BA.D0.BE.D0.BC_.D1.8F.D0.B7.D1.8B.D0.BA.D0.B5
|
||||
;; http://www.artlebedev.ru/kovodstvo/sections/104/
|
||||
(primary-opening :utf-8 "«" :html "«" :latex "{}<<"
|
||||
:texinfo "@guillemetleft{}")
|
||||
|
|
|
@ -250,6 +250,34 @@ call_test-newline[:eval yes :results raw]('(1\n2))<point>"
|
|||
<point>#+call: bar()"
|
||||
(org-babel-execute-src-block nil (org-babel-lob-get-info))))))
|
||||
|
||||
(ert-deftest test-ob-lob/confirm-evaluate ()
|
||||
"Test confirmation when exporting lob calls."
|
||||
;; With the default `org-confirm-babel-evaluate' of t, the caller is
|
||||
;; queried one time.
|
||||
(should
|
||||
(= 1
|
||||
(let ((org-export-use-babel t)
|
||||
(org-confirm-babel-evaluate t)
|
||||
(confirm-evaluate-calls 0))
|
||||
(cl-letf (((symbol-function 'yes-or-no-p)
|
||||
(lambda (&rest _ignore)
|
||||
(cl-incf confirm-evaluate-calls)
|
||||
t)))
|
||||
(org-test-with-temp-text
|
||||
"
|
||||
#+name: foo
|
||||
#+begin_src emacs-lisp
|
||||
nil
|
||||
#+end_src
|
||||
|
||||
#+call: foo()"
|
||||
(let ((string (buffer-string)))
|
||||
(with-temp-buffer
|
||||
(org-mode)
|
||||
(insert string)
|
||||
(org-babel-exp-process-buffer)
|
||||
confirm-evaluate-calls))))))))
|
||||
|
||||
(provide 'test-ob-lob)
|
||||
|
||||
;;; test-ob-lob.el ends here
|
||||
|
|
|
@ -420,6 +420,38 @@ another block
|
|||
(org-split-string (buffer-string))))
|
||||
(delete-file file))))))
|
||||
|
||||
(ert-deftest ob-tangle/multiple-noweb-in-line ()
|
||||
"Test handling of multiple noweb references in a single line."
|
||||
(should
|
||||
(equal '("1" "2" "1")
|
||||
(let ((file (make-temp-file "org-tangle-")))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(org-test-with-temp-text-in-file
|
||||
(format "
|
||||
#+name: block1
|
||||
#+begin_src elisp
|
||||
1
|
||||
#+end_src
|
||||
|
||||
#+name: block2
|
||||
#+begin_src elisp
|
||||
2
|
||||
#+end_src
|
||||
|
||||
#+name: block3
|
||||
#+begin_src elisp :noweb yes :tangle %s
|
||||
<<block1>> <<block2>> <<block1>>
|
||||
#+end_src"
|
||||
file)
|
||||
(let ((org-babel-noweb-error-all-langs nil)
|
||||
(org-babel-noweb-error-langs nil))
|
||||
(org-babel-tangle)))
|
||||
(with-temp-buffer
|
||||
(insert-file-contents file)
|
||||
(org-split-string (buffer-string))))
|
||||
(delete-file file))))))
|
||||
|
||||
(ert-deftest ob-tangle/detangle-false-positive ()
|
||||
"Test handling of false positive link during detangle."
|
||||
(let (buffer)
|
||||
|
|
|
@ -111,13 +111,14 @@
|
|||
(buf (get-buffer org-agenda-buffer-name))
|
||||
org-agenda-files)
|
||||
(when buf (kill-buffer buf))
|
||||
(org-test-with-temp-text "<2017-03-17 Fri>"
|
||||
(org-follow-timestamp-link)) ;creates a sticky agenda
|
||||
(org-test-agenda--kill-all-agendas)
|
||||
(org-agenda-list)
|
||||
(should (= 1 (length (org-test-agenda--agenda-buffers))))
|
||||
(should (string= "*Org Agenda*"
|
||||
(buffer-name (car (org-test-agenda--agenda-buffers))))))
|
||||
(dolist (fn '(org-agenda-list org-todo-list))
|
||||
(org-test-with-temp-text "<2017-03-17 Fri>"
|
||||
(org-follow-timestamp-link)) ;creates a sticky agenda
|
||||
(org-test-agenda--kill-all-agendas)
|
||||
(funcall fn)
|
||||
(should (= 1 (length (org-test-agenda--agenda-buffers))))
|
||||
(should (string= "*Org Agenda*"
|
||||
(buffer-name (car (org-test-agenda--agenda-buffers)))))))
|
||||
(org-test-agenda--kill-all-agendas))
|
||||
|
||||
(ert-deftest test-org-agenda/sticky-agenda-name-after-reload ()
|
||||
|
|
|
@ -57,6 +57,44 @@
|
|||
(forward-line -1)
|
||||
(org-element-property :title (org-element-at-point))))))
|
||||
|
||||
(ert-deftest test-org-archive/datetree ()
|
||||
"Test `org-archive-subtree' with a datetree target."
|
||||
(org-test-at-time "<2020-07-05 Sun>"
|
||||
;; Test in buffer target with no additional subheadings...
|
||||
(should
|
||||
(string-match-p
|
||||
(regexp-quote "*** 2020-07-05 Sunday\n**** a")
|
||||
(org-test-with-temp-text-in-file "* a\n"
|
||||
(let ((org-archive-location "::datetree/"))
|
||||
(org-archive-subtree)
|
||||
(buffer-string)))))
|
||||
;; ... and with `org-odd-levels-only' non-nil.
|
||||
(should
|
||||
(string-match-p
|
||||
(regexp-quote "***** 2020-07-05 Sunday\n******* a")
|
||||
(org-test-with-temp-text-in-file "* a\n"
|
||||
(let ((org-archive-location "::datetree/")
|
||||
(org-odd-levels-only t))
|
||||
(org-archive-subtree)
|
||||
(buffer-string)))))
|
||||
;; Test in buffer target with an additional subheading...
|
||||
(should
|
||||
(string-match-p
|
||||
(regexp-quote "*** 2020-07-05 Sunday\n**** a\n***** b")
|
||||
(org-test-with-temp-text-in-file "* b\n"
|
||||
(let ((org-archive-location "::datetree/* a"))
|
||||
(org-archive-subtree)
|
||||
(buffer-string)))))
|
||||
;; ... and with `org-odd-levels-only' non-nil.
|
||||
(should
|
||||
(string-match-p
|
||||
(regexp-quote "***** 2020-07-05 Sunday\n******* a\n********* b")
|
||||
(org-test-with-temp-text-in-file "* b\n"
|
||||
(let ((org-archive-location "::datetree/* a")
|
||||
(org-odd-levels-only t))
|
||||
(org-archive-subtree)
|
||||
(buffer-string)))))))
|
||||
|
||||
(ert-deftest test-org-archive/to-archive-sibling ()
|
||||
"Test `org-archive-to-archive-sibling' specifications."
|
||||
;; Archive sibling before or after archive heading.
|
||||
|
|
|
@ -2103,7 +2103,12 @@
|
|||
(should-not
|
||||
(org-test-with-temp-text "* Headline :ARCHIVE:\n** Level 2\nBody"
|
||||
(goto-char (point-max))
|
||||
(org-in-archived-heading-p t))))
|
||||
(org-in-archived-heading-p t)))
|
||||
;; Archive tag containing ARCHIVE as substring
|
||||
(should-not
|
||||
(org-test-with-temp-text "* Headline :NOARCHIVE:\n** Level 2\nBody"
|
||||
(goto-char (point-max))
|
||||
(org-in-archived-heading-p))))
|
||||
|
||||
(ert-deftest test-org/entry-blocked-p ()
|
||||
;; Check other dependencies.
|
||||
|
@ -2457,6 +2462,11 @@ SCHEDULED: <2014-03-04 tue.>"
|
|||
(org-test-with-temp-text "#+TAGS: [ A : B C ]"
|
||||
(org-mode-restart)
|
||||
org-tag-groups-alist))))
|
||||
(should-not
|
||||
(let ((org-tag-alist '(("A"))))
|
||||
(org-test-with-temp-text "#+TAGS:"
|
||||
(org-mode-restart)
|
||||
org-current-tag-alist)))
|
||||
;; FILETAGS keyword.
|
||||
(should
|
||||
(equal '("A" "B" "C")
|
||||
|
@ -4705,6 +4715,32 @@ Text.
|
|||
(org-demote)
|
||||
(forward-line 2)
|
||||
(org-get-indentation))))))
|
||||
;; When `org-adapt-indentation' is non-nil, log drawers are
|
||||
;; adjusted.
|
||||
(should
|
||||
(equal
|
||||
"** H\n :LOGBOOK:\n - a\n :END:\n b"
|
||||
(org-test-with-temp-text "* H\n :LOGBOOK:\n - a\n :END:\n b"
|
||||
(let ((org-odd-levels-only nil)
|
||||
(org-adapt-indentation t))
|
||||
(org-demote))
|
||||
(buffer-string))))
|
||||
(should
|
||||
(equal
|
||||
"** H\n :LOGBOOK:\n - a\n :END:\n b"
|
||||
(org-test-with-temp-text "* H\n :LOGBOOK:\n - a\n :END:\n b"
|
||||
(let ((org-odd-levels-only nil)
|
||||
(org-adapt-indentation 'headline-data))
|
||||
(org-demote))
|
||||
(buffer-string))))
|
||||
(should
|
||||
(equal
|
||||
"** H\n :LOGBOOK:\n - a\n :END:"
|
||||
(org-test-with-temp-text "* H\n:LOGBOOK:\n- a\n:END:"
|
||||
(let ((org-odd-levels-only nil)
|
||||
(org-adapt-indentation t))
|
||||
(org-demote))
|
||||
(buffer-string))))
|
||||
;; Ignore contents of source blocks or example blocks when
|
||||
;; indentation should be preserved (through
|
||||
;; `org-src-preserve-indentation' or "-i" flag).
|
||||
|
@ -4873,6 +4909,41 @@ Text.
|
|||
(org-promote))
|
||||
(forward-line)
|
||||
(org-get-indentation))))
|
||||
;; When `org-adapt-indentation' is non-nil, log drawers are
|
||||
;; adjusted.
|
||||
(should
|
||||
(equal
|
||||
"* H\n :LOGBOOK:\n - a\n :END:\n b"
|
||||
(org-test-with-temp-text "** H\n :LOGBOOK:\n - a\n :END:\n b"
|
||||
(let ((org-odd-levels-only nil)
|
||||
(org-adapt-indentation t))
|
||||
(org-promote))
|
||||
(buffer-string))))
|
||||
(should
|
||||
(equal
|
||||
"* H\n :LOGBOOK:\n - a\n :END:\n b"
|
||||
(org-test-with-temp-text "** H\n :LOGBOOK:\n - a\n :END:\n b"
|
||||
(let ((org-odd-levels-only nil)
|
||||
(org-adapt-indentation 'headline-data))
|
||||
(org-promote))
|
||||
(buffer-string))))
|
||||
(should
|
||||
(equal
|
||||
"* H\n:LOGBOOK:\n- a\n:END:"
|
||||
(org-test-with-temp-text "** H\n:LOGBOOK:\n- a\n:END:"
|
||||
(let ((org-odd-levels-only nil)
|
||||
(org-adapt-indentation t))
|
||||
(org-promote))
|
||||
(buffer-string))))
|
||||
(should
|
||||
(equal
|
||||
"# H\n:LOGBOOK:\n- a\n:END:"
|
||||
(org-test-with-temp-text "* H\n:LOGBOOK:\n- a\n:END:"
|
||||
(let ((org-odd-levels-only nil)
|
||||
(org-allow-promoting-top-level-subtree t)
|
||||
(org-adapt-indentation t))
|
||||
(org-promote))
|
||||
(buffer-string))))
|
||||
;; Ignore contents of source blocks or example blocks when
|
||||
;; indentation should be preserved (through
|
||||
;; `org-src-preserve-indentation' or "-i" flag).
|
||||
|
@ -7101,7 +7172,14 @@ Paragraph<point>"
|
|||
(equal "{A+}"
|
||||
(org-test-with-temp-text "#+TAGS: [ A : B C ]"
|
||||
(org-mode-restart)
|
||||
(let ((org-tag-alist-for-agenda nil)) (org-tags-expand "{A+}"))))))
|
||||
(let ((org-tag-alist-for-agenda nil)) (org-tags-expand "{A+}")))))
|
||||
;; Uppercase MATCH works with a non-nil DOWNCASED and SINGLE-AS-LIST.
|
||||
(should
|
||||
(equal (list "a" "b" "c")
|
||||
(org-test-with-temp-text "#+TAGS: [ A : B C ]"
|
||||
(org-mode-restart)
|
||||
(let ((org-tag-alist-for-agenda nil))
|
||||
(sort (org-tags-expand "A" t t) #'string-lessp))))))
|
||||
|
||||
|
||||
;;; TODO keywords
|
||||
|
|
Loading…
Reference in New Issue