* lisp/ox-odt.el (org-odt-template, org-odt--export-wrap):
`write-region' instead of `save-buffer'.
`write-file' and `save-buffer' trigger major mode changes, which leads
to various mode-related hooks being run. This is undesirable: running
these on generated files is wasted time and computation,
* ox.el, ox-odt.el: Use `write-region' instead of `write-file' or
`save-buffer' to protect generated export buffers from auto-formatting
hooks.
In particular, `tidy' is often configured as the auto-formatter for HTML
and XML, and it can corrupt the exports.
TINYCHANGE
---
lisp/ox-odt.el | 4 ++--
* lisp/oc-basic.el (org-cite-basic--parse-json): Make sure year
extracted from date-parts is returned as string. Raise error if
original type other than number or string.
The stringifiation is motivated by errors like the following on Emacs 28
with nativecomp:
Error during redisplay: (jit-lock-f
* ox.el (org-export-to-file): `write-region' instead of `write-file'.
* ox-odt.el (org-odt-template, org-odt--export-wrap): `write-region'
instead of `save-buffer'.
`write-file' and `save-buffer' trigger major mode changes, which leads
to various mode-related hooks being run. This is undesirabl
* lisp/oc-basic.el (org-cite-basic--parse-json): Make date-parsing and
year extraction more resilient. Provide more informative errors when it
fails.
A string-based date is not only indicated by the key 'raw, but also
possibly by the key 'literal.
String-based dates come in various formats, not
* lisp/org-indent.el (org-indent--compute-prefixes): Prefixes should
only be computed when `org-indent-indentation-per-level' is greater than
0. For one thing, the current algorithm leads to an error otherwise,
and for another, this makes it possible to use org-indent just to
preserve indentation