Commit graph

25988 commits

Author SHA1 Message Date
Ihor Radchenko 97a780f0be
org-table-justify-field-maybe: Do not allow newlines inside cells
* lisp/org-table.el (org-table-justify-field-maybe): Remove newlines
from cell values, when present.  Newlines will alter the table cell
structure.

Reported-by: Julien Palard <julien@palard.fr>
Link: https://orgmode.org/list/638faf1b.050a0220.2bd96.904b@mx.google.com
2022-12-07 16:59:21 +03:00
Ihor Radchenko 3176ed9052
org-persist: Never write data associated with encrypted files
* lisp/org-persist.el (org-persist-write): Do not write data
associated with gpg-encrypted files.  This will avoid data leakage.
(org-persist--storage-version): Bump storage version to invalidate
previously stored, potentially leaked, data.

Reported-by: Clément Pit-Claudel <clement.pitclaudel@live.com>
2022-12-07 16:05:21 +03:00
Ihor Radchenko 5d14e88c51
org-make-tags-matcher: Fix regexp
* lisp/org.el (org-make-tags-matcher): Match
<now>/<today>/<tomorrow>/<+3d>/etc time queries.  They are allowed by
"11.3.3 Matching tags and properties" section of the manual.

Fixes regression from e022a0cea.

Reported-by: Carlo Tambuatco <oraclmaster@gmail.com>
Link: https://orgmode.org/list/87bkokgtd7.fsf@kyleam.com
2022-12-07 14:23:29 +03:00
Ihor Radchenko cc5427b7ef
org-babel-result-to-file: Fix results file inside attachment dir
* lisp/ob-core.el (org-babel-result-to-file): When file path in the
result contains attachment dir, reduce the path to relative file name
when generating attachment: link.
* testing/lisp/test-ob.el (test-ob-core/dir-attach): Add test.

Reported-by: Johan Tolö <johan@toloe.se>
Link: https://orgmode.org/list/875yesnia6.fsf@toloe.se
2022-12-07 14:13:49 +03:00
Ihor Radchenko 4dddbc1436
org-clock-update-time-maybe: Preserve point position better
* lisp/org-clock.el: Try harder to preserve point position upon
updating the clock line.  Even when `save-excursion' is not
sufficient.

Reported-by: Daniel Clemente <n142857@gmail.com>
Link: https://orgmode.org/list/CAJKAhPDVs5GRKR-cmyeNd5cQFHyKpw_=JptBzi1f0FYNTqqjzA@mail.gmail.com
2022-12-07 13:48:32 +03:00
Ihor Radchenko 7e6b55b8fd
org-element--cache-active-p: Fix when cache is disabled in indirect buffers
* lisp/org-element.el (org-element--cache-active-p): Consider cache
disabled when any of the indirect buffers do not have modification
detection.  This can be important when one uses
`combine-after-change-calls' inside an indirect buffers disabling
`after-change-functions' temporarily in the indirect buffer.

Reported-by: Feng Shu <tumashu@163.com>
Link: https://orgmode.org/list/87359z8ssb.fsf@163.com
2022-12-04 16:10:25 +03:00
Ihor Radchenko 461eb2a0ec
org-fold-core-cycle-over-indirect-buffers: Fix missing indirect capture buffers
* lisp/org-fold-core.el (org-fold-core-cycle-over-indirect-buffers):
Fix logic detecting foreign `org-fold-core--indirect-buffers'.
`current-buffer' is not always at `car'.  Before this change, capture
buffers could be missed when cycling over indirect buffers causing
subtle bugs.

Reported-by: Alexandros Prekates <aprekates@posteo.net>
Link: https://orgmode.org/list/20221128122841.2246aa08@enous
2022-12-04 16:10:19 +03:00
Ihor Radchenko 4564627415
org-babel-comit-with-output: Fix when prompt is emitted partially
* lisp/ob-comint.el (org-babel-comint-with-output): Do not rely on
output filter when detecting prompt lines.  Search for
`comint-prompt-regexp' in the full output after applying the filter.
This is needed when the filter is supplied with partial prompts.

Reported-by: Frédéric Santos <frederic.santos@u-bordeaux.fr>
Link: https://orgmode.org/list/877czca7oj.fsf@u-bordeaux.fr
2022-12-02 13:59:24 +08:00
Kyle Meyer d122c2b5b4 ox-md: Tweak a defcustom type for compatibility with Emacs<28
* lisp/ox-md.el (org-md-toplevel-hlevel): Change the type from natnum
to integer, which is less accurate but compatible with all Emacs
versions that Org supports.

This is a follow-up to the recent port of 4b2f5425d.
2022-12-01 17:26:01 -05:00
Eli Zaretskii 3159ea296f Backport commit 8b3baadf6 from Emacs
* lisp/org-clock.el (org-x11idle-exists-p): Don't try to
invoke "command x11idle" on MS-Windows and MS-DOS.  This fixes a
hang during byte-compilation of Org.

Fix compilation of Org 9.6 on MS-Windows
8b3baadf671b7b3d5058808c4655eca8bd46015e
Eli Zaretskii
Thu Dec 1 14:40:47 2022 +0200
2022-12-01 17:25:59 -05:00
Mattias Engdegård 9b856c273f Backport commit 4b2f5425d from Emacs
* lisp/ob-clojure.el
(ob-clojure-babashka-command, ob-clojure-nbb-command):
Account for the possibility of nil (commands absent).
* lisp/org.el (org-safe-remote-resources):
* lisp/ox-md.el (org-md-toplevel-hlevel):
Fix incorrect or invalid types.

Fix types in various defcustom declarations
4b2f5425d7af1a6f992ad8ce0a4452a2e778815a
Mattias Engdegård
Thu Dec 1 13:03:19 2022 +0100

[km] The natnum change will be adjusted in an upcoming commit because
     natnum not available until Emacs 28.
2022-12-01 17:25:58 -05:00
Stefan Kangas c8ad9e4b28 Backport commit 8617edfff from Emacs
; Fix typos
8617edfffd07eb80561b4de6a37c5b0b5f442e07
Stefan Kangas
Wed Nov 30 16:59:41 2022 +0100
2022-11-30 17:19:12 -05:00
Mattias Engdegård 7ba099a3fd Backport commit c3466099c from Emacs
* lisp/org-element.el (org-element--get-node-properties):
Escape literal `+`.
* lisp/org-persist.el (org-persist-load:index):
Replace line-start with string-start when the latter is meant.

Org regexp style fixes
c3466099c5f44c52ec73a1bbbb2b42de6f29ac7f
Mattias Engdegård
Wed Nov 30 13:23:38 2022 +0100
2022-11-30 08:55:24 -05:00
Kyle Meyer a4d38e3965 ORG-NEWS: Fix location of some v9.6 entries
Three entries describe changes made in the 9.6 release, not 9.5.  The
associated commits are 226119124 (ob-core.el/babel: Special handling
for attachment links in src block, 2022-06-14), 7f3a6cf6e
(org-capture: Add template hook properties, 2022-10-07), and b4e437f96
(ob-core: Resolve named list references to simple lists, 2022-11-26).
2022-11-29 22:32:30 -05:00
Kyle Meyer 3b79818691 ORG-NEWS: Drop "Version 9.7" heading from bugfix branch 2022-11-29 21:22:05 -05:00
Kyle Meyer 5fd5912fa4 ob-core: Silence byte-compiler warning
* lisp/ob-core.el (org-babel-read-list): Reflow docstring paragraph to
silence "docstring wider than 80 characters" warning.
2022-11-29 21:22:05 -05:00
Bastien b3da427ebb Update version numbers for the 9.6 release 2022-11-29 07:34:50 +01:00
Ihor Radchenko 9276219103
org-export--get-subtree-options: Do not jump to parent subtree
* lisp/ox.el: Never jump to parent heading even when point is at an
existing heading.
* testing/lisp/test-ox.el (test-org-export/get-subtree-options): Fix
test assuming that current subtree may include parent.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
Link: https://orgmode.org/list/CAFyQvY3mxi4DRTS+W-AX7bFELVujqH4DODEYPy3hyGRRuMEPSw@mail.gmail.com
2022-11-27 16:48:44 +08:00
Ihor Radchenko eed4708b66
org-babel: Add new :results discard header argument
* lisp/ob-core.el (org-babel-result-cond): Unconditionally return nil
and suppress all the processing for :results discard.
(org-babel-common-header-args-w-values):
(org-babel-sha1-hash): Add the new value to know :results value list.
* doc/org-manual.org (Handling):
* etc/ORG-NEWS (New =:results discard= header argument): Document the
new value.

Reported-by: Daniel Ortmann <daniel.ortmann@oracle.com>
Link: https://orgmode.org/list/87tu2tjary.fsf@localhost
2022-11-27 08:32:51 +08:00
Ihor Radchenko 6db75d5602
* etc/ORG-NEWS: Announce deprecation of python-mode.el (MELPA) support
(=python-mode.el (MELPA)= support in =ob-python.el= is deprecated):
Document that we no longer support third-party python-mode.el package
in favor of the built-in python.el.

Link: https://orgmode.org/list/87r0yk7bx8.fsf@localhost
2022-11-26 18:02:21 +08:00
Ihor Radchenko 9eed8567e8
testing/lisp/test-org-element.el: Uncomment working test
* testing/lisp/test-org-element.el (test-org-element/class):
Uncomment.  Whatever caused the failure in the past is not longer the
problem.  Tests are passing.
2022-11-26 16:05:19 +08:00
Ihor Radchenko b4e437f968
ob-core: Resolve named list references to simple lists
* lisp/ob-core.el (org-babel-read-list): Return a simple list instead
of list of lists.  Document this in the docstring.
* testing/lisp/test-ob-java.el (ob-java/read-return-list):
(ob-java/read-list-return-array):
(ob-java/read-return-list-with-package): Fix tests assuming previous
behavior.
* testing/lisp/test-ob.el (test-ob/simple-variable-resolution): Add
new tests.
* etc/ORG-NEWS (List references in source block variable assignments
are now proper lists): Document the change.

This commit fixes the broken promise in the manual section 16.4
Environment of a Code Block where the named references to lists should
be converted to simple lists consisting of the top-level items.

The inconsistency existed for a while and possibly lurked into some
third-party packages.  So, announcement in NEWS is required.

Reported-by: Alain.Cochard@unistra.fr
Link: https://orgmode.org/list/87pmdqfao4.fsf@localhost
2022-11-26 09:51:36 +08:00
Ihor Radchenko c72d5ee840
org-table-convert-refs-to-rc: Fix failing test
* lisp/org-table.el (org-table-convert-refs-to-an): Leave $0
references (current row) unchanged during conversion.
*
testing/lisp/test-org-table.el (test-org-table/org-table-convert-refs-to-an/2):
Re-enable the failing test.
2022-11-25 14:45:09 +08:00
Rudolf Adamkovič 5337a49f32
org.el: Use long option names when launching dvisvgm
* lisp/org.el (org-preview-latex-process-alist): Use long option names
when launching dvisvgm, optimizing for maintainability, instead of
brevity.  For example, use `--no-fonts' instead of `-n'.
2022-11-25 10:07:00 +08:00
Rudolf Adamkovič 52ebf6b45e
org.el: Compute bounds exactly when converting LaTeX output to SVG
* lisp/org.el (org-preview-latex-process-alist): Call `dvisvgm' with
`-e' (`--exact-bbox') instead of `-b min' (`--bbox=min') to measure
the exact bounds around visual glyphs, as opposed to using font
metrics, to avoid clipping at the edges.

Link: https://orgmode.org/list/m2v8n4w00w.fsf@me.com
2022-11-25 10:06:44 +08:00
Ihor Radchenko 670f68bea2
lisp/org-agenda.el: Obsolete unused org-let' and org-let2'
* lisp/org-agenda.el (org-let):
(org-let2):
* lisp/org-compat.el (org-let):
(org-let2): Move to org-compat and mark for removal.

P.S. Save the kittens!
2022-11-25 09:42:17 +08:00
Ihor Radchenko f7831cc9ac
* testing/lisp/test-org-table.el: Uncomment working test
(test-org-table/org-table-convert-refs-to-rc/3): Uncomment test that
is no longer broken.
2022-11-24 19:42:15 +08:00
Ihor Radchenko d4522dd4df
lisp/org.el: Fix toggling overlays in region
* lisp/org.el (org--inline-image-overlays): New function returning
overlays in region.
(org-toggle-inline-images): Respect BEG and END arguments when
determining presence of overlays.
(org-remove-inline-images): Clear up deleted overlays.

Reported-by: William Denton <wtd@pobox.com>
Link: https://orgmode.org/list/alpine.DEB.2.22.394.2211221559080.61289@shell3.miskatonic.org
2022-11-24 10:11:15 +08:00
Ihor Radchenko 50a3558011
org-manual: Clarify auto-detection of code block result type
* doc/org-manual.org (How to evaluate source code): Link to Results of
evaluation section for details about the inserted code block result.
(Type): Clarify that auto-detecting result type relies on specific
language backend, linking to the relevant manual section.
(Languages): Clarify that Worg is a website.

Reported-by: Alain.Cochard@unistra.fr
Link: https://orgmode.org/list/25461.4423.734070.149776@gargle.gargle.HOWL
2022-11-24 09:53:39 +08:00
Ihor Radchenko 1cdac8ef6a
* lisp/ob-eval.el (org-babel--get-shell-file-name): Update fixme 2022-11-24 09:49:09 +08:00
Kyle Meyer 28f220d1da org-manual: Deleting trailing space to pass Emacs's pre-commit check 2022-11-23 15:45:00 -05:00
Kyle Meyer c75aec4e6c Merge branch 'km/from-emacs-master' 2022-11-23 15:13:24 -05:00
Stefan Kangas 529c2a3df1 Backport commit beaa2e495 from Emacs
; Fix typos (misspelled symbols)
beaa2e49530b8149d2c22cb5fa15b8d48f7937b6
Stefan Kangas
Mon Nov 21 15:20:11 2022 +0100
2022-11-23 15:09:24 -05:00
Rudolf Adamkovič 7f4d91040a
ox-html: Use accurate MathJax versions
* etc/ORG-NEWS (HTML export uses MathJax 3+ instead of MathJax 2):
* lisp/ox-html.el (org-html-mathjax-options): Mention Mathjax 4+
version support where applicable.

Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://orgmode.org/list/m28rk2k8so.fsf@me.com
2022-11-23 19:08:27 +08:00
Ihor Radchenko 89af7b11a4
org-sbe: Fix when the macro is expanded outside Org file
* lisp/ob-table.el (org-sbe): Do not try to execute code block during
macro expansion.
* testing/lisp/test-ob-table.el (test-ob-table/sbe): Uncomment the
test.  Update the expected return value.
2022-11-23 17:26:55 +08:00
Ihor Radchenko bd384d3267
test-org-export/activate-smart-quotes: Uncomment working test
* testing/lisp/test-ox.el (test-org-export/activate-smart-quotes):
Uncomment a test that was claimed broken.  It is not anymore.
2022-11-23 11:32:04 +08:00
Ihor Radchenko 07eced3639
org-make-parameter-alist: Change the argument name
* lisp/org-macs.el (org-make-parameter-alist): Change the argument
name to conventional PLIST, as the FIXME suggests.
2022-11-22 11:09:53 +08:00
Ihor Radchenko b57674a847
org-manual: Document org-babel-pre-tangle-hook' and org-babel-tangle-body-hook'
* doc/org-manual.org (Tangle hooks): Document the missing hooks.
2022-11-22 10:48:46 +08:00
Ihor Radchenko f995425d06
org-table-convert-region: Update docstring
* lisp/org-table.el (org-table-convert-region): Mention when an error
can be thrown in the docstring.
2022-11-22 10:11:33 +08:00
Stefan Kangas f78dfea63d
Remove 'org-speed-commands-user' warning
* lisp/org-keys.el (org-speed-command-help): Remove
'org-speed-commands-user' warning.
2022-11-21 19:42:43 +08:00
Kyle Meyer aed55381bd Merge branch 'km/from-emacs-master' 2022-11-20 22:30:47 -05:00
Stefan Kangas 257df88645 Backport commit 16318bfb5 from Emacs
; Fix typos
16318bfb518aa7bc06e502e6fad7e53ec91067f9
Stefan Kangas
Sun Nov 20 12:59:39 2022 +0100
2022-11-20 22:28:30 -05:00
Stefan Kangas 2e0fcc14e2 Backport commit ba485eb94 from Emacs
; Fix typos
ba485eb949ddec53b1d7b5d78f3fcfbe2be60d7d
Stefan Kangas
Fri Nov 18 16:02:19 2022 +0100
2022-11-20 22:26:22 -05:00
Stefan Kangas 3d76d2ffbf Backport commit 93036209f from Emacs
; Fix typos (duplicate words)
93036209fae87dc620b27b2ce2e0146e6252113c
Stefan Kangas
Thu Nov 17 09:34:24 2022 +0100
2022-11-20 22:22:11 -05:00
Juanma Barranquero c53d752e61 Backport commit 623db40dd from Emacs
* lisp/ol.el (org-link-search-must-match-exact-headline):
* lisp/org-faces.el (org-column): Fix typos in docstrings.

; * lisp/*.el: Fix typos in docstrings
623db40dd1cd21623c5cecdc0abbf3ce885f92b1
Juanma Barranquero
Thu Nov 17 08:48:02 2022 +0100
2022-11-20 22:20:12 -05:00
Rudolf Adamkovič 62e1513b5a
ox-html: Update from MathJax 2 to MathJax 3+
* lisp/ox-html.el (
org-html-mathjax-options,
org-html-mathjax-template,
org-html--build-mathjax-config
): Update from MathJax 2 to 3 while maintaining compatibility.  All
legacy options should continue to work, except for the 'path' option
which must now point to MathJax 3 or later.
* testing/lisp/test-ox-html.el (
ox-html/mathjax-path-none,
ox-html/mathjax-path-default,
ox-html/mathjax-path-custom,
ox-html/mathjax-path-in-buffer,
ox-html/mathjax-options-default,
ox-html/mathjax-options-custom,
ox-html/mathjax-options-in-buffer,
ox-html/mathjax-legacy-scale-default,
ox-html/mathjax-legacy-scale-custom,
ox-html/mathjax-legacy-scale-in-buffer,
ox-html/mathjax-legacy-scale-message,
ox-html/mathjax-legacy-scale-message-in-buffer,
ox-html/mathjax-legacy-scale-ignore,
ox-html/mathjax-legacy-autonumber-ams,
ox-html/mathjax-legacy-autonumber-ams-in-buffer,
ox-html/mathjax-legacy-autonumber-none,
ox-html/mathjax-legacy-autonumber-none-in-buffer,
ox-html/mathjax-legacy-autonumber-all,
ox-html/mathjax-legacy-autonumber-all-in-buffer,
ox-html/mathjax-legacy-autonumber-message,
ox-html/mathjax-legacy-autonumber-message-in-buffer,
ox-html/mathjax-legacy-font-tex,
ox-html/mathjax-legacy-font-tex-in-buffer,
ox-html/mathjax-legacy-font-stix-web,
ox-html/mathjax-legacy-font-stix-web-in-buffer,
ox-html/mathjax-legacy-font-asana-math,
ox-html/mathjax-legacy-font-asana-math-in-buffer,
ox-html/mathjax-legacy-font-neo-euler,
ox-html/mathjax-legacy-font-neo-euler-in-buffer,
ox-html/mathjax-legacy-font-gyre-pagella,
ox-html/mathjax-legacy-font-gyre-pagella-in-buffer,
ox-html/mathjax-legacy-font-gyre-termes,
ox-html/mathjax-legacy-font-gyre-termes-in-buffer,
ox-html/mathjax-legacy-font-latin-modern,
ox-html/mathjax-legacy-font-latin-modern-in-buffer,
ox-html/mathjax-legacy-line-breaks-true,
ox-html/mathjax-legacy-line-breaks-true-in-buffer,
ox-html/mathjax-legacy-line-breaks-false,
ox-html/mathjax-legacy-line-breaks-false-in-buffer,
ox-html/mathjax-legacy-line-breaks-message,
ox-html/mathjax-legacy-line-breaks-message-in-buffer): Test MathJax in
general and also the conversion of legacy options from MathJax 2 to 3.
* testing/org-test.el (org-test-capture-messages): Add a new macro
useful for testing the messages put in the echo area.
* etc/ORG-NEWS: Document MathJax 2 to 3 upgrade, highlighting the
benefits of the new version but also mentioning the fact that the user
may need to update the `path' option in `org-html-mathjax-options'.
* doc/org-manual.org (Math formatting in HTML export): Update the link
to the MathJax CDN and the example of how to use `+HTML_MATHJAX' with
MathJax 3.  Also, remove the note on MathJax extensions, as they did
not work (and do not work) as documented.

Link: https://list.orgmode.org/orgmode/m2a667n4ax.fsf@me.com/
2022-11-21 10:44:56 +08:00
Bastien 46c4335e44 Merge branch 'bugfix' 2022-11-20 23:23:52 +01:00
Giovanni Ridolfi 225d58341b doc/org-manual.org: Fix keybinding
* doc/org-manual.org (Internal archiving): Fix keybinding.

TINYCHANGE
2022-11-20 23:21:26 +01:00
Ihor Radchenko 1d985406d8
Revert "ob-core: Do not limit table size in babel output"
This reverts commit 5347f4c75a.

`org-table-convert-region-max-lines' has been introduced explicitly
for the problem of babel output.  Therefore the commit was against the
established logic.  A different approach needs to be used to tackle
the reported problem.
2022-11-20 13:19:43 +08:00
Ihor Radchenko 5347f4c75a
ob-core: Do not limit table size in babel output
* lisp/ob-core.el (org-babel-import-elisp-from-file): Do not limit the
maximum possible resulting table to
`org-table-convert-region-max-lines'.

Reported-by: Daniel Ortmann <daniel.ortmann@oracle.com>
Link: https://orgmode.org/list/b7021ff3-60d7-863a-5579-dff60f7e1337@oracle.com
2022-11-20 13:15:44 +08:00