aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBastien Guerry2014-01-07 14:22:53 +0100
committerBastien Guerry2014-01-07 14:22:53 +0100
commit3c8b09ca2e01b0ef0c1b6651fab54194f0019fdc (patch)
treeca02feb436782a74af050f15c02843da84a95f4a
parent2b6b4f204c819569734c092532d56da85eef503b (diff)
downloademacs-3c8b09ca2e01b0ef0c1b6651fab54194f0019fdc.tar.gz
emacs-3c8b09ca2e01b0ef0c1b6651fab54194f0019fdc.zip
Merge Org version 8.2.5c.
-rw-r--r--doc/misc/ChangeLog20
-rw-r--r--doc/misc/org.texi84
-rw-r--r--etc/refcards/orgcard.tex6
-rw-r--r--lisp/org/ChangeLog104
-rw-r--r--lisp/org/ob-exp.el266
-rw-r--r--lisp/org/ob-gnuplot.el2
-rw-r--r--lisp/org/ob-latex.el2
-rw-r--r--lisp/org/ob-lob.el5
-rw-r--r--lisp/org/ob-maxima.el3
-rw-r--r--lisp/org/org-agenda.el56
-rw-r--r--lisp/org/org-attach.el5
-rw-r--r--lisp/org/org-ctags.el8
-rw-r--r--lisp/org/org-element.el46
-rw-r--r--lisp/org/org-habit.el4
-rw-r--r--lisp/org/org-inlinetask.el3
-rw-r--r--lisp/org/org-rmail.el8
-rw-r--r--lisp/org/org-table.el54
-rw-r--r--lisp/org/org-version.el4
-rw-r--r--lisp/org/org.el64
-rw-r--r--lisp/org/ox-html.el23
-rw-r--r--lisp/org/ox-icalendar.el4
-rw-r--r--lisp/org/ox-odt.el44
-rw-r--r--lisp/org/ox-org.el14
-rw-r--r--lisp/org/ox-publish.el4
-rw-r--r--lisp/org/ox-texinfo.el4
-rw-r--r--lisp/org/ox.el12
26 files changed, 485 insertions, 364 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 187493d5557..df132b647a6 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,23 @@
12013-01-07 Rasmus <w530@pank.eu>
2
3 * misc/org.texi (Global and local cycling): Fix missing '@'.
4
52013-01-07 Bastien Guerry <bzg@gnu.org>
6
7 * misc/org.texi (Global and local cycling): Mention C-u C-u TAB.
8 (Include files, The Export Dispatcher)
9 (Advanced configuration)
10 (Header arguments in Org mode properties): Spelling fixes.
11 (Special blocks): Add #+BEGIN_ABSTRACT as another example.
12 (@LaTeX{} specific attributes): New index entries. Use
13 #+BEGIN_ABSTRACT in the example.
14
152013-01-07 Nicolas Goaziou <n.goaziou@gmail.com>
16
17 * misc/org.texi (Org export): New section.
18 (HTML doctypes): Fix whitespace error. Fix display.
19 (Publishing options): Add missing html publishing options.
20
12014-01-07 Glenn Morris <rgm@gnu.org> 212014-01-07 Glenn Morris <rgm@gnu.org>
2 22
3 * efaq.texi (Basic editing, Packages that do not come with Emacs): 23 * efaq.texi (Basic editing, Packages that do not come with Emacs):
diff --git a/doc/misc/org.texi b/doc/misc/org.texi
index bd024e1edd3..b5ccb2b0767 100644
--- a/doc/misc/org.texi
+++ b/doc/misc/org.texi
@@ -2,7 +2,8 @@
2@c %**start of header 2@c %**start of header
3@setfilename ../../info/org 3@setfilename ../../info/org
4@settitle The Org Manual 4@settitle The Org Manual
5@set VERSION 8.2.4 5
6@include org-version.inc
6 7
7@c Use proper quote and backtick for code sections in PDF output 8@c Use proper quote and backtick for code sections in PDF output
8@c Cf. Texinfo manual 14.2 9@c Cf. Texinfo manual 14.2
@@ -280,7 +281,7 @@ modify this GNU manual.''
280 281
281@dircategory Emacs editing modes 282@dircategory Emacs editing modes
282@direntry 283@direntry
283* Org Mode: (org). Outline-based notes management and organizer. 284* Org Mode: (org). Outline-based notes management and organizer
284@end direntry 285@end direntry
285 286
286@titlepage 287@titlepage
@@ -588,6 +589,7 @@ Exporting
588* @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF 589* @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF
589* Markdown export:: Exporting to Markdown 590* Markdown export:: Exporting to Markdown
590* OpenDocument Text export:: Exporting to OpenDocument Text 591* OpenDocument Text export:: Exporting to OpenDocument Text
592* Org export:: Exporting to Org
591* iCalendar export:: Exporting to iCalendar 593* iCalendar export:: Exporting to iCalendar
592* Other built-in back-ends:: Exporting to @code{Texinfo}, a man page, or Org 594* Other built-in back-ends:: Exporting to @code{Texinfo}, a man page, or Org
593* Export in foreign buffers:: Author tables in lists in Org syntax 595* Export in foreign buffers:: Author tables in lists in Org syntax
@@ -1283,6 +1285,9 @@ When @kbd{S-@key{TAB}} is called with a numeric prefix argument N, the
1283CONTENTS view up to headlines of level N will be shown. Note that inside 1285CONTENTS view up to headlines of level N will be shown. Note that inside
1284tables, @kbd{S-@key{TAB}} jumps to the previous field. 1286tables, @kbd{S-@key{TAB}} jumps to the previous field.
1285 1287
1288@cindex set startup visibility, command
1289@orgcmd{C-u C-u @key{TAB},org-set-startup-visibility}
1290Switch back to the startup visibility of the buffer (@pxref{Initial visibility}).
1286@cindex show all, command 1291@cindex show all, command
1287@orgcmd{C-u C-u C-u @key{TAB},show-all} 1292@orgcmd{C-u C-u C-u @key{TAB},show-all}
1288Show all, including drawers. 1293Show all, including drawers.
@@ -10313,12 +10318,19 @@ Org syntax includes pre-defined blocks (@pxref{Paragraphs} and @ref{Literal
10313examples}). It is also possible to create blocks containing raw code 10318examples}). It is also possible to create blocks containing raw code
10314targeted at a specific back-ends (e.g., @samp{#+BEGIN_LATEX}). 10319targeted at a specific back-ends (e.g., @samp{#+BEGIN_LATEX}).
10315 10320
10316Any other block is a @emph{special block}. Each export back-end decides if 10321Any other block is a @emph{special block}.
10317they should be exported, and how. When the block is ignored, its contents 10322
10318are still exported, as if the block were not there. For example, when 10323For example, @samp{#+BEGIN_ABSTRACT} and @samp{#+BEGIN_VIDEO} are special
10319exporting a @samp{#+BEGIN_TEST} block, HTML back-end wraps its contents 10324blocks. The first one is useful when exporting to @LaTeX{}, the second one
10320within @samp{<div name="test">} tag. Refer to back-end specific 10325when exporting to HTML5.
10321documentation for more information. 10326
10327Each export back-end decides if they should be exported, and how. When the
10328block is ignored, its contents are still exported, as if the opening and
10329closing block lines were not there. For example, when exporting a
10330@samp{#+BEGIN_TEST} block, HTML back-end wraps its contents within a
10331@samp{<div name="test">} tag.
10332
10333Refer to back-end specific documentation for more information.
10322 10334
10323@node Exporting, Publishing, Markup, Top 10335@node Exporting, Publishing, Markup, Top
10324@chapter Exporting 10336@chapter Exporting
@@ -10350,6 +10362,7 @@ in the iCalendar format.
10350* @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF 10362* @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF
10351* Markdown export:: Exporting to Markdown 10363* Markdown export:: Exporting to Markdown
10352* OpenDocument Text export:: Exporting to OpenDocument Text 10364* OpenDocument Text export:: Exporting to OpenDocument Text
10365* Org export:: Exporting to Org
10353* iCalendar export:: Exporting to iCalendar 10366* iCalendar export:: Exporting to iCalendar
10354* Other built-in back-ends:: Exporting to @code{Texinfo}, a man page, or Org 10367* Other built-in back-ends:: Exporting to @code{Texinfo}, a man page, or Org
10355* Export in foreign buffers:: Author tables in lists in Org syntax 10368* Export in foreign buffers:: Author tables in lists in Org syntax
@@ -10449,6 +10462,7 @@ Built-in back-ends include:
10449@item man (Man page format) 10462@item man (Man page format)
10450@item md (Markdown format) 10463@item md (Markdown format)
10451@item odt (OpenDocument Text format) 10464@item odt (OpenDocument Text format)
10465@item org (Org format)
10452@item texinfo (Texinfo format) 10466@item texinfo (Texinfo format)
10453@end itemize 10467@end itemize
10454 10468
@@ -11107,12 +11121,12 @@ Becomes:
11107@end example 11121@end example
11108 11122
11109Special blocks that do not correspond to HTML5 elements (see 11123Special blocks that do not correspond to HTML5 elements (see
11110@code{org-html-html5-elements}) will revert to the usual behavior, 11124@code{org-html-html5-elements}) will revert to the usual behavior, i.e.,
11111i.e. #+BEGIN_LEDERHOSEN will still export to <div class=''lederhosen''>. 11125@code{#+BEGIN_LEDERHOSEN} will still export to @samp{<div class="lederhosen">}.
11112 11126
11113Headlines cannot appear within special blocks. To wrap a headline and its 11127Headlines cannot appear within special blocks. To wrap a headline and its
11114contents in e.g. <section> or <article> tags, set the @code{HTML_CONTAINER} 11128contents in e.g., @samp{<section>} or @samp{<article>} tags, set the
11115property on the headline itself. 11129@code{HTML_CONTAINER} property on the headline itself.
11116 11130
11117@node HTML preamble and postamble, Quoting HTML tags, HTML doctypes, HTML export 11131@node HTML preamble and postamble, Quoting HTML tags, HTML doctypes, HTML export
11118@subsection HTML preamble and postamble 11132@subsection HTML preamble and postamble
@@ -11791,12 +11805,18 @@ Code that may not fit in a single page.
11791 11805
11792@subsubheading Special blocks in @LaTeX{} export 11806@subsubheading Special blocks in @LaTeX{} export
11793@cindex special blocks, in @LaTeX{} export 11807@cindex special blocks, in @LaTeX{} export
11808@cindex abstract, in @LaTeX{} export
11809@cindex proof, in @LaTeX{} export
11794 11810
11795In @LaTeX{} back-end, special blocks become environments of the same name. 11811In @LaTeX{} back-end, special blocks become environments of the same name.
11796Value of @code{:options} attribute will be appended as-is to that 11812Value of @code{:options} attribute will be appended as-is to that
11797environment's opening string. For example: 11813environment's opening string. For example:
11798 11814
11799@example 11815@example
11816#+BEGIN_ABSTRACT
11817We demonstrate how to solve the Syracuse problem.
11818#+END_ABSTRACT
11819
11800#+ATTR_LATEX: :options [Proof of important theorem] 11820#+ATTR_LATEX: :options [Proof of important theorem]
11801#+BEGIN_PROOF 11821#+BEGIN_PROOF
11802... 11822...
@@ -11808,6 +11828,10 @@ Therefore, any even number greater than 2 is the sum of two primes.
11808becomes 11828becomes
11809 11829
11810@example 11830@example
11831\begin@{abstract@}
11832We demonstrate how to solve the Syracuse problem.
11833\end@{abstract@}
11834
11811\begin@{proof@}[Proof of important theorem] 11835\begin@{proof@}[Proof of important theorem]
11812... 11836...
11813Therefore, any even number greater than 2 is the sum of two primes. 11837Therefore, any even number greater than 2 is the sum of two primes.
@@ -11872,7 +11896,7 @@ that one (@pxref{Export settings}).
11872 11896
11873@c begin opendocument 11897@c begin opendocument
11874 11898
11875@node OpenDocument Text export, iCalendar export, Markdown export, Exporting 11899@node OpenDocument Text export, Org export, Markdown export, Exporting
11876@section OpenDocument Text export 11900@section OpenDocument Text export
11877@cindex ODT 11901@cindex ODT
11878@cindex OpenDocument 11902@cindex OpenDocument
@@ -12789,7 +12813,28 @@ will take care of updating the @code{rng-schema-locating-files} for you.
12789 12813
12790@c end opendocument 12814@c end opendocument
12791 12815
12792@node iCalendar export, Other built-in back-ends, OpenDocument Text export, Exporting 12816@node Org export
12817@section Org export
12818@cindex Org export
12819
12820@code{org} export back-end creates a normalized version of the Org document
12821in current buffer. In particular, it evaluates Babel code (@pxref{Evaluating
12822code blocks}) and removes other back-ends specific contents.
12823
12824@subheading Org export commands
12825
12826@table @kbd
12827@orgcmd{C-c C-e O o,org-org-export-to-org}
12828Export as an Org document. For an Org file, @file{myfile.org}, the resulting
12829file will be @file{myfile.org.org}. The file will be overwritten without
12830warning.
12831@orgcmd{C-c C-e O O,org-org-export-as-org}
12832Export to a temporary buffer. Do not create a file.
12833@item C-c C-e O v
12834Export to an Org file, then open it.
12835@end table
12836
12837@node iCalendar export, Other built-in back-ends, Org export, Exporting
12793@section iCalendar export 12838@section iCalendar export
12794@cindex iCalendar export 12839@cindex iCalendar export
12795 12840
@@ -12868,7 +12913,6 @@ On top of the aforementioned back-ends, Org comes with other built-in ones:
12868@itemize 12913@itemize
12869@item @file{ox-man.el}: export to a man page. 12914@item @file{ox-man.el}: export to a man page.
12870@item @file{ox-texinfo.el}: export to @code{Texinfo} format. 12915@item @file{ox-texinfo.el}: export to @code{Texinfo} format.
12871@item @file{ox-org.el}: export to an Org document.
12872@end itemize 12916@end itemize
12873 12917
12874To activate these export back-end, customize @code{org-export-backends} or 12918To activate these export back-end, customize @code{org-export-backends} or
@@ -13314,10 +13358,13 @@ string of these options for details.
13314@end multitable 13358@end multitable
13315 13359
13316@vindex org-html-doctype 13360@vindex org-html-doctype
13361@vindex org-html-container-element
13362@vindex org-html-html5-fancy
13317@vindex org-html-xml-declaration 13363@vindex org-html-xml-declaration
13318@vindex org-html-link-up 13364@vindex org-html-link-up
13319@vindex org-html-link-home 13365@vindex org-html-link-home
13320@vindex org-html-link-org-files-as-html 13366@vindex org-html-link-org-files-as-html
13367@vindex org-html-link-use-abs-url
13321@vindex org-html-head 13368@vindex org-html-head
13322@vindex org-html-head-extra 13369@vindex org-html-head-extra
13323@vindex org-html-inline-images 13370@vindex org-html-inline-images
@@ -13325,21 +13372,26 @@ string of these options for details.
13325@vindex org-html-preamble 13372@vindex org-html-preamble
13326@vindex org-html-postamble 13373@vindex org-html-postamble
13327@vindex org-html-table-default-attributes 13374@vindex org-html-table-default-attributes
13375@vindex org-html-table-row-tags
13328@vindex org-html-head-include-default-style 13376@vindex org-html-head-include-default-style
13329@vindex org-html-head-include-scripts 13377@vindex org-html-head-include-scripts
13330@multitable @columnfractions 0.32 0.68 13378@multitable @columnfractions 0.32 0.68
13331@item @code{:html-doctype} @tab @code{org-html-doctype} 13379@item @code{:html-doctype} @tab @code{org-html-doctype}
13380@item @code{:html-container} @tab @code{org-html-container-element}
13381@item @code{:html-html5-fancy} @tab @code{org-html-html5-fancy}
13332@item @code{:html-xml-declaration} @tab @code{org-html-xml-declaration} 13382@item @code{:html-xml-declaration} @tab @code{org-html-xml-declaration}
13333@item @code{:html-link-up} @tab @code{org-html-link-up} 13383@item @code{:html-link-up} @tab @code{org-html-link-up}
13334@item @code{:html-link-home} @tab @code{org-html-link-home} 13384@item @code{:html-link-home} @tab @code{org-html-link-home}
13335@item @code{:html-link-org-as-html} @tab @code{org-html-link-org-files-as-html} 13385@item @code{:html-link-org-as-html} @tab @code{org-html-link-org-files-as-html}
13386@item @code{:html-link-use-abs-url} @tab @code{org-html-link-use-abs-url}
13336@item @code{:html-head} @tab @code{org-html-head} 13387@item @code{:html-head} @tab @code{org-html-head}
13337@item @code{:html-head-extra} @tab @code{org-html-head-extra} 13388@item @code{:html-head-extra} @tab @code{org-html-head-extra}
13338@item @code{:html-inline-images} @tab @code{org-html-inline-images} 13389@item @code{:html-inline-images} @tab @code{org-html-inline-images}
13339@item @code{:html-extension} @tab @code{org-html-extension} 13390@item @code{:html-extension} @tab @code{org-html-extension}
13340@item @code{:html-preamble} @tab @code{org-html-preamble} 13391@item @code{:html-preamble} @tab @code{org-html-preamble}
13341@item @code{:html-postamble} @tab @code{org-html-postamble} 13392@item @code{:html-postamble} @tab @code{org-html-postamble}
13342@item @code{:html-table-attributes} @tab @code{org-html-table-default-attributes} 13393@item @code{:html-table-attributes} @tab @code{org-html-table-default-attributes}
13394@item @code{:html-table-row-tags} @tab @code{org-html-table-row-tags}
13343@item @code{:html-head-include-default-style} @tab @code{org-html-head-include-default-style} 13395@item @code{:html-head-include-default-style} @tab @code{org-html-head-include-default-style}
13344@item @code{:html-head-include-scripts} @tab @code{org-html-head-include-scripts} 13396@item @code{:html-head-include-scripts} @tab @code{org-html-head-include-scripts}
13345@end multitable 13397@end multitable
diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex
index bfbc8ec92a6..cf1e309bed7 100644
--- a/etc/refcards/orgcard.tex
+++ b/etc/refcards/orgcard.tex
@@ -1,7 +1,7 @@
1% Reference Card for Org Mode 1% Reference Card for Org Mode
2\def\orgversionnumber{8.2.4} 2\def\orgversionnumber{8.2}
3\def\versionyear{2013} % latest update 3\def\versionyear{2014} % latest update
4\input emacsver.tex 4\def\year{2014} % latest copyright year
5 5
6%**start of header 6%**start of header
7\newcount\columnsperpage 7\newcount\columnsperpage
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog
index 87280e57b36..bac878d2299 100644
--- a/lisp/org/ChangeLog
+++ b/lisp/org/ChangeLog
@@ -1,3 +1,107 @@
12013-01-07 Bastien Guerry <bzg@gnu.org>
2
3 * org-clock.el (org-clock-cancel-hook)
4 (org-clock-leftover-time): Fix typo in docstring.
5
6 * ox-odt.el (org-odt--frame): Add a draw:name property to the
7 draw:frame tag.
8 (org-odt-format-label): Don't use short-caption at all.
9
10 * org-rmail.el (org-rmail-follow-link): Don't raise an error when
11 no article is matched.
12
13 * org.el (org-set-tags): Ignore invisible text when restoring
14 cursor position.
15 (org-refile-get-location): Check for a refile position when the
16 position is not nil, otherwise allow to create the parent node if
17 the user requests it.
18 (org-refile-allow-creating-parent-nodes): Fix typo in
19 docstring.
20 (org-entry-get): Minor docstring enhancement.
21 (org-set-startup-visibility): Bugfix.
22 (org-shiftcontrolup, org-shiftcontroldown): When
23 `org-support-shift-select' is not `nil', let-bind it to nil if
24 point is on a clock log. Otherwise throw an error.
25
26 * ob-lob.el (org-babel-lob-files): Fix custom type.
27 (org-babel-lob-ingest): Small docstring fix.
28
29 * org-agenda.el (org-cmp-ts): Fix bug: interpret `late' as
30 `later than any date' instead of `later than today'.
31
32 * org.el (org-do-emphasis-faces): Handle false positives by
33 restarting the re-search one char after the beginning of the
34 match, not one char before its ending.
35 (org-entry-put): Check that the value provided is a string. If it
36 is nil, convert it to the empty string.
37
38 * ob-latex.el (org-babel-latex-htlatex-packages): Use repeat
39 instead of list as the defcustom type.
40
41 * ox.el (org-export-with-creator):
42 * org.el (org-loop-over-headlines-in-active-region)
43 (org-mouse-1-follows-link, org-provide-todo-statistics):
44 * org-agenda.el (org-agenda-custom-commands-local-options)
45 (org-agenda-start-with-log-mode)
46 (org-agenda-show-inherited-tags): Don't quote const values.
47
48 * ox-texinfo.el (org-texinfo-def-table-markup):
49 * org-inlinetask.el (org-inlinetask-show-first-star):
50 * ob-maxima.el (org-babel-maxima-command): Add type.
51
52 * org-table.el (org-table-fix-formulas): Handle multiple
53 #+tblfm: lines.
54
55 * ox.el (org-export-to-file): Fix typo in docstring.
56
57 * org.el (org-self-insert-command)
58 (orgtbl-self-insert-command): Change the value of the
59 `delete-selection' property to allow other commands like
60 `electric-pair-will-use-region' to be run before deletion.
61
62 * org-attach.el (vc-git): Require.
63 (org-attach-commit): Check whether git is installed.
64
652013-01-07 Nicolas Goaziou <n.goaziou@gmail.com>
66
67 * ox-icalendar.el (org-icalendar--combine-files): Make sure
68 anniversaries do not end up in *Message* buffer instead of the ICS
69 file.
70
71 * ox-html.el: Clean up "FIXME" comments.
72
73 * ox-publish.el (org-publish-resolve-external-fuzzy-link): Fix
74 docstring.
75
76 * ox.el (org-export-smart-quotes-regexps): Fix smart quote
77 detection when it is followed by an open parenthesis syntax class.
78
79 * org-element.el (org-element-inline-babel-call-successor): Use
80 original regexp to stay up-to-date with Babel changes.
81 (org-element--affiliated-re): Fix affiliated keyword regexp.
82
83 * ox-org.el (org-org-identity): Since back-end specific keywords
84 are stripped from output, also remove attr_backend keywords.
85 (org-babel-exp-process-buffer): Fix duplicate evaluation with
86 :wrap src.
87 (org-babel-exp-non-block-elements): Removed function.
88
892013-01-07 Ted Wiles <thewiles@wharton.upenn.edu> (tiny change)
90
91 * org-habit.el (org-habit-parse-todo): Match all TODO keywords,
92 not just "TODO".
93
942013-01-07 U-usuario <rbenit68@yahoo.es> (tiny change)
95
96 * ob-gnuplot.el (org-babel-gnuplot-quote-tsv-field): Fix code
97 typo.
98
992013-01-07 Vladimir Lomov <lomov.vl@gmail.com> (tiny change)
100
101 * ox-html.el (org-html-style-default): New classes caption.t-above
102 and caption.t-bottom.
103 (org-html-table): Use new classes.
104
12013-12-23 Chong Yidong <cyd@gnu.org> 1052013-12-23 Chong Yidong <cyd@gnu.org>
2 106
3 * org.el (orgstruct-make-binding): Call set-transient-map instead 107 * org.el (orgstruct-make-binding): Call set-transient-map instead
diff --git a/lisp/org/ob-exp.el b/lisp/org/ob-exp.el
index 973cea0bff8..74581421591 100644
--- a/lisp/org/ob-exp.el
+++ b/lisp/org/ob-exp.el
@@ -150,19 +150,17 @@ this template."
150 :type 'string) 150 :type 'string)
151 151
152(defvar org-babel-default-lob-header-args) 152(defvar org-babel-default-lob-header-args)
153(defun org-babel-exp-non-block-elements (start end) 153(defun org-babel-exp-process-buffer ()
154 "Process inline source and call lines between START and END for export." 154 "Execute all Babel blocks in current buffer."
155 (interactive) 155 (interactive)
156 (save-excursion 156 (save-window-excursion
157 (goto-char start) 157 (save-excursion
158 (unless (markerp end) 158 (let ((case-fold-search t)
159 (let ((m (make-marker))) 159 (regexp (concat org-babel-inline-src-block-regexp "\\|"
160 (set-marker m end (current-buffer)) 160 org-babel-lob-one-liner-regexp "\\|"
161 (setq end m))) 161 "^[ \t]*#\\+BEGIN_SRC")))
162 (let ((rx (concat "\\(?:" org-babel-inline-src-block-regexp 162 (goto-char (point-min))
163 "\\|" org-babel-lob-one-liner-regexp "\\)"))) 163 (while (re-search-forward regexp nil t)
164 (while (re-search-forward rx end t)
165 (save-excursion
166 (let* ((element (save-excursion 164 (let* ((element (save-excursion
167 ;; If match is inline, point is at its 165 ;; If match is inline, point is at its
168 ;; end. Move backward so 166 ;; end. Move backward so
@@ -170,145 +168,117 @@ this template."
170 ;; object, not the following one. 168 ;; object, not the following one.
171 (backward-char) 169 (backward-char)
172 (save-match-data (org-element-context)))) 170 (save-match-data (org-element-context))))
173 (type (org-element-type element))) 171 (type (org-element-type element))
174 (when (memq type '(babel-call inline-babel-call inline-src-block)) 172 (beg-el (org-element-property :begin element))
175 (let ((beg-el (org-element-property :begin element)) 173 (end-el (org-element-property :end element)))
176 (end-el (org-element-property :end element))) 174 (case type
177 (case type 175 (inline-src-block
178 (inline-src-block 176 (let* ((info (org-babel-parse-inline-src-block-match))
179 (let* ((info (org-babel-parse-inline-src-block-match)) 177 (params (nth 2 info)))
180 (params (nth 2 info))) 178 (setf (nth 1 info)
181 (setf (nth 1 info) 179 (if (and (cdr (assoc :noweb params))
182 (if (and (cdr (assoc :noweb params)) 180 (string= "yes" (cdr (assoc :noweb params))))
183 (string= "yes" (cdr (assoc :noweb params)))) 181 (org-babel-expand-noweb-references
184 (org-babel-expand-noweb-references 182 info (org-babel-exp-get-export-buffer))
185 info (org-babel-exp-get-export-buffer)) 183 (nth 1 info)))
186 (nth 1 info))) 184 (goto-char beg-el)
187 (goto-char beg-el) 185 (let ((replacement (org-babel-exp-do-export info 'inline)))
188 (let ((replacement (org-babel-exp-do-export info 'inline))) 186 (if (equal replacement "")
189 (if (equal replacement "") 187 ;; Replacement code is empty: remove inline src
190 ;; Replacement code is empty: completely 188 ;; block, including extra white space that
191 ;; remove inline src block, including extra 189 ;; might have been created when inserting
192 ;; white space that might have been created 190 ;; results.
193 ;; when inserting results.
194 (delete-region beg-el
195 (progn (goto-char end-el)
196 (skip-chars-forward " \t")
197 (point)))
198 ;; Otherwise: remove inline src block but
199 ;; preserve following white spaces. Then
200 ;; insert value.
201 (delete-region beg-el
202 (progn (goto-char end-el)
203 (skip-chars-backward " \t")
204 (point)))
205 (insert replacement)))))
206 ((babel-call inline-babel-call)
207 (let* ((lob-info (org-babel-lob-get-info))
208 (results
209 (org-babel-exp-do-export
210 (list "emacs-lisp" "results"
211 (apply #'org-babel-merge-params
212 org-babel-default-header-args
213 org-babel-default-lob-header-args
214 (append
215 (org-babel-params-from-properties)
216 (list
217 (org-babel-parse-header-arguments
218 (org-no-properties
219 (concat
220 ":var results="
221 (mapconcat 'identity
222 (butlast lob-info 2)
223 " ")))))))
224 "" (nth 3 lob-info) (nth 2 lob-info))
225 'lob))
226 (rep (org-fill-template
227 org-babel-exp-call-line-template
228 `(("line" . ,(nth 0 lob-info))))))
229 ;; If replacement is empty, completely remove the
230 ;; object/element, including any extra white space
231 ;; that might have been created when including
232 ;; results.
233 (if (equal rep "")
234 (delete-region
235 beg-el
236 (progn (goto-char end-el)
237 (if (not (eq type 'babel-call))
238 (progn (skip-chars-forward " \t") (point))
239 (skip-chars-forward " \r\t\n")
240 (line-beginning-position))))
241 ;; Otherwise, preserve following white
242 ;; spaces/newlines and then, insert replacement
243 ;; string.
244 (goto-char beg-el)
245 (delete-region beg-el 191 (delete-region beg-el
246 (progn (goto-char end-el) 192 (progn (goto-char end-el)
247 (skip-chars-backward " \r\t\n") 193 (skip-chars-forward " \t")
248 (point))) 194 (point)))
249 (insert rep))))))))))))) 195 ;; Otherwise: remove inline src block but
250 196 ;; preserve following white spaces. Then insert
251(defvar org-src-preserve-indentation) ; From org-src.el 197 ;; value.
252(defun org-babel-exp-process-buffer () 198 (delete-region beg-el
253 "Execute all blocks in visible part of buffer." 199 (progn (goto-char end-el)
254 (interactive) 200 (skip-chars-backward " \t")
255 (save-window-excursion 201 (point)))
256 (let ((case-fold-search t) 202 (insert replacement)))))
257 (pos (point-min))) 203 ((babel-call inline-babel-call)
258 (goto-char pos) 204 (let* ((lob-info (org-babel-lob-get-info))
259 (while (re-search-forward "^[ \t]*#\\+BEGIN_SRC" nil t) 205 (results
260 (let ((element (save-match-data (org-element-at-point)))) 206 (org-babel-exp-do-export
261 (when (eq (org-element-type element) 'src-block) 207 (list "emacs-lisp" "results"
262 (let* ((match-start (copy-marker (match-beginning 0))) 208 (apply #'org-babel-merge-params
263 (begin (copy-marker (org-element-property :begin element))) 209 org-babel-default-header-args
264 ;; Make sure we don't remove any blank lines after 210 org-babel-default-lob-header-args
265 ;; the block when replacing it. 211 (append
266 (block-end (save-excursion 212 (org-babel-params-from-properties)
267 (goto-char (org-element-property :end element)) 213 (list
268 (skip-chars-backward " \r\t\n") 214 (org-babel-parse-header-arguments
269 (copy-marker (line-end-position)))) 215 (org-no-properties
270 (ind (org-get-indentation)) 216 (concat
271 (headers 217 ":var results="
272 (cons 218 (mapconcat 'identity
273 (org-element-property :language element) 219 (butlast lob-info 2)
274 (let ((params (org-element-property :parameters element))) 220 " ")))))))
275 (and params (org-split-string params "[ \t]+")))))) 221 "" (nth 3 lob-info) (nth 2 lob-info))
276 ;; Execute all non-block elements between POS and 222 'lob))
277 ;; current block. 223 (rep (org-fill-template
278 (org-babel-exp-non-block-elements pos begin) 224 org-babel-exp-call-line-template
279 ;; Take care of matched block: compute replacement 225 `(("line" . ,(nth 0 lob-info))))))
280 ;; string. In particular, a nil REPLACEMENT means the 226 ;; If replacement is empty, completely remove the
281 ;; block should be left as-is while an empty string 227 ;; object/element, including any extra white space
282 ;; should remove the block. 228 ;; that might have been created when including
283 (let ((replacement (progn (goto-char match-start) 229 ;; results.
284 (org-babel-exp-src-block headers)))) 230 (if (equal rep "")
285 (cond ((not replacement) (goto-char block-end)) 231 (delete-region
286 ((equal replacement "") 232 beg-el
287 (delete-region begin 233 (progn (goto-char end-el)
288 (progn (goto-char block-end) 234 (if (not (eq type 'babel-call))
289 (skip-chars-forward " \r\t\n") 235 (progn (skip-chars-forward " \t") (point))
290 (if (eobp) (point) 236 (skip-chars-forward " \r\t\n")
291 (line-beginning-position))))) 237 (line-beginning-position))))
292 (t 238 ;; Otherwise, preserve following white
293 (goto-char match-start) 239 ;; spaces/newlines and then, insert replacement
294 (delete-region (point) block-end) 240 ;; string.
295 (insert replacement) 241 (goto-char beg-el)
296 (if (org-element-property :preserve-indent element) 242 (delete-region beg-el
297 ;; Indent only the code block markers. 243 (progn (goto-char end-el)
298 (save-excursion (skip-chars-backward " \r\t\n") 244 (skip-chars-backward " \r\t\n")
299 (indent-line-to ind) 245 (point)))
300 (goto-char match-start) 246 (insert rep))))
301 (indent-line-to ind)) 247 (src-block
302 ;; Indent everything. 248 (let* ((match-start (match-beginning 0))
303 (indent-rigidly match-start (point) ind))))) 249 ;; Make sure we don't remove any blank lines
304 (setq pos (line-beginning-position)) 250 ;; after the block when replacing it.
305 ;; Cleanup markers. 251 (block-end (save-excursion
306 (set-marker match-start nil) 252 (goto-char end-el)
307 (set-marker begin nil) 253 (skip-chars-backward " \r\t\n")
308 (set-marker block-end nil))))) 254 (line-end-position)))
309 ;; Eventually execute all non-block Babel elements between last 255 (ind (org-get-indentation))
310 ;; src-block and end of buffer. 256 (headers
311 (org-babel-exp-non-block-elements pos (point-max))))) 257 (cons
258 (org-element-property :language element)
259 (let ((params (org-element-property :parameters element)))
260 (and params (org-split-string params "[ \t]+"))))))
261 ;; Take care of matched block: compute replacement
262 ;; string. In particular, a nil REPLACEMENT means
263 ;; the block should be left as-is while an empty
264 ;; string should remove the block.
265 (let ((replacement (progn (goto-char match-start)
266 (org-babel-exp-src-block headers))))
267 (cond ((not replacement) (goto-char block-end))
268 ((equal replacement "")
269 (delete-region beg-el end-el))
270 (t
271 (goto-char match-start)
272 (delete-region (point) block-end)
273 (insert replacement)
274 (if (org-element-property :preserve-indent element)
275 ;; Indent only the code block markers.
276 (save-excursion (skip-chars-backward " \r\t\n")
277 (indent-line-to ind)
278 (goto-char match-start)
279 (indent-line-to ind))
280 ;; Indent everything.
281 (indent-rigidly match-start (point) ind))))))))))))))
312 282
313(defun org-babel-in-example-or-verbatim () 283(defun org-babel-in-example-or-verbatim ()
314 "Return true if point is in example or verbatim code. 284 "Return true if point is in example or verbatim code.
diff --git a/lisp/org/ob-gnuplot.el b/lisp/org/ob-gnuplot.el
index 57396f1d015..8767e88e4c3 100644
--- a/lisp/org/ob-gnuplot.el
+++ b/lisp/org/ob-gnuplot.el
@@ -253,7 +253,7 @@ then create one. Return the initialized session. The current
253 (org-babel-gnuplot-quote-timestamp-field s) 253 (org-babel-gnuplot-quote-timestamp-field s)
254 (if (zerop (length s)) 254 (if (zerop (length s))
255 (or *org-babel-gnuplot-missing* s) 255 (or *org-babel-gnuplot-missing* s)
256 (if (string-match "[ \"]" "?") 256 (if (string-match "[ \"]" s)
257 (concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"") 257 (concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"")
258 "\"") 258 "\"")
259 s))))) 259 s)))))
diff --git a/lisp/org/ob-latex.el b/lisp/org/ob-latex.el
index 00fcdc1d6e5..35b6650798e 100644
--- a/lisp/org/ob-latex.el
+++ b/lisp/org/ob-latex.el
@@ -59,7 +59,7 @@
59 '("[usenames]{color}" "{tikz}" "{color}" "{listings}" "{amsmath}") 59 '("[usenames]{color}" "{tikz}" "{color}" "{listings}" "{amsmath}")
60 "Packages to use for htlatex export." 60 "Packages to use for htlatex export."
61 :group 'org-babel 61 :group 'org-babel
62 :type '(list (string))) 62 :type '(repeat (string)))
63 63
64(defun org-babel-expand-body:latex (body params) 64(defun org-babel-expand-body:latex (body params)
65 "Expand BODY according to PARAMS, return the expanded body." 65 "Expand BODY according to PARAMS, return the expanded body."
diff --git a/lisp/org/ob-lob.el b/lisp/org/ob-lob.el
index 753eaf99625..4e635da1067 100644
--- a/lisp/org/ob-lob.el
+++ b/lisp/org/ob-lob.el
@@ -40,14 +40,13 @@ files to `org-babel-lob-files'.")
40To add files to this list use the `org-babel-lob-ingest' command." 40To add files to this list use the `org-babel-lob-ingest' command."
41 :group 'org-babel 41 :group 'org-babel
42 :version "24.1" 42 :version "24.1"
43 :type 'list) 43 :type '(repeat file))
44 44
45(defvar org-babel-default-lob-header-args '((:exports . "results")) 45(defvar org-babel-default-lob-header-args '((:exports . "results"))
46 "Default header arguments to use when exporting #+lob/call lines.") 46 "Default header arguments to use when exporting #+lob/call lines.")
47 47
48(defun org-babel-lob-ingest (&optional file) 48(defun org-babel-lob-ingest (&optional file)
49 "Add all named source-blocks defined in FILE to 49 "Add all named source blocks defined in FILE to `org-babel-library-of-babel'."
50`org-babel-library-of-babel'."
51 (interactive "fFile: ") 50 (interactive "fFile: ")
52 (let ((lob-ingest-count 0)) 51 (let ((lob-ingest-count 0))
53 (org-babel-map-src-blocks file 52 (org-babel-map-src-blocks file
diff --git a/lisp/org/ob-maxima.el b/lisp/org/ob-maxima.el
index 836cdcb8dc1..7435f1d3286 100644
--- a/lisp/org/ob-maxima.el
+++ b/lisp/org/ob-maxima.el
@@ -43,7 +43,8 @@
43(defcustom org-babel-maxima-command 43(defcustom org-babel-maxima-command
44 (if (boundp 'maxima-command) maxima-command "maxima") 44 (if (boundp 'maxima-command) maxima-command "maxima")
45 "Command used to call maxima on the shell." 45 "Command used to call maxima on the shell."
46 :group 'org-babel) 46 :group 'org-babel
47 :type 'string)
47 48
48(defun org-babel-maxima-expand (body params) 49(defun org-babel-maxima-expand (body params)
49 "Expand a block of Maxima code according to its header arguments." 50 "Expand a block of Maxima code according to its header arguments."
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index 1589774ec51..116909da9fd 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -328,11 +328,11 @@ the daily/weekly agenda, see `org-agenda-skip-function'.")
328 (string)) 328 (string))
329 (list :tag "Number of days in agenda" 329 (list :tag "Number of days in agenda"
330 (const org-agenda-span) 330 (const org-agenda-span)
331 (choice (const :tag "Day" 'day) 331 (choice (const :tag "Day" day)
332 (const :tag "Week" 'week) 332 (const :tag "Week" week)
333 (const :tag "Fortnight" 'fortnight) 333 (const :tag "Fortnight" fortnight)
334 (const :tag "Month" 'month) 334 (const :tag "Month" month)
335 (const :tag "Year" 'year) 335 (const :tag "Year" year)
336 (integer :tag "Custom"))) 336 (integer :tag "Custom")))
337 (list :tag "Fixed starting date" 337 (list :tag "Fixed starting date"
338 (const org-agenda-start-day) 338 (const org-agenda-start-day)
@@ -390,32 +390,32 @@ the daily/weekly agenda, see `org-agenda-skip-function'.")
390 (repeat :inline t :tag "Conditions for skipping" 390 (repeat :inline t :tag "Conditions for skipping"
391 (choice 391 (choice
392 :tag "Condition type" 392 :tag "Condition type"
393 (list :tag "Regexp matches" :inline t (const :format "" 'regexp) (regexp)) 393 (list :tag "Regexp matches" :inline t (const :format "" regexp) (regexp))
394 (list :tag "Regexp does not match" :inline t (const :format "" 'notregexp) (regexp)) 394 (list :tag "Regexp does not match" :inline t (const :format "" notregexp) (regexp))
395 (list :tag "TODO state is" :inline t 395 (list :tag "TODO state is" :inline t
396 (const 'todo) 396 (const todo)
397 (choice 397 (choice
398 (const :tag "any not-done state" 'todo) 398 (const :tag "any not-done state" todo)
399 (const :tag "any done state" 'done) 399 (const :tag "any done state" done)
400 (const :tag "any state" 'any) 400 (const :tag "any state" any)
401 (list :tag "Keyword list" 401 (list :tag "Keyword list"
402 (const :format "" quote) 402 (const :format "" quote)
403 (repeat (string :tag "Keyword"))))) 403 (repeat (string :tag "Keyword")))))
404 (list :tag "TODO state is not" :inline t 404 (list :tag "TODO state is not" :inline t
405 (const 'nottodo) 405 (const nottodo)
406 (choice 406 (choice
407 (const :tag "any not-done state" 'todo) 407 (const :tag "any not-done state" todo)
408 (const :tag "any done state" 'done) 408 (const :tag "any done state" done)
409 (const :tag "any state" 'any) 409 (const :tag "any state" any)
410 (list :tag "Keyword list" 410 (list :tag "Keyword list"
411 (const :format "" quote) 411 (const :format "" quote)
412 (repeat (string :tag "Keyword"))))) 412 (repeat (string :tag "Keyword")))))
413 (const :tag "scheduled" 'scheduled) 413 (const :tag "scheduled" scheduled)
414 (const :tag "not scheduled" 'notscheduled) 414 (const :tag "not scheduled" notscheduled)
415 (const :tag "deadline" 'deadline) 415 (const :tag "deadline" deadline)
416 (const :tag "no deadline" 'notdeadline) 416 (const :tag "no deadline" notdeadline)
417 (const :tag "timestamp" 'timestamp) 417 (const :tag "timestamp" timestamp)
418 (const :tag "no timestamp" 'nottimestamp)))))) 418 (const :tag "no timestamp" nottimestamp))))))
419 (list :tag "Non-standard skipping condition" 419 (list :tag "Non-standard skipping condition"
420 :value (org-agenda-skip-function) 420 :value (org-agenda-skip-function)
421 (const org-agenda-skip-function) 421 (const org-agenda-skip-function)
@@ -1357,12 +1357,12 @@ explanations on the possible values."
1357 :group 'org-agenda-startup 1357 :group 'org-agenda-startup
1358 :group 'org-agenda-daily/weekly 1358 :group 'org-agenda-daily/weekly
1359 :type '(choice (const :tag "Don't show log items" nil) 1359 :type '(choice (const :tag "Don't show log items" nil)
1360 (const :tag "Show only log items" 'only) 1360 (const :tag "Show only log items" only)
1361 (const :tag "Show all possible log items" 'clockcheck) 1361 (const :tag "Show all possible log items" clockcheck)
1362 (repeat :tag "Choose among possible values for `org-agenda-log-mode-items'" 1362 (repeat :tag "Choose among possible values for `org-agenda-log-mode-items'"
1363 (choice (const :tag "Show closed log items" 'closed) 1363 (choice (const :tag "Show closed log items" closed)
1364 (const :tag "Show clocked log items" 'clock) 1364 (const :tag "Show clocked log items" clock)
1365 (const :tag "Show all logged state changes" 'state))))) 1365 (const :tag "Show all logged state changes" state)))))
1366 1366
1367(defcustom org-agenda-start-with-clockreport-mode nil 1367(defcustom org-agenda-start-with-clockreport-mode nil
1368 "The initial value of clockreport-mode in a newly created agenda window." 1368 "The initial value of clockreport-mode in a newly created agenda window."
@@ -1805,7 +1805,7 @@ When set to nil, never show inherited tags in agenda lines."
1805 :version "24.3" 1805 :version "24.3"
1806 :type '(choice 1806 :type '(choice
1807 (const :tag "Show inherited tags when available" t) 1807 (const :tag "Show inherited tags when available" t)
1808 (const :tag "Always show inherited tags" 'always) 1808 (const :tag "Always show inherited tags" always)
1809 (repeat :tag "Show inherited tags only in selected agenda types" 1809 (repeat :tag "Show inherited tags only in selected agenda types"
1810 (symbol :tag "Agenda type")))) 1810 (symbol :tag "Agenda type"))))
1811 1811
@@ -7003,7 +7003,7 @@ When TYPE is \"scheduled\", \"deadline\", \"timestamp\" or
7003\"timestamp_ia\", compare within each of these type. When TYPE 7003\"timestamp_ia\", compare within each of these type. When TYPE
7004is the empty string, compare all timestamps without respect of 7004is the empty string, compare all timestamps without respect of
7005their type." 7005their type."
7006 (let* ((def (if org-sort-agenda-notime-is-late 9901 -1)) 7006 (let* ((def (if org-sort-agenda-notime-is-late most-positive-fixnum -1))
7007 (ta (or (and (string-match type (or (get-text-property 1 'type a) "")) 7007 (ta (or (and (string-match type (or (get-text-property 1 'type a) ""))
7008 (get-text-property 1 'ts-date a)) def)) 7008 (get-text-property 1 'ts-date a)) def))
7009 (tb (or (and (string-match type (or (get-text-property 1 'type b) "")) 7009 (tb (or (and (string-match type (or (get-text-property 1 'type b) ""))
diff --git a/lisp/org/org-attach.el b/lisp/org/org-attach.el
index 2c291a07622..07307e68f6f 100644
--- a/lisp/org/org-attach.el
+++ b/lisp/org/org-attach.el
@@ -41,8 +41,7 @@
41 (require 'cl)) 41 (require 'cl))
42(require 'org-id) 42(require 'org-id)
43(require 'org) 43(require 'org)
44 44(require 'vc-git)
45(declare-function vc-git-root "vc-git" (file))
46 45
47(defgroup org-attach nil 46(defgroup org-attach nil
48 "Options concerning entry attachments in Org-mode." 47 "Options concerning entry attachments in Org-mode."
@@ -266,7 +265,7 @@ This checks for the existence of a \".git\" directory in that directory."
266 (let* ((dir (expand-file-name org-attach-directory)) 265 (let* ((dir (expand-file-name org-attach-directory))
267 (git-dir (vc-git-root dir)) 266 (git-dir (vc-git-root dir))
268 (changes 0)) 267 (changes 0))
269 (when git-dir 268 (when (and git-dir (executable-find "git"))
270 (with-temp-buffer 269 (with-temp-buffer
271 (cd dir) 270 (cd dir)
272 (let ((have-annex 271 (let ((have-annex
diff --git a/lisp/org/org-ctags.el b/lisp/org/org-ctags.el
index faf543be1b5..41775bdab6d 100644
--- a/lisp/org/org-ctags.el
+++ b/lisp/org/org-ctags.el
@@ -63,19 +63,19 @@
63;; with the same name as the link; then, if unsuccessful, ask the user if 63;; with the same name as the link; then, if unsuccessful, ask the user if
64;; he/she wants to rebuild the 'TAGS' database and try again; then ask if 64;; he/she wants to rebuild the 'TAGS' database and try again; then ask if
65;; the user wishes to append 'tag' as a new toplevel heading at the end of 65;; the user wishes to append 'tag' as a new toplevel heading at the end of
66;; the buffer; and finally, defer to org's default behavior which is to 66;; the buffer; and finally, defer to org's default behaviour which is to
67;; search the entire text of the current buffer for 'tag'. 67;; search the entire text of the current buffer for 'tag'.
68;; 68;;
69;; This behavior can be modified by changing the value of 69;; This behaviour can be modified by changing the value of
70;; ORG-CTAGS-OPEN-LINK-FUNCTIONS. For example I have the following in my 70;; ORG-CTAGS-OPEN-LINK-FUNCTIONS. For example I have the following in my
71;; .emacs, which describes the same behavior as the above paragraph with 71;; .emacs, which describes the same behaviour as the above paragraph with
72;; one difference: 72;; one difference:
73;; 73;;
74;; (setq org-ctags-open-link-functions 74;; (setq org-ctags-open-link-functions
75;; '(org-ctags-find-tag 75;; '(org-ctags-find-tag
76;; org-ctags-ask-rebuild-tags-file-then-find-tag 76;; org-ctags-ask-rebuild-tags-file-then-find-tag
77;; org-ctags-ask-append-topic 77;; org-ctags-ask-append-topic
78;; org-ctags-fail-silently)) ; <-- prevents org default behavior 78;; org-ctags-fail-silently)) ; <-- prevents org default behaviour
79;; 79;;
80;; 80;;
81;; Usage 81;; Usage
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el
index 73d55315575..77b2bc26ef9 100644
--- a/lisp/org/org-element.el
+++ b/lisp/org/org-element.el
@@ -239,19 +239,6 @@ application to open them.")
239By default, all keywords setting attributes (i.e. \"ATTR_LATEX\") 239By default, all keywords setting attributes (i.e. \"ATTR_LATEX\")
240are affiliated keywords and need not to be in this list.") 240are affiliated keywords and need not to be in this list.")
241 241
242(defconst org-element--affiliated-re
243 (format "[ \t]*#\\+%s:"
244 ;; Regular affiliated keywords.
245 (format "\\(%s\\|ATTR_[-_A-Za-z0-9]+\\)\\(?:\\[\\(.*\\)\\]\\)?"
246 (regexp-opt org-element-affiliated-keywords)))
247 "Regexp matching any affiliated keyword.
248
249Keyword name is put in match group 1. Moreover, if keyword
250belongs to `org-element-dual-keywords', put the dual value in
251match group 2.
252
253Don't modify it, set `org-element-affiliated-keywords' instead.")
254
255(defconst org-element-keyword-translation-alist 242(defconst org-element-keyword-translation-alist
256 '(("DATA" . "NAME") ("LABEL" . "NAME") ("RESNAME" . "NAME") 243 '(("DATA" . "NAME") ("LABEL" . "NAME") ("RESNAME" . "NAME")
257 ("SOURCE" . "NAME") ("SRCNAME" . "NAME") ("TBLNAME" . "NAME") 244 ("SOURCE" . "NAME") ("SRCNAME" . "NAME") ("TBLNAME" . "NAME")
@@ -298,6 +285,31 @@ This list is checked after translations have been applied. See
298Any keyword in this list will have its value parsed and stored as 285Any keyword in this list will have its value parsed and stored as
299a secondary string.") 286a secondary string.")
300 287
288(defconst org-element--affiliated-re
289 (format "[ \t]*#\\+\\(?:%s\\):\\(?: \\|$\\)"
290 (concat
291 ;; Dual affiliated keywords.
292 (format "\\(?1:%s\\)\\(?:\\[\\(.*\\)\\]\\)?"
293 (regexp-opt org-element-dual-keywords))
294 "\\|"
295 ;; Regular affiliated keywords.
296 (format "\\(?1:%s\\)"
297 (regexp-opt
298 (org-remove-if
299 #'(lambda (keyword)
300 (member keyword org-element-dual-keywords))
301 org-element-affiliated-keywords)))
302 "\\|"
303 ;; Export attributes.
304 "\\(?1:ATTR_[-_A-Za-z0-9]+\\)"))
305 "Regexp matching any affiliated keyword.
306
307Keyword name is put in match group 1. Moreover, if keyword
308belongs to `org-element-dual-keywords', put the dual value in
309match group 2.
310
311Don't modify it, set `org-element-affiliated-keywords' instead.")
312
301(defconst org-element-object-restrictions 313(defconst org-element-object-restrictions
302 (let* ((standard-set 314 (let* ((standard-set
303 (remq 'plain-link (remq 'table-cell org-element-all-successors))) 315 (remq 'plain-link (remq 'table-cell org-element-all-successors)))
@@ -2906,12 +2918,8 @@ CONTENTS is nil."
2906Return value is a cons cell whose CAR is `inline-babel-call' and 2918Return value is a cons cell whose CAR is `inline-babel-call' and
2907CDR is beginning position." 2919CDR is beginning position."
2908 (save-excursion 2920 (save-excursion
2909 ;; Use a simplified version of 2921 (when (re-search-forward org-babel-inline-lob-one-liner-regexp nil t)
2910 ;; `org-babel-inline-lob-one-liner-regexp'. 2922 (cons 'inline-babel-call (match-end 1)))))
2911 (when (re-search-forward
2912 "call_\\([^()\n]+?\\)\\(?:\\[.*?\\]\\)?([^\n]*?)\\(\\[.*?\\]\\)?"
2913 nil t)
2914 (cons 'inline-babel-call (match-beginning 0)))))
2915 2923
2916 2924
2917;;;; Inline Src Block 2925;;;; Inline Src Block
diff --git a/lisp/org/org-habit.el b/lisp/org/org-habit.el
index 54ba26dd349..721718d2b6c 100644
--- a/lisp/org/org-habit.el
+++ b/lisp/org/org-habit.el
@@ -200,7 +200,9 @@ This list represents a \"habit\" for the rest of this module."
200 (count 0)) 200 (count 0))
201 (unless reversed (goto-char end)) 201 (unless reversed (goto-char end))
202 (while (and (< count maxdays) 202 (while (and (< count maxdays)
203 (funcall search "- State \"DONE\".*\\[\\([^]]+\\)\\]" limit t)) 203 (funcall search (format "- State \"%s\".*\\[\\([^]]+\\)\\]"
204 (regexp-opt org-done-keywords))
205 limit t))
204 (push (time-to-days 206 (push (time-to-days
205 (org-time-string-to-time (match-string-no-properties 1))) 207 (org-time-string-to-time (match-string-no-properties 1)))
206 closed-dates) 208 closed-dates)
diff --git a/lisp/org/org-inlinetask.el b/lisp/org/org-inlinetask.el
index b491b83888d..de4267c8d9c 100644
--- a/lisp/org/org-inlinetask.el
+++ b/lisp/org/org-inlinetask.el
@@ -103,7 +103,8 @@ the value of this variable."
103 "Non-nil means display the first star of an inline task as additional marker. 103 "Non-nil means display the first star of an inline task as additional marker.
104When nil, the first star is not shown." 104When nil, the first star is not shown."
105 :tag "Org Inline Tasks" 105 :tag "Org Inline Tasks"
106 :group 'org-structure) 106 :group 'org-structure
107 :type 'boolean)
107 108
108(defvar org-odd-levels-only) 109(defvar org-odd-levels-only)
109(defvar org-keyword-time-regexp) 110(defvar org-keyword-time-regexp)
diff --git a/lisp/org/org-rmail.el b/lisp/org/org-rmail.el
index ccfa59f5cf5..6859b659dde 100644
--- a/lisp/org/org-rmail.el
+++ b/lisp/org/org-rmail.el
@@ -95,7 +95,10 @@
95(defun org-rmail-follow-link (folder article) 95(defun org-rmail-follow-link (folder article)
96 "Follow an Rmail link to FOLDER and ARTICLE." 96 "Follow an Rmail link to FOLDER and ARTICLE."
97 (require 'rmail) 97 (require 'rmail)
98 (setq article (org-add-angle-brackets article)) 98 (cond ((null article) (setq article ""))
99 ((stringp article)
100 (setq article (org-add-angle-brackets article)))
101 (t (user-error "Wrong RMAIL link format")))
99 (let (message-number) 102 (let (message-number)
100 (save-excursion 103 (save-excursion
101 (save-window-excursion 104 (save-window-excursion
@@ -105,8 +108,7 @@
105 (rmail-widen) 108 (rmail-widen)
106 (goto-char (point-max)) 109 (goto-char (point-max))
107 (if (re-search-backward 110 (if (re-search-backward
108 (concat "^Message-ID:\\s-+" (regexp-quote 111 (concat "^Message-ID:\\s-+" (regexp-quote article))
109 (or article "")))
110 nil t) 112 nil t)
111 (rmail-what-message)))))) 113 (rmail-what-message))))))
112 (if message-number 114 (if message-number
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el
index 089a25325ff..261d62f9625 100644
--- a/lisp/org/org-table.el
+++ b/lisp/org/org-table.el
@@ -2274,33 +2274,35 @@ KEY is \"@\" or \"$\". REPLACE is an alist of numbers to replace.
2274For all numbers larger than LIMIT, shift them by DELTA." 2274For all numbers larger than LIMIT, shift them by DELTA."
2275 (save-excursion 2275 (save-excursion
2276 (goto-char (org-table-end)) 2276 (goto-char (org-table-end))
2277 (when (let ((case-fold-search t)) (looking-at "[ \t]*#\\+tblfm:")) 2277 (let ((case-fold-search t)
2278 (let ((msg "The formulas in #+TBLFM have been updated") 2278 (s-end (save-excursion (re-search-forward "^\\S-*$\\|\\'" nil t))))
2279 (re (concat key "\\([0-9]+\\)")) 2279 (while (re-search-forward "[ \t]*#\\+tblfm:" s-end t)
2280 (re2 2280 (let ((msg "The formulas in #+TBLFM have been updated")
2281 (when remove 2281 (re (concat key "\\([0-9]+\\)"))
2282 (if (or (equal key "$") (equal key "$LR")) 2282 (re2
2283 (format "\\(@[0-9]+\\)?%s%d=.*?\\(::\\|$\\)" 2283 (when remove
2284 (regexp-quote key) remove) 2284 (if (or (equal key "$") (equal key "$LR"))
2285 (format "@%d\\$[0-9]+=.*?\\(::\\|$\\)" remove)))) 2285 (format "\\(@[0-9]+\\)?%s%d=.*?\\(::\\|$\\)"
2286 s n a) 2286 (regexp-quote key) remove)
2287 (when remove 2287 (format "@%d\\$[0-9]+=.*?\\(::\\|$\\)" remove))))
2288 (while (re-search-forward re2 (point-at-eol) t) 2288 s n a)
2289 (when remove
2290 (while (re-search-forward re2 (point-at-eol) t)
2291 (unless (save-match-data (org-in-regexp "remote([^)]+?)"))
2292 (if (equal (char-before (match-beginning 0)) ?.)
2293 (user-error "Change makes TBLFM term %s invalid, use undo to recover"
2294 (match-string 0))
2295 (replace-match "")))))
2296 (while (re-search-forward re (point-at-eol) t)
2289 (unless (save-match-data (org-in-regexp "remote([^)]+?)")) 2297 (unless (save-match-data (org-in-regexp "remote([^)]+?)"))
2290 (if (equal (char-before (match-beginning 0)) ?.) 2298 (setq s (match-string 1) n (string-to-number s))
2291 (user-error "Change makes TBLFM term %s invalid, use undo to recover" 2299 (cond
2292 (match-string 0)) 2300 ((setq a (assoc s replace))
2293 (replace-match ""))))) 2301 (replace-match (concat key (cdr a)) t t)
2294 (while (re-search-forward re (point-at-eol) t) 2302 (message msg))
2295 (unless (save-match-data (org-in-regexp "remote([^)]+?)")) 2303 ((and limit (> n limit))
2296 (setq s (match-string 1) n (string-to-number s)) 2304 (replace-match (concat key (int-to-string (+ n delta))) t t)
2297 (cond 2305 (message msg))))))))))
2298 ((setq a (assoc s replace))
2299 (replace-match (concat key (cdr a)) t t)
2300 (message msg))
2301 ((and limit (> n limit))
2302 (replace-match (concat key (int-to-string (+ n delta))) t t)
2303 (message msg)))))))))
2304 2306
2305(defun org-table-get-specials () 2307(defun org-table-get-specials ()
2306 "Get the column names and local parameters for this table." 2308 "Get the column names and local parameters for this table."
diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el
index 63abb9d0015..7ccddb52a92 100644
--- a/lisp/org/org-version.el
+++ b/lisp/org/org-version.el
@@ -5,13 +5,13 @@
5(defun org-release () 5(defun org-release ()
6 "The release version of org-mode. 6 "The release version of org-mode.
7 Inserted by installing org-mode or when a release is made." 7 Inserted by installing org-mode or when a release is made."
8 (let ((org-release "8.2.3a")) 8 (let ((org-release "8.2.5c"))
9 org-release)) 9 org-release))
10;;;###autoload 10;;;###autoload
11(defun org-git-version () 11(defun org-git-version ()
12 "The Git version of org-mode. 12 "The Git version of org-mode.
13 Inserted by installing org-mode or when a release is made." 13 Inserted by installing org-mode or when a release is made."
14 (let ((org-git-version "release_8.2.3a")) 14 (let ((org-git-version "release_8.2.5c"))
15 org-git-version)) 15 org-git-version))
16;;;###autoload 16;;;###autoload
17(defvar org-odt-data-dir "/usr/share/emacs/etc/org" 17(defvar org-odt-data-dir "/usr/share/emacs/etc/org"
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 6c6b1b101f4..edbcc09cd10 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -602,7 +602,7 @@ The list of commands is: `org-schedule', `org-deadline',
602already archived entries." 602already archived entries."
603 :type '(choice (const :tag "Don't loop" nil) 603 :type '(choice (const :tag "Don't loop" nil)
604 (const :tag "All headlines in active region" t) 604 (const :tag "All headlines in active region" t)
605 (const :tag "In active region, headlines at the same level than the first one" 'start-level) 605 (const :tag "In active region, headlines at the same level than the first one" start-level)
606 (string :tag "Tags/Property/Todo matcher")) 606 (string :tag "Tags/Property/Todo matcher"))
607 :version "24.1" 607 :version "24.1"
608 :group 'org-todo 608 :group 'org-todo
@@ -1741,7 +1741,7 @@ Needs to be set before org.el is loaded."
1741 :version "24.4" 1741 :version "24.4"
1742 :package-version '(Org . "8.3") 1742 :package-version '(Org . "8.3")
1743 :type '(choice 1743 :type '(choice
1744 (const :tag "A double click follows the link" 'double) 1744 (const :tag "A double click follows the link" double)
1745 (const :tag "Unconditionally follow the link with mouse-1" t) 1745 (const :tag "Unconditionally follow the link with mouse-1" t)
1746 (integer :tag "mouse-1 click does not follow the link if longer than N ms" 450))) 1746 (integer :tag "mouse-1 click does not follow the link if longer than N ms" 450)))
1747 1747
@@ -2246,7 +2246,7 @@ fast, while still showing the whole path to the entry."
2246 "Non-nil means allow to create new nodes as refile targets. 2246 "Non-nil means allow to create new nodes as refile targets.
2247New nodes are then created by adding \"/new node name\" to the completion 2247New nodes are then created by adding \"/new node name\" to the completion
2248of an existing node. When the value of this variable is `confirm', 2248of an existing node. When the value of this variable is `confirm',
2249new node creation must be confirmed by the user (recommended) 2249new node creation must be confirmed by the user (recommended).
2250When nil, the completion must match an existing entry. 2250When nil, the completion must match an existing entry.
2251 2251
2252Note that, if the new heading is not seen by the criteria 2252Note that, if the new heading is not seen by the criteria
@@ -2428,7 +2428,7 @@ current entry each time a todo state is changed."
2428 :group 'org-todo 2428 :group 'org-todo
2429 :type '(choice 2429 :type '(choice
2430 (const :tag "Yes, only for TODO entries" t) 2430 (const :tag "Yes, only for TODO entries" t)
2431 (const :tag "Yes, including all entries" 'all-headlines) 2431 (const :tag "Yes, including all entries" all-headlines)
2432 (repeat :tag "Yes, for TODOs in this list" 2432 (repeat :tag "Yes, for TODOs in this list"
2433 (string :tag "TODO keyword")) 2433 (string :tag "TODO keyword"))
2434 (other :tag "No TODO statistics" nil))) 2434 (other :tag "No TODO statistics" nil)))
@@ -5693,7 +5693,7 @@ The time stamps may be either active or inactive.")
5693 '(invisible org-link)) 5693 '(invisible org-link))
5694 (add-text-properties (match-beginning 3) (match-end 3) 5694 (add-text-properties (match-beginning 3) (match-end 3)
5695 '(invisible org-link))))) 5695 '(invisible org-link)))))
5696 (backward-char 1)) 5696 (goto-char (1+ (match-beginning 0))))
5697 rtn)) 5697 rtn))
5698 5698
5699(defun org-emphasize (&optional char) 5699(defun org-emphasize (&optional char)
@@ -6827,10 +6827,12 @@ With a numeric prefix, show all headlines up to that level."
6827 "Set the visibility required by startup options and properties." 6827 "Set the visibility required by startup options and properties."
6828 (cond 6828 (cond
6829 ((eq org-startup-folded t) 6829 ((eq org-startup-folded t)
6830 (org-cycle '(4))) 6830 (org-overview))
6831 ((eq org-startup-folded 'content) 6831 ((eq org-startup-folded 'content)
6832 (let ((this-command 'org-cycle) (last-command 'org-cycle)) 6832 (org-content))
6833 (org-cycle '(4)) (org-cycle '(4))))) 6833 ((or (eq org-startup-folded 'showeverything)
6834 (eq org-startup-folded nil))
6835 (show-all)))
6834 (unless (eq org-startup-folded 'showeverything) 6836 (unless (eq org-startup-folded 'showeverything)
6835 (if org-hide-block-startup (org-hide-block-all)) 6837 (if org-hide-block-startup (org-hide-block-all))
6836 (org-set-visibility-according-to-property 'no-cleanup) 6838 (org-set-visibility-according-to-property 'no-cleanup)
@@ -6910,7 +6912,6 @@ With numerical argument N, show content up to level N."
6910 (show-branches)) 6912 (show-branches))
6911 (if (bobp) (throw 'exit nil)))))) 6913 (if (bobp) (throw 'exit nil))))))
6912 6914
6913
6914(defun org-optimize-window-after-visibility-change (state) 6915(defun org-optimize-window-after-visibility-change (state)
6915 "Adjust the window after a change in outline visibility. 6916 "Adjust the window after a change in outline visibility.
6916This function is the default value of the hook `org-cycle-hook'." 6917This function is the default value of the hook `org-cycle-hook'."
@@ -11704,9 +11705,9 @@ this is used for the GOTO interface."
11704 (setq answ (funcall cfunc prompt tbl nil (not new-nodes) 11705 (setq answ (funcall cfunc prompt tbl nil (not new-nodes)
11705 nil 'org-refile-history (or cdef (car org-refile-history)))) 11706 nil 'org-refile-history (or cdef (car org-refile-history))))
11706 (setq pa (or (assoc answ tbl) (assoc (concat answ "/") tbl))) 11707 (setq pa (or (assoc answ tbl) (assoc (concat answ "/") tbl)))
11707 (org-refile-check-position pa)
11708 (if pa 11708 (if pa
11709 (progn 11709 (progn
11710 (org-refile-check-position pa)
11710 (when (or (not org-refile-history) 11711 (when (or (not org-refile-history)
11711 (not (eq old-hist org-refile-history)) 11712 (not (eq old-hist org-refile-history))
11712 (not (equal (car pa) (car org-refile-history)))) 11713 (not (equal (car pa) (car org-refile-history))))
@@ -14556,7 +14557,7 @@ With prefix ARG, realign all tags in headings in the current buffer."
14556 (and (not (featurep 'xemacs)) c0 indent-tabs-mode (tabify p0 (point))) 14557 (and (not (featurep 'xemacs)) c0 indent-tabs-mode (tabify p0 (point)))
14557 tags) 14558 tags)
14558 (t (error "Tags alignment failed"))) 14559 (t (error "Tags alignment failed")))
14559 (org-move-to-column col) 14560 (org-move-to-column col nil nil t)
14560 (unless just-align 14561 (unless just-align
14561 (run-hooks 'org-after-tags-change-hook)))))) 14562 (run-hooks 'org-after-tags-change-hook))))))
14562 14563
@@ -15289,6 +15290,8 @@ in `org-use-property-inheritance' selects PROPERTY for inheritance.
15289If the property is present but empty, the return value is the empty string. 15290If the property is present but empty, the return value is the empty string.
15290If the property is not present at all, nil is returned. 15291If the property is not present at all, nil is returned.
15291 15292
15293Return the value as a string.
15294
15292If LITERAL-NIL is set, return the string value \"nil\" as a string, 15295If LITERAL-NIL is set, return the string value \"nil\" as a string,
15293do not interpret it as the list atom nil. This is used for inheritance 15296do not interpret it as the list atom nil. This is used for inheritance
15294when a \"nil\" value can supersede a non-nil value higher up the hierarchy." 15297when a \"nil\" value can supersede a non-nil value higher up the hierarchy."
@@ -15454,14 +15457,19 @@ Each hook function should accept two arguments, the name of the property
15454and the new value.") 15457and the new value.")
15455 15458
15456(defun org-entry-put (pom property value) 15459(defun org-entry-put (pom property value)
15457 "Set PROPERTY to VALUE for entry at point-or-marker POM." 15460 "Set PROPERTY to VALUE for entry at point-or-marker POM.
15461If the value is `nil', it is converted to the empty string.
15462If it is not a string, an error is raised."
15463 (cond ((null value) (setq value ""))
15464 ((not (stringp value))
15465 (error "Properties values should be strings.")))
15458 (org-with-point-at pom 15466 (org-with-point-at pom
15459 (org-back-to-heading t) 15467 (org-back-to-heading t)
15460 (let ((beg (point)) (end (save-excursion (outline-next-heading) (point))) 15468 (let ((beg (point)) (end (save-excursion (outline-next-heading) (point)))
15461 range) 15469 range)
15462 (cond 15470 (cond
15463 ((equal property "TODO") 15471 ((equal property "TODO")
15464 (when (and (stringp value) (string-match "\\S-" value) 15472 (when (and (string-match "\\S-" value)
15465 (not (member value org-todo-keywords-1))) 15473 (not (member value org-todo-keywords-1)))
15466 (user-error "\"%s\" is not a valid TODO state" value)) 15474 (user-error "\"%s\" is not a valid TODO state" value))
15467 (if (or (not value) 15475 (if (or (not value)
@@ -15470,7 +15478,7 @@ and the new value.")
15470 (org-todo value) 15478 (org-todo value)
15471 (org-set-tags nil 'align)) 15479 (org-set-tags nil 'align))
15472 ((equal property "PRIORITY") 15480 ((equal property "PRIORITY")
15473 (org-priority (if (and value (stringp value) (string-match "\\S-" value)) 15481 (org-priority (if (and value (string-match "\\S-" value))
15474 (string-to-char value) ?\ )) 15482 (string-to-char value) ?\ ))
15475 (org-set-tags nil 'align)) 15483 (org-set-tags nil 'align))
15476 ((equal property "CLOCKSUM") 15484 ((equal property "CLOCKSUM")
@@ -19489,8 +19497,14 @@ because, in this case the deletion might narrow the column."
19489 (org-fix-tags-on-the-fly)))) 19497 (org-fix-tags-on-the-fly))))
19490 19498
19491;; Make `delete-selection-mode' work with org-mode and orgtbl-mode 19499;; Make `delete-selection-mode' work with org-mode and orgtbl-mode
19492(put 'org-self-insert-command 'delete-selection t) 19500(put 'org-self-insert-command 'delete-selection
19493(put 'orgtbl-self-insert-command 'delete-selection t) 19501 (lambda ()
19502 (not (run-hook-with-args-until-success
19503 'self-insert-uses-region-functions))))
19504(put 'orgtbl-self-insert-command 'delete-selection
19505 (lambda ()
19506 (not (run-hook-with-args-until-success
19507 'self-insert-uses-region-functions))))
19494(put 'org-delete-char 'delete-selection 'supersede) 19508(put 'org-delete-char 'delete-selection 'supersede)
19495(put 'org-delete-backward-char 'delete-selection 'supersede) 19509(put 'org-delete-backward-char 'delete-selection 'supersede)
19496(put 'org-yank 'delete-selection 'yank) 19510(put 'org-yank 'delete-selection 'yank)
@@ -20025,21 +20039,19 @@ Depending on context, this does one of the following:
20025 "Change timestamps synchronously up in CLOCK log lines. 20039 "Change timestamps synchronously up in CLOCK log lines.
20026Optional argument N tells to change by that many units." 20040Optional argument N tells to change by that many units."
20027 (interactive "P") 20041 (interactive "P")
20028 (cond ((and (not org-support-shift-select) 20042 (if (and (org-at-clock-log-p) (org-at-timestamp-p t))
20029 (org-at-clock-log-p) 20043 (let (org-support-shift-select)
20030 (org-at-timestamp-p t)) 20044 (org-clock-timestamps-up n))
20031 (org-clock-timestamps-up n)) 20045 (user-error "Not at a clock log")))
20032 (t (org-shiftselect-error))))
20033 20046
20034(defun org-shiftcontroldown (&optional n) 20047(defun org-shiftcontroldown (&optional n)
20035 "Change timestamps synchronously down in CLOCK log lines. 20048 "Change timestamps synchronously down in CLOCK log lines.
20036Optional argument N tells to change by that many units." 20049Optional argument N tells to change by that many units."
20037 (interactive "P") 20050 (interactive "P")
20038 (cond ((and (not org-support-shift-select) 20051 (if (and (org-at-clock-log-p) (org-at-timestamp-p t))
20039 (org-at-clock-log-p) 20052 (let (org-support-shift-select)
20040 (org-at-timestamp-p t)) 20053 (org-clock-timestamps-down n))
20041 (org-clock-timestamps-down n)) 20054 (user-error "Not at a clock log")))
20042 (t (org-shiftselect-error))))
20043 20055
20044(defun org-ctrl-c-ret () 20056(defun org-ctrl-c-ret ()
20045 "Call `org-table-hline-and-move' or `org-insert-heading' dep. on context." 20057 "Call `org-table-hline-and-move' or `org-insert-heading' dep. on context."
diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el
index 45a20ddb826..d5e4b7876b7 100644
--- a/lisp/org/ox-html.el
+++ b/lisp/org/ox-html.el
@@ -279,6 +279,8 @@ for the JavaScript code in this tag.
279 pre.src-sql:before { content: 'SQL'; } 279 pre.src-sql:before { content: 'SQL'; }
280 280
281 table { border-collapse:collapse; } 281 table { border-collapse:collapse; }
282 caption.t-above { caption-side: top; }
283 caption.t-bottom { caption-side: bottom; }
282 td, th { vertical-align:top; } 284 td, th { vertical-align:top; }
283 th.right { text-align: center; } 285 th.right { text-align: center; }
284 th.left { text-align: center; } 286 th.left { text-align: center; }
@@ -580,7 +582,7 @@ The function must accept two parameters:
580The function should return the string to be exported. 582The function should return the string to be exported.
581 583
582For example, the variable could be set to the following function 584For example, the variable could be set to the following function
583in order to mimic default behavior: 585in order to mimic default behaviour:
584 586
585The default value simply returns the value of CONTENTS." 587The default value simply returns the value of CONTENTS."
586 :group 'org-export-html 588 :group 'org-export-html
@@ -3255,8 +3257,8 @@ contextual information."
3255 (if (equal attributes "") "" (concat " " attributes)) 3257 (if (equal attributes "") "" (concat " " attributes))
3256 (if (not caption) "" 3258 (if (not caption) ""
3257 (format (if org-html-table-caption-above 3259 (format (if org-html-table-caption-above
3258 "<caption align=\"above\">%s</caption>" 3260 "<caption class=\"t-above\">%s</caption>"
3259 "<caption align=\"bottom\">%s</caption>") 3261 "<caption class=\"t-bottom\">%s</caption>")
3260 (concat 3262 (concat
3261 "<span class=\"table-number\">" 3263 "<span class=\"table-number\">"
3262 (format (org-html--translate "Table %d:" info) number) 3264 (format (org-html--translate "Table %d:" info) number)
@@ -3438,21 +3440,6 @@ Return output file name."
3438 org-html-extension "html")) 3440 org-html-extension "html"))
3439 plist pub-dir)) 3441 plist pub-dir))
3440 3442
3441
3442;;; FIXME
3443
3444;;;; org-format-table-html
3445;;;; org-format-org-table-html
3446;;;; org-format-table-table-html
3447;;;; org-table-number-fraction
3448;;;; org-table-number-regexp
3449;;;; org-html-inline-image-extensions
3450;;;; org-export-preferred-target-alist
3451;;;; class for anchors
3452;;;; org-export-mark-todo-in-toc
3453;;;; org-html-format-org-link
3454;;;; (caption (and caption (org-xml-encode-org-text caption)))
3455;;;; alt = (file-name-nondirectory path)
3456 3443
3457(provide 'ox-html) 3444(provide 'ox-html)
3458 3445
diff --git a/lisp/org/ox-icalendar.el b/lisp/org/ox-icalendar.el
index 40003bf65f7..a60c2f92f39 100644
--- a/lisp/org/ox-icalendar.el
+++ b/lisp/org/ox-icalendar.el
@@ -964,9 +964,7 @@ files to build the calendar from."
964 ;; BBDB anniversaries. 964 ;; BBDB anniversaries.
965 (when (and org-icalendar-include-bbdb-anniversaries 965 (when (and org-icalendar-include-bbdb-anniversaries
966 (require 'org-bbdb nil t)) 966 (require 'org-bbdb nil t))
967 (with-temp-buffer 967 (with-output-to-string (org-bbdb-anniv-export-ical)))))))
968 (org-bbdb-anniv-export-ical)
969 (buffer-string)))))))
970 (run-hook-with-args 'org-icalendar-after-save-hook 968 (run-hook-with-args 'org-icalendar-after-save-hook
971 org-icalendar-combined-agenda-file)) 969 org-icalendar-combined-agenda-file))
972 (org-release-buffers org-agenda-new-buffers))) 970 (org-release-buffers org-agenda-new-buffers)))
diff --git a/lisp/org/ox-odt.el b/lisp/org/ox-odt.el
index 988d3a6c446..1e966fe108c 100644
--- a/lisp/org/ox-odt.el
+++ b/lisp/org/ox-odt.el
@@ -998,7 +998,9 @@ See `org-odt--build-date-styles' for implementation details."
998 (if width (format " svg:width=\"%0.2fcm\"" width) "") 998 (if width (format " svg:width=\"%0.2fcm\"" width) "")
999 (if height (format " svg:height=\"%0.2fcm\"" height) "") 999 (if height (format " svg:height=\"%0.2fcm\"" height) "")
1000 extra 1000 extra
1001 (format " text:anchor-type=\"%s\"" (or anchor-type "paragraph"))))) 1001 (format " text:anchor-type=\"%s\"" (or anchor-type "paragraph"))
1002 (format " draw:name=\"%s\""
1003 (car (org-odt-add-automatic-style "Frame"))))))
1002 (format 1004 (format
1003 "\n<draw:frame draw:style-name=\"%s\"%s>\n%s\n</draw:frame>" 1005 "\n<draw:frame draw:style-name=\"%s\"%s>\n%s\n</draw:frame>"
1004 style frame-attrs 1006 style frame-attrs
@@ -2120,45 +2122,9 @@ SHORT-CAPTION are strings."
2120 ;; Get label and caption. 2122 ;; Get label and caption.
2121 (label (org-element-property :name caption-from)) 2123 (label (org-element-property :name caption-from))
2122 (caption (org-export-get-caption caption-from)) 2124 (caption (org-export-get-caption caption-from))
2123 (short-caption (org-export-get-caption caption-from t))
2124 ;; Transcode captions.
2125 (caption (and caption (org-export-data caption info))) 2125 (caption (and caption (org-export-data caption info)))
2126 ;; Currently short caption are sneaked in as object names. 2126 ;; FIXME: We don't use short-caption for now
2127 ;; 2127 (short-caption nil))
2128 ;; The advantages are:
2129 ;;
2130 ;; - Table Of Contents: Currently, there is no support for
2131 ;; building TOC for figures, listings and tables. See
2132 ;; `org-odt-keyword'. User instead has to rely on
2133 ;; external application for building such indices. Within
2134 ;; LibreOffice, building an "Illustration Index" or "Index
2135 ;; of Tables" will create a table with long captions (only)
2136 ;; and building a table with "Object names" will create a
2137 ;; table with short captions.
2138 ;;
2139 ;; - Easy navigation: In LibreOffice, object names are
2140 ;; offered via the navigation bar. This way one can
2141 ;; quickly locate and jump to object of his choice in the
2142 ;; exported document.
2143 ;;
2144 ;; The main disadvantage is that there cannot be any markups
2145 ;; within object names i.e., one cannot embolden, italicize
2146 ;; or underline text within short caption. So suppress
2147 ;; generation of <text:span >...</text:span> and other
2148 ;; markups by overriding the default translators. We
2149 ;; probably shouldn't be suppressing translators for all
2150 ;; elements in `org-element-all-objects', but for now this
2151 ;; will do.
2152 (short-caption
2153 (let ((short-caption (or short-caption caption))
2154 (backend (org-export-create-backend
2155 :parent (org-export-backend-name
2156 (plist-get info :back-end))
2157 :transcoders
2158 (mapcar (lambda (type) (cons type (lambda (o c i) c)))
2159 org-element-all-objects))))
2160 (when short-caption
2161 (org-export-data-with-backend short-caption backend info)))))
2162 (when (or label caption) 2128 (when (or label caption)
2163 (let* ((default-category 2129 (let* ((default-category
2164 (case (org-element-type element) 2130 (case (org-element-type element)
diff --git a/lisp/org/ox-org.el b/lisp/org/ox-org.el
index d35d1c05f29..3b2e55e2d45 100644
--- a/lisp/org/ox-org.el
+++ b/lisp/org/ox-org.el
@@ -22,15 +22,8 @@
22 22
23;;; Commentary: 23;;; Commentary:
24 24
25;; This library implements an Org back-end for Org exporter.
26;;
27;; It introduces two interactive functions, `org-org-export-as-org'
28;; and `org-org-export-to-org', which export, respectively, to
29;; a temporary buffer and to a file.
30;;
31;; A publishing function is also provided: `org-org-publish-to-org'.
32
33;;; Code: 25;;; Code:
26
34(require 'ox) 27(require 'ox)
35(declare-function htmlize-buffer "htmlize" (&optional buffer)) 28(declare-function htmlize-buffer "htmlize" (&optional buffer))
36 29
@@ -121,7 +114,10 @@ setting of `org-html-htmlize-output-type' is 'css."
121(defun org-org-identity (blob contents info) 114(defun org-org-identity (blob contents info)
122 "Transcode BLOB element or object back into Org syntax. 115 "Transcode BLOB element or object back into Org syntax.
123CONTENTS is its contents, as a string or nil. INFO is ignored." 116CONTENTS is its contents, as a string or nil. INFO is ignored."
124 (org-export-expand blob contents t)) 117 (let ((case-fold-search t))
118 (replace-regexp-in-string
119 "^[ \t]*#\\+ATTR_[-_A-Za-z0-9]+:\\(?: .*\\)?\n" ""
120 (org-export-expand blob contents t))))
125 121
126(defun org-org-headline (headline contents info) 122(defun org-org-headline (headline contents info)
127 "Transcode HEADLINE element back into Org syntax. 123 "Transcode HEADLINE element back into Org syntax.
diff --git a/lisp/org/ox-publish.el b/lisp/org/ox-publish.el
index 16189ecba54..55cb6466e9c 100644
--- a/lisp/org/ox-publish.el
+++ b/lisp/org/ox-publish.el
@@ -228,7 +228,7 @@ If you create a site-map file, adjust the sorting like this:
228 `:sitemap-sort-files' 228 `:sitemap-sort-files'
229 229
230 The site map is normally sorted alphabetically. You can 230 The site map is normally sorted alphabetically. You can
231 change this behavior setting this to `anti-chronologically', 231 change this behaviour setting this to `anti-chronologically',
232 `chronologically', or nil. 232 `chronologically', or nil.
233 233
234 `:sitemap-ignore-case' 234 `:sitemap-ignore-case'
@@ -1072,7 +1072,7 @@ publishing directory."
1072Return value is a list of numbers, or nil. This function allows 1072Return value is a list of numbers, or nil. This function allows
1073to resolve external fuzzy links like: 1073to resolve external fuzzy links like:
1074 1074
1075 [[file.org::*fuzzy][description]" 1075 [[file.org::*fuzzy][description]]"
1076 (when org-publish-cache 1076 (when org-publish-cache
1077 (cdr (assoc (org-split-string 1077 (cdr (assoc (org-split-string
1078 (if (eq (aref fuzzy 0) ?*) (substring fuzzy 1) fuzzy)) 1078 (if (eq (aref fuzzy 0) ?*) (substring fuzzy 1) fuzzy))
diff --git a/lisp/org/ox-texinfo.el b/lisp/org/ox-texinfo.el
index 93279f3291e..ef881afe2c0 100644
--- a/lisp/org/ox-texinfo.el
+++ b/lisp/org/ox-texinfo.el
@@ -288,7 +288,9 @@ When nil, no transformation is made."
288 (const :tag "No formatting"))) 288 (const :tag "No formatting")))
289 289
290(defcustom org-texinfo-def-table-markup "@samp" 290(defcustom org-texinfo-def-table-markup "@samp"
291 "Default setting for @table environments.") 291 "Default setting for @table environments."
292 :group 'org-export-texinfo
293 :type 'string)
292 294
293;;; Text markup 295;;; Text markup
294 296
diff --git a/lisp/org/ox.el b/lisp/org/ox.el
index 3f24801f10b..fcf6aab2069 100644
--- a/lisp/org/ox.el
+++ b/lisp/org/ox.el
@@ -362,7 +362,7 @@ If the value is `comment' insert it as a comment."
362 :group 'org-export-general 362 :group 'org-export-general
363 :type '(choice 363 :type '(choice
364 (const :tag "No creator sentence" nil) 364 (const :tag "No creator sentence" nil)
365 (const :tag "Sentence as a comment" 'comment) 365 (const :tag "Sentence as a comment" comment)
366 (const :tag "Insert the sentence" t))) 366 (const :tag "Insert the sentence" t)))
367 367
368(defcustom org-export-with-date t 368(defcustom org-export-with-date t
@@ -493,7 +493,7 @@ t Allow export of math snippets."
493 "The last level which is still exported as a headline. 493 "The last level which is still exported as a headline.
494 494
495Inferior levels will usually produce itemize or enumerate lists 495Inferior levels will usually produce itemize or enumerate lists
496when exported, but back-end behavior may differ. 496when exported, but back-end behaviour may differ.
497 497
498This option can also be set with the OPTIONS keyword, 498This option can also be set with the OPTIONS keyword,
499e.g. \"H:2\"." 499e.g. \"H:2\"."
@@ -1726,13 +1726,13 @@ Assume buffer is in Org mode. Narrowing, if any, is ignored."
1726 (t 1726 (t
1727 ;; Options in `org-export-options-alist'. 1727 ;; Options in `org-export-options-alist'.
1728 (dolist (property (funcall find-properties key)) 1728 (dolist (property (funcall find-properties key))
1729 (let ((behavior (nth 4 (assq property options)))) 1729 (let ((behaviour (nth 4 (assq property options))))
1730 (setq plist 1730 (setq plist
1731 (plist-put 1731 (plist-put
1732 plist property 1732 plist property
1733 ;; Handle value depending on specified 1733 ;; Handle value depending on specified
1734 ;; BEHAVIOR. 1734 ;; BEHAVIOR.
1735 (case behavior 1735 (case behaviour
1736 (space 1736 (space
1737 (if (not (plist-get plist property)) 1737 (if (not (plist-get plist property))
1738 (org-trim val) 1738 (org-trim val)
@@ -4955,7 +4955,7 @@ If no translation is found, the quote character is left as-is.")
4955(defconst org-export-smart-quotes-regexps 4955(defconst org-export-smart-quotes-regexps
4956 (list 4956 (list
4957 ;; Possible opening quote at beginning of string. 4957 ;; Possible opening quote at beginning of string.
4958 "\\`\\([\"']\\)\\(\\w\\|\\s.\\|\\s_\\)" 4958 "\\`\\([\"']\\)\\(\\w\\|\\s.\\|\\s_\\|\\s(\\)"
4959 ;; Possible closing quote at beginning of string. 4959 ;; Possible closing quote at beginning of string.
4960 "\\`\\([\"']\\)\\(\\s-\\|\\s)\\|\\s.\\)" 4960 "\\`\\([\"']\\)\\(\\s-\\|\\s)\\|\\s.\\)"
4961 ;; Possible apostrophe at beginning of string. 4961 ;; Possible apostrophe at beginning of string.
@@ -5612,7 +5612,7 @@ a registered back-end. FILE is the name of the output file, as
5612a string. 5612a string.
5613 5613
5614A non-nil optional argument ASYNC means the process should happen 5614A non-nil optional argument ASYNC means the process should happen
5615asynchronously. The resulting buffer file then be accessible 5615asynchronously. The resulting buffer will then be accessible
5616through the `org-export-stack' interface. 5616through the `org-export-stack' interface.
5617 5617
5618Optional arguments SUBTREEP, VISIBLE-ONLY, BODY-ONLY and 5618Optional arguments SUBTREEP, VISIBLE-ONLY, BODY-ONLY and