* 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.
* lisp/ox-texinfo.el (org-texinfo-supports-math-p): Consider
compilation error as indication that math is not supported. texinfo
compiler throws "unknown command `displaymath'" error in such case,
causing `org-texinfo-compile' to err as well.
Fixes CI tests failures when testing with Texinfo versions with no
math support.
https://builds.sr.ht/~bzg/job/959487
* doc/org-manual.org (LaTeX fragments): Do not state that dash is
allowed after single "$" math delimiter and recommend "\(...\)".
Detection of "$-" as closing math delimiters has been broken since 2015
as a side effect of using punctuation class in regular expressions while
dash is considered as a word constituent. See commits
6779f8f424 and c0369a7984. Bring the manual in accordance to the code
instead of allowing "($-2 change)" false positives. Users who do not
like "\(...\)" constructs may use a helper for typing it and may change
how it is displayed to minimize visual noise by fontification, see
- Eric S Fraga to emacs-orgmode. Re: Depreciating TeX-style LaTeX
fragments. Sun, 16 Jan 2022 12:10:30 +0000.
<https://list.orgmode.org/87k0ezdgp5.fsf@ucl.ac.uk>
- Ihor Radchenko to emacs-orgmode. Re: [PATCH] Add support for $…$ latex
fragments followed by a dash. Thu, 27 Jan 2022 16:28:10 +0800.
<https://list.orgmode.org/87r18t7fc5.fsf@localhost>
* lisp/org-agenda.el (org-agenda-run-series): Fix arguments in the
call. "agenda*" should include appointments and thus HOURS argument
should be non-nil. See `org-agenda' for analogous call.
* lisp/ob-clojure.el (org-babel-clojure-backend): Add support for
clojure-cli.
* lisp/ob-clojure.el (org-babel-clojurescript-backend): Move nbb to
clojurescript.
* lisp/ob-clojure.el (org-babel-expand-body:clojure)
* lisp/ob-clojure.el (ob-clojure-eval-with-cider): Return only the
last expression when :results is not set or value, and return only
stdout when :results is set to output.
* lisp/ob-clojure.el (ob-clojure-eval-with-cmd): Rename function as
it is not only for babashka.
* lisp/ob-clojure.el (org-babel-execute:clojure): Differentiate
between Clojure and ClojureScript source blocks.
The problem was that the ob-clojure results where not correctly
taking the results parameter into account.
E.g. with the cider backend, you would get all printed or returned
values for each line in your block:
(def small-map {:a 2 :b 4 :c 8})
{:some :map}
(prn :xx)
(:b small-map)
| #'user/small-map |
| {:some :map} |
| 4 |
or for babashka you would only get the printed values but not the
last return value:
(def small-map {:a 2 :b 4 :c 8})
{:some :map}
(prn :xx)
(:b small-map)
: :xx
Now when you specify :results value, the result is only the last
returned value, and with :results output you get all values
printed to stdout.
So the examples above would all result in the same:
(def small-map {:a 2 :b 4 :c 8})
{:some :map}
(prn :xx)
(:b small-map)
: 4
* lisp/ox-latex.el (org-latex-paragraph): If export creates single
paragraph contents with empty lines, remove the empty lines to ensure
that we retain a single paragraph.
Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://orgmode.org/list/tufdb6$11h2$1@ciao.gmane.io
* org-agenda.el (org-prepare-agenda): Don't reset
`org-todo-keywords-for-agenda' when org-agenda-multi.
Fixes a bug with TODO keywords that came to light in org-modern,
see https://github.com/minad/org-modern/issues/26.
This is very similar to cd2d138883,
which fixed the same for `org-done-keywords-for-agenda` (to fix
a similar styling issue).
TINYCHANGE
* lisp/org.el (org-read-date): When DEFAULT-TIME time provided, prefer
it even when `org-extend-today-until' dictates -1 day shift. We
should only consider `org-extend-today-until' for actual today times,
not for future dates, where is becomes confusing.
Reported-by: Tim Ruffing <crypto@timruffing.de>
Link: https://orgmode.org/list/3489c1917ad4be0625ea5f0b2c1b0f2b72ea39e9.camel@timruffing.de