* lisp/org.el: (org-save-all-org-buffers): Ensure `save-some-buffers' PRED returns boolean.
As of this upstream commit:
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=a9ad3d477441feefa3bf6107d58281cb64e0e78a
`save-some-buffers' will call its PRED argument if it returns a function.
Since (derived-mode-p 'org-mode) returns the symbol org-mode,
and org-mode is a function, org-mode is reloaded in modified Org
buffers when calling `org-save-all-org-buffers'. Among other
undesirable behavior, this will cause the buffer's visibility to be
reset to its initial visibility.
* lisp/oc.el (org-cite-list-citations): Do not use
`org-export-get-footnote-definition' so as to not cache footnote
definitions too early, i.e., when citations are still present in the
parse tree.
* lisp/oc-biblatex.el (org-cite-biblatex--multi-arguments): Append
"\relax" unconditionally to avoid calling `org-export-data' on next
object, when citations are still present in the parse tree.
Reported-by: Elias Bounatirou <elias.bounatirou@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-09/msg00067.html>
* lisp/oc.el (org-cite-process-citations): Add a space before citation
only if it is preceded by a quotation mark.
* testing/lisp/test-oc.el (test-org-cite/export-capability): Add
tests.
Reported-by: Denis Maier <denismaier@mailbox.org>
<http://lists.gnu.org/r/emacs-orgmode/2021-09/msg00085.html>
* lisp/ox-koma-letter.el (org-koma-letter-export-block)
(org-koma-letter-export-snippet): Fix warning about two unused
parameter.
Fix ox-koma-letter compilation warnings
bd60fca2faa03034e89df68a69255656df6512ba
Lars Ingebrigtsen
Sat Oct 2 10:37:55 2021 +0200
[ km: This has already been taken care of in the bugfix branch by
85e5540eb (lisp/ox-koma-letter.el: Use lexical-binding,
2021-09-30). ]
* lisp/oc-csl.el (org-cite-csl--etc-dir): Adjust docstring to describe
purpose without tying the variable to the repository install scenario.
Since 604bfd9d7 (oc-csl: be more caution about the csl etc location,
2021-07-15), this value hasn't been limited to the repository's
etc/csl/.
* lisp/oc-csl.el (org-cite-csl--etc-dir): Add `data-directory' case,
using it as the fallback. Also, use the more specific
file-directory-p rather than file-exists-p to inspect the candidates.
When using Org from the system installation, the CSL files will be
available in the etc/org/csl/ subdirectory underneath
`data-directory'. (This requires the etc/csl/ files to be synced to
the Emacs repo under etc/org/csl.)
Give the Org repository and package cases precedence because they are
anchored to a specific oc.el location while, for Emacs releases with
Org 9.5 or later, the data-directory files will typically always be
present.
* lisp/org.el (org-do-emphasis-faces): Make sure that we never match
ending marker of an emphasis as a beginning marker of another
emphasis. For example, in "(~-~) test (~+~)" "~) test (~" is a valid
code match unless we move point to the end the first code emphasis
completely during parsing.
Fixes https://orgmode.org/list/87fsujp7mc.fsf@web.de
* lisp/ob-gnuplot.el (org-babel-gnuplot-table-to-data): Force applying
`org-babel-gnuplot-quote-tsv-field' to empty table cells when
converting org tables to gnuplot input. By default,
`orgtbl-to-generic' ignores :fmt for empty table cells. We need to
set :raw to non-nil AND :backend to non-nil to force custom formatting
of empty table cells.
Fixes https://orgmode.org/list/20210617211347.59e4de56@happy.intern.roklein.de
* lisp/org-element.el (org-element-headline-parser):
Pretty sure this one should be `skip-chars-backward`, not
`skip-syntax-backward`, since \t isn't a valid syntax code.
org-element: use correct function
58102466e32d4dd9c7d816cdc3f4595a2145f332
Mattias Engdegård
Thu Sep 30 17:16:25 2021 +0200
* lisp/ob-julia.el: Use lexical-binding.
(ess-eval-visibly-p): Declare.
(org-babel-julia-assign-elisp): Remove unused vars `header` and
`row-names` and corespondingly remove now unused args `colnames-p` and
`rownames-p`.
(org-babel-variable-assignments:julia): Adjust call to
`org-babel-julia-assign-elisp` accordingly.
(org-babel-julia-initiate-session): Use `bound-and-true-p`.
(org-babel-julia-evaluate-external-process)
(org-babel-julia-evaluate-session, org-babel-julia-evaluate):
Remove unused arg `row-names-p`.
(org-babel-execute:julia): Adjust call to
`org-babel-julia-evaluate` accordingly.
* lisp/org/ob-julia.el: Use lexical-binding
b5e3cc3bc597d56dfe09ee500717344649ea0354
Stefan Monnier
Thu Sep 30 10:02:29 2021 -0400
[ km: This was independently applied covered on the bugfix branch with
the combination of a3b6728f9 and efa498b67. I'm applying it here
too for bookkeeping/traceability purposes, and to bring in one
missing piece (see merge). ]
* lisp/org/ox-koma-letter.el: Use lexical-binding
a5b761ec334cded8252e81c3887142a46752ec6a
Stefan Monnier
Thu Sep 30 09:58:04 2021 -0400
[ km: This was independently applied covered on the bugfix branch with
the combination of 85e5540eb and f5b297292, but I'm applying it here
too for bookkeeping/traceability purposes. ]
* lisp/ob-julia.el: Use lexical-binding.
(ess-eval-visibly-p): Declare as dynamically scoped.
(org-babel-execute:julia, org-babel-julia-assign-elisp)
(org-babel-julia-evaluate, org-babel-julia-evaluate-session):
Remove unused references to `colnames-p' and `rownames-p'.
Thanks to Pedro Bruel for reviewing this patch.
* lisp/org-macs.el (org-do-remove-indentation): Add optional argument
to skip the first line.
* lisp/org-src.el (org-src--coordinates): Fix coordinates for inline
LaTeX fragments.
(org-src--contents-for-write-back): Do not indent first line for LaTeX
fragments.
(org-src--edit-element): Compute block-indentation according to parent
for LaTeX fragments. Skip first line when removing common indentation
for LaTeX fragments.
* lisp/ob-core.el (org-babel-eval-headers): Fix elements ordering.
(org-babel-merge-params): Tiny refactoring.
This fixes the test `test-ob-lob/call-with-header-arguments' that
fails after 9f1507bdd.
* lisp/ob-core.el (org-babel-default-header-args): Document ability to
use closures.
(org-babel-eval-headers): New function to generate header arguments,
which adds the ability to evaluate closures during source block
execution or export.
(org-babel-merge-params): Only evaluate closures when we have our
final list of headers.
* lisp/org-macs.el (org-plist-delete-all): New function.
* lisp/ox-publish.el (org-publish-file): Add
`org-html-publish-to-html' as the default publishing function.
* testing/lisp/test-ox-publish.el (org-test-publish): Use
`org-plist-delete-all' to remove properties from the plist.
Reported-by: Christopher W. Ryan
See <https://list.orgmode.org/CAELBRWLgV-s6SGX=cevtN7iW8htwiLezR469T-cGMWE_6iX1+A@mail.gmail.com>