* lisp/org-table.el (org-table--separator-space-pre): Make the
separator space non-sticky. Otherwise, typing text into shrunk table
made the text invisible.
* lisp/org-fold-core.el (org-fold-core-region):
(org-fold-core--isearch-show-temporary): Clear/restore folding
property in addition to 'invisible property when revealing folds
temporarily for the purposes of isearch. This is needed because fold
status is determined from that property, not just from 'invisible.
The old code sometimes treated temporarily displayed overlays as
folded, breaking `org-cycle'.
This patch adds options to org-babel-comint-with-output to skip prompt
removal. Allowing individual languages to handle this cleanup can be
more robust than relying on the generic ob-comint implementation.
This allows ob-python to switch back to using
`org-babel-comint-with-output' rather than its own bespoke
reimplementation, reducing code duplication. Furthermore, this adds a
new implementation of ob-R non-async session output evaluation, that
is similar to the ob-python approach in that it avoids leaking
prompts, rather than relying on the cleanup from
`org-babel-comint-with-output'. A test is added to test-ob-R.el to
demonstrate the improved robustness of the new approach; previously,
this test would fail due to a false positive prompt, but now passes.
* lisp/ob-comint.el (org-babel-comint--remove-prompts-p): New helper
function to parse the prompt-handling argument in
`org-babel-comint-with-output' and `org-babel-comint-async-register'.
(org-babel-comint-with-output): Add a new argument
to prevent extra processing for prompt cleanup. Also, search for the
end-of-execution sentinel within the collected output rather than the
comint buffer, which doesn't depend on the position of point during
evaluation.
(org-babel-comint-async-register): Move parsing of prompt-handling
argument to `org-babel-comint--remove-prompts-p'.
* lisp/ob-python.el: Require subr-x for Emacs 27 compatibility.
(org-babel-python-send-string): Switch to using
`org-babel-comint-with-output', rather than bespoke reimplementation.
* lisp/ob-R.el: Require subr-x for Emacs 27 compatibility.
(ess-send-string): Declare external function.
(org-babel-R-evaluate-session): New implementation of output
evaluation that avoids leaking prompts, by writing the code block to a
tmp file and then sourcing it.
* testing/lisp/test-ob-R.el (test-ob-r/session-output-with->-bol): New
test for robustness against false positive prompts at the beginning of
a line.
* lisp/org-mouse.el (org-mouse-context-menu): Fix `grep' command to
handle filenames starting with '-' by adjusting wildcard usage to
prevent misinterpretation as options.
* lisp/ob-comint.el (org-babel-comint-async-remove-prompts-p): New
variable to disable prompt removal in async output.
(org-babel-comint-async-filter): Check
`org-babel-comint-async-remove-prompts-p' before calling
`org-babel-comint--prompt-filter'.
(org-babel-comint-async-register): Added argument for whether prompts
should be removed from async output.
* lisp/ob-python.el (org-babel-python-async-evaluate-session): Set
option to inhibit prompt removal when registering async evaluators.
* lisp/ob-R.el (ob-session-async-org-babel-R-evaluate-session): Set
option to inhibit prompt removal when registering async evaluators.
* testing/lisp/test-ob-R.el (test-ob-R/async-prompt-filter): Test for
over-aggressive prompt removal.
* lisp/ox-texinfo.el (org-texinfo--match-definition): Consider :tag
being an anonymous node with multiple markup nodes. Convert it to
plain Texinfo beforehand, so that it is available as a plain text.
Add new optional argument INFO to be able to run Org AST for :tag ->
Texinfo text conversion.
(org-texinfo--separate-definitions): Pass INFO to
`org-texinfo--match-definition'.
* testing/lisp/test-ox-texinfo.el (test-ox-texinfo/definition): New
test case.
Reported-by: 8dcc <8dcc.git@gmail.com>
Link: https://orgmode.org/list/87wmi09tdx.fsf@gmail.com
* lisp/org.el (org-open-at-mouse): Suppress parser warning when
attempting to open fontified Org links outside Org mode (for example,
in agenda buffers). This is not a real fix - parser may still fail in
buffers where the surrounding link contents makes parser use
Org-specific local variables; but we at least recover from
deterioration of the behaviour when opening links worked _most of the
time_ without issues.
Reported-by: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
Link: https://orgmode.org/list/a864b26f-433e-49a8-8d58-74c9210e0fbd@gmail.com
* lisp/ox-texinfo.el (org-texinfo--sanitize-content): Sanitize commas
everywhere to make sure that we do not end up with text commas being
interpreted as argument separator in @command{arg1, arg2, ...}. This
approach will produce @comma{} even when it is not necessary, but it
is the safest approach.
(org-texinfo-plain-text): Update the comment.
* testing/lisp/test-ox-texinfo.el (test-ox-texinfo/escape-special-characters):
New test.
Reported-by: 8dcc <8dcc.git@gmail.com>
Link: https://orgmode.org/list/87set58skp.fsf@gmail.com
The check for appropriate context in `org-babel-header-arg-expand' was
inadequate: a colon was deemed appropriate anywhere in the source
block, not just in the header.
* lisp/ob-core.el (org-babel-header-arg-expand): The function now uses
`org-babel-in-src-block-header-p' to check for appropriate context.
(org-babel-in-src-block-header-p): New function.
Reported-by: use @Addlai on Emacs SE.
Link: https://list.orgmode.org/orgmode/87zfnrb2nu.fsf@pierrot.dokosmarshall.org/
* lisp/ob-clojure.el (org-babel-expand-body:clojure): Leave the
comments intact if the code block does not have :var.
Reported-by: "Anoop G R" <anoopemacs@gmail.com>
Link: https://list.orgmode.org/874j5azk2p.fsf@localhost/T/#t
TINYCHANGE
* lisp/org-refile.el (org-refile-get-targets): Calculate the file part
of the outline path once per file, improving the performance when
org-refile-use-outline-path is set to 'title.
* lisp/ox-texinfo.el (org-texinfo--split-definition): Do not store
definition options as :attr_texinfo read by
`org-export-read-attribute'. `org-export-read-attribute' is incapable
of reading literal nil. Instead, store the options literally, as is,
in a special non-standard syntax node property.
(org-texinfo-special-block): Make use of syntax node property used by
`org-texinfo--split-definition', when present.
* testing/lisp/test-ox-texinfo.el (test-ox-texinfo/definition): New
test.
Reported-by: 8dcc <8dcc.git@gmail.com>
Link: https://orgmode.org/list/87plo98a8g.fsf@gmail.com
* lisp/org-macs.el (org-unique-local-variables): Do not copy over
`buffer-file-name'. This may interact badly with `org-persist' and
`org-element' - `org-persist' assumes that all the buffers with a
given `buffer-file-name' are the same, which may not be true when
copying over variables into a temporary edit buffer (org-src).
* lisp/org-persist.el (org-persist-write:elisp): Add FIXME.
Reported-by: Akash Pal <akashpaul21@gmail.com>
Link: https://list.orgmode.org/orgmode/CA+6WspJ8J+iBzL+CQr5JTZUE5hhhHBrUunLw2naKpxwpv1DNqA@mail.gmail.com/
* lisp/org-footnote.el (org-footnote--allow-reference-p): New optional
argument indicating that the footnote reference is going to be
anonymous/inline. It is then allowed to be at bol.
(org-footnote-new): Check whether a footnote reference can be inserted
in place taking into account the footnote type.
* testing/lisp/test-org-footnote.el (test-org-footnote/new): New test
cases.
Reported-by: Suhail Singh <suhailsingh247@gmail.com>
Link: https://orgmode.org/list/877carzufa.fsf@gmail.com
* lisp/org-keys.el (org-up-heading): Add new alias for
`outline-up-heading'.
(org-mode-map): Remap `outline-up-heading' to the new alias.
(org-navigation-repeat-map, org-link-navigation-repeat-map)
(org-block-navigation-repeat-map): Add new repeat-maps to make
navigation easier.
* doc/org-manual.org (Repeating commands): Document the new feature in the manual.
* etc/ORG-NEWS (Some navigation commands can now be repeated): Announce it.
* lisp/org.el (org-comment-or-uncomment-region): When calculating
region boundaries inside src edit buffer, do not assume that region
length does not change - it may, when the indentation inside src edit
buffer is different from the Org buffer.
Reported-by: Stephanus Comnenus <linjt267@gmail.com>
Link: https://orgmode.org/list/CAHqtn=fWq6E5_pm72AB9vFxwjS0a8ma=UvVjMrgeivE9pa13ZQ@mail.gmail.com
TINYCHANGE
* org-colview.el (org-columns--collect-values): Accept an additional
optional argument AGENDA-MARKER.
(org-agenda-columns): Pass the position of the current agenda line to
org-columns--collect-values through AGENDA-MARKER. Use it to read the
'duration' property
Fixes the bug below.
Reported-by: Stanislav Vlasov
Link:
https://lists.gnu.org/archive/html/emacs-orgmode/2020-08/msg00090.html
also see the fix
Reported-by: Mamoru Miura
Link: https://lists.gnu.org/archive/html/emacs-orgmode/2022-07/msg00558.html
Previously, `org-agenda-columns' called `org-columns--collect-values' from
the buffer from which the agenda line originates. As a result,
`org-columns--collect-values' did not have access to the agenda line.
Mamoru Miura's solution recomputes the agenda-line. My current patch
adds an optional argument to `org-columns--collect-values' which can be
used to pass the position of the agenda line.
TINYCHANGE
* lisp/ob-core.el (org-babel-get-src-block-info): Use `copy-tree'
when using `org-babel-default-header-args*' variables to prepare the
`info' variable used in src block evaluation. The `info' variable gets
modified, and the modifications were affecting the values of the user
variables. In particular, the `:file' setting was modified in the presence
of a `:output-dir' setting, concatenating more and more copies of the directory
every time the block was evaluated.
Reported-by: @lyndhurst on SE Emacs
Link: https://emacs.stackexchange.com/questions/82261/
* lisp/org-persist.el (org-persist--write-cache):
* lisp/org-persist.el (org-persist-read):
(org-persist-write): Remove `org-persist--write-cache'. The values,
after reading, might sometimes be modified in place. The
modifications, when done inside some kind of deeply nested structure,
will propagate to the cache, polluting what was originally written in
the persist file.
This was a difficult bug to spot - the modification hapenned when an
Org buffer was saved to a different file (C-x C-w), modified, leading
to `org-element--cache' modification, and then closed. This
modification propagated to `org-persist--write-cache', leading to
incorrect cache value being assigned to the original buffer (before
C-x C-w).
Reported-by: Gregor Zattler <telegraph@gmx.net>
* lisp/ox-texinfo.el (org-texinfo-supports-math-p): Two
improvements: (1) Fix the incorrect `.info' extension used for the
temporary `.texi' file. This removes the warning "makeinfo: warning:
input file testXXX.info; did you mean testXXX.texi?" (2) Suppress
output when compiling the "Is math supported?" test file. This is to
avoid user confusion, as the user cares about their Texinfo file, not
implementation details. This removes the message "Processing Texinfo
file /var/.../testXXX.info...".
* lisp/org-id.el (org-id-find-id-file): Only fallback to the
current-buffer filename when it is an org-mode buffer. This avoids
accidental change of the major-mode when querying a non-existent id
from a non-org-mode buffer.
Reported-by: Visuwesh <visuweshm@gmail.com>
Link: https://list.orgmode.org/87ikuuwmz4.fsf@gmail.com/
* lisp/ob-core.el (org-babel-view-src-block-info): Query in-buffer
header arguments (`org-entry-get') from Org buffer. It does nothing
from *Help* buffer.
In the previous version, when the user interactively calls
`org-babel-view-src-block-info' and the point is on a code block, these
two warnings are shown in the buffer *Warnings*:
⛔ Warning (org-element): ‘org-element-at-point’ cannot be used in non-Org buffer #<buffer *Help*> (help-mode)
⛔ Warning (org-element): ‘org-element-at-point’ cannot be used in non-Org buffer #<buffer *Help*> (help-mode)
This happened because `org-babel-view-src-block-info'
calls (org-entry-get (point) "header-args" t) while being in
the *Help* buffer. `org-babel-view-src-block-info' should call
org-entry-get while being in the Org Mode buffer and then switch to
the *Help* buffer once it has all the information that is then
displayed in the *Help* buffer.
In the introduced changes, we execute (org-entry-get (point)
"header-args" t) while being in the Org Mode buffer and we switch
to *Help* when we have the necessary information that is then shown in
the *Help* buffer.
TINYCHANGE