Commit Graph

27681 Commits

Author SHA1 Message Date
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
Ihor Radchenko 95b494a862
lisp/ox-odt.el (org-odt-table): Add FIXME comment 2024-04-05 13:17:27 +03:00
Ihor Radchenko ef43642874
lisp/ox-odt.el (org-odt-item): Fix table hack inside nested list
* lisp/ox-odt.el (org-odt-item): When exporting table inside a list,
fix scenario when the table is located inside a sub-list of another
list.

Reported-by: Christian Moe <mail@christianmoe.com>
Link: https://orgmode.org/list/87edxn9z7n.fsf@localhost
2024-04-05 13:17:23 +03:00
Ihor Radchenko 9bff93f19a
Update version number for the 9.6.25 release 2024-04-05 10:29:48 +03:00
Stefan Monnier 90045c45e2
org-element--cache-after-change: Remove redundant setq
* lisp/org-element.el (org-element--cache-after-change):
`org-element--cache-after-change' already changes
`org-element--cache-change-warning' by side effect.  No need to assign
it.
2024-04-04 20:11:04 +03:00
Ihor Radchenko e965d26edb
Merge branch 'bugfix' 2024-04-04 19:17:22 +03:00
Lee Thompson 9895ed3968
doc/org-manual.org (Header and sectioning structure): Corrected info mixup
TINYCHANGE
2024-04-04 19:14:49 +03:00
Ihor Radchenko c8d1338365
org-html-htmlize-generate-css: Do not omit faces without :inherit property
* lisp/ox-html.el (org-html-htmlize-generate-css): Fix not adding
faces without :inherit property to the generated css.  Update the
docstring, detailing that the css class names are the face names with
`org-html-htmlize-font-prefix' prepended.
2024-04-04 14:18:37 +03:00
Ihor Radchenko 0f11d21cb6
Merge branch 'bugfix' 2024-04-03 15:07:08 +03:00
Morgan Smith 3e61311c71
org-manual: Document Org Plot option "timeind"
* doc/org-manual.org (Plot options): Document "timeind".  Also fix the
formatting for a couple other entries.
2024-04-03 15:06:24 +03:00
Ihor Radchenko f6876d73b3
etc/ORG-NEWS: Fix typos
* etc/ORG-NEWS (=.avif= images are now recognized in ~org-html-inline-image-rules~):
(Blank lines after removed objects are now retained during export):
"are not" -> "are now".
2024-04-03 15:01:14 +03:00
Ihor Radchenko ce5e8ecbb8
Prioritize underline over subscript inside parenthesis
* lisp/org-element.el (org-element--object-lex): Prioritise underline
parser over subscript.  `org-element-underline-parser' is more strict
compared to `org-element-subscript-parser'.
* testing/lisp/test-org-element.el (test-org-element/underline-parser):
Add test.
* etc/ORG-NEWS (Underline syntax now takes priority over subscript
when both are applicable): Announce the breaking change.

Reported-by: Juan Manuel Macías <maciaschain@posteo.net>
Link: https://list.orgmode.org/87v8z52eom.fsf@posteo.net/T/#t
2024-04-01 15:32:14 +03:00
Max Nikulin a3bcb55365
test-org.el: Add new LaTeX to MathML tests for shell escaping
* testing/lisp/test-org.el (test-org/format-latex-as-html)
(test-org/create-math-formula): New tests for escaping of shell specials
in commands executed by `org-format-latex-as-html'
and `org-create-math-formula'.

These tests do not require applications for conversion of LaTeX
snippets and use simple shell commands instead.
2024-04-01 14:21:49 +03:00
Ihor Radchenko a698d073a1
org-latex-to-mathml/html-convert-command: Prevent shell expansion
* lisp/org.el (org-create-math-formula):
(org-format-latex-as-html): Shell-quote LaTeX fragment text when
replacing %i placeholder.  This prevents shell expansion of
$... and similar constructs inside the code.
(org-latex-to-mathml-convert-command):
(org-latex-to-html-convert-command): Update the docstring.
* etc/ORG-NEWS (~org-latex-to-mathml-convert-command~ and
~org-latex-to-html-convert-command~ shell-escape LaTeX code): Announce
the breaking change.
* doc/org-manual.org (LaTeX math snippets): Update example.

Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://orgmode.org/list/735645dd-1ddf-4579-a6dd-2700f3e83c94@gmail.com
2024-04-01 14:13:15 +03:00
Ihor Radchenko 1d86651bef
org--collect-keywords-1: Ignore #+SETUPFILE when its file handler errs
* lisp/org.el (org--collect-keywords-1): When `expand-file-name'
handler errs on #+SETUPFILE, ignore it.  An error may be thrown when
by custom file handler (for example, by TRAMP handler on GVFS path
when `tramp-gvfs-enabled' is nil; which is the default).

Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://orgmode.org/list/uue18j$j42$1@ciao.gmane.io
2024-04-01 14:04:50 +03:00
Ihor Radchenko 4c902d4771
doc/org-manual.org: Do not abbreviate links when editing the manual
Filling paragraphs depends on the hidden parts of the links, making
contributor edits dependent on the `org-link-descriptive'
customization.  Make filling consistent by not hiding link paths in
the org-manual.org specifically.
2024-04-01 12:55:52 +03:00
Ihor Radchenko 462bbb213a
Make sure that commented headings appear commented
* lisp/org.el (org-set-font-lock-defaults): Apply 'org-special-keyword
face to commented headings last, so that every markup inside look dim,
as per 'org-special-keyword face.
2024-03-31 14:50:49 +03:00
Ihor Radchenko d3878cb6fe
Consistently combine markup and the containing element faces during fontification
* lisp/org-src.el (org-fontify-inline-src-blocks-1):
* lisp/org.el (org-fontify-macros):
* lisp/org.el (org-activate-footnote-links):
(org-set-font-lock-defaults):  Prepend faces during
activation instead of overriding.  Add a comment explaining the
general rule how we combine faces.
* etc/ORG-NEWS (Org mode faces are now consistently combined, with
markup faces taking precedence over the containing element faces):
Document the breaking change.

Reported-by: StrawberryTea <look@strawberrytea.xyz>
Link: https://orgmode.org/list/875xy21e49.fsf@localhost
2024-03-31 14:41:07 +03:00
Ihor Radchenko c0e732266b
org-file-contents: Improve comment
* lisp/org.el (org-file-contents): Link to an example when
`file-remote-p' may throw an error.
2024-03-30 13:01:17 +03:00
Matthew Trzcinski e9c288dfac lisp/ob-comint.el: Fix prompt appearing in async shell results
* lisp/ob-comint.el (org-babel-comint-async-filter): Call prompt
`org-babel-comint--prompt-filter'

Reported-by: "Matthew Trzcinski" <matt@excalamus.com>
Link: https://list.orgmode.org/18d753c1e8a.cfb3e1921191837.5665565128507976741@excalamus.com/
2024-03-29 12:11:18 +01:00
Matthew Trzcinski 0102988afb testing/lisp/test-ob-shell.el: Test async prompt removal
* testing/lisp/test-ob-shell.el (test-ob-shell/session-async-results):
Create test verifying bug report that shell prompt appears in async
results.
2024-03-29 12:11:18 +01:00
Matthew Trzcinski 574e04d119 lisp/ob-comint.el: Refactor `org-babel-comint-with-output'
* lisp/ob-comint.el (org-babel-comint-with-output): Replace logic for
prompt and echo filtering with `org-babel-comint--prompt-filter' and
`org-babel-comint--echo-filter'.  Delete
`org-babel-comint-prompt-separator' variable and move related comment
to `org-babel-comint--prompt-filter'.
2024-03-29 12:11:18 +01:00
Matthew Trzcinski 3776eba2f7 lisp/ob-comint.el: Create comint echo filter
* lisp/ob-comint.el (org-babel-comint--echo-filter): Extract echo
filtering logic from `org-babel-comint-with-output' into a new
function.
2024-03-29 12:11:18 +01:00
Matthew Trzcinski c2b763dd14 testing/lisp/test-ob-comint.el: Make test for echo filter
* test-ob-comint.el:
(test-org-babel-comint/echo-filter-removes-echo): Test that echoed
input is removed from process buffer output.
2024-03-29 12:11:18 +01:00
Matthew Trzcinski 227cbb5359 lisp/ob-comint.el: Create comint prompt filter
* lisp/ob-comint.el (org-babel-comint--prompt-filter): Extract prompt
filtering logic from `org-babel-comint-with-output' into a new
function.
2024-03-29 12:11:18 +01:00
Matthew Trzcinski 820a99b171 testing/lisp/test-ob-comint.el: Make test for prompt filter
* test-ob-comint.el:  Make new file for comint tests.
(test-org-babel-comint/prompt-filter-removes-prompt): Test that the
prompt is removed from process buffer output.
2024-03-29 12:11:18 +01:00
Ross Timson 1be2f96931
lisp/ox-html.el: Add avif support for html export inline images
* lisp/ox-html.el (org-html-inline-image-rules): Add AVIF image
support for inline images on HTML export.

AVIF is well supported by browsers these days and offers similar
features and much better compression than the other image formats
commonly used for the web.

TINYCHANGE
2024-03-27 15:11:40 +03:00
Ihor Radchenko 3f20e32f8e
org-element-clock-parser: Do not be case-sensitive
* lisp/org-element.el (org-element-clock-parser): Fix demanding
upcased "CLOCK:" string.  As per general Org mode syntax principle,
keywords in Org mode are case-insensitive.
* testing/lisp/test-org-element.el (test-org-element/clock-parser):
Add test.

Reported-by: Gregor Zattler <telegraph@gmx.net>
Link: https://orgmode.org/list/875xx8mvvn.fsf@no.lan
2024-03-27 14:57:17 +03:00
Ihor Radchenko 5bdfc02c6f
Update version number for the 9.6.24 release 2024-03-26 22:45:33 +03:00
Laurence Warne 990b89d324
Create commands for `org-read-date-minibuffer-local-map'
Create commands for `org-read-date-minibuffer-local-map' for use in
place of the inline lambda commands in order to aid user discoverability.

* org.el (org-calendar-goto-today-or-insert-dot)
(org-calendar-goto-today, org-calendar-backward-month)
(org-calendar-forward-month, org-calendar-backward-year)
(org-calendar-forward-year, org-calendar-backward-week)
(org-calendar-forward-week, org-calendar-backward-day)
(org-calendar-forward-day, org-calendar-view-entries)
(org-calendar-scroll-month-left, org-calendar-scroll-month-right)
(org-calendar-scroll-three-months-left)
(org-calendar-scroll-three-months-right): New functions.
* org-keys.el (org-read-date-minibuffer-local-map): Use the new
functions for keybindings instead of inline functions.

TINYCHANGE
2024-03-26 18:04:23 +03:00
Ihor Radchenko a3bd978e15
Merge branch 'bugfix' 2024-03-26 14:44:52 +03:00
Ihor Radchenko 6223f20a64
org-map-entries: Fix when buffer is not a file buffer and SCOPE is nil
* lisp/org.el (org-map-entries): Avoid triggering check for existence
of file on FS when SCOPE is nil.

Link: https://old.reddit.com/r/emacs/comments/1bnhz24/bug_nonexistent_agenda_file_s/
2024-03-26 14:36:53 +03:00