emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ob-core: add org-confirm-babel-evaluate-cell custom variable


From: Ihor Radchenko
Subject: Re: [PATCH] ob-core: add org-confirm-babel-evaluate-cell custom variable
Date: Sat, 31 Dec 2022 13:48:17 +0000

Tom Gillespie <tgbugs@gmail.com> writes:

>> What about modifying `org-confirm-babel-evaluate' to allow these values:
>>
>> - t      : confirm header vars *and* code blocks
>> - 'code  : confirm code blocks
>> - 'vars  : confirm vars
>> - nil    : don't confirm
>>
>> and set the default value to 'code, while allowing concerned users to
>> set it to `t' -- until we have a better system for evaluation query.
>>
>> WDYT?
>
> In short this is not a viable solution because there is no way
> to compose nil for embedded expressions with a function
> for blocks. We really do not want to change the function
> signature for the function to also have to accept whether
> it is a block or an embedded expression. That will break
> code for everyone.

Agree. The value of `org-confirm-babel-evaluate' can be a function. If
we do not change the function signature, there will be no way to provide
the code block vs. code cell granularity we are trying to handle.

We may, however, make `org-confirm-babel-evaluate' function value accept
an extra third argument - context ('code or 'vars). This will retain the
required flexibility without introducing an extra variable.

P.S. Considering intense discussion around the topic, what about
reverting my commit from the release? We can then re-consider the whole
design and apply something more elaborate later.

-- 
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>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]