* 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.