0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-25 10:32:52 +00:00
Commit graph

26061 commits

Author SHA1 Message Date
Ihor Radchenko 34a8133715
Revert "lisp/ox-latex.el: put labels inside example blocks"
This reverts commit 304f18cb72.

This patch will break verbatim environment as the label will be
interpreted verbatim as well.
2022-12-08 15:44:58 +03:00
Ihor Radchenko 0baa75bb45
Merge branch 'bugfix' 2022-12-08 15:06:59 +03:00
Ihor Radchenko 8b6df19dc7
org-fold-core-get-regions: Search whole buffer when FROM and TO are nil
* lisp/org-fold-core.el (org-fold-core-get-regions): Fix non-intuitive
when FROM and TO are nil.  Update the docstring.

Reported-by: Daniel Mendler
2022-12-08 15:04:11 +03:00
Ihor Radchenko 697aa627ac
Merge branch 'bugfix' 2022-12-08 14:38:47 +03:00
Hugo Heagren 304f18cb72
lisp/ox-latex.el: put labels inside example blocks
* lisp/ox-latex.el (org-latex-example-block): Instead of
`org-latex--wrap-label', manually add label after
\begin{<environment>}.

This produces proper label resolution in LaTeX.  Labels before the
environment begins can be interpreted as referring to the surrounding
section.
2022-12-08 14:35:01 +03:00
Jeremie Juste 1ad16ffb95 ob-R.el: Restore the handling of org-list in as var
* ob-R.el (org-babel-R-assign-elisp): Use the patch from
ccberry@health.ucsd.edu, to print org-list as a one column table as it
was the case in release_9.5. The break in R is due commit b4e437f96 *
ob-core: Resolve named list references to simple lists.

* test-ob-R.el (ob-R-nested-list): New function to test that org list
with multiple level are handled as expected in R.

see https://list.orgmode.org/87bkofh0ir.fsf@localhost/ for context.
2022-12-07 22:06:40 +01:00
Jeremie Juste 08433d9b0c test-ob-R.el: New function to test for :result output
* test-ob-R.el (ob-session-R-result-output): This test will check if
output is printed to buffer in a session with :results output. This
test is to prevent the bug mentioned in https://list.orgmode.org/877czca7oj.fsf@u-bordeaux.fr/
does not happen again.
2022-12-07 19:55:33 +01:00
Ihor Radchenko c59d6d82e6
Merge branch 'bugfix' 2022-12-07 17:02:51 +03:00
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 0ccf1da3dd
Merge branch 'bugfix' 2022-12-07 16:07:00 +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 1f5afbbcfb
Merge branch 'bugfix' 2022-12-07 14:25:17 +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 06648d43e4
Merge branch 'bugfix' 2022-12-07 14:15:31 +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 dd499ccab8
Merge branch 'bugfix' 2022-12-07 13:52:17 +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
Rudolf Adamkovič 78d283e27d
ob-core: Remove the confusing "result silenced" message
* lisp/ob-core.el (org-babel-execute-src-block): Do not say "result
silenced" after executing the source blocks with `:results none' to
avoid confusion with `:results silent'.
2022-12-05 14:26:46 +03:00
Yuval Langer c4de06ce10
lisp/org.el: Mention how to widen in docstrings of commands that do narrowing
lisp/org.el: (org-narrow-to-subtree, org-toggle-narrow-to-subtree,
org-narrow-to-block, org-narrow-to-element): Mention how to widen in
docstrings of commands that do narrowing.

TINYCHANGE
2022-12-05 14:21:27 +03:00
Stefan Kangas 60de19f910
; Fix two typos 2022-12-04 16:29:00 +03:00
Stefan Kangas 81b083b083
Improve Swedish entry in org-export-dictionary
* lisp/ox.el (org-export-dictionary): Improve Swedish localization.
2022-12-04 16:27:33 +03:00
Ihor Radchenko f41ef345b6
Merge branch 'bugfix' 2022-12-04 16:19:47 +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
Gerard Vermeulen 4af243166c
org-clock-clocktable-language-setup: Fix Dutch translation
* lisp/org-clock.el (org-clock-clocktable-language-setup): Use Rubriek
for "heading".  It is more accurate as "Hoofding" refers to newspaper
headline.  Add the missing translation for "Clock summary at".

TINYCHANGE

Link: https://orgmode.org/list/4057b0bb88604e0f1ac4d18e11bf60f5@posteo.net
2022-12-04 14:13:15 +03:00
Ihor Radchenko 53814a8068
Merge branch 'bugfix' 2022-12-02 14:01:25 +08: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
Ihor Radchenko 9e9412919e
org-element: Prefer `org-element-with-disabled-cache' macro
* lisp/org-element.el (org-element--cache-verify-element):
(org-element-at-point-no-context): Use
`org-element-with-disabled-cache' instead of let-binding
`org-element-use-cache' variable.  The former is more reliable.
2022-12-02 13:26:56 +08:00
Kyle Meyer 74df6e55c2 Merge branch 'bugfix' 2022-12-01 17:27:29 -05: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
Kyle Meyer d500b406fc Merge branch 'bugfix' 2022-11-30 08:57:24 -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 4bb59b505d Merge branch 'bugfix'
Discard the ORG-NEWS change from 3b7981869.
2022-11-29 21:27:01 -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