* lisp/org.el (org-link-protocols): Remove variable org-link-protocols.
The data in this variable is now retrieved with org-link-get-parameter.
* lisp/org.el: Enable file links to use the application link property to
determine the follow action. Also add a space after let*.
* lisp/org-element.el: Replace `org-link-types' variable with
`org-link-types' function.
* lisp/org.el: Replace the `org-link-types' variable with
`org-link-types' function. Create `org-link-get-parameter' and
`org-link-set-parameters' functions. Remove `org-add-link-type'. Add
`org-store-link-functions' function and remove
`org-store-link-functions' variable. Add `org--open-file-link' for use
as a :follow function for file type links.
* lisp/org.el: Set :follow functions for file links in `org-link-parameters.
Define `org-open-file-link' that opens a file link with an app.
* testing/lisp/test-ox.el: Remove usage of the `org-link-types'
variable.
* lisp/org-compat.el: Move `org-add-link-type' and mark it as obsolete.
* lisp/ox.el: Change org-add-link-type comment in ox.el.
* lisp/ox.el (org-export--missing-definitions):
(org-export--install-footnote-definitions): New functions
(org-export--merge-external-footnote-definitions): Remove function
(org-export-as):
(org-export--prune-tree): Use new functions.
* testing/lisp/test-ox.el (test-org-export/footnotes): Add tests.
Reported-by: Mark Edgington <edgimar@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/107940>
* lisp/ox.el (org-export-get-footnote-definition): When a definition is
empty, but does exist, return the empty string instead of raising an
error.
* testing/lisp/test-ox.el (test-org-export/get-footnote-definition): New
test.
Reported-by: Mark Edgington <edgimar@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/107873>
* lisp/ox.el (org-export-get-loc): Refactor code. Speed-up processing
when the element doesn't require line numbering.
* testing/lisp/test-ox.el (test-org-gen-loc-list): Reformat code.
* lisp/org-element.el (org-element-example-block-parser): Use cons cell
for :number-lines specifying offset in addition to type (new/continue).
('continue . offset) for :number-lines will add this offset count to
the last line number. ('new . offset) for :number-lines will reset the
line number counting starting at offset
(org-element-src-block-parser): same for SRC block as EXAMPLE block
* lisp/ox-html.el (org-html-format-code):
* lisp/ox-latex.el (org-latex-src-block):
* lisp/ox-odt.el (org-odt-format-code):
* lisp/ox.el (org-export-resolve-coderef):
(org-export-get-loc):
(org-export-format-code-default):
* contrib/lisp/ox-groff.el (org-groff-src-block): Use new cons cell
for :number-lines.
* testing/lisp/test-ox.el (ert-deftest test-org-export/get-loc): Tests for
changes
(test-org-gen-loc-list): Helper function for `test-org-export/get-loc'.
* lisp/ob-exp.el (org-babel-exp-process-buffer): Handle
`org-export-babel-evaluate' handling.
(org-babel-exp-results): Ignore `org-export-babel-evaluate' since it is
handled as a higher level.
* lisp/ox.el (org-export-as): Allow to short-circuit babel evaluation if
`org-export-babel-evaluate' is nil.
* testing/lisp/test-ob-exp.el (ob-export/babel-evaluate): New test.
Reported-by: Nicolas Richard <nrichard@ulb.ac.be>
<http://permalink.gmane.org/gmane.emacs.orgmode/106767>
* lisp/ox.el (org-export-format-reference): Internal references are
always 10 character long.
This reduces further possible reference clashes with user-defined
labels.
* lisp/ox-publish.el (org-publish--collect-references): Renamed...
(org-publish--store-crossrefs): ... to this.
(org-publish-org-to): Use previous function. Small refactoring.
(org-publish-resolve-external-link): Use tight integration with
`org-export-get-reference' so as to provide reliable cross references.
* lisp/ox.el (org-export-get-reference): Conversely, take into
consideration references suggested by
`org-publish-resolve-external-link'.
* lisp/ox.el (org-export-get-reference): Use randomly generated labels.
(org-export-new-reference):
(org-export-format-reference): New functions.
* testing/lisp/test-ox.el (test-org-export/get-reference): New test.
The new scheme is better when datum type cannot be known ahead of time
or when references are not created sequentially, e.g., during
a publishing process where a reference to a file can be require before
the file is published.
Expunge "allow" + infinitive without direct object from source and doc.
fbce4757a874cc43806eb41b8637538b101c3c69
Alan Mackenzie
Sun Jan 24 20:30:39 2016 +0000
* lisp/org-element.el (org-element--set-regexps):
(org-element-footnote-definition-interpreter):
(org-element-footnote-reference-parser):
(org-element-footnote-reference-interpreter): Do not consider [1]-like
constructs as footnotes anymore.
* lisp/ox.el (org-export-expand-include-keyword):
(org-export--prepare-file-contents): Apply changes to footnotes.
* doc/org.texi (Footnotes): Remove references to plain footnotes.
* testing/lisp/test-org-element.el (test-org-element/footnote-reference-parser):
(test-org-element/footnote-reference-interpreter):
* testing/lisp/test-ox.el (test-org-export/expand-include):
(test-org-export/expand-macro):
(test-org-export/get-footnote-number):
(test-org-export/collect-footnote-definitions):
(test-org-export/footnotes):
(test-org-export/fuzzy-link): Update tests.
Since it is possible to refer unambiguously to a label without the "fn:"
prefix, the latter becomes part of the syntax and no longer part of the
label. In particular [fn:1] and [fn:label] are labelled, respectively,
"1" and "label".
* lisp/org-element.el (org-element-export-block-parser):
(org-element--current-element): Use new syntax for export blocks.
(org-element-block-name-alist): Remove.
* lisp/ox.el (org-export-register-backend):
(org-export-define-derived-backend): Remove :export-block keyword from
back-end's definition.
(org-export-expand-include-keyword): Use new syntax for include
keywords.
* lisp/ox-ascii.el (ascii):
* lisp/ox-beamer.el (beamer):
* lisp/ox-html.el (html):
* lisp/ox-latex.el (latex):
(org-latex-prefer-user-labels):
* lisp/ox-man.el (man):
* lisp/ox-md.el (md):
* lisp/ox-odt.el (odt):
* lisp/ox-texinfo.el (texinfo): Propagate changes to "ox.el".
* lisp/ob-core.el (org-babel-insert-result):
* lisp/ob-haskell.el (org-babel-haskell-export-to-lhs): Use new syntax.
* lisp/org.el (org-structure-template-alist): Use new syntax.
(org-protecting-blocks): Add "export" to protected blocks. Remove
back-ends blocks, which are now special blocks.
(org-fontify-meta-lines-and-blocks-1): Fontify correctly new blocks.
* lisp/org-footnote.el (org-footnote-forbidden-blocks):
* lisp/org-list.el (org-list-forbidden-blocks): Add "export" to
forbidden blocks. Remove back-ends blocks, which are now special
blocks.
* contrib/lisp/ox-extra.el: Update comments.
* testing/lisp/test-org-element.el (test-org-element/export-block-parser):
(test-org-element/export-block-interpreter):
* testing/lisp/test-ob.el (test-ob/org-babel-remove-result--results-html):
(test-ob/org-babel-remove-result--results-latex):
* testing/lisp/test-ox.el (test-org-export/expand-include): Update tests.
Export blocks are explicitly marked as such at the syntax level to
disambiguate their parsing from special blocks. The new syntax is
#+BEGIN_EXPORT backend
...
#+END_EXPORT
instead of
#+BEGIN_backend
...
#+END_backend
As a consequence, =INCLUDE= keywords syntax is modified, e.g.,
#+INCLUDE: "file.org" HTML
becomes
#+INCLUDE: "file.org" export html
* lisp/ox-latex.el (org-latex--delayed-footnotes-definitions):
* lisp/ox.el (org-export--selected-trees):
(org-export--prune-tree):
(org-export--merge-external-footnote-definitions):
(org-export--footnote-reference-map): Provide nil value for binders.
Using
(letrec ((SYMBOL)) ...)
to bind SYMBOL to nil relies on (setq SYMBOL) setting SYMBOL to nil. As
of 5d93a89 (Byte compiler: on setq with an odd number of arguments,
generate a `signal', 2015-11-26) in the Emacs repo, setq signals an
error when given an odd number of arguments.
Reported-by: Zack Piper <zack@apertron.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/103539>
<http://permalink.gmane.org/gmane.emacs.devel/196182>
* lisp/ox.el (org-export--delete-comments): Preserve document's
structure when removing comment lines or comment blocks.
* testing/lisp/test-ox.el (test-org-export/comments): New test.
Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102860>
* lisp/ox.el (org-export-get-environment): Do not handle :back-end
and :translate-alist.
(org-export--collect-tree-properties): Do not handle :exported-data.
(org-export--get-export-attributes): New function.
(org-export-as): Use new function.
* testing/lisp/test-ox.el (org-test-with-parsed-data): Use new function.
* lisp/ox.el (org-export-get-environment): Do not fill :id-alist yet.
(org-export-collect-tree-properties): Complete it here instead.
Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102540>
* lisp/ox.el (org-export-with-broken-links): New variable.
(org-export-options-alist): Add new OPTIONS item.
(org-link-broken): New error type.
(org-export-resolve-coderef):
(org-export-resolve-fuzzy-link):
(org-export-resolve-id-link): Raise appropriate error symbol when a link
cannot be resolved.
(org-export-data): Handle new error type.
* doc/org.texi (Export settings): Document new feature.
* testing/lisp/test-ox.el (test-org-export/resolve-id-link):
(test-org-export/resolve-fuzzy-link):
(test-org-export/resolve-coderef): Update tests.
* lisp/org-element.el (org-element-remove-indentation): Mark as
an obsolete replacement for `org-remove-indentation'.
(org-element-example-block-parser):
(org-element-example-block-interpreter):
(org-element-src-block-parser):
* lisp/ox.el (org-export-unravel-code): Apply obsolescence.
* lisp/ox.el (org-export-smart-quotes-alist):
(org-export--smart-quote-status): Change misleading quote names.
Due to the new smart quotes algorithm, "..." are always primary quotes,
even though they may be translated as single quotes. Conversely, '...'
are secondary quotes and may not be translated to single quotes.
* lisp/org-macro.el (org-macro--collect-macros): cd to the directory
containing the SETUPFILE before recursing so that relative pathnames
in the SETUPFILE are expanded properly.
* lisp/org.el (org--setup-collect-keywords): cd to the directory
containing the SETUPFILE before recursing so that relative pathnames
in the SETUPFILE are expanded properly.
* lisp/ox.el (org-export--get-inbuffer-options,
org-export--list-bound-variables): cd to the directory containing the
SETUPFILE before recursing so that relative pathnames in the SETUPFILE
are expanded properly.
If /path/to/foo.org contains:
#+SETUPFILE: settings/beamer.org
and /path/to/settings/beamer.org contains:
#+SETUPFILE: common.org
then we want to read /path/to/settings/common.org, not
/path/to/common.org.
TINYCHANGE
Protect apostrophes not covered by the last backport. Convert
expressions like '(...) to \\='(...) and symbols written as 'name to
`name'. (In addition to ensuring the correct display, the latter also
improves consistency with many Org docstrings.)
If these aren't protected, Emacs 25 may display them as curved quotes in
the help buffer, depending on the value of text-quoting-style.
These changes are in line with the changes proposed on the mailing list,
but many of those changes weren't necessary because they had already
been reverted in the Emacs repo.
<http://permalink.gmane.org/gmane.emacs.orgmode/100896/>
These changes are the combination of the commits below (in order
applied). Unlike other backports, these are applied in one commit
because they are closely related and because some of the later commits
reverse changes in earlier commits. Changes to message and help quote
display for Emacs 25 seem to be here to stay. The quote protections are
required to ensure grave accents and apostrophes are displayed as
intended in Emacs 25, and they should not affect earlier versions.
Quoting fixes in lisp/org
6cd2629bd1b3ce77d29ac28e29237c94a4197116
Paul Eggert
Mon Aug 31 00:29:40 2015 -0700
More-conservative ‘format’ quote restyling
fbb5531fa11d13854b274d28ccd329c9b6652cfc
Paul Eggert
Sun Aug 23 22:39:06 2015 -0700
Prefer directed to neutral quotes
875a5d0ead827d3da32ecbd30e739a29f07bbc87
Paul Eggert
Mon Aug 24 23:57:25 2015 -0700
Escape ` and ' in doc
19532d147b431a4fe34f088d6de07891c48e2c5c
Paul Eggert
Tue Sep 1 18:23:21 2015 -0700
Fix some more docstring etc. quoting problems
26bd978d87dfbf9baa115cd961a67d42b416c4bf
Paul Eggert
Thu Sep 3 15:32:54 2015 -0700
Go back to grave quoting in source-code docstrings etc.
6afef3f6ca2f3009c722b84e249903b7f807b044
Paul Eggert
Mon Sep 7 16:09:27 2015 -0700
* lisp/ox.el (org-export--update-footnote-label): Remove function.
(org-export--prepare-file-contents): Do not error when a footnote
definition cannot be found.
In particular, it should not throw an error when a footnote is not
defined outside of export scope.
Reported-by: Leonard Randall <leonard.a.randall@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/100924>
* lisp/ox.el (org-export--update-footnote-label):
(org-export--prepare-file-contents): Use a new naming scheme for
internal footnotes, less likely to introduce collisions.
The previous one introduced a collision between [1] and [fn:1].
* lisp/ox.el (org-export--prepare-file-contents): Do not error when
including multiple footnotes with the same label.
* testing/lisp/test-ox.el (test-org-export/expand-include): Update test.
Reported-by: Leonard Randall <leonard.a.randall@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/100906>
* lisp/ox.el (org-export--get-subtree-options):
(org-export-output-file-name): Let user control inheritance for these
properties instead of hard-coding (an inconsistent) behavior.
Reported-by: Eric Abrahamsen <eric@ericabrahamsen.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/100373>
Add changes from Emacs repo that should have been backported with
bb77dd2.
Update copyright year to 2015
7e09ef09a479731d01b1ca46e94ddadd73ac98e3
Paul Eggert
Thu Jan 1 14:26:41 2015 -0800
* lisp/ox.el (org-export-as): Refresh regexps before executing Babel
code, running last hook and parsing buffer so precomputed regular
expressions are correct at each of these steps.
This is not necessary before macros since those are not expected to
rely on computed expression. Actually, advanced macros, i.e. with
"(eval ...)" syntax, could make use of them, but a Babel snippet is
more likely in this situation.
Reported-by: Robert Klein <RoKlein@roklein.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/98550>
* lisp/ox.el (org-export--get-subtree-options): When multiple options
refer to the same keyword, and, as a consequence, to the same export
property, make sure all of them get updated.
* testing/lisp/test-ox.el (test-org-export/get-subtree-options): Add
test.
Reported-by: Myles English <mylesenglish@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98583>
* lisp/ox.el (org-export-get-environment):
(org-export-collect-tree-properties):
Remove :footnote-definition-alist property.
(org-export-get-footnote-definition): Apply removal of property.
(org-export--merge-external-footnote-definitions): New function.
(org-export-as): Use new function.
* testing/lisp/test-ox.el (test-org-export/footnotes): Update tests.
This change allows to have all footnote definitions within the parse
tree, so they can be reached with, e.g., a parse tree filter.
* lisp/ox.el (org-export-resolve-fuzzy-link): When a fuzzy link
matches more than one headline, prefer the first one in the parse
tree.
* testing/lisp/test-ox.el (test-org-export/fuzzy-link): Remove a test.
This behaviour is consistent with `org-open-at-point'. Also, it
allows to cache destinations.
* lisp/ox.el (org-export-expand-include-keyword):
(org-export--prepare-file-contents):
(org-export-with-backend): Wrap line of code within 80 columns.
(org-export--inclusion-absolute-lines): Remove unecessary `format'
call for error message.
* lisp/ox.el (org-export-registered-backends): Renamed from
`org-export--registered-backends'.
(org-export-get-backend):
(org-export-register-backend):
(org-export-insert-default-template):
(org-export--dispatch-ui):
* lisp/org.el (org-export-registered-backends):
(org-export-backends):
(org-get-export-keywords):
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option/options):
* testing/lisp/test-ox.el (test-org-export/define-backend):
(test-org-export/define-derived-backend):
(test-org-export/derived-backend-p):
(test-org-export/get-all-transcoders):
(test-org-export/get-all-options):
(test-org-export/get-all-filters):
(test-org-export/with-backend): Apply renaming.
Since the variable is copiously used outside of "ox.el", there's no
reason to mark it as internal.
* ox.el (org-export-get-reference): Change labeling scheme.
160820bc94 and later changed the label naming scheme to follow types.
This commit maps to types to more standard names, e.g. 'headline' to
'sec'.
* lisp/ox.el (org-export-dictionary): Fix Spanish translations,
including :ascii and :html properties. Also add :default Spanish
property for "References".
TINYCHANGE
* lisp/ox.el (org-export--get-inbuffer-options): Allow multi-line objects.
* testing/lisp/test-ox.el (test-org-export/get-inbuffer-options): Add
tests. Update some others.
It is possible to write, e.g.,
#+TITLE: *bold
#+TITLE: sentence*
* lisp/ox.el (org-export-options-alist): Implement `parse' behavior
and use it for parsed keywords. Update docstring.
(org-export-document-properties): Remove variable.
(org-export--get-subtree-options):
(org-export--get-inbuffer-options):
(org-export--get-global-options):
(org-export--prune-tree):
(org-export--remove-uninterpreted-data): Handle `parse' behavior.
(org-export-as): Do not assume :date is always a secondary string
and :email is never one.
* testing/lisp/test-ox.el (test-org-export/get-inbuffer-options):
Update tests.
* ox.el: Remove #+KEYWORD: and #+DESCRIPTION:.
* ox-deck.el, ox-rss.el, ox-html, ox-latex, ox-odt, ox-org: Add
#+KEYWORD and #+DESCRIPTION.
* org.texi (Export settings): Explicit state which backends
support #+DESCRIPTION and #+KEYWORDS.
* lisp/ox.el (org-export-filters-alist): Remove reference to comment
filters.
(org-export-filter-comment-functions,
org-export-filter-comment-block-functions): Remove variables.
* doc/org.texi (Advanced configuration): Remove reference to comment
filters.
* etc/ORG-NEWS: Signal removal.
Comments are removed before parsing the buffer. As a consequence,
filters are never called.
* lisp/ox.el (org-export--delete-comments): Renamed from
`org-export--delete-commented-subtrees'. Also remove comments and
comment blocks.
(org-export-as): Apply renaming.
* testing/lisp/test-ox.el (org-test-with-parsed-data): Apply renaming.
From the export point of view COMMENTed subtrees and regular comments
are expected to be treated in the same way.
* lisp/org-macro.el (org-macro--collect-macros): Ignore macro
definitions in commented subtrees.
* lisp/ox.el (org-export--get-inbuffer-options): Ignore options in
commented subtrees.
(org-export--delete-commented-subtrees): Remove function.
(org-export-as): Apply removal.
Removing the whole subtree is not subtle as Babel might want to use
data there.
Reported-by: Robert Klein <RoKlein@roklein.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/96347>
* lisp/ox.el (org-export--delete-commented-subtrees): New function.
(org-export-as): Use new function.
* testing/lisp/test-ox.el (org-test-with-parsed-data,
test-org-export/get-inbuffer-options): Use new function.
(test-org-export/expand-macro): Add tests.
Reported-by: Andreas Leha <andreas.leha@med.uni-goettingen.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/96267>
* lisp/ox.el (org-export--prune-tree): Renamed from
`org-export-prune-tree'. Move it close to its caller.
(org-export--remove-uninterpreted-data): Renamed from
`org-export-remove-uninterpreted-data'. Move it close to its caller.
(org-export--remove-uninterpreted-data-1): Move internal function
close to its caller.
(org-export-as): Apply renaming.
* testing/lisp/test-ox.el (org-test-with-parsed-data): Apply renaming.
* lisp/ox.el (org-export-get-environment): Properly find file
associated to id link.
(org-export-resolve-id-link): Throw an error on unresolved id links.
Use `org-id-find' instead of `org-id-find-id-file' as the latter may
returns the file attached to current buffer on search failure.
Reported-by: Jacob Gerlach <jacobgerlach@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96020>
* lisp/ox.el (org-export-resolve-fuzzy-link): Throw an error instead
of returning nil when link can't be resolved.
* testing/lisp/test-ox.el (test-org-export/resolve-fuzzy-link): Change
last test from should-not to should-error
In addition to throwing an error, don't store the failed match in the
link cache.
TINYCHANGE
* lisp/ox.el (org-export-with-creator): Change default value.
* lisp/ox-ascii.el (org-ascii-template):
* lisp/ox-beamer.el (org-beamer-template):
* lisp/ox-latex.el (org-latex-template):
* lisp/ox-odt.el (org-odt-template):
* lisp/ox-org.el (org-org-template):
* lisp/ox-texinfo.el (org-texinfo-template): Treat
`org-export-with-creator' as a boolean.
* testing/lisp/test-ox.el (test-org-export/parse-option-keyword):
Update test.
* doc/org.texi (Export settings): Update allowed values in
`org-export-with-creator'.
* etc/ORG-NEWS: Signal change.
Special `comment' value isn't meaningful for all back-ends and is not
implemented in every back-end where it makes sense anyway.
It is possible to add a comment including creator at the end of the
document using a body filter instead.
* lisp/ox.el (org-export--footnote-reference-map): New function.
(org-export-footnote-first-reference-p,
org-export-get-footnote-number): Allow to change order when footnotes
references are contained within footnote definitions.
* testing/lisp/test-ox.el (test-org-export/footnote-first-reference-p):
(test-org-export/get-footnote-number): New tests.
(test-org-export/footnotes): Update test.
* ox.el (org-export-with-title): New variable.
* ox (org-export-options-alist),
ox-ascii.el (org-ascii-template--document-title),
ox-beamer.el (org-beamer-template), ox-html.el (org-html-template),
ox-latex.el (org-latex-template), ox-man.el (org-man-template),
ox-odt.el (org-odt-template), ox-org.el (org-org-template),
ox-publish.el (org-publish-project-alist),
ox-texinfo.el (org-texinfo-template),
ox-groff.el (org-groff--mt-head): Use new variable.
* ox-koma-letter.el (org-koma-letter-use-title): Mark obsolete.
* test-ox.el (test-org-export/parse-option-keyword): Add :with-title.
* ORG-NEWS, org.texi: Mention org-export-with-title.
This is useful in e.g. ox-html where title can be set via
`org-html-preamble-template' or when using the {{{title}}}-macro.
* ox.el (org-export-as): Allow {{{date}}} to take formatting-argument.
* org.texi (Macro replacement): Document {{{date}}} formatting.
* test-ox.el (test-org-export/expand-macro): Test {{{data(format)}}}
* org-NEWS: Mention optional {{{data}}} argument.
Optional argument to {{{date}}} like {{{date(FMT)}}} are treated
similar to {{{time(FMT)}}} if \#+DATE is a timestamp.
* lisp/org-element.el (org-element-headline-parser): Remove :alt-title.
* lisp/ox.el (org-export-get-alt-title): Check regular :ALT_TITLE
property instead of :alt-title.
`:alt-title' is an export-specific property. As a consequence, it's
value doesn't need to be parsed at "org-element.el"'s level. There, it
is treated as a regular property : `ALT_TITLE'.
This also removes the last call to
`org-element-parse-secondary-string' from "org-element.el".
* lisp/ox.el (org-export-collect-tree-properties): Do not
set :ignore-list.
(org-export--populate-ignore-list): Remove function.
(org-export--selected-trees): Small refactoring.
(org-export-prune-tree): New function.
(org-export-remove-uninterpreted-data): Fix docstring.
(org-export-as): Prune tree before calling tree filter.
* testing/lisp/test-ox.el (org-test-with-parsed-data): Fix macro.
This patch introduces two changes in the export process:
1. Non-exported elements are removed from the tree instead of being
moved into an ignore list (with the exceptions of tables rows
and cells)
2. Parse tree filter is called on the tree being exported, not the
original one.
Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/94162>
* lisp/ox.el (org-export-ignore-element): Remove function.
(org-export-collect-tree-properties): Do not assume users can
modify :ignore-list export property.
* testing/lisp/test-ox.el (test-org-export/user-ignore-list): Remove
test.
:ignore-property is an implementation detail, which should not be
exposed to users. Also, it is easier to simply remove the element to
ignore from the parse tree with `org-element-extract-element'.
* ox.el (org-export-expand-include-keyword): Infer :minlevel for
included Org documents if not set explicitly.
* test-ox.el (org-export-expand-include-keyword): Add tests for inferred :minlevel.
* ox.el (org-export--prepare-file-contents): Preserve footnotes
when using the LINES argument. New optional argument FOOTNOTES.
(org-export-expand-include-keyword): New optional argument
FOOTNOTES.
* test-ox.el (test-org-export/expand-include): Add test for INCLUDE
with :lines and footnotes.
* lisp/ox.el (org-export--inclusion-absolute-lines): Fix comment.
(org-export--prepare-file-contents): Do not look for property drawers
after a drawer, since this is impossible.
* testing/examples/include.org: Fix test data.
* lisp/ox.el (org-export-async-start): Limit first argument to lambda
expressions.
* lisp/ox-publish.el (org-publish, org-publish-all,
org-publish-current-file): Replace `ignore', per limit stated above.
Due to a hack allowing to provide quasi-quoted lambda expressions,
symbols are not allowed as result handler. This limitation is not
much of a problem as `org-export-async-start' is only meant to be used
internally.
* lisp/ox.el (org-export--get-buffer-attributes):
Resurrect :input-buffer property.
This property was removed in 604b9389. since it wasn't necessary
anymore internally. It is back again as a consequence of a user
request.
http://permalink.gmane.org/gmane.emacs.orgmode/91230
* lisp/ox.el (org-export-table-row-in-header-p): New function.
(org-export-table-row-starts-header-p,
org-export-table-row-ends-header-p): Use new function.
* testing/lisp/test-ox.el (test-org-export/table-row-in-header-p): New
test.
* lisp/ox.el (org-export-first-sibling-p, org-export-first-sibling-p):
Extend to all elements and objects.
* testing/lisp/test-ox.el (test-org-export/first-sibling-p,
test-org-export/last-sibling-p): Add tests.
* etc/ORG-NEWS: Document change.
* lisp/ox.el (org-export-to-file): Provide output file name in
communication channel, through :output-file property.
This change is needed to fix back-ends needing this information during
the process, e.g., `texinfo'.
* lisp/org-element.el (org-element-all-elements): Remove
`export-block' type.
(org-element-block-name-alist): Make it a defconst since it is not
meant to be changed anymore.
(org-element-export-block-parser,
org-element-export-block-interpreter): Remove functions.
* lisp/ox.el (org-export-filters-alist): Remove export block filter.
(org-export-register-backend): Do not alter
`org-export-block-name-alist' anymore.
(org-export-define-backend, org-export-define-derived-backend): Update
docstring.
(org-export-filter-export-block-functions): Remove variable.
* testing/lisp/test-org-element.el (test-org-element/export-block-parser,
test-org-element/export-block-interpreter): Remove tests.
* testing/lisp/test-ox.el (test-org-export/define-backend): Update test.
* lisp/ox.el (org-export-raw-special-block-p): New function.
* testing/lisp/test-ox.el (test-org-export/raw-special-block-p): New
test.
This patch is a forward-compatibility measure since the function is
mandatory for export back-ends in Org 8.3. It makes it easier for
back-end maintainers to provide a back-end compatible with both Org
8.2 and 8.3.
* lisp/ox.el (org-export-collect-tree-properties): Make sure changes
to the parse tree propagate to the value of
`org-export-get-footnote-definition'.
Thanks to Florian Beck for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88419
* lisp/org-element.el (org-element-recursive-objects): Add
`footnote-reference'.
(org-element-secondary-value-alist): Remove reference to
`footnote-reference'.
(org-element-footnote-reference-parser): Definition for inline
references is stored as the contents of the reference, not in
a secondary string.
(org-element-footnote-reference-interpreter): Apply changes from
parser.
* lisp/ox.el (org-export-get-footnote-definition,
org-export-get-environment): Apply changes from parser.
* testing/lisp/test-org-element.el (test-org-element/footnote-reference-parser):
Update test.
(test-org-element/context): Add test.
Storing definition in a secondary string was a poor design choice as
there is no "primary" string anyway. This also prevents
`org-element-context' from finding objects within the inline
definition.
* lisp/ox.el (org-export-expand-include-keyword): Change parsing so
that arbitrary blocks around the included content can be used.
Content is not code-escaped unless it is a literal block, this
applies to "src" and "example".
* doc/org.texi (Include files): Document the additional markup.
* testing/lisp/test-ox.el (test-org-export/expand-include): Add test
for an #+INCLUDE with "html" and "center" markup.
* testing/examples/include.html: New file, used for testing
"#+INCLUDE html".
* lisp/ox.el (org-export--get-inbuffer-options): Return the empty
string instead of nil when TITLE keywords has no value.
(org-export--get-buffer-attributes): Do not set :title property
early.
(org-export--get-global-options): Do not ignore anymore nil values.
Small refactoring.
(org-export-as): Correctly set :title here.
Thanks to Nicolas Richard for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/87149
* lisp/ox.el (org-export-get-parent): Move definition of
'org-export-get-parent' before first use. Leave comment at original
place of definition.
* lisp/org.el (org-uniquify): Move definition of 'org-uniquify' before
first use. Leave comment at original place of definition.
* ox.el (org-export-dictionary): Add "References".
* contrib/lisp/ox-bibtex.el (org-bibtex-process-bib-files):
Translate "References" according to the export language.
Thanks to Julian Gehring for suggesting this.
* lisp/ob-core.el (org-babel-exp-reference-buffer): New variable, as
a replacement for `org-current-export-file'.
(org-babel-check-confirm-evaluate): Use new variable.
* lisp/ob-exp.el (org-babel-exp-in-export-file): Use new variable.
(org-babel-exp-get-export-buffer): Remove function.
(org-babel-exp-process-buffer): Change signature.
* lisp/ob-ref.el (org-babel-ref-resolve): Use new variable during
export in order to properly resolve references.
* lisp/ox.el (org-export-execute-babel-code): Use new variable.
* contrib/lisp/org-wikinodes.el (org-wikinodes-process-links-for-export):
Remove a cond branch as it is always
false (`org-current-export-file' couldn't be a string).
* testing/lisp/test-ob-lob.el (test-ob-lob/export-lob-lines): Update
test.
* testing/lisp/test-ob.el (test-ob/eval-header-argument): Update test.
* testing/lisp/test-ob-exp.el (ob-export/reference-in-post-header):
New test.
During export, Babel executes sequentially all blocks in the buffer
being exported. This can lead to modifications preventing some
references from being resolved. As a workaround, Babel stores
a pristine copy of the buffer in a variable so it can always find
needed references.
Before this patch, the variable storing this copy was
`org-current-export-file' and was dynamically bound in "ox.el". It
was used to resolve noweb references (`org-babel-expand-noweb-references')
but not regular references (`org-babel-ref-resolve').
Now, the variable is `org-babel-exp-reference-buffer' and it is bound
from `org-babel-exp-process-buffer'. It is used to resolve all
references. In particular, this allows to use references in :post
header.
Thanks to Jarmo Hurri for reporting it.
* lisp/org-element.el (org-element-cache-sync-idle-time): Change
default value.
(org-element-cache-sync-duration, org-element-cache-sync-break,
org-element--cache-sync-requests, org-element--cache-sync-timer,
org-element--cache-sync-keys, org-element--cache-default-key,
org-element--cache-change-warning): New variables.
(org-element-cache-merge-changes-threshold,
org-element--cache-status): Removed variables.
(org-element--cache-key, org-element--cache-generate-key,
org-element--cache-key-less-p, org-element--cache-find,
org-element--cache-set-timer, org-element--cache-process-request,
org-element--cache-submit-request, org-element--parse-to,
org-element--cache-interrupt-p, org-element--cache-put,
org-element--cache-active-p): New functions.
(org-element--cache-compare): Adapt to new keys in AVL tree.
(org-element--cache-pending-changes-p,
org-element--cache-cancel-changes, org-element--cache-mapc,
org-element-cache-get, org-element-cache-put): Removed functions.
(org-element--cache-before-change): Use new variables.
(org-element--cache-after-change): Renamed from
`org-element--cache-record-change'.
(org-element-cache-get): Change signature.
(org-element-cache-put): Rewrite function. Use new tools.
(org-element-cache-reset): Adapt to new variables.
(org-element--cache-sync): Rewrite function.
* lisp/ox.el (org-export--generate-copy-script): Do not copy through
new cache-related variables.
(org-export-ignored-local-variables): New variable.
* testing/lisp/test-org-element.el (test-org-element/cache): New test.
Now only the part of the cache that needs to be accessed is updated
synchronously. Otherwise, it happens on idle time.
* lisp/ox-beamer.el: Be more cautious about the order in which options
are defined, at this order will be the same when creating an export
template (see `org-export-insert-default-template').
* lisp/ox-html.el: Ditto.
* lisp/ox-latex.el: Ditto.
* lisp/ox.el: Ditto.
* lisp/ox.el (org-export-insert-default-template): Do not hard-code
alphabetical order for keywords in templates. Instead, follow order
specified in back-ends or `org-export-options-alist' for the default
case.
* ox.el (org-export--get-subtree-options): When using the
headline as a title for a subtree export, only take the true
heading, no TODO keyword, no priority cookie, no tag.
Thanks to Robert Klein for reporting this.
* lisp/ox.el (org-export-insert-default-template): Only insert
keywords and options relatives to the selected back-end. Ignore
those relatives to its parent in the case of a derived back-end.
* lisp/ox.el (org-export-with-fixed-width, org-export-with-tables):
Change docstring to reflect new meaning.
(org-export--skip-p): Completely ignore tables and fixed-width areas
if appropriate option is nil.
* testing/lisp/test-ox.el (test-org-export/handle-options): Add tests.
* lisp/ox.el (org-export-dictionary): Add new Japanese translation
strings.
A few strings in `org-export-dictionary' didn't have Japanese
translations. So, I just added.
* lisp/ox.el (org-export-dictionary): Convert all Japanese translation
from utf-8 to default.
There shouldn't be much need for exporters and users to worry about
the coding system of the final output. If one wants to export a
"Japanese" document, he should already have the document with Japanese
capable coding system. In that case, Emacs should be able to handle
the coding system conversion form the translation table to the
designated file coding system.
There are two cases which I can think don't work:
- all words in the document are written in romaji, and one wants
romaji translations
- the documents are writ en in a language which does not support
Japanese character set, ie English or French, and one wants to use
Japanese for non-content strings, ie TOC.
These cases are too rare that we can ignore for now.
* lisp/ox.el (org-export-remove-uninterpreted-data): Renamed from
`org-export--remove-uninterpreted'.
(org-export--remove-uninterpreted-data-1): New function.
(org-export-as): Use new function.
* testing/lisp/test-ox.el (test-org-export/uninterpreted): Add test.
* lisp/ox.el (org-export-data): Do not check for uninterpreted
elements or objects. These are removed from parse tree anyway.
(org-export--remove-uninterpreted): New function.
(org-export--interpret-p): Removed function.
(org-export-as): Handle uninterpreted elements and objects.
* lisp/org-element.el (org-element-secondary-p): New function.
* lisp/ox.el (org-export-get-previous-element,
org-export-get-next-element): Use new function.
* testing/lisp/test-org-element.el (test-org-element/secondary-p): New
test.
* lisp/ob-C.el, lisp/ob-clojure.e: Require 'cl at compile-time.
* lisp/ob-tangle.el: Do not require 'cl at compile time.
* lisp/org-agenda.el: Declare function `org-columns-remove-overlays´.
* lisp/org.el: Declare functions `org-clocktable-shift´,
`org-clock-update-time-maybe´, `org-clock-remove-overlays´,
`org-babel-tangle-file´, `org-table-blank-field´,
`org-table-insert-row´, `org-add-archive-files´, `org-table-begin´,
`org-table-end´. Move defsubst `org-uniquify´ before its many uses.
* lisp/ox.el: Move defsubst `org-export-get-parent´ before its many
uses.
* ox.el (org-export-async-init-file): Use :set to set the
default value.
* ox-texinfo.el (org-texinfo-filename): Fix default value.
(org-texinfo-format-headline-function): Use 'ignore as the
default value.
(org-texinfo-format-drawer-function): Use a function as the
default value. Update docstring.
(org-texinfo-drawer): Always use
`org-texinfo-format-drawer-function' as it is now a function
by default.
(org-texinfo-headline): Compare
`org-texinfo-format-headline-function' against 'ignore.
(org-texinfo-inlinetask): Compare
`org-texinfo-format-inlinetask-function' against 'ignore.
* ox-odt.el (org-odt-format-drawer-function): Use a function
as the default value. Update docstring.
(org-odt-format-headline-function)
(org-odt-format-inlinetask-function): Fix default value.
(org-odt-with-latex): Use :set to set the default value.
(org-odt-drawer): Always use `org-odt-format-drawer-function'
as it is now a function by default.
(org-odt-format-headline--wrap): Compare
`org-odt-format-headline-function' against 'ignore.
* ox-latex.el (org-latex-format-drawer-function): Use a
function as the default value. Update docstring.
(org-latex-format-inlinetask-function): Fix default value.
(org-latex-drawer): Always use
`org-latex-format-drawer-function' as it is now a function by
default.
(org-latex-inlinetask): Compare
`org-latex-format-inlinetask-function' against 'ignore.
* ox-html.el (org-html-format-drawer-function): Use a
function as the default value. Update docstring.
(org-html-format-headline-function)
(org-html-format-inlinetask-function): Fix default value.
(org-html-with-latex): Use :set to set the default value.
(org-html--format-toc-headline)
(org-html-format-headline--wrap): Compare
`org-html-format-headline-function' against 'ignore.
(org-html-inlinetask): Compare
`org-html-format-inlinetask-function' against 'ignore.
* ox-ascii.el (org-ascii-format-drawer-function): Use a
function as the default value. Update docstring.
(org-ascii-drawer): Always use
`org-ascii-format-drawer-function' as it is now a function by
default.
(org-ascii-format-inlinetask-default): New function.
(org-ascii-format-inlinetask-function): Use
`org-ascii-format-inlinetask-default' as the default.
* org.el (org-mouse-1-follows-link): Use :set to set the
default value. Update custom type.
(org-log-note-headings): Fix order or list items in the custom
type.
(orgstruct-heading-prefix-regexp): Use an empty string as the
default value. Use 'regexp as the custom type.
(orgstruct-make-binding): Tiny docstring enhancement. Assume
`orgstruct-heading-prefix-regexp' is a string.
* org-agenda.el (org-agenda-search-view-max-outline-level):
Set default value to 0. Update docstring.
(org-agenda-deadline-leaders): Fix custom type.
(org-search-view): Assume
`org-agenda-search-view-max-outline-level' is a number.
* ob-ruby.el (org-babel-ruby-nil-to): Fix custom type.
* ob-python.el (org-babel-python-mode): Use :set to set the
default value.
(org-babel-python-None-to): Fix custom type.
* ob-plantuml.el (org-plantuml-jar-path): Fix default value.
(org-babel-execute:plantuml): Assume `org-plantuml-jar-path'
is a string.
* ob-latex.el (org-babel-latex-htlatex): Fix default value.
(org-babel-latex-htlatex-packages): Fix custom type.
(org-babel-execute:latex): Assume `org-babel-latex-htlatex' is
a string.
Thanks to Glenn Morris for reporting this.
* lisp/ox.el (org-export-get-previous-element,
org-export-get-next-element): Fix return value for non plain text
objects in a secondary string.
* testing/lisp/test-ox.el: Add tests.
* lisp/ox.el (org-export-insert-default-template): Make sure strings
are properly quoted when inserting a template. Specifically,
default value for drawers should be d:(not "LOGBOOK"), not d:(not
LOGBOOK).
* lisp/ox.el (org-export-table-cell-starts-colgroup-p,
org-export-table-cell-ends-colgroup-p,
org-export-table-row-starts-rowgroup-p,
org-export-table-row-ends-rowgroup-p): fix swapage of "row" and
"column" in the docstrings for these functions
* lisp/ox-latex.el (org-latex--translate): New function.
(org-latex-longtable-continued-on)
org-latex-longtable-continued-from): Remove variables.
(org-latex-table-row): Use new function.
* lisp/ox.el (org-export-dictionary): Add entries relative to
longtables. Fix some other entries.
* lisp/ox.el (org-export--populate-ignore-list): Ignore text before
first headline if an :export: tag (or a select tag) is found within
the buffer.
* testing/lisp/test-ox.el: Add tests.
* lisp/ox.el (org-export-collect-headlines): Do not build TOC for
headlines below H value.
* testing/lisp/test-ox.el: Add test.
Reported-by: Jambunathan K <kjambunathan@gmail.com>
* lisp/ox.el (org-export-table-cell-alignment): Ensure required
variables are available.
This error is triggered in ODT export with lists using :list-table
feature. This creates tables as parsed data on the fly in the tree,
triggering call to `org-export-table-cell-alignment', but `org-table'
library may not be available.
* lisp/ox.el (org-export-table-cell-width): Modify key (now an
element) and value structure (now a vector) of cache so it can use
`eq' as test. Elements are circular lists so `equal' cannot apply on
them.
Reported-by: Jambunathan K <kjambunathan@gmail.com>
* lisp/ox.el (org-export-data-with-backend): Set temporary back-end as
the new back-end in local communication channel.
(org-export-filter-apply-functions): Handle corner case where back-end
is nil.
* testing/lisp/test-ox.el: Small refactoring.
* lisp/ox.el (org-export-filter-apply-functions): Only provide
back-end name (a symbol) as second argument of filters, not the full
back-end (a vector).
* lisp/ox-publish.el (org-publish-find-title): Fix title when no
#+TITLE property is provided.
* lisp/ox.el (org-export-store-default-title): Remove-function.
(org-export--default-title): Remove variable.
(org-export-options-alist): Do not use a default value.
(org-export--get-buffer-attributes): Store a default title.
(org-export-as): Apply function removal.
(org-export--get-global-options): Do not set a property with an
explicitely nil value.
* lisp/ox.el (org-export-to-buffer): Add two arguments: one to trigger
asynchronous export and the other to do extra processing from within
the buffer.
(org-export-to-file): Add two arguments: one to trigger asynchronous
export and the other to do extra processing on the output file.
(org-export-async-start): Small clean up.
* lisp/ox.el (org-export-current-backend): New variable.
(org-export-as): Use new variable.
Thanks to Christophe Rhodes for providing a preliminary patch.
* lisp/ox.el (org-export-insert-default-template): Fix
"wrong-type-argument" error in template insertion.
Thanks to Eric Abrahamsen for reporting this.
* lisp/ox.el (org-export--registered-backends): Renamed from
`org-export-registered-backends'.
(org-export-invisible-backends): Removed variable.
(org-export-get-backend, org-export-get-all-transcoders
org-export-get-all-options, org-export-get-all-filters): New
functions. It replaces `org-export-backend-translate-table'.
(org-export-barf-if-invalid-backend, org-export-derived-backend-p,
org-export-define-backend, org-export-define-derived-backend):
Rewrite functions using new representation.
(org-export-backend-translate-table): Remove function.
(org-export-get-environment): Use new function.
(org-export--get-subtree-options, org-export--parse-option-keyword,
org-export--get-inbuffer-options, org-export--get-global-options,
org-export-to-buffer org-export-to-file, org-export-string-as
org-export-replace-region-by): Update docstring.
(org-export-data-with-translations): Remove function. Use
`org-export-data-with-backend' with a temporary back-end instead.
(org-export-data-with-backend, org-export-as): Reflect new definition
for back-ends.
(org-export--dispatch-action, org-export--dispatch-ui): Reflect new
definition for back-ends and variable removal. Refactoring.
(org-export-filter-apply-functions): Call functions with
current back-end's name, not full back-end.
* lisp/org.el (org-export-backends, org-create-formula--latex-header):
Use new structure and variables.
* testing/lisp/test-ox.el: Update tests.
This patch separates back-end definition from its registration. Thus,
it allows to use anonymous or unregistered back-ends.
* ox.el (org-export-smart-quotes-alist): Added ("da" "no" "nb" "nn"
"sv").
* ox.el (org-export-dictionary): Added some entries ("da" "no" "nb"
"nn" "sv").
These languages are rather unrestricted, so some changes may to some
extend reflect my preferences.
* lisp/org-element.el (org-element--remove-indentation): New function.
(org-element-example-block-parser, org-element-src-block-parser): Use
new function.
(org-element-src-block-interpreter): Update function according to
change.
* lisp/ox.el (org-export-unravel-code): Do not remove any indentation
since it now happens at the parser level.
* testing/lisp/test-org-element.el: Add tests.
* testing/lisp/test-ox.el: Refactor tests.
* lisp/ox.el (org-export-options-alist): Change default value
for :title property.
(org-export--default-title): New dynamically scoped variable.
(org-export-store-default-title): New function.
(org-export--get-buffer-attributes): Remove title handling.
(org-export--get-global-options): Revert "ox: Fix default
title" (16f12e0aef). Refactor code.
* testing/lisp/test-ox.el: Update a test.
* lisp/ox.el (org-export--get-global-options): Properly set default
title, i.e. when to TITLE keyword is provided.
* testing/lisp/test-ox.el: Add tests.
* ox.el (org-export-resolve-fuzzy-link): Look for fuzzy link in a
cache before trying to resolve it in the parse tree.
When a document contains a large number of identical fuzzy links, it
doesn't make sense to continually search for them. Instead, cache the
locations in the position independent case.
* lisp/ox.el (org-export-expand): Optionally add affiliated keywords
to results.
* lisp/ox-org.el (org-org-identity): Use new argument for
`org-export-expand'.
* lisp/ox.el (org-export--skip-p, org-export--interpret-p): When
`org-export-with-footnotes' is nil, ignore completely footnotes
references and definitions instead of exporting them verbatim.
* testing/lisp/test-ox.el: Add tests.
* lisp/ox.el (org-export-with-timestamps): Only applies to isolated
timestamps, i.e. timestamps in a paragraph containing only
timestamps and empty strings.
(org-export--skip-p): Skip timestamps according to new behaviour.
* testing/lisp/test-ox.el: Update tests.
* ox.el (org-export-stack-mode)
* org-crypt.el (org-crypt-check-auto-save)
(org-crypt-use-before-save-magic): Use `org-add-hook' when the
hooks are local hooks.
* org-indent.el (org-indent-mode)
* org-agenda.el (org-agenda-mode): Use `org-add-hook' and
merge upstream change from Emacs revno r112320.
* lisp/ox-latex.el: Remove instructions since everything is documented
in Org manual.
* lisp/ox.el (org-export-with-smart-quotes): Use LATEX instead of
LaTeX for keywords, the latter being hard to type, somewhat
difficult to read, and overall just pedantic.
* ox-latex.el (latex): Don't force exporting with smart
quotes.
* ox.el (org-export-with-smart-quotes): Mention the need to
use the relevant Babel package when setting this option to
non-nil.
Before the fix, if the user used #+LANGUAGE: fr with no other
customization, the quotes would disappear from the PDF output.
That's because smart quotes were enforced, while the .tex file
needs \usepackage[french]{babel} to display the quotes.
We now don't force the smart quotes and give more explanations
in `org-export-with-smart-quotes'.
* lisp/ox.el (org-export-filters-alist): Remove macro filter.
(org-export-filter-macro-functions): Remove variable.
Macro filters are never called since macro expansion happens before
the export process.
* ox.el (org-export-options-alist, org-export--skip-p): Use
`:with-planning' instead of `:with-plannings', to keep in sync
with the corresponding option's name.
* ox.el (org-export-replace-region-by): New function.
* ox-texinfo.el (org-texinfo-convert-region-to-texinfo):
* ox-md.el (org-md-convert-region-to-md):
* ox-latex.el (org-latex-convert-region-to-latex):
* ox-html.el (org-html-convert-region-to-html): New functions
to replace the active region by its export into various
backends.
* lisp/ox.el (org-export-insert-default-template): New function.
(org-export--dispatch-ui, org-export--dispatch-action): Access to the
function through the dispatcher.
From the dispatcher, if subtree export is selected, options will be
installed as node properties in current subtree.
* lisp/org.el (org-store-link, org-link-search, org-options-keywords):
Remove reference to TARGET keyword.
* lisp/ox.el (org-export-resolve-fuzzy-link, org-export-get-ordinal):
Do not use TARGET as a destination for links anymore.
* testing/lisp/test-ox.el: Update tests.
* testing/lisp/test-org.el: Update tests.
Its specifications were not useful enough to keep maintaining this
feature.
* lisp/ox.el (org-export--list-bound-variables): Renamed from
`org-export--install-letbind-maybe'. Though, only return list of
bound variables instead of installing them as buffer-local
variables.
(org-export-get-environment): Use new function. Take care of the
installation of bound variables.
(org-export--generate-copy-script): Make sure non-Org variables are
also installed in buffer copy.
* testing/lisp/test-ox.el: Add test.
* lisp/ox.el (org-export-data): White spaces after export snippets are
never ignored.
* testing/lisp/test-ox.el: Add test.
Back-end developers should pay attention to the fact that white spaces
before and after an ignored export snippet now are accumulated in the
output.
* ox.el (org-export--copy-to-kill-ring-p): New function.
(org-export-copy-to-kill-ring): Use 'if-interactive as the
default.
(org-export-to-buffer, org-export-to-file): Use
`org-export--copy-to-kill-ring-p' and fix docstrings.
* ox-odt.el (org-odt-export-as-odf): Use
`org-export--copy-to-kill-ring-p'.
* lisp/ox.el (org-export-read-attribute): Do not use `read' to read
attributes. Instead, extract keywords and values from it, which
means each value will be a string when non-nil.
* contrib/lisp/ox-groff.el (org-groff-link--inline-image): Use new
attribute syntax. Small refactoring.
* lisp/ox-ascii.el (org-ascii-horizontal-rule): Use new attribute
syntax.
* lisp/ox-beamer.el (org-beamer-plain-list): Use new attribute syntax.
* lisp/ox-html.el (org-html--textarea-block): Use new attribute
syntax.
* lisp/ox-latex.el (org-latex--inline-image, org-latex--org-table,
org-latex--math-table): Use new attribute syntax.
* lisp/ox-man.el (org-man-table--org-table): Use new attribute syntax.
Small refactoring.
* lisp/ox-odt.el (org-odt-link--inline-image, org-odt-table-cell): Use
new attribute syntax.
* testing/lisp/test-ox.el: Add tests.
This patch introduces two changes. To begin with, it removes the need
for quoting and escaping characters. Also, all non-nil values are
stored as strings. As an exception "nil" is stored as nil.
* lisp/ox.el (org-export--generate-copy-script): Call `org-mode' when
duplicating a buffer. It will properly set every variable, like
`comment-start'.
(org-export-async-start): Do not call `org-mode' since this is done
already in the previous function.
* lisp/ox.el (org-export-as): Store export options in :export-options
porperty within communication channel.
This patch allows export options activated to be available to export
back-ends.
* lisp/ox.el (org-export--selected-trees): Also mark inlinetasks with
a select tag.
(org-export--skip-p): Skip inlinetasks with a :noexport: tag.
* testing/lisp/test-ox.el: Add tests.
* lisp/ox.el (org-export-async-start): Ignore `org-mode-hook' and
`kill-emacs-hook'. The first one has been run in the original
buffer. The second is not necessary and can pollute output to
a temporary buffer (e.g. with `org-clock-persistence-insinuate').
Export commands can be restricted to a specific subtree. When using a
prefix argument to org-export-dispatch, the restriction did not stick,
i.e. the command would be restricted to whatever note the cursor
happens to be in. This made it difficult to repeat export of a
subtree while editing it. This change introduces a new marker and
uses this marker to remember the cursor position of the previous
export command. So repeating a subtree-restricted command will now
re-export the same subtree, provided you are still in the same
buffer. To break this connection, just make a new export without
relying on the prefix argument.
* lisp/ox.el (org-export-dispatch-last-position): New variable
(org-export-dispatch): Save position of cursor at the moment when
the export command is called. Restore that position temporarily
when repeating the previous export command.
* lisp/ox.el (org-export-get-previous-element): Change order of
retured elements in `org-export-get-previous-element'.
* testing/lisp/test-ox.el: Update test.
* lisp/ox.el (org-export-stack): Rewrite.
(org-export-stack-refresh): Refactor.
(org-export-stack-remove, org-export-stack-view): Apply renaming.
(org-export-stack-mode-map): Use tabulated list map as a basis.
(org-export-stack--generate, org-export-stack--num-predicate): New
function.
* lisp/ox.el (org-export-get-optional-title): Return regular title
when no optional title is found.
* lisp/ox-ascii.el (org-ascii--build-title): Apply change to
`org-export-get-optional-title'.
* lisp/ox-html.el (org-html--format-toc-headline): Apply change to
`org-export-get-optional-title'.
* lisp/ox-latex.el (org-latex-headline): Apply change to
`org-export-get-optional-title'.
* testing/lisp/test-ox.el: Add tests.
* lisp/org-element.el (org-element-headline-parser): Node
property :OPTIONAL_TITLE: in a headline will be parsed and stored
under :optional-title property.
* lisp/ox.el (org-export-get-optional-title): New function.
* lisp/ox.el (org-export--generate-copy-script): Clone
`buffer-file-coding-system' when creating a buffer copy.
This patches makes sure the output will share the same encoding as the
original buffer.
* org-compat.el (org-file-equal-p): New compatibility function.
* ox.el (org-export-output-file-name): Use the new function.
Thanks to Mark Edgington for reporting this.
* lisp/ox.el (org-export-install-filters): Properly install filters
send through ext-plist mechanism.
* lisp/ox-publish.el (org-publish-org-to): Small refactoring.
* lisp/ox-html.el (org-html-keyword): Remove INDEX keyword handling.
ox-publish.el takes care of it already.
* lisp/ox.el (org-export-resolve-fuzzy-link): Whitespaces are not
significant when matching a fuzzy link.
* lisp/org-element.el (org-element-link-parser): Do not remove
newlines characters in paths anymore, since this is not required.
* testing/lisp/test-org-element.el: Update tests.
* testing/lisp/test-ox.el: Add test.