* lisp/ob-comint.el (org-babel-comint-with-output): Sometimes, REPL
can split whitespace between sequence of prompt prompt prompt.
In particular, inf-ruby did this on multiline input.
See: https://list.orgmode.org/87ttsnh5bx.fsf@localhost/T/#t
* lisp/ob-python.el (org-babel-python-initiate-session-by-key): Switch
from `org-babel-comint-wait-for-output' to `sleep-for' while waiting
for `org-babel-python--initialized', to prevent hanging on restarted
Python process.
* lisp/ox-texinfo.el (org-texinfo--match-definition): It is safe to
drop `save-match-data' as the function modifies the match data anyway,
and `save-match-data' does not affect anything else.
* lisp/org-refile.el (org-refile-get-targets): Throw better errors
when `org-refile-targets' value is malformed. Allow common mistake
with not using a cons cell in the target description.
* lisp/org-fold-core.el (org-fold-core-get-folding-spec-from-alias):
Do not put ":alias" as an actual alias. The code did not account that
`assq' returns the whole cons cell, not just value of the alist item.
("cider"): Remove assertions for cider. Clojure supports more than cider.
(ob-clojure/simple-session):
(ob-clojure/initiate-session):
(ob-clojure/initiate-session-with-var): Remove session tests -
ob-clojure has no session support.
(ob-clojure/tangle-without-ns): Remove tangle test - it has no
relation to ob-clojure.
Add FIXME to implement some tests, as we end up with 0 ob-clojure
tests after this commit.
Link: https://orgmode.org/list/87v8d4ivqh.fsf@localhost
* lisp/ox.el (org-export-expand-include-keyword): Do not wrap
`org-element-at-point' into `save-match-data'. The search data from
`re-search-forward' is unused in the code and `save-match-data' call
is costly.
* lisp/ob-core.el (org-babel-parse-multiple-vars):
(org-babel-goto-named-src-block):
(org-babel-goto-named-result): Describe all the function arguments in
the docstring.
* lisp/ox-latex.el (org-latex-inline-src-block):
(org-latex-src-block): Update the warning text, explicitly mentioning
the variable name to be adjusted.
Reported-by: Guillaume MULLER <guillaume.muller@emse.fr>
Link: https://orgmode.org/list/b5c056cb-3258-4a11-2d9b-33c97b112d62@emse.fr
* lisp/oc-basic.el (org-cite-basic--parse-bibliography): Use
`file-truename' to follow symlinks first before checking bibliography
file change times.
Reported-by: Leo Butler <Leo.Butler@umanitoba.ca>
Link: https://orgmode.org/list/877cpmkds1.fsf@t14.reltub.ca
The docstring was not accurate from the times when group information
was added to it. The patch uses the groups, as they appear in the
function code itself.
* lisp/ob-ruby.el (org-babel-ruby-prompt):
(org-babel-ruby-define-prompt): New variables used to set appropriate
unique prompt and disable echo in session.
(org-babel-ruby-initiate-session): Setup prompt and echo during
session initialization.
(org-babel-ruby-evaluate): Rely on `org-babel-ruby-initiate-session'
to setup prompt and echo. Re-setting the prompt back after every
evaluation can be tricky because of async nature of the prompt, so it
is now dropped.
This garbage collects many times when calling
`org-get-buffer-tags' (such as during tag completion) in a large file
with many tags. Raise `gc-cons-threshold' as this may affect other
callers in large files.
Note that `org-element-parse-buffer' also raises `gc-cons-threshold'
as a precedent.
This has no effect on most callers and increases performance for
extreme cases.
* lisp/org-element.el (org-element-cache-map): Raise
`gc-cons-threshold'.
Thanks to Ihor Radchenko and Liu Hui for valuable feedback on this
patch.
* lisp/ob-python.el (org-babel-execute:python): Parse graphics-file
from params, and pass it to `org-babel-python-evaluate'.
(org-babel-python--output-graphics-wrapper): New constant. Python
code to save graphical output.
(org-babel-python--def-format-value): New constant. Python function
to format and save value results to file. Includes handling for
graphics, dataframes, and arrays.
(org-babel-python-table-or-string): Prevent `org-babel-script-escape'
from mangling dict results.
(org-babel-python--setup-session): New function to
run setup code within Python session.
(org-babel-python-initiate-session-by-key): Replace lambda with
`org-babel-python--setup-session' in `python-shell-first-prompt-hook',
or run it directly if the session was started outside Org.
(org-babel-python-wrapper-method): Removed. Instead use part of the
string directly in `org-babel-python-evaluate-external-process'.
(org-babel-python-pp-wrapper-method): Removed. Pretty printing is now
handled by `org-babel-python--def-format-value'.
(org-babel-python--exec-tmpfile): Removed. Instead use the raw string
directly in `org-babel-python-evaluate-session'.
(org-babel-python-format-session-value): Updated to use
`org-babel-python--def-format-value' for formatting value result.
(org-babel-python-evaluate): New parameter graphics-file. Pass
graphics-file onto downstream helper functions.
(org-babel-python-evaluate-external-process): New parameter
graphics-file. Use `org-babel-python--output-graphics-wrapper' for
graphical output. For value result, use
`org-babel-python--def-format-value'. Don't call `org-trim' on
results, to prevent misalignment of pandas DataFrames.
(org-babel-python-evaluate-session): New parameter graphics-file. Use
`org-babel-python--output-graphics-wrapper' for graphical output.
Replace the removed constant `org-babel-python--exec-tmpfile' with the
string directly. Rename local variable tmp-results-file to
results-file, which may take the value of graphics-file when provided.
(org-babel-python-async-evaluate-session): New parameter
graphics-file. Use `org-babel-python--output-graphics-wrapper' for
graphical output. Rename local variable tmp-results-file to
results-file, which may take the value of graphics-file when provided.
* lisp/org-element.el (org-element-item-parser): Do not parse beyond
LIMIT - they may extend :post-blank beyond parent list contents.
(org-element-plain-list-parser): Make sure that plain list always owns
the trailing blank lines.
(org-element-cache-version): Bump cache version.
* testing/lisp/test-org-element.el (test-org-element/item-parser): Add
test.
Reported-by: Tom Alexander <tom@fizz.buzz>
Link: https://orgmode.org/list/1c833eb8-c556-437b-ac5b-be360ebcc869@app.fastmail.com
* lisp/org-element-ast.el (org-element--standard-properties): Re-order
the properties, making the element boundaries in order as they will
appear in buffer. Re-group other properties.
* lisp/org-element.el (org-element-cache-version): New constant
defining the current cache version.
(org-element-cache-reset): Use the new variable.
* lisp/org.el (org-mode): Assert loading the correct cache version.
Reported-by: Gregor Zattler <telegraph@gmx.net>
Link: https://orgmode.org/list/87350cvm3d.fsf@no.lan
*
testing/lisp/test-org-colview.el (test-org-colview/columns--move-row-stay-at-the-same-column):
Skip the test in Emacs <29 where it is not possible to determine
visual column.
* lisp/org-colview.el (org-columns-global): New buffer-local variable
holding GLOBAL argument to `org-columns'.
(org-columns): Record the GLOBAL arg.
(org-columns-redo): Fix `org-columns' call, using
`funcall-interactively' and passing GLOBAL arg as well. The previous
usage of `call-interactively' made no sense because
`org-column-current-fmt' would not be passed as an argument -
`call-interactively' does not allow passing arguments.
Link: https://orgmode.org/list/877culo1pb.fsf@localhost
* doc/org-manual.org (org-columns-move-row-up,
org-columns-move-row-down, org-columns-move-left,
org-columns-move-right): Document two new and two old commands.
* etc/ORG-NEWS (New commands to move rows up & down): Document the new
feature.
* lisp/org-colview.el (org-columns--move-row, org-columns-move-row-up,
org-columns-move-row-down): New functions.
* testing/lisp/test-org-colview.el (test-org-colview/columns-move-row-down,
test-org-colview/columns-move-row-up,
test-org-colview/columns--move-row-stay-at-the-same-column,
test-org-colview/columns-move-row-down-with-subheading): New tests.
* lisp/org-colview.el (org-columns): Use markers to store collected
column headline value positions. This is necessary because
`org-columns--display-here' may modify buffer, invalidating headline
positions returned by `org-scan-tags'.
Reported-by: Jakob Schöttl <jschoett@gmail.com>
Link: https://orgmode.org/list/831f07e0-d86a-a0dc-c967-e48906f520a1@gmail.com
* lisp/ob-core.el (org-babel-current-result-hash): Mark INFO argument
as unused. `org-babel-where-is-src-block-results' does not use INFO
argument even when passed.
* lisp/org-element.el (org-element--string-cache): Change the value to
hash table. Update the docstring.
(org-element--get-cached-string): Use hash table.
obarrays have a number of rough edges when used for purposes other
than interning symbols. Using obarrays may cause unexpected problems
and hash tables are preferred. Credit: Stefan Monnier.