* lisp/org-element.el (org-element--cache-self-verify): Switch to nil
by default, disabling costly cache self-verification. This is
relatively safe as no relevant bug reports have been submitted for a
while. Also, the most critical cache failures are still monitored.
* lisp/org.el (org-image-max-width): New custom variable controlling
max inline image width.
(org--create-inline-image): Use the new variable.
* doc/org-manual.org (Images):
* etc/ORG-NEWS (New customization ~org-image-max-width~ limiting the
displayed inline image width): Document the new variable.
* testing/lisp/test-ob-fortran.el (ob-fortran/wrong-list):
(ob-fortran/compiler-flags): Uncomment the tests, making sure that
error buffer is displayed.
* org-table.el (org-self-insert-command): Use `last-command-event'
instead of `last-input-event'. Using `last-input-event' causes
problems in the presence of `evil-escape'. Consider a buffer that has
`orgtbl-mode' enabled while evil-escape is in use. Assume the
evil-escape sequence is "fd". Typing "f RET" will instead insert "RET
RET" into the buffer, since `last-input-event' is "RET", but
`last-command-event' is "f".
TINYCHANGE
* lisp/org-habit.el (org-habit-get-priority): Rename to
`org-habit-get-urgency'.
* lisp/org-compat.el (org-habit-get-priority): Obsolete the old name.
* lisp/org-agenda.el (org-agenda-sorting-strategy):
* lisp/org-agenda.el (org-search-view):
(org-agenda-get-todos):
(org-agenda-get-timestamps):
(org-agenda-get-progress):
(org-agenda-get-deadlines):
(org-agenda-get-scheduled):
(org-agenda-get-blocks):
(org-entries-lessp): Alter priority-up and priority-down sorting
strategies to only sort by actual priority. Rename the previous
composite sorting rank to urgency, corresponding to the new urgency-up
and urgency-down sorting strategies. Store the new rank in 'urgency
text property. Update the docstrings accordingly. Use `urgency-down'
in place of `priority-down' in the default sorting strategy.
(org-set-sorting-strategy): Use `urgency-down' in place of
`priority-down'.
* etc/ORG-NEWS ("Priority" used to sort items in agenda is renamed to
"urgency"): Document the change.
* doc/org-manual.org (Sorting of agenda items): Update manual using
"urgency" term in place of confusing "priority".
Thanks to Samuel Wales for the idea how to fix the inconsistency.
Reported-by: Jonas Olofsson <jonas.olofsson@apple.com>
Link: https://orgmode.org/list/26396316-1201-4D88-9D81-C87DDDA8885A@apple.com
* lisp/ox-html.el (org-html--id-attr-prefix):
* lisp/ox-odt.el (org-odt--id-attr-prefix): Refactor hardcoded "ID-"
as a new private variable.
* org/ox-html.el (org-html--reference): Add support for the ID
property (previously only supported CUSTOM_ID).
These changes make crossfile ID links work in the exported HTML when
`org-html-prefer-user-labels' is not-nil.
Fixes issue where the ox-icalendar export uses an inconsistent mix of
dos and unix style line endings.
* lisp/ox-icalendar.el (org-icalendar-fold-string): No longer converts
to CRLF, instead delegating that to `org-icalendar--post-process-file'.
(org-icalendar--post-process-file): New function to handle exported
file post-processing. Converts EOL to CRLF, and then runs
`org-icalendar-after-save-hook'.
(org-icalendar-export-to-ics, org-icalendar-export-current-agenda,
org-icalendar--combine-files): Call `org-icalendar--post-process-file'
instead of running `org-icalendar-after-save-hook' directly.
* testing/lisp/test-ox-icalendar.el: New file for unit tests of
ox-icalendar. Add an initial test for CRLF line endings.
See also:
https://list.orgmode.org/87o7oetneo.fsf@localhost/T/#m3e3eb80f9fc51ba75854b33ebfe9ecdefa2ded24https://list.orgmode.org/orgmode/87ilgljv6i.fsf@localhost/
* lisp/ob-exp.el (org-babel-exp-results): Display warning when babel
does not know how to execute exported code block and :results
demands results to be exported.
* lisp/ob-exp.el (org-babel-exp-process-buffer): Do not use
`save-window-excursion'.
* lisp/ox.el (org-export-dispatch):
(org-export--dispatch-ui): Use `save-window-excursion' only when
displaying the dispatch interface.
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Allow fontifying
src blocks with language specification missing.
* lisp/org-src.el (org-src-block-faces): Clarify in the docstring that
"" language name referes to src blocks with no language. Remove
redundant :version tag.
* etc/ORG-NEWS (~org-src-block-faces~ now accepts empty string ~""~ as
language name): Announce the change.
Link: https://orgmode.org/list/99388ff3711696091f0312a5c3f0bcbd@kragelund.me
* lisp/ob-haskell.el (org-babel-haskell-export-to-lhs): Use
non-interactive `insert-file-contents' + `write-region' to avoid
triggering various interactive hooks. Ensure that temp files are
always deleted.
* lisp/org-agenda.el (org-agenda-write):
* lisp/org-table.el: Simplify code using `write-region'.
* lisp/ox-odt.el (org-odt-template): Use `insert-file-contents' +
`write-region' instead of `find-file-noselect' that may trigger
various hooks. The new approach makes `revert-buffer' not
necessary (and do not trigger `revert-buffer' hooks). Also, the
problem with backups will no longer exists.
Original idea: https://list.orgmode.org/orgmode/20221002035931.12191-1-dafydd.lukes@gmail.com/
* doc/org-manual.org (Summary of In-Buffer Settings): Clarify that
only in-buffer settings are considered in SETUPFILE. Other contents
is ignored. Split the explanation into multiple paragraphs.
Reported-by: Bruno BEAUFILS <bruno.beaufils@univ-lille.fr>
Link: https://orgmode.org/list/20230216235224.7g5xdlkcnw2z4k3n@settat
* lisp/ob-comint.el (org-babel-comint-with-output): Do not try to
filter out prompts in `comint-output-filter-functions'. The prompts
may arrive there arbitrarily - multiple prompts together, partial
prompts, full prompts, etc. For example "ghci> " prompt may arrive as
"gh" + "ci> " with second part still matching `comint-prompt-regexp'.
As a result, if we keep using `comint-output-filter-functions', the
split prompts may sometimes retain their initial part, littering the
results. Now, we postpone filtering to after receiving the output,
still making sure that agglomerated prompts gets filtered using a
custom regexp derived from `comint-prompt-regexp'.
* lisp/ob-comint.el (org-babel-comint-with-output): Consider that
comint can sometimes agglomerate multiple prompts together even within
a single output increment as passed to
`comint-output-filter-functions'.
Example in GHC comint buffer:
GHCi, version 9.0.2: https://www.haskell.org/ghc/ :? for help
ghci> ghci> :{
main :: IO ()
main = putStrLn "Hello World!"
:}
main
"org-babel-haskell-eoe"
ghci| ghci| ghci| ghci> ghci> Hello World!
ghci> "org-babel-haskell-eoe"
ghci>
* lisp/ob-python.el (python-shell-buffer-name): Remove unneeded
defvar.
(org-babel-python-initiate-session-by-key): Check if session already
existed before run-python. Only wait for initialization if it's a
newly started session. Also simplify the code a bit by combining
multiple setq and let statements into a single let statement. Also
add a comment about why adding to `python-shell-first-prompt-hook'
after `run-python' should be safe from race conditions.
* lisp/org.el (org-remove-timestamp-with-keyword): Use `delete-char'
instead of for-interactive-use-only `backward-delete-char'.
(org-fast-tag-selection): Remove unnecessary `condition-case'.
(org-delete-backward-char): Make it explicit that we fall back to
normal interactive call.
Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62518
* lisp/org-macs.el (org-sxhash-safe): New function to calculate object
hashes. Unlike `sxhash', the new function ensures that
if (= (org-sxhash-safe A) (org-sxhash-safe b)) then (equal A B)
Not just the opposite.
* lisp/ob-core.el (org-babel-temp-stable-file): Use the new function.
Reported-by: Thomas Worthington <thomas.worthington@cosector.com>
Link: https://orgmode.org/list/877cwrcdh2.fsf@localhost
* lisp/org-fold.el (org-fold-show-children): Clarify the docstring
emphasizing that direct children are always displayed. Fix
grandchildren being displayed when the first child has deeper level
than the next children.
* lisp/ob-comint.el (org-babel-comint-with-output): Do not try to
filter out prompts in `comint-output-filter-functions'. The prompts
may arrive there arbitrarily - multiple prompts together, partial
prompts, full prompts, etc. For example "ghci> " prompt may arrive as
"gh" + "ci> " with second part still matching `comint-prompt-regexp'.
As a result, if we keep using `comint-output-filter-functions', the
split prompts may sometimes retain their initial part, littering the
results. Now, we postpone filtering to after receiving the output,
still making sure that agglomerated prompts gets filtered using a
custom regexp derived from `comint-prompt-regexp'.
* lisp/ob-comint.el (org-babel-comint-with-output): Consider that
comint can sometimes agglomerate multiple prompts together even within
a single output increment as passed to
`comint-output-filter-functions'.
Example in GHC comint buffer:
GHCi, version 9.0.2: https://www.haskell.org/ghc/ :? for help
ghci> ghci> :{
main :: IO ()
main = putStrLn "Hello World!"
:}
main
"org-babel-haskell-eoe"
ghci| ghci| ghci| ghci> ghci> Hello World!
ghci> "org-babel-haskell-eoe"
ghci>
* lisp/org-clock.el (org-logind-dbus-session-path): Do not try to use
dbus when `dbus-call-method' errs.
`dbus-call-method' may throw
Debugger entered--Lisp error: (dbus-error "org.freedesktop.login1.NoSessionForPID" "PID 7361 does not belong to any known session")
Do not try to use dbus method in such scenario.
Link: https://builds.sr.ht/~bzg/job/961763
* lisp/org.el (org-at-date-range-p):
(org--math-p):
(org-first-sibling-p): Remove interactive spec.
Predicates like `org-first-sibling-p' are no use when called
interactively, and should not appear in the M-x prompt.
TINYCHANGE
* lisp/org-timer.el (org-logind-dbus-session-path): New variable.
(org-logind-user-idle-seconds): New function.
(org-user-idle-seconds): Use them.
* etc/ORG-NEWS (Add support for ~logind~ idle time in
~org-user-idle-seconds~): Document the new feature.
* ob-shell.el (org-babel-sh-evaluate): Add condition for async within
session. Allow :async header argument to be either t or blank.
* test-ob-shell.el:
(test-ob-shell/session-async-valid-header-arg-values): Check that
:async header works for both t and blank values.
(test-ob-shell/session-async-inserts-uuid-before-results-are-returned):
Check that UUID is used as placeholder until results return.
(test-ob-shell/session-async-evaluation): Check that asynchronously
evaluated results are eventually placed in the buffer.
Link: https://list.orgmode.org/186283d230a.129f5feb61660123.3289004102603503414@excalamus.com/
* ob-R.el (ob-session-async-org-babel-R-evaluate-session): Use
`org-id-uuid' instead of `md5' as results placeholder.
* ob-python.el (org-babel-python-async-evaluate-session): Use
`org-id-uuid' instead of `md5' as results placeholder.
* org-id.el (org-id-uuid): Move to org-macs.el.
* org.el (org-uuidgen-p): Move to org-macs.el. Expose regexp used to
match UUID.
* org-macs.el (org-uuid-regexp): Refactor `org-uuidgen-p' to expose
regexp used to match UUID.
* lisp/org-element.el (org-element-headline-parser): Allow empty title
with tags. Do not consider space after COMMENT to be a part of title.
*
testing/lisp/test-org-element.el (test-org-element/headline-todo-keyword):
Add tests.
Reported-by: Leo Butler <Leo.Butler@umanitoba.ca>
Link: https://orgmode.org/list/87zg8t4zgo.fsf@localhost
* lisp/org-element.el (org-element-headline-parser): Allow end of line
instead of space after todo keyword.
*
testing/lisp/test-org-element.el (test-org-element/headline-todo-keyword):
Add new test.