Daniel Bausch <[email protected]> writes:

> I simply removed variant (2) entirely.  A `:var` keyword now always
> takes exactly two arguments, a NAME string and the VALUE, of which the
> VALUE is used as-is, so a keyword is no longer a problem there either:
>
>     (org-babel-call "foo" :var "a" :some-keyword)
>
> If someone wants to define a variable using a resolved reference,
> e.g. to read from a table, they can still use `org-babel-ref-resolve`
> explicitly (positionally or named).  I mentioned that in the docstring.
>
>     (org-babel-call "foo" :var "a" (org-babel-ref-resolve "tbl[1,1]"))

What if someone wants to pass two variables?

> Regarding your comments on the complementary function
> `org-babel-result`:
>
>> Why not just :var hello=hello[:cache yes]() +
>> (setq org-babel-update-intermediate 'cache)?
>
> I checked this and I don't think it's a substitute for my proposed
> function.  The idea of `org-babel-result` is to have something that
> obviously and reliably never modifies or re-executes the producing block
> (regardless of any settings).

> Let's say, the referenced block took an hour to run (I happen to have
> such queries) or even is a one-shot thing whose result isn't
> reproducible at all.  Now with the result already in the buffer, I want
> to consume the result in another block.
>
> With the proposed `org-babel-result` I can do that in an elisp body or
> in a variable assignment in the header.

Could you elaborate on what you expect to happen when there is no cached
result in buffer?

> Attached find v4 of the patch.
>
> This patch revision also includes some tests, which the ealier versions
> did not.

Before we go too far with LLM-generated patches, please note that GNU
projects, including Emacs, cannot accept LLM-generated patches as of
now. This is a temporary policy that will be in place while GNU is
consulting with lawyers on the implications of LLM code on GPLv3
license. I hope that GNU can produce the final policy in the coming
months.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
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>

Reply via email to