* lisp/ob-tangle.el (org-babel-tangle-single-block): Explicitly move
to the beginning of title instead of assuming that
`org-back-to-heading' sets match data appropriately (it is not
documented to do so).
* testing/lisp/test-ob-tangle.el (ob-tangle/comment-org): Add test.
Reported-by: Nick Dokos <ndokos@redhat.com>
Link: https://orgmode.org/list/87bkh8k3at.fsf@alphaville.usersys.redhat.com
* lisp/org-fold-core.el (org-fold-core-cycle-over-indirect-buffers):
Clear folds from killed indirect buffers once only. Avoid calling
`remove-text-properties' when there is nothing to remove.
* lisp/org-fold-core.el (org-fold-core--fix-folded-region): Ignore
deletions more aggressively, avoiding the calls to
`org-fold-core-cycle-over-indirect-buffers'.
* lisp/org-element.el (org-element-cache-map): Fix when DATA is
obsolete after buffer modification.
* testing/lisp/test-org.el (test-org/map-entries): Add test.
Reported-by: Victor A. Stoichita <victor@svictor.net>
Link: https://orgmode.org/list/87v8fzxbfo.fsf@svictor.net
* lisp/org.el (org-display-inline-images): inline display of attached
images in link descriptions.
Previously, `org-display-inline-images' only inlined images in link
descriptions when they were explicit "file:" links. This change adds
support for "attachment:" links. E.g.:
[[https://orgmode.org][attachment:emacs-screenshot.png]]
Set `org-map-continue-from' in the hook as otherwise the example won't
work if user try the example on buffer with headings not separated by
contents or empty lines.
Reported-by: Victor A. Stoichita <victor@svictor.net>
Link: https://orgmode.org/list/877csf6yva.fsf@svictor.net
* lisp/ob-C.el (org-babel-C-val-to-C-type): Floats should be printed
as string literals to prevent rounding introduced by %f format.
* testing/lisp/test-ob-C.el (ob-C/float-var): Test that floats are not
rounded when passed as an org :var.
Both Org bugfix's 52dc48050 (Handle compiler warnings from Emacs
master, 2023-04-27) and Emacs master's 4f0849a9e6d (Remove unused
values in effect context, 2023-04-09) comment out an unused condition
in org-babel-insert-result to silence a compiler warning that's new to
the Emacs master branch. However, the changes are slightly different,
so the next sync to emacs-29 will trigger a conflict when merged to
master.
Takes Emacs's variant to 1) avoid the conflict and 2) undo the
unrelated space change from Org's variant. (52dc48050 improved the
comment slightly, but it's not worth the conflict.)
* lisp/ob-core.el (org-babel-insert-result): Silence
ignored-return-value warnings about calls to side-effect-free
functions in the last clause of `cond` statements whose values are
unused.
Remove unused values in effect context
4f0849a9e6d29e25d23e061bd81bacce9468856d
Mattias Engdegård
Sun Apr 9 16:45:40 2023 +0200
* lisp/ob-core.el (org-babel-insert-result): Comment out unused `cond'
clause. Still leave it there for readability of the logic.
* lisp/org.el (org-agenda-restrict-begin):
(org-agenda-restrict):
(org-agenda-restrict-end): Mark variables from org-agenda.
Fix build when Org's version changes
* lisp/org/org-macs.el (org--inhibit-version-check): Rename from
'org--built-in-p' and make it a defvar. All users changed.
(Bug#62762)
62e4eb8fcf71a852117b372809bd4a7953f9b679
Eli Zaretskii
Mon Apr 24 14:16:05 2023 +0300
* lisp/oc.el (org-cite-activate): Discard match data set by activate
function. We already move the point after citation by force, so can
as well ensure that match-data remain accurate for later font-lock
use.
Reported-by: Lin Jian <me@linj.tech>
Link: https://orgmode.org/list/87sfczztg6.fsf@linj.tech
(org-agenda-highlight-todo): Use `propertize' that copies the argument
string instead of `org-add-props'. Otherwise, if the compiler
optimizes string constants into a single object, the properties may
populate in unexpected places.
Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
Link: https://orgmode.org/list/CAM9ALR95F_ZHV2_WsqAz0-35-S2rwxbHqsA5VGftvq51Yz3ZAQ@mail.gmail.com
* lisp/org-macs.el (org--built-in-p): New constant indicating if Org
source is a part of Emacs source tree.
(org-assert-version): Skip check when Org is built-in.
* lisp/ob-tangle.el (org-babel-tangle-default-file-mode): The docstring
states that it the default value is read-write for the user, read only
for everyone else. This is not consistent with the default value which
is actually read-*execute* for the user, read only for everyone else.
The default value is updated to be read-write for the user, as stated in
the docstring.
Reported-by: Ruijie Yu <ruijie@netyu.xyz>
Link: https://list.orgmode.org/orgmode/sdv3554xtat.fsf@fw.net.yu
* lisp/ob-tangle.el (org-babel-interpret-file-mode): When specifying a
file mode in the "rw-r--r--" style, this is interpreted by splicing the
user, group, and other compenents into a "u=rw,g=r,o=r" style string and
applying `file-modes-symbolic-to-number`. For correct interpretation,
we need to ensure the dashes are removed in this process.
* 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.
* 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/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.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/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
* 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.