1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-10-18 02:19:46 +00:00
Commit Graph

27920 Commits

Author SHA1 Message Date
Sacha Chua
566c341155
org-refile: calculate file part of the outline path once per file
* lisp/org-refile.el (org-refile-get-targets): Calculate the file part
of the outline path once per file, improving the performance when
org-refile-use-outline-path is set to 'title.
2024-10-15 20:48:10 +02:00
Ihor Radchenko
da0f6eff75
ox-texinfo: Fix edge case with - Variable: nil:: definition
* lisp/ox-texinfo.el (org-texinfo--split-definition): Do not store
definition options as :attr_texinfo read by
`org-export-read-attribute'.  `org-export-read-attribute' is incapable
of reading literal nil.  Instead, store the options literally, as is,
in a special non-standard syntax node property.
(org-texinfo-special-block): Make use of syntax node property used by
`org-texinfo--split-definition', when present.
* testing/lisp/test-ox-texinfo.el (test-ox-texinfo/definition): New
test.

Reported-by: 8dcc <8dcc.git@gmail.com>
Link: https://orgmode.org/list/87plo98a8g.fsf@gmail.com
2024-10-14 20:39:47 +02:00
Ihor Radchenko
90945e16aa
Fix bad org-src interaction with org-persist
* lisp/org-macs.el (org-unique-local-variables): Do not copy over
`buffer-file-name'.  This may interact badly with `org-persist' and
`org-element' - `org-persist' assumes that all the buffers with a
given `buffer-file-name' are the same, which may not be true when
copying over variables into a temporary edit buffer (org-src).
* lisp/org-persist.el (org-persist-write:elisp): Add FIXME.

Reported-by: Akash Pal <akashpaul21@gmail.com>
Link: https://list.orgmode.org/orgmode/CA+6WspJ8J+iBzL+CQr5JTZUE5hhhHBrUunLw2naKpxwpv1DNqA@mail.gmail.com/
2024-10-13 12:17:28 +02:00
Ihor Radchenko
b6dbf88810
org-footnote-new: Do not throw an error at bol for inline/anonymous footnotes
* lisp/org-footnote.el (org-footnote--allow-reference-p): New optional
argument indicating that the footnote reference is going to be
anonymous/inline.  It is then allowed to be at bol.
(org-footnote-new): Check whether a footnote reference can be inserted
in place taking into account the footnote type.
* testing/lisp/test-org-footnote.el (test-org-footnote/new): New test
cases.

Reported-by: Suhail Singh <suhailsingh247@gmail.com>
Link: https://orgmode.org/list/877carzufa.fsf@gmail.com
2024-10-13 11:03:32 +02:00
Visuwesh
b6a72e134d
Add repeat-mode keymap for navigation commands
* lisp/org-keys.el (org-up-heading): Add new alias for
`outline-up-heading'.
(org-mode-map): Remap `outline-up-heading' to the new alias.
(org-navigation-repeat-map, org-link-navigation-repeat-map)
(org-block-navigation-repeat-map): Add new repeat-maps to make
navigation easier.
* doc/org-manual.org (Repeating commands): Document the new feature in the manual.
* etc/ORG-NEWS (Some navigation commands can now be repeated): Announce it.
2024-10-12 19:39:56 +02:00
Ihor Radchenko
11cf3b6daf
Merge branch 'bugfix' 2024-10-12 14:55:14 +02:00
Ihor Radchenko
3117185dba
org-texinfo-supports-math-p: Fix incompatibility with Emacs 27
* lisp/ox-texinfo.el (org-texinfo-supports-math-p): Avoid using
`file-name-with-extension', which is not yet available in Emacs 27.
2024-10-12 14:50:52 +02:00
Ihor Radchenko
a8da21874d
Merge branch 'bugfix' 2024-10-12 12:53:19 +02:00
Ihor Radchenko
96f695034c
org-get-export-keywords: Fix completing export attributes
* lisp/org.el (org-get-export-keywords): Complete export attributes
like #+attr_<backend>:.

Reported-by: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
Link: https://orgmode.org/list/CAO48Bk-NB9HyavB7tCbq3hQZW=CboHx5qC_-s=kF_v2uihC2Rg@mail.gmail.com
2024-10-12 12:51:26 +02:00
Ihor Radchenko
76cd7e995a
Merge branch 'bugfix' 2024-10-12 10:49:43 +02:00
Ihor Radchenko
19d462e7a7
org-comment-or-uncomment-region: Fix comment boundaries inside src blocks
* lisp/org.el (org-comment-or-uncomment-region): When calculating
region boundaries inside src edit buffer, do not assume that region
length does not change - it may, when the indentation inside src edit
buffer is different from the Org buffer.

Reported-by: Stephanus Comnenus <linjt267@gmail.com>
Link: https://orgmode.org/list/CAHqtn=fWq6E5_pm72AB9vFxwjS0a8ma=UvVjMrgeivE9pa13ZQ@mail.gmail.com

TINYCHANGE
2024-10-12 10:47:11 +02:00
Anand Deopurkar
e2823be9da
org-colview: Fix ignoring org-agenda-columns-add-appointments-to-effort-sum
* org-colview.el (org-columns--collect-values): Accept an additional
optional argument AGENDA-MARKER.
(org-agenda-columns): Pass the position of the current agenda line to
org-columns--collect-values through AGENDA-MARKER.  Use it to read the
'duration' property

Fixes the bug below.

Reported-by: Stanislav Vlasov
Link:
https://lists.gnu.org/archive/html/emacs-orgmode/2020-08/msg00090.html

also see the fix
Reported-by: Mamoru Miura
Link: https://lists.gnu.org/archive/html/emacs-orgmode/2022-07/msg00558.html

Previously, `org-agenda-columns' called `org-columns--collect-values' from
the buffer from which the agenda line originates. As a result,
`org-columns--collect-values' did not have access to the agenda line.
Mamoru Miura's solution recomputes the agenda-line.  My current patch
adds an optional argument to `org-columns--collect-values' which can be
used to pass the position of the agenda line.

TINYCHANGE
2024-10-12 09:31:44 +02:00
Ihor Radchenko
aead1f13ab
Merge branch 'bugfix' 2024-10-10 19:42:03 +02:00
Nick Dokos
b457dbfe5a
org-babel: Avoid changing user options by not sharing list structure
* lisp/ob-core.el (org-babel-get-src-block-info): Use `copy-tree'
when using `org-babel-default-header-args*' variables to prepare the
`info' variable used in src block evaluation. The `info' variable gets
modified, and the modifications were affecting the values of the user
variables. In particular, the `:file' setting was modified in the presence
of a `:output-dir' setting, concatenating more and more copies of the directory
every time the block was evaluated.

Reported-by: @lyndhurst on SE Emacs
Link: https://emacs.stackexchange.com/questions/82261/
2024-10-10 19:38:24 +02:00
Ihor Radchenko
f14ed5791f
Merge branch 'bugfix' 2024-10-07 20:41:47 +02:00
Ihor Radchenko
eb6d70f817
org-persist: Fix cached data being modified by reference
* lisp/org-persist.el (org-persist--write-cache):
* lisp/org-persist.el (org-persist-read):
(org-persist-write): Remove `org-persist--write-cache'.  The values,
after reading, might sometimes be modified in place.  The
modifications, when done inside some kind of deeply nested structure,
will propagate to the cache, polluting what was originally written in
the persist file.

This was a difficult bug to spot - the modification hapenned when an
Org buffer was saved to a different file (C-x C-w), modified, leading
to `org-element--cache' modification, and then closed.  This
modification propagated to `org-persist--write-cache', leading to
incorrect cache value being assigned to the original buffer (before
C-x C-w).

Reported-by: Gregor Zattler <telegraph@gmx.net>
2024-10-07 20:35:12 +02:00
Ihor Radchenko
d33940f6e2
Fix typo in 1a51e21979
* lisp/ox.el (org-export-dictionary): Fix language id.  Should be
"de".

TINYCHANGE
2024-10-07 19:54:39 +02:00
Philip Kaludercic
1a51e21979
* lisp/org/ox.el (org-export-dictionary): Update German entries 2024-10-06 14:42:32 +02:00
Ihor Radchenko
28c83e678f
Update version number for the 9.7.12 release 2024-10-06 09:30:35 +02:00
Ihor Radchenko
28b6315108
Merge branch 'bugfix' 2024-09-22 18:15:19 +02:00
Rudolf Adamkovic
fac0787e16
ox-texinfo: Check for math support without warnings and quietly
* lisp/ox-texinfo.el (org-texinfo-supports-math-p): Two
improvements: (1) Fix the incorrect `.info' extension used for the
temporary `.texi' file.  This removes the warning "makeinfo: warning:
input file testXXX.info; did you mean testXXX.texi?" (2) Suppress
output when compiling the "Is math supported?" test file.  This is to
avoid user confusion, as the user cares about their Texinfo file, not
implementation details.  This removes the message "Processing Texinfo
file /var/.../testXXX.info...".
2024-09-22 18:06:22 +02:00
Visuwesh
5dc7028d7f
org-id: Guard against unwarranted major-mode change when querying id
* lisp/org-id.el (org-id-find-id-file): Only fallback to the
current-buffer filename when it is an org-mode buffer.  This avoids
accidental change of the major-mode when querying a non-existent id
from a non-org-mode buffer.

Reported-by: Visuwesh <visuweshm@gmail.com>
Link: https://list.orgmode.org/87ikuuwmz4.fsf@gmail.com/
2024-09-22 12:41:54 +02:00
Ihor Radchenko
10adc2bbd7
Merge branch 'bugfix' 2024-09-22 12:35:28 +02:00
Rodrigo Morales
d8fc26aefa
org-babel-view-src-block-info: Fix querying Org properties in Help buffer
* lisp/ob-core.el (org-babel-view-src-block-info): Query in-buffer
header arguments (`org-entry-get') from Org buffer.  It does nothing
from *Help* buffer.

In the previous version, when the user interactively calls
`org-babel-view-src-block-info' and the point is on a code block, these
two warnings are shown in the buffer *Warnings*:

 Warning (org-element): ‘org-element-at-point’ cannot be used in non-Org buffer #<buffer *Help*> (help-mode)
 Warning (org-element): ‘org-element-at-point’ cannot be used in non-Org buffer #<buffer *Help*> (help-mode)

This happened because `org-babel-view-src-block-info'
calls (org-entry-get (point) "header-args" t) while being in
the *Help* buffer.  `org-babel-view-src-block-info' should call
org-entry-get while being in the Org Mode buffer and then switch to
the *Help* buffer once it has all the information that is then
displayed in the *Help* buffer.

In the introduced changes, we execute (org-entry-get (point)
"header-args" t) while being in the Org Mode buffer and we switch
to *Help* when we have the necessary information that is then shown in
the *Help* buffer.

TINYCHANGE
2024-09-22 12:28:08 +02:00
Jack Kamm
c07028671d
ox-icalendar: Fix export of diary-style timestamps
* lisp/ox-icalendar.el (org-icalendar-entry): Include timestamps of
type diary when `:with-timestamps' is `active'.
* lisp/ox.el (org-export--skip-p): Include timestamps of type diary
when `:with-timestamps' is `active'.
*
testing/lisp/test-ox-icalendar.el (test-ox-icalendar/diary-timestamp):
Unit test for exporting timestamps of type diary.
2024-09-22 12:22:33 +02:00
Ihor Radchenko
0b1a4bfc48
Merge branch 'bugfix' 2024-09-22 11:47:53 +02:00
Benjamin McMillan
2a85367ea8
lisp/org.el: Add back "export" blocks to natively fontified blocks
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Add "export" to
list of block types that are fontified if `org-src-fontify-natively'
is non-nil.  This brings back the previous undocumented behaviour.

Link: https://list.orgmode.org/87h6aejf17.fsf@localhost/
TINYCHANGE
2024-09-22 11:43:55 +02:00
Lukas Rudd Andersen
a8790ed09e
lisp/org-persist.el: Fix regression missed by 7fd8099
* lisp/org-persist.el: (org-persist--find-index): Fix regression that
  makes the function return nil when container in COLLECTION is not a
  list of containers.

TINYCHANGE
2024-09-22 11:06:41 +02:00
Ihor Radchenko
8b8b61d277
Merge branch 'bugfix' 2024-09-22 10:11:45 +02:00
Morgan Willcock
c766ea34ec
.dir-locals.el: Disable compilation of .dir-locals.el
* .dir-locals.el: Add `no-byte-compile'.

Reported-by: Lin Jian <me@linj.tech>
Link: https://list.orgmode.org/orgmode/87zfocwjwx.fsf@linj.tech/

TINYCHANGE
2024-09-22 10:08:39 +02:00
Jens Lechtenbörger
9cbf0c99c3
test-ox-publish.el: Add tests for publish cache
* testing/lisp/test-ox-publish.el (org-test-publish): Add optional
arguments `timestamp-flag' and `pubdir' for control over existing
local variables, add optional argument `keep-pubdir-p' for conditional
deletion of publication directory.
(org-test-publish-touch): New function to change modification time of
file.
(test-org-publish/publish-cache): New function with tests.

* testing/examples/pub-cache/source.org:
* testing/examples/pub-cache/config.org: New example files.
2024-09-17 20:32:15 +02:00
Ihor Radchenko
7cecc2aa2c
doc/org-manual.org (Choosing a working directory): Fix typo
:mkdirp, not :mkdir.

TINYCHANGE
2024-09-17 08:35:40 +02:00
Rudolf Adamkovic
6443c83bd1
ox-texinfo: Support links in headings
* etc/ORG-NEWS (Texinfo exporter now supports links in headings):
Announce the new feature.
* lisp/ox-texinfo.el: (org-texinfo--format-entries,
org-texinfo--get-node, org-texinfo--sanitize-title-reference,
org-texinfo--sanitize-title): A 2-step change: (1) Rename
`--sanitize-title' to `--sanitize-title-reference' and (2) create a
new `--sanitize-title' sanitation function.  The new function is less
strict in that does not remove links, which should be allowed in
sectioning commands, such as `@unnumbered'.  The old function remains
more strict, which is useful for generating `@node' names, for
example.
* testing/lisp/test-ox-texinfo.el:
(test-ox-texinfo/headings-with-links): Test the new functionality to
avoid regressions in the future.
2024-09-16 20:54:08 +02:00
Pedro A. Aranda
cdcde091b9
ox-latex: Suggest xcolor instead of color
* lisp/ox-latex.el (org-latex-src-block-backend): In the docstring,
suggest xcolor instead of color.  Color might be less reliable.  See
https://tex.stackexchange.com/questions/89763/when-to-use-the-xcolor-package-instead-of-the-color-package
2024-09-15 16:10:59 +02:00
Rudolf Adamkovič
4829bacffe
ox-texinfo: Fix automatic @ref titles
* lisp/ox-texinfo.el (org-texinfo--@ref): Fix an incorrect assumption
that Texinfo uses node names for automatic link text.  It does not.
Instead, it uses the corresponding section title.  For example, if a
node is named `a' its section is named `A', the Org link to the node
`a' written as `[[...][xxx]]' ends up being rendered as "A", which
means the link description the Org user provided is ignored.
2024-09-15 14:08:19 +02:00
Kyle Meyer
9f29451d86 Merge branch 'km/from-emacs-30' into bugfix 2024-09-14 11:58:26 -04:00
Robert Pluim
00ef9b557d Backport commit 79f68597a from Emacs
; * etc/ORG-NEWS: Fix typo.
79f68597abade27939397e0c2a50eec833e64daf
Robert Pluim
Fri Sep 13 09:50:01 2024 +0200
2024-09-14 11:56:04 -04:00
Stefan Kangas
0afa19e8bf Backport commit 4047072c7 from Emacs
* doc/org-manual.org (Link Abbreviations):
Update the FSF address to 31 Milk Street.

Update FSF's address
4047072c7d847afb5027dab27e97606a49c1d62e
Stefan Kangas
Mon Sep 2 21:02:09 2024 +0200
2024-09-14 11:54:29 -04:00
Rudolf Adamkovic
3428b522fb
doc/org-manual.org: Update a deprecated function
* doc/org-manual.org (Global and local cycling):
(Initial visibility): Replace `org-set-startup-visibility' with
`org-cycle-set-startup-visibility' as per "This function is obsolete
since 9.6; use ‘org-cycle-set-startup-visibility’ instead."
2024-08-31 16:39:55 +02:00
Slawomir Grochowski
07dd3bcae6
org-columns-compile-format: Fix regexp
* lisp/org-colview.el (org-columns-compile-format): Refactor
string-based regexp to `rx' form.  Fix regexp: When an empty
parentheses () is in the column format string then the regexp
can't capture the operator which is in curly brackets {}.
(org-columns-new): prevent adding empty parantheses '()' to 'column
format string' when 'column title' is empty.
* testing/lisp.test-org-colview.el (test-org-colview/compile-format):
New test case: check if operator will be captured when there is
empty parantheses '()' in 'column format string'.

Reported-by: Sławomir Grochowski <slawomir.grochowski@gmail.com>
Link: https://list.orgmode.org/orgmode/877ccczt83.fsf@gmail.com/
2024-08-31 15:31:13 +02:00
Ihor Radchenko
6a5d0ed342
Update version number for the 9.7.11 release 2024-08-23 10:20:21 +02:00
Ihor Radchenko
34979457f9
lisp/ox.el (org-export-options-alist): Improve docstring
Users often confuse alist key and the first element of the alist value
- KEYWORD in this alist.  Make the distinction more clear in the
docstring.

Link: https://list.orgmode.org/orgmode/87h6biyrd7.fsf@localhost/
2024-08-22 14:53:49 +02:00
Ihor Radchenko
7a3fc3d78b
Merge branch 'bugfix' 2024-08-22 14:37:15 +02:00
Ihor Radchenko
8fd6cc9020
lisp/ob-gnuplot.el: Fix cyclic dependency
* lisp/ob-gnuplot.el (org-babel-gnuplot-table-to-data): Load ox-ascii
dynamically.

Reported-by: Donald Hunter <donald@sealgair.com>
Link: https://orgmode.org/list/20240821112055.16184-1-donald@sealgair.com
2024-08-22 14:36:51 +02:00
Ihor Radchenko
d51dc4aa29
org-toggle-inline-images-command: New command for C-c C-x C-v binding
* lisp/org.el (org-toggle-inline-images-command): New command to
toggle images.  Unlike the old `org-toggle-inline-image', it is more
flexible and default to toggling images at point/current entry.
* lisp/org-keys.el (org-mode-map): Bind C-c C-x C-v to the new
command.
* doc/org-manual.org (Images): Update the manual describing the new
command behaviour.
* etc/ORG-NEWS (=C-c C-x C-v= command toggling inline image display
has been reworked): Document the breaking change.

Link: https://list.orgmode.org/6461a84b.a70a0220.b6d36.5d00@mx.google.com/
2024-08-18 12:23:10 +02:00
Ihor Radchenko
6bf748e0d9
etc/ORG-NEWS: Add reference to undocumented feature added in Org 9.7 2024-08-18 12:09:04 +02:00
Ihor Radchenko
19440a8bc2
Merge branch 'bugfix' 2024-08-18 12:07:03 +02:00
Ihor Radchenko
b128d2be81
etc/ORG-NEWS (Alignment of image previews can be customized): Add missing entry 2024-08-18 12:05:39 +02:00
Ihor Radchenko
5ebd973e09
Update version number for the 9.7.10 release 2024-08-16 08:53:10 +02:00
Jens Lechtenbörger
38d1bc67b2
lisp/ox-publish.el: Use publish time in publish cache
* lisp/ox-publish.el (org-publish-update-timestamp): Store current
time in publish cache, instead of modification time of source file.
(org-publish-cache-file-needs-publishing): Return t, if source or an
included file was modified more recently.

Previously, a source file including a newer file was published again
and again.  Now, publishing only happens if either source or an
included file changed since the last publishing.
2024-08-15 20:24:42 +02:00