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-07 Thread Ihor Radchenko
Emin Martinian  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
> . 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 .
Support Org development at ,
or support my work at 



Bug: using :wrap src interferes with :cache yes with :var [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)]

2023-06-06 Thread Emin Martinian
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
. 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.