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: Ihor Radchenko
Subject: Re: per-file (or, really, per buffer) allowing/disallowing code block execution
Date: Tue, 06 Sep 2022 21:33:54 +0800

Fedja Beader <fedja@protonmail.ch> writes:

> Pressing C-c C-c in a code block asks the user whether to
> execute that code block or not. This soon becomes annoying.
> To remedy this, org-mode provides us the variable
> org-confirm-babel-evaluate. But this is not very user friendly.
>
> Additionally, as per documentation, this variable only controls
> whether org-mode (babel? Forgive me, I am sort of a new user of
> Emacs) will execute the code block without asking, or ask.
>
> 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.
>
> Particularly the second case is the one that cannot be
> supported by simply defining org-confirm-babel-evaluate.

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.


-- 
Ihor Radchenko,
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]