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