* lisp/ol-gnus.el (org-gnus-store-link): Use nnselect when available.
In the master branch of the Emacs repository, f103e89c1d (Add aliases
for recent Gnus nnselect changes, 2020-09-07) switched
org-gnus-store-link over to using nnselect, but that can't be ported
as is because it isn't backward compatible. Make a similar change
that includes compatibility kludges.
* lisp/ox-texinfo.el (org-texinfo-link): Use
`org-texinfo--sanitize-content'.
(cherry picked from commit 8fd24c0a53)
[km]: This fixes a double-escaping regression introduced by 706970efb
(ox-texinfo.el: Fix escaping special chars in raw-path,
2020-06-05).
* lisp/ob-python.el (org-babel-python--eval-ast): Removed.
(org-babel-python-format-session-value): New function that returns
Python code to evaluate for sessions with value results.
(org-babel-python-evaluate-session): Replace
org-babel-python--eval-ast with org-babel-python-format-session-value.
Motivation is that the new function is more flexible than the old
format string. We can pass in the full result-params, which can be
used to add more formatting options in future. We could also add more
optional arguments in the future to extend this functionality.
This function will be particularly helpful for a couple patches after
9.4:
- ob-reticulate
- https://orgmode.org/list/875z98gj4f.fsf@gmail.com/
- Improved formatting
- https://orgmode.org/list/87eenpfe77.fsf@gmail.com/
However, I add this function in now 9.4, so those future patches can
rely on it in 9.4. In particular, ob-reticulate will probably be
packaged separately from org-mode, and I want to provide a stable
interface to it so that it can be released after 9.4.
* lisp/org-faces.el (org-block): Tiny docstring enhancement.
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Use the
`org-block' face for every true blocks.
Reported-by: Sébastien Miquel <sebastien.miquel@posteo.eu>
https://orgmode.org/list/42749c98-ddfe-bad4-43a5-1119e24972bd@posteo.eu
* lisp/org.el (org-in-archived-heading-p): New function.
* lisp/ob-exp.el (org-babel-exp-process-buffer):
* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): Use
`org-in-archived-heading-p' to skip archived headings when tangling
and exporting.
* testing/lisp/test-org.el (test-org/in-archived-heading-p): Add
test for `org-in-archived-heading-p'.
Reported-by: flare <gabrielxaviersmith@gmail.com>
See https://orgmode.org/list/877dt9ey2c.fsf@gmail.com/
* lisp/ob-python.el (py-send-string-no-output): Remove external function.
(py-shell-send-string): Add external function.
(org-babel-python--eval-ast): Remove blank lines.
(org-babel-python--send-string): New function to send string to Python
process and return output.
(org-babel-python-evaluate-session): Call
org-babel-python--send-string to evaluate code.
New function to send code to Python session. It has the following
desirable properties:
- Wait for evaluation to finish before returning.
- Input can have arbitrary spaces/newlines.
- Avoid echoing input to the session.
- Echo all output to the session.
- Output is also captured and returned separately.
- Avoid adding extra prompts to the session.
- Work well with both Python and IPython repls.
The implementation borrows from `python-shell-send-string-no-output'
and `org-babel-comint-with-output'. This commit is related to
632ceabb1, which tried to implement the same thing, but also
introduced bugs, and had to be partially reverted in b5709ddc9.
* lisp/ob-python.el (org-babel-python-initiate-session-by-key): Remove
workaround for emacs<24.1. Sleep after starting Python, to prevent
startup messages leaking into output results.
* testing/lisp/test-ob-python.el (test-ob-python/session-multiline):
Remove workaround for startup message leaking into results.
* lisp/ob-shell.el (org-babel-execute:shell)
(org-babel-sh-evaluate): Use the exit code as the value and,
consequently, as the result when no :results header is set.
See this thread:
https://orgmode.org/list/CA+A2iZaziAfMeGpBqL6qGrzrWEVvLvC0DUw++T4gCF3NGuW-DQ@mail.gmail.com/
And Tim's useful summary here:
https://orgmode.org/list/87sgiszqc1.fsf@gmail.com/
This commit resolves the issue by deciding not to make an exception
for ob-shell.el:
- the "value" of executing a shell/bash script is the exit code
- when no :results header is set, use the value as the result
- use :results output to use the stdout
* lisp/ob-core.el (org-babel--expand-body): New function.
(org-babel-check-confirm-evaluate):
(org-babel-execute-src-block): Use org-babel--expand-body.
As of 727c6d7fe (lisp/ob-core.el: org-babel-check-confirm-evaluate
strip coderefs, 2020-09-04), org-babel-check-confirm-evaluate and
org-babel-execute-src-block use the same logic to expand the body and
strip coderefs. Move that code to a helper function.
This patch is functionally equivalent to the patch originally proposed
by Tom Gillespie at
https://orgmode.org/list/CA+G3_PNi3uMvBiWgBdKuC3C6VJt1T1j-RKH43LRqYbr+4NS8ZA@mail.gmail.com
* lisp/ob-core.el (org-babel-check-confirm-evaluate): strip coderefs
before passing the body of the block to org-confirm-babel-evaluate
using the same let block as is used in org-babel-execute-src-block.
* lisp/org.el (org-read-date-display-live): Document that live
display is only available when `org-read-date-popup-calendar' is
non-nil.
See <https://orgmod.org/list/20200630180259.zj3krk57x5iqmbsj@orion>
Reported-by: Edmund Christian Herenz <eherenz@eso.org>
* lisp/ob-core.el (org-babel-result-to-file): Use
`buffer-base-buffer' so that `buffer-file-name' returns correct
results in indirect buffers too.
See <https://orgmode.org/list/87eeos3w7v.fsf@localhost>
TINYCHANGE
* doc/org-manual.org (JavaScript supported display of web pages):
Small rephrasing.
(Exporting to minimal HTML): New section.
Reported-by: Paramjit Singh <paramjitrohits@gmail.com>