Commit Graph

27562 Commits

Author SHA1 Message Date
Ihor Radchenko 9e88e1c822
Merge branch 'bugfix' 2024-04-24 15:46:32 +03:00
Ihor Radchenko d6353b283a
ox-ascii: Fix broken link export for broken fuzzy links
* lisp/ox-ascii.el (org-ascii--describe-links): Ignore all kinds of
broken links, not just broken id links.

Reported-by: Pablo Aguado <aguadopd@hotmail.com>
Link: https://orgmode.org/list/SA1P223MB070291E02E95707C31342244C2102@SA1P223MB0702.NAMP223.PROD.OUTLOOK.COM
2024-04-24 15:46:07 +03:00
Ihor Radchenko 80b474db00
ox-ascii: Fix broken link export for broken fuzzy links
* lisp/ox-ascii.el (org-ascii--describe-links): Ignore all kinds of
broken links, not just broken id links.

Reported-by: Pablo Aguado <aguadopd@hotmail.com>
Link: https://orgmode.org/list/SA1P223MB070291E02E95707C31342244C2102@SA1P223MB0702.NAMP223.PROD.OUTLOOK.COM
2024-04-24 15:42:39 +03:00
Ihor Radchenko c6c5474b7e
ob-exp: Preserve header arguments in source block after processing
* lisp/ob-exp.el (org-babel-exp-process-buffer): Fix infinite loop
when the inline src block replacement is the same as the existing src
block.
(org-babel-exp-code): Support new placeholder %header-args for
non-default header arguments.
(org-babel-exp-inline-code-template):
(org-babel-exp-code-template): Change the templates to include header
arguments.
* testing/lisp/test-ob-exp.el (ob-exp/exports-inline-code):
(ob-exp/exports-inline-code-double-eval-exports-both):
(ob-export/export-with-results-before-block): Adjust tests.
* etc/ORG-NEWS (=ox-org= preserves header non-default arguments in src
blocks): Document the breaking change.

This change fixes ox-org export for src blocks.  Previously src blocks
did not preserve their header arguments.  Now, non-default header
arguments are preserved.

Link: https://github.com/emacsorphanage/ox-pandoc/issues/37
2024-04-24 14:48:19 +03:00
Arash Esbati ff9d00c9c3
doc/org-manual.org: Document `org-emphasize'
* doc/org-manual.org (Emphasis and Monospace): Document the
command `org-emphasize'.

Link: https://lists.gnu.org/archive/html/emacs-orgmode/2024-04/msg00381.html
2024-04-23 14:30:52 +03:00
Alexander Gogl 46e13c3ebd
ox-latex: New option to customize LaTeX footnote command
* lisp/ox-latex.el (org-export-define-backend): Add option.
(org-latex-default-footnote-command): New custom variable.
(org-latex-footnote-reference): Replace string "\\footnote{%s%s}"
with custom variable.

* etc/ORG-NEWS (New and changed options): Add description to option.

Some LaTeX classes define their own footnote commands. For example,
kaobook (https://github.com/fmarotta/kaobook/blob/master/example_and_documentation.pdf)
has \footnotes and \sidenotes, whereby sidenotes (notes are put into
the outter margin) are the dominant form of putting notes in
kaobook. It would be great if you could make the footnote command in
the footnote function customizable. My proposal is in the attachment.

Modified from a feature request by Alexander Gogl.

Link: https://list.orgmode.org/m2v84fhj9u.fsf@gmail.com/T/#m71809443a3b328ed704712ba53e6bb78282249cc

TINYCHANGE
2024-04-23 13:58:14 +03:00
Ihor Radchenko 1ad03e77b1
org-fold: Fix regression after b03ece433
* lisp/org-fold-core.el (org-fold-core-add-folding-spec): Add new
folding spec property :font-lock.

Reported-by: StrawberryTea <look@strawberrytea.xyz>
Link: https://orgmode.org/list/87frvdtemx.fsf@strawberrytea.xyz
2024-04-22 22:20:49 +03:00
Ihor Radchenko 52bde22b9d
Merge branch 'bugfix' 2024-04-22 21:10:13 +03:00
Ihor Radchenko a9275d5fd1
doc/org-manual.org: Fix description of switches in literal examples
Fix erroneous assertion that switches are always at the end of "begin"
line.

Reported-by: João Pedro <jpedrodeamorim@gmail.com>
Link: https://orgmode.org/list/87zftm2ltt.fsf@ergo
2024-04-22 21:08:20 +03:00
Ihor Radchenko dba92f72d3
Merge branch 'bugfix' 2024-04-22 16:44:27 +03:00
Ihor Radchenko 0db82ee8f8
org-agenda-manipulate-query: Fix repeated canceled calls
* lisp/org-agenda.el (org-agenda-manipulate-query): When called
multiple times, discarding edits, prevent accumulating trailing + + +
- +{} in the query string.

Reported-by: Carlos Pita <carlosjosepita2@gmail.com>
Link: https://orgmode.org/list/87r1be97xd.fsf@localhost
2024-04-22 16:42:08 +03:00
Ihor Radchenko 5b0b7f2924
org-paste-subtree: With single/double prefix, force inserting sibling/child
* lisp/org.el (org-paste-subtree): When called with single or double
universal argument, force inserting sibling heading or child heading
accordingly.
* testing/lisp/test-org.el (test-org/paste-subtree): Add tests for the
new behavior.
* doc/org-manual.org (Structure Editing): Update the command description.
* etc/ORG-NEWS (~org-paste-subtree~ now handles =C-u= and =C-u C-u=
prefix arguments specially): Announce the change.

Link: https://orgmode.org/list/878rhxtszb.fsf@localhost
2024-04-21 14:59:37 +03:00
Ihor Radchenko 36d0928043
Clarify `org-use-sub-superscripts' and related options
* lisp/org.el (org-use-sub-superscripts): Update the docstring
explaining that (...) is understood as sub/superscript, even when
there are spaces inside.  Add a note that the underlying markup is not
altered.
* lisp/ox.el (org-export-with-sub-superscripts): Link to the
`org-use-sub-superscripts' docstring instead of duplicating the
docstring text.
* doc/org-manual.org (Subscripts and Superscripts): Clarify the
differences between `org-export-with-sub-superscripts' and
`org-use-sub-superscripts'.  Add a note that underlying markup does
not change.

Link: https://orgmode.org/list/87plvproor.fsf@localhost
2024-04-21 12:41:05 +03:00
Ihor Radchenko 769018718c
ox-odt: Fix regression when exporting file links after 72b0e9ff0
* lisp/ox-odt.el (org-odt-link--inline-image): Fix file path expansion
code.  Explicitly assert that the passed link must be a file
link (otherwise, the rest of the function logic does not make any
sense).
(org-odt-link): Remove special handling of http, https, ftp, and
mailto links, following the idea behind 72b0e9ff0.  Fix coderef link
handling - they must use raw coderef, not coderef:<ref>.

Reported-by: Fraga, Eric <e.fraga@ucl.ac.uk>
Link: https://orgmode.org/list/87r0f3ndvy.fsf@ucl.ac.uk
2024-04-20 15:19:11 +03:00
Morgan Smith 942a7320d0
org-element-cache-map: Fix edge case when we move to not-yet-cached element
* lisp/org-element.el (org-element-cache-map): Make sure that there is
always a cached element where we move START position.
* testing/lisp/test-org-element.el (test-org-element/cache-map): New
test.

Co-authored-by: Morgan Smith <Morgan.J.Smith@outlook.com>
2024-04-19 16:06:44 +03:00
Ihor Radchenko d73688faa4
org-paste-subtree: Fix pasting when point is on heading but not at bol
* lisp/org.el (org-paste-subtree): When point is on heading, but not
at bol, paste using heading level minimal between current heading
level and next visible heading level.
* testing/lisp/test-org.el (test-org/paste-subtree): Add test cases.

Reported-by: Philipp Kiefer <phil.kiefer@gmail.com>
Link: https://orgmode.org/list/878rhxtszb.fsf@localhost
2024-04-19 14:11:15 +03:00
Ihor Radchenko 037700c411
Update version number for the 9.6.27 release 2024-04-19 10:56:36 +03:00
Ihor Radchenko 1ae978f940
Merge branch 'bugfix' 2024-04-15 14:19:50 +03:00
Ihor Radchenko 4ae5cc0182
org-self-insert-command: Prevent deleting selection for speed commands
* lisp/org.el (org--speed-command-p): New helper function checking
whether current command is a speed command.
(org-self-insert-command): Use the new helper.
* lisp/org.el: In `delete-selection' property of
`org-self-insert-command' symbol, signal that selection must not be
deleted when current command is a speed command.

Reported-by: Joe Gilder <joe@homestudiocorner.com>
Link: https://orgmode.org/list/87il0voeok.fsf@localhost
2024-04-15 14:17:17 +03:00
Ihor Radchenko b03ece433b
org-fold: Optimize fontification of link folds
* lisp/org-fold-core.el (org-fold-core--specs): Add new folding spec -
:font-lock.  When non-nil, enable re-fontification of the folds.
(org-fold-core-region): Only trigger re-fontification when the folding
spec has :font-lock property.
* lisp/org-fold.el (org-fold-initialize): Only enable re-fontification
of folded outlines, drawers, and blocks.
2024-04-15 11:53:59 +03:00
Ihor Radchenko 17072a4690
Allow clock elements without timestamp, like CLOCK: => 12:00
This syntax has been introduced in Org 4.78, but not supported later,
when Org element parser have been created.  Fix this omission to not
remove an existing (and announced!) feature.

This kind of clock is of limited use though - all the customizations
relying upon knowing _when_ clocking time was recorded, like ranges in
clock tables or limits on the displayed clocked-in time, will include
such clocks unconditionally.  So, not adding this to the manual, as it
is not very clear how to use it in actual workflow.

* lisp/org-element.el (org-element-clock-line-re): Update the regexp.
(org-element-clock-parser): Do not assume that timestamp always
follows CLOCK: line.
* testing/lisp/test-org-element.el (test-org-element/clock-parser):
(test-org-element/clock-interpreter): Add tests checking parser and
interpreter output of clocks without timestamps.

Link: https://orgmode.org/list/87frvpyzrf.fsf@localhost
2024-04-14 15:46:15 +03:00
Ihor Radchenko b42867b5a1
org-html-toc: Fix duplicate ids when there are multiples TOCs
* lisp/ox-html.el (org-html-toc): When multiple TOCs are generated
inside the exported document, make sure that they do not have
duplicate IDs.

Reported-by: Michel Damiens <michel.damiens@gmail.com>
Link: https://orgmode.org/list/87sfj6av4t.fsf@localhost
2024-04-14 13:34:13 +03:00
Ihor Radchenko 4d3b216b83
Merge branch 'bugfix' 2024-04-13 15:50:01 +03:00
Ihor Radchenko 6cb088972f
org-link-open-as-file: Do not try dired wildcard expansion when file exists
* lisp/ol.el (org-link-open-as-file): When PATH points to an existing
file and contains wildcard chars, do not try to list all the files in
`dired'.

Reported-by: Edgar Lux <edgarlux@mailfence.com>
Link: https://orgmode.org/list/1294251072.453751.1712943418634@ichabod.co-bxl
2024-04-13 15:47:18 +03:00
Ihor Radchenko 08c047a507
Merge branch 'bugfix' 2024-04-12 21:03:36 +03:00
Lei Zhe 5128460f94
org-table-header-line-mode: Fix when cursor is outside table
* lisp/org-table.el (org-table-header-set-header): Display table
header even when the point is below the table, as long as the table is
visible at the top of the window.
2024-04-12 21:01:49 +03:00
Ihor Radchenko c274128997
org-table-eval-formula: Keep empty result in duration (;TtU) mode
* lisp/org-table.el (org-table-eval-formula): When using T, t, or
U (duration) mode, do not convert empty results into duration.  This
is to keep things consistent with default mode.

Reported-by: Jeff Trull <edaskel@att.net>
Link: https://list.orgmode.org/orgmode/CAF_DUeEFpNU5UXjE80yB1MB9xj5oVLqG=XadnkqCdzWtakWdPg@mail.gmail.com/
2024-04-12 15:07:02 +03:00
Ihor Radchenko 096ecc9e24
Update version number for the 9.6.26 release 2024-04-12 09:53:47 +03:00
Morgan Smith 66e307b411
lisp/org-element.el: Add repeater-deadline support to org-element
* lisp/org-element.el (org-element-timestamp-parser,
org-element-timestamp-interpreter): Add support for repeater
deadlines.  Adds two new properties: ':repeater-deadline-value' and
':repeater-deadline-unit'.

* testing/lisp/test-org-element.el (test-org-element/timestamp-parser,
test-org-element/timestamp-interpreter): Test support for repeater
deadlines.

* etc/ORG-NEWS: Add relevant news.
2024-04-11 16:17:40 +03:00
Ihor Radchenko ead3f99901
Fix regression after 72b0e9ff0
* lisp/ox-html.el (org-html-link): Fix code branches assuming that
PATH variable strips link type.

Reported-by: Daniel Clemente <n142857@gmail.com>
Link: https://orgmode.org/list/CAJKAhPD=eMR2Tw3rsufPw_T6eEexpcHP=6PXKw3fLDtB2Z7qNg@mail.gmail.com
2024-04-10 17:02:01 +03:00
Ihor Radchenko 093b21c8c3
org-latex--caption/label-string: Add comment 2024-04-10 16:36:10 +03:00
Ihor Radchenko 78e9dd0c42
Fix when user customization makes Org dialogues pop up in new frames
* lisp/ol.el (org-insert-link):
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
* lisp/org-attach.el (org-attach):
* lisp/org-clock.el (org-clock-select-task):
* lisp/org-goto.el (org-goto-location):
* lisp/org-macs.el (org-mks):
* lisp/org-table.el (org-table-fedit-finish):
* lisp/org.el (org-offer-links-in-entry):
* lisp/ox.el (org-export-dispatch): Arrange the dialogue window to be
killed when it is displayed in a new frame.
`save-window-configuration' is not enough in such scenarios.  Use
`quit-window' instead.
* lisp/org-table.el (org-table-edit-formulas): Prohibit popping up
table editor in a new frame.  This is because the major mode for
formula editing makes assumptions about where the editor window is
located and does not work reliably in a separate frame.

Reported-by: Björn Bidar <bjorn.bidar@thaodan.de>
Link: https://orgmode.org/list/87jzlcoxuq.fsf@
2024-04-10 15:42:52 +03:00
Ihor Radchenko 129a18abf3
org-timer-set-timer: Fix when called from agenda buffer
* lisp/org-timer.el (org-timer-set-timer): Get effort minutes from
agenda entry line when in agenda buffer.

Reported-by: Bhavin Gandhi <bhavin7392@gmail.com>
Link: https://orgmode.org/list/CAOn=hbez7-4wFG2M1-MSHqAwvV0mysvLAUYP9_GK6mrSbtz3CQ@mail.gmail.com
2024-04-10 11:49:55 +03:00
Ihor Radchenko 85389da8cf
Merge branch 'bugfix' 2024-04-10 11:18:25 +03:00
Ihor Radchenko 42cdf2a90e
org-emphasis-alist: Clarify that emphasis markers cannot be changed
* lisp/org.el (org-emphasis-alist): Update the docstring, clarifying
that emphasis markers cannot be changed to arbitrary markers.

Link: https://orgmode.org/list/m3il0pac42.fsf@sina.com
2024-04-10 11:17:03 +03:00
Ihor Radchenko 9d636473be
fixup! lisp/ob-emacs-lisp.el: Throw an error when session is requested 2024-04-09 16:35:44 +03:00
Ihor Radchenko d1c6f91ced
lisp/ob-emacs-lisp.el: Throw an error when session is requested
* lisp/ob-emacs-lisp.el (org-babel-execute:emacs-lisp): When :session
is provided, signal error - sessions are not supported.
(org-babel-prep-session:emacs-lisp): Signal error when trying to
switch to session.

Reported-by: Adam Sneller <adam@earth2adam.com>
Link: https://orgmode.org/list/871qoe8k9e.fsf@localhost
2024-04-09 16:22:00 +03:00
Ihor Radchenko 029d85dcca
Merge branch 'bugfix' 2024-04-09 14:07:28 +03:00
Ihor Radchenko 67ec699769
org-dblock-write:columnview: Fix when :id file:foo.org is not open
* lisp/org-colview.el (org-dblock-write:columnview): Fix generating
columnview when :id point to a file that is not yet open in Emacs.
Just open it as needed.

Reported-by: Vlastimil Vondra <vlastimil.vondra@gmail.com>
Link: https://orgmode.org/list/CACjq+cwjyi-d_jFY9oVe_kviMfLqm4t3+DVtr_Qk_kZaZt7ncA@mail.gmail.com
2024-04-09 14:04:02 +03:00
Ihor Radchenko 6d864526b7
org-offer-links-in-entry: Kill *Select Link* buffer on C-g
* lisp/org.el (org-offer-links-in-entry): When selection is aborted
via C-g, kill *Select Link* buffer.  This is useful when the location
of the buffer is customized via `display-buffer-alist' to be not in
the same frame - then, `save-window-configuration' is not enough get
rid of the temporary window.
2024-04-07 16:03:10 +03:00
Ihor Radchenko be80f4319f
fixup! Honor `display-buffer-alist' when creating dialogues
Fix Emacs <29 compatibility.
2024-04-07 16:02:35 +03:00
Ihor Radchenko 18fbb9985f
Honor `display-buffer-alist' when creating dialogues
* lisp/org-macs.el (org-display-buffer-split): New function to display
just the new buffer and current buffer visible in the frame.  To be
used as `display-buffer' ACTION parameter.
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
(org-agenda-fit-window-to-buffer):
(org-agenda-prepare-window):
(org-agenda-switch-to):
* lisp/org-capture.el (org-capture-place-template):
* lisp/org-goto.el (org-goto-location):
* lisp/org-src.el (org-src-switch-to-buffer):
* lisp/org.el (org-tree-to-indirect-buffer):
(org-fast-todo-selection):
(org-add-log-note):
(org-fast-tag-selection):
(org-submit-bug-report):
* lisp/ox.el (org-export--dispatch-ui): Get rid of calling
`delete-other-windows' manually.  Instead, make use of
`org-display-buffer-slip' + `pop-to-buffer'/`display-buffer'.  This
way, user overrides in `display-buffer-alist' are honored.
* lisp/org-plot.el (org-plot/gnuplot):
* lisp/org.el (org-offer-links-in-entry): When `delete-other-windows'
cannot be avoided, make it ignore errors in the frames where
displaying a lone window is forbidden.
2024-04-07 13:34:13 +03:00
Sławomir Grochowski cc3a13c1fe
lisp/org-colview.el: Add defcustom `org-columns-checkbox-allowed-values'
* lisp/org-colview.el Add defcustom
`org-columns-checkbox-allowed-values'.
(org-columns-next-allowed-value): Introduce variable
`org-columns-checkbox-allowed-values'.

This would allow to use more than two states ("[ ]", "[X]") in columns
with SUMMARY-TYPE that use checkbox ("X", "X/", "X%").  For example
you can add an intermediate state ("[-]").  Or empty state ("") to
remove checkbox.

* etc/ORG-NEWS: New option ~org-columns-checkbox-states~.
2024-04-06 15:54:35 +03:00
Ihor Radchenko ea6296a4d9
Consistently label fold types when `org-fold-core-style' is 'overlays
* lisp/org-clock.el (org-clock-find-position):
* lisp/org-compat.el (org-flag-drawer):
* lisp/org-src.el (org-edit-src-exit):
* lisp/org.el (org-log-beginning): Do not force 'outline folds when
`org-fold-core-style' is 'overlays.  The erroneous logic dates back to
the time when all the folding was done via 'outline folds to save up
on the number of overlays in buffer.  This is not longer the case -
newer Emacs no longer struggle with number of overlays and we fall
back to using text properties in older Emacs.

Reported-by: Bruno Cardoso <cardoso.bc@gmail.com>
Link: https://orgmode.org/list/87sezzmd1m.fsf@gmail.com
2024-04-06 15:21:10 +03:00
Ihor Radchenko b45b393265
lisp/ox.el (org-export-table-row-is-special-p): Fix docstring
Special rows may not be ignored depending on :with-special-rows option.
2024-04-05 17:03:41 +03:00
Ihor Radchenko d72feeb09b
lisp/ox.el (org-export-table-row-number): Clarify docstring 2024-04-05 17:03:40 +03:00
Ihor Radchenko eceb2fac4c
Merge branch 'bugfix' 2024-04-05 14:33:25 +03:00
Ihor Radchenko 22306682ff
doc/org-manual.org (Plain Lists): Add example of forced list numbering
Reported-by: Sharon Kimble <boudiccas@skimble09.plus.com>
Link: https://orgmode.org/list/87pmbwkqb2.fsf@localhost
2024-04-05 14:32:15 +03:00
Ihor Radchenko b2827aed98
org-dblock-write:columnview: Write width specifications
* lisp/org-colview.el (org-dblock-write:columnview): When writing
table, write width specifications as well and apply them.
* testing/lisp/test-org-colview.el (test-org-colview/dblock): Add
test.
* etc/ORG-NEWS (=colview= dynamic block now writes column width
specifications): Document the change.

Link: https://orgmode.org/list/87r1015w30.fsf@localhost
2024-04-05 14:14:04 +03:00
Ihor Radchenko d491a74fd9
fixup! lisp/ox-odt.el (org-odt-table): Add FIXME comment 2024-04-05 13:19:58 +03:00