emacs-orgmode
[Top][All Lists]
Advanced

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

Re: per-file (or, really, per buffer) allowing/disallowing code block ex


From: Greg Minshall
Subject: Re: per-file (or, really, per buffer) allowing/disallowing code block execution
Date: Tue, 06 Sep 2022 22:05:25 +0300

Fedja,

> What I would like to have, to safely and easily use org-mode
> as an interactive notebook, is to not have to overload this
> function and to be asked only once per buffer/file whether to:
> 1) Unconditionally allow executing all code blocks
> 2) Unconditionally disallow executing all code blocks
> 3) Ask for every block.

i think that is an interesting idea, and maybe a more pleasant user
interface than what we currently have.  

probably, for me, it would allow me to drop a number of buffer-local
variable customizations, as i'm typically evaluating code in a given
buffer over and over again (and, so, would be happy to pay the price of
saying "yes" once per buffer (per emacs instance).

i'd be curious to hear what the downsides might be, especially anyone
who sees security-related downsides.

Ihor,

> 1) You can set org-confirm-babel-evaluate buffer-locally
> 2) Same or set :eval no header arg. (see
> https://orgmode.org/org.html#Evaluating-Code-Blocks)
> 3) You can set :eval query header arg.

for me the use case is 1) disabling all (or setting to "query") when,
e.g., you are exporting some file you received via e-mail and so trust
*none* of the code blocks; 2) enabling all for some file that you
yourself maintain, and so trust *all* the code blocks.  at least
initially, this seems a nice direction.

cheers, Greg



reply via email to

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