* Bug: using :wrap src interferes with :cache yes with :var [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)]
@ 2023-06-02 18:04 Emin Martinian
2023-06-07 12:55 ` Ihor Radchenko
0 siblings, 1 reply; 2+ messages in thread
From: Emin Martinian @ 2023-06-02 18:04 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 657 bytes --]
I think there is a bug with the `:cache' header and how results of
evaluation are wrapped: Using `:cache yes' and wrapping the results
prevents later blocks using the cached results.
To reproduce, start with an example like the one at the bottom of the
documentation in
<https://orgmode.org/manual/Evaluating-Code-Blocks.html>. Then add
something like `:wrap src R' (or `:results value drawer') to the header
of the block named `random' and the second block produces `nil' instead
of the desired result.
I verified the bug using `emacs -nw -q' with version 9.3 but would be
happy to send more information if the above is not enough to reproduce.
Thanks.
[-- Attachment #2: Type: text/html, Size: 2241 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug: using :wrap src interferes with :cache yes with :var [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)]
2023-06-02 18:04 Bug: using :wrap src interferes with :cache yes with :var [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)] Emin Martinian
@ 2023-06-07 12:55 ` Ihor Radchenko
0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2023-06-07 12:55 UTC (permalink / raw)
To: Emin Martinian; +Cc: emacs-orgmode
Emin Martinian <emin.martinian@gmail.com> writes:
> I think there is a bug with the `:cache' header and how results of
> evaluation are wrapped: Using `:cache yes' and wrapping the results
> prevents later blocks using the cached results.
>
> To reproduce, start with an example like the one at the bottom of the
> documentation in
> <https://orgmode.org/manual/Evaluating-Code-Blocks.html>. Then add
> something like `:wrap src R' (or `:results value drawer') to the header
> of the block named `random' and the second block produces `nil' instead
> of the desired result.
I tried to evaluate the following in various orders.
#+NAME: random
#+BEGIN_SRC R :cache yes :wrap src R
runif(+1)
#+END_SRC
#+NAME: caller
#+BEGIN_SRC emacs-lisp :var x=random :cache yes
x
#+END_SRC
I am unable to see any issues with the latest development version of Org.
You may try to update Org and check on your side.
Canceled, for now.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-06-07 12:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-02 18:04 Bug: using :wrap src interferes with :cache yes with :var [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)] Emin Martinian
2023-06-07 12:55 ` Ihor Radchenko
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.