* 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.
* lisp/ox.el (org-export--dispatch-ui): Renamed from
`org-export-dispatch-ui'. Handle scrolling.
(org-export--dispatch-action): Renamed from
`org-export-dispatch-action'. Implement scrolling.
(org-export-dispatch): Apply renaming.
Heavily based on a patch from Jambunathan K.
* lisp/ox.el (org-export-output-file-name): Add a protection when
output file name is the same as the original org.
* testing/lisp/test-ox.el: Add tests.
* lisp/ox.el (org-export--collect-headline-numbering): Remove footnote
section from TOC.
(org-export-collect-headlines): Do not count footnote section when
numbering a headline.
* testing/lisp/test-ox.el: Add tests.
* lisp/ox.el (org-export-as): Call `inner-template' function, if
available.
* lisp/ox-html.el (org-html-inner-template): New function.
(org-html-template): Move all parts that should be inserted even in
a body-only export into `org-html-inner-template'.
* testing/lisp/test-ox.el: Add tests.
* lisp/org.el (org-modules): Remove export back-ends from the list.
Update docstring.
(org-export-backends): New variable.
* lisp/ox.el (org-export-async-start): Make sure export framework is
required in the external process.
* lisp/ob-exp.el (org-babel-exp-process-buffer): Renamed from
`org-export-blocks-preprocess'.
* lisp/ox.el (org-export-execute-babel-code): Apply previous renaming.
* testing/org-test.el (org-test-at-id): Make sure the function returns
the value of the last form in its body.
* testing/lisp/test-ob-exp.el: Fix tests.
* testing/lisp/test-ob-lob.el: Fix tests.