* lisp/org-element.el (org-element-export-block-parser): Type is always
stored in capitals.
* testing/lisp/test-ox.el (test-org-export/export-block): Add test.
Reported-by: Suvayu Ali <fatkasuvayu+linux@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/103921>
* 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.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-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/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): 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-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.
* 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.
* 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.