* lisp/org.el (org-paste-subtree): Do not check `kill-ring' before
calling `current-kill' since the latter can pull content of clipboard.
First call of `org-paste-subtree' failed if nothing had been yanked
before since Emacs start but system clipboard had text with valid
subtree originating from other application. The bug was where since
the commit adding `org-paste-subtree'.
If both `kill-ring' and system clipboard are empty then `current-kill'
generates meaningful error.
* lisp/ox-latex.el (org-latex-src-block--listings): Do not use global
\lstset to set options. Prefer optional argument to lstlisting
environment instead.
Reported-by: Denis Bitouzé <denis.bitouze@univ-littoral.fr>
Link: https://orgmode.org/list/87pmepvb7u.fsf@example.com
* lisp/ob-scheme.el (geiser): Add new declare.
(org-babel-scheme-get-repl): When possible, call the newer `geiser'
instead of the obsolete `run-geiser'.
* lisp/org-element.el (org-element--cache-active-p):
(org-element--cache-put):
(org-element--cache-process-request):
(org-element--parse-to): Ensure that cache updates are done in base
buffer.
(org-element--cache-remove): Ensure that cache updates are done in base
buffer. Watch for cache size to be non-negative.
* lisp/org-macs.el (org-with-base-buffer): New macro to run code in
base buffer of current or given buffer.
* lisp/org-element.el (org-element-org-data-parser):
(org-element--cache-find):
(org-element--cache-sync):
(org-element--cache-before-change):
(org-element--cache-after-change):
(org-element--cache-submit-request):
(org-persist-after-read-hook): Use the new macro.
* lisp/org-agenda.el (org-agenda-show-outline-path):
* lisp/org.el (org-display-outline-path): Surround symbols with `...'
rather than using leading quote.
See 6013cb161 (Fix doc string quoting problems with ', 2022-07-25) for
a more detailed explanation.
* lisp/org-clock.el (org-x11idle-exists-p): Do not check if load-time
`window-system' is `x'. Instead, rely on the check in
`org-user-idle-seconds'.
Emacs may start as a daemon and hence `window-system' may not yet be
`x' during startup.
Reported-by: Julien Cubizolles <j.cubizolles@free.fr>
Link: https://orgmode.org/list/871qqs6gqs.fsf@free.fr
* lisp/ox-latex.el (org-latex-line-break-safe):
(org-latex-table-row):
Change \empty ending to explicit optional argument. \empty still has
undesired side effects in some cases.
* testing/lisp/test-org-table.el (test-org-table/to-latex):
* testing/lisp/test-ox-latex.el (test-ox-latex/verse): Update tests.
Reported-by: Juan Manuel Macías <maciaschain@posteo.net>
Link: https://orgmode.org/list/87o7u9rz1a.fsf@posteo.net
* lisp/ob-clojure.el (org-babel-expand-body:clojure): Always quote
the variables passed from org-mode in Clojure let binding.
When a variable is a table or list, it's value is "(..data..)"
and without quotes, Clojure would try to execute the first
value as a function.
* lisp/org-datetree.el (org-datetree-insert-line): Use
`org--blank-before-heading-p' check.
* testing/lisp/test-org-datetree.el (test-org-datetree/find-date-create):
(test-org-datetree/find-month-create):
(test-org-datetree/find-iso-week-create): Explicitly set
`org-blank-before-new-entry' assumed throughout the tests.
Note that the `auto' behavior in `org-blank-before-new-entry' is
somewhat arbitrary. It currently prefers no blank lines by
default (when no other headings are present in the buffer). I went
with fixing the tests rather than changing
`org--blank-before-heading-p' to prefer inserting blank lines. This
should make lesser impact on the end users.
Reported-by: Richard Walker <walkerrichardj@gmail.com>
Link: https://list.orgmode.org/orgmode/CAFyNgSE4mAt+b0Ks8L9bg2LbHcXnayOh+bYyONTQ4jN+zx3C1w@mail.gmail.com/
* lisp/org.el (org-toggle-inline-images): Support region.
(org-display-inline-images): Fix refresh argument logic.
(org-remove-inline-images): Support region.
* lisp/org-keys.el (org-toggle-inline-images): Update arguments.
* lisp/org-cycle.el (org-cycle-inline-images-display): Add new option to
control whether auto display inline images when cycling.
(org-cycle-display-inline-images): Add new hook function to auto display
inline images when cycling.
(org-cycle-hook): Add `org-cycle-display-inline-images' into cycling
hook by default.
* doc/org-manual.org (Exporting):
* etc/ORG-NEWS: Document the new option.
* lisp/ob-python.el (py-choose-shell):
(py-toggle-shells): Use the new function name.
(py-default-interpreter): Remove the variable that is no longer
provided by python-mode.el.
(org-babel-python-initiate-session-by-key): Use `py-choose-shell'.
Reported-by: Christian Köstlin <christian.koestlin@gmail.com>
* lisp/ob-core.el (org-babel-where-is-src-block-head): Clarify that
return value is nil within blank after src block.
(org-babel-demarcate-block): Insert new block inheriting language when
within blank lines after existing src block. Document the behavior.
Reported-by: dalanicolai <dalanicolai@gmail.com>
Link: https://orgmode.org/list/CACJP=3nCekgX4RuYBWf=R_2t05-s4ikx-L9qP7W0cSicNG55BA@mail.gmail.com
* lisp/org-refile.el (org-refile-get-targets): Use a document
title (#+TITLE) instead of file or buffer name in outline path, if a
corresponding customisation option is set to 'title. Fallback to a
filename if there is no title in the document.
* lisp/org-refile.el (org-refile-use-outline-path): Add a new option
'title, see above.
* lisp/org-agenda.el (org-agenda-show-outline-path): Add an option to
show a document title at start of an outline path, instead of a file or
a buffer name.
* lisp/org.el (org-display-outline-path): Show a document title (#+TITLE
value) and an outline path in an echo area if the customisation option
is set to 'title. Fallback to a file or a buffer name if the document
title is absent.
* lisp/org.el (org-get-title): A new function to collect a document
title from an org-mode buffer, based on a `org-clock-get-file-title'
implementation.
* lisp/org-clock.el (org-clock-get-file-title): Removed.
* lisp/oc.el (org-cite-make-insert-processor): Provide the required
argument to SELECT-STYLE.
Reported-by: Kierin Bell <bellkierin@gmail.com>
Link: https://orgmode.org/list/875yg940z8.fsf@gmail.com
* lisp/org-attach.el (org-attach-attach): Fix typo when
`org-attach-store-link-p' is set to t. Instead of `file', we need
`attach-file': the link to the attached file, not the original.
* lisp/ob-core.el (org-babel-string-read): Only considered \" at the
string boundaries, not inside.
* testing/lisp/test-ob-shell.el (ob-shell/results-table): Add a test.
* lisp/ob-eval.el (org-babel-eval): Return the available command
output even when the command fails.
This is useful for bash scripts that can produce useful output even
upon failing. The error window is still displayed to inform users.
Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://orgmode.org/list/m2czakgpk8.fsf@me.com
* lisp/ob-eval.el (org-babel-eval-error-notify): When STDERR is empty,
display the exit code in the error buffer rather than empty buffer.
Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://orgmode.org/list/m2czakgpk8.fsf@me.com
* lisp/ob-comint.el (org-babel-comint-with-output): Consider scenarios
when comint emits output without trailing newlines. The strategy to
split the full concatenated output using `comint-prompt-regexp' does
not work when the regexp matches bol. Use a constant string as a
separator instead of relying upon `comint-prompt-regexp'.
Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://orgmode.org/list/m2czakgpk8.fsf@me.com
* lisp/ob-core.el (org-babel-temp-directory): Fix return value for
remote directory.
(org-babel-temp-file): Simplify using `org-babel-temp-directory'. Fix
incorrect file location when PREFIX is "".
(org-babel-temp-stable-directory): New macro returning suitable
temporary stable directory.
(org-babel-temp-stable-file): Simplify using
`org-babel-temp-stable-directory'. Fix incorrect file location when
PREFIX is "".
* lisp/ob-java.el (org-babel-execute:java): Use
`org-babel-temp-directory'.
Reported-by: Ferdinand Pieper <fer@pie.tf>
Link: https://orgmode.org/list/87r0yz7u9q.fsf_-_@pie.tf
* lisp/ox-odt.el (org-odt-link): Use file: link code branch when
exporting id: links to document property drawers. Call `org-odt-link'
with equivalent file: link instead of duplicating the existing code.
Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://orgmode.org/list/tiubca$1252$1@ciao.gmane.io
* lisp/ob-comint.el (org-babel-comint-with-output): Clean up empty
output. Such output is emitted unnecessarily for multi-line scripts.
* lisp/ob-shell.el (org-babel-shell-set-prompt-commands): Disable
PS2 and equivalent prompts. Make sure that PROMPT_COMMAND does not
interfere with PS1 setting in POSIX shells.
(org-babel-sh-evaluate): Do not send input line-by-line. Instead, let
`org-babel-coming-with-output' handle waiting for the output as well
as recording it. Update to the new `org-babel-coming-with-output'
behavior of cleaning empty outputs.
* testing/lisp/test-ob-shell.el (test-ob-shell/session): Add a test.
Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://list.orgmode.org/orgmode/m2r0zboix1.fsf@me.com/
* lisp/ob-core.el (org-babel-format-result): Use `org-list-to-org'
instead of `org-list-to-generic' to format result in Org list.
The problem was in formatting a multiline text result into an Org
list. Additional lines of a list item should be indented with the
first line of the item. The method used for this
formatting (`org-list-to-generic') does not add the extra indentation
to additional lines of an item. Using `org-list-to-org' instead fixes
the problem.
TINYCHANGE
* lisp/org-clock.el (org-clock-insert-selection-line): Display N/A
when non-printable character selection is requested. Non-printable
characters cannot be entered through `read-char'.
Reported-by: Kevin Brubeck Unhammer <unhammer@fsfe.org>
Link: https://orgmode.org/list/87y2krmzol.fsf@trigram.no
* lisp/ox-odt.el (org-odt-plain-text): Use `fill-region' to unfill the
paragraphs with newlines accounting for scripts without spaces between
words.
Reported-by: James Harkins <jamshark70@zoho.com>
Link: https://orgmode.org/list/sbhnlv$4t1$1@ciao.gmane.io
* lisp/ob-java.el (org-babel-header-args:java): Complete the list of
header arguments supported for Java source blocks.
* testing/lisp/test-ob-java.el (ob-java/lint-header-arguments): Test
that the linter approves of all the supported arguments.
* lisp/org-macs.el (org-file-newer-than-p): Recommend passing file
modification time instead of wall time to avoid truncation of timestamp
precision for the sake of filesystems with coarse time resolution.
(org-compile-file): Store file modification time instead of system clock
for later comparison by `org-file-newer-than-p'.
* lisp/org.el (org-babel-load-file): Use `file-newer-than-file-p'
instead of `org-file-newer-than-p' since the former is more suitable
for target-prerequisite relation in the case of equal timestamps.
Improve error reporting when source file does not exist.
Update timestamp after tangling of an org file, not before it.
This is assumed to be a better fix of the problem with change of time
representation in Emacs-29. The problem was reported by Mark Barton
<mbarton98@gmail.com> in
https://list.orgmode.org/BF5B9308-3FEF-4DC6-98C9-BFF36F19D36C@gmail.com
Paul Eggert <eggert@cs.ucla.edu> committed another variant to Emacs
as 3abb3681b5. It was ported to Org as commit 56ba22b9df several months
later.
Unchanged timestamp of a file means failure of `org-compile-file' but in
`org-babel-load-file' the target may be considered as up to date if its
timestamp is equal to the one for the prerequisite.
So `org-file-newer-than-p' is not suitable for both cases. The
difference matters for filesystems with coarse timestamp resolution, for
example HFS+.
Earlier call of `org-babel-load-file' for a non-existing .org file
caused "Bad bounding indices: 0, 2" error.
Update file timestamp (introduced by the commit 1525a5a64e)
after tangling of the file. Change caused by conflict resolution during
rebasing of the initial version of the patch. See
https://list.orgmode.org/t75efi$9pv$1@ciao.gmane.io for an argument
in support of such change.
Add a property `:parameters' to special blocks, to store the
PARAMETERS as a string.
* lisp/org-element.el (org-element-special-block-parser): Parse
PARAMETERS and set the property `:parameters'.
(org-element-special-block-interpreter): Interpret the property
`:parameters'.
*
testing/lisp/test-org-element.el (test-org-element/special-block-parser):
Add a new test for PARAMETERS.
(test-org-element/special-block-interpreter): Add new tests for PARAMETERS.