[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: |
Fedja Beader |
Subject: |
Re: per-file (or, really, per buffer) allowing/disallowing code block execution |
Date: |
Thu, 08 Sep 2022 12:34:25 +0000 |
Hello Richard, Ihor and Steven,
I'm aware that file-local variables exist, but it seems that
all documentation for them put them *into the file*, which is not secure for
files downloaded from the internet. What is to stop a malicious file from
setting an "yes, execute me automatically" variable?
Anyway, the point of my email was to suggest a change to org-mode such that it
provides a pleasant out-of-the-box user experience for people like me. I want
to use org-mode as a python/octave/R/whatever interactive notebook without
having to spend several days learning elisp and the internal workings of Emacs.
I have spent these days, days that could be better (sorry!) used working on
actual projects of mine. But I spent this time and the time to articulate what
I want and to write these emails in the hope that I will be the last person
having to do so. I would also like to suggest org-mode to other people instead
of Jupyter notebook without having to add "oh, btw, you might want to add these
three pages of alien code to your init.el to make it usable".
To go a bit further off-thread, this change might seem unnecessary. However,
the other changes I want is also auto-executing all modified code blocks on
file save and/or when the cursor moves out of it, auto-executing dependent
blocks when their dependency changes (e.g. blocks full of constants) or marking
blocks as stale. But I will make suggestions to improve these things in later
emails, once I know what I want.
Hello Greg,
Agreed, just yesterday I must have pressed C-c C-c "yes" three times a minute
evaluating an embedded Octave script. The current default configuration is not
pleasant at all.
Hello Ihor,
> Then, what about the following:
> 1. Set org-confirm-babel-evaluate globally to t
> 2. In the files you maintain, you can always put
> file-local/directory-local value of org-confirm-babel-evaluate to
> nil.
> 3. We can modify org-babel-confirm-evaluate _function_ to accept four
> possible answers: yes, no, yes for all in buffer, no for all in
> buffer. The extra 2 options will set buffer-local value of
> org-confirm-babel-evaluate in the current Emacs session
Don't know about option (1), (2) seems insecure at first glance, for the
reasons mentioned above. (3) sounds good (yes/no/always/never?) and what I want.
- per-file (or, really, per buffer) allowing/disallowing code block execution, Fedja Beader, 2022/09/06
- Re: per-file (or, really, per buffer) allowing/disallowing code block execution, Ihor Radchenko, 2022/09/06
- Re: per-file (or, really, per buffer) allowing/disallowing code block execution, Greg Minshall, 2022/09/06
- Re: per-file (or, really, per buffer) allowing/disallowing code block execution, Steven Harris, 2022/09/06
- Re: per-file (or, really, per buffer) allowing/disallowing code block execution, Ihor Radchenko, 2022/09/08
- Re: per-file (or, really, per buffer) allowing/disallowing code block execution,
Fedja Beader <=
- Re: per-file (or, really, per buffer) allowing/disallowing code block execution, tomas, 2022/09/08
- Re: per-file (or, really, per buffer) allowing/disallowing code block execution, Ihor Radchenko, 2022/09/09
- Re: per-file (or, really, per buffer) allowing/disallowing code block execution, Fedja Beader, 2022/09/09
- Re: per-file (or, really, per buffer) allowing/disallowing code block execution, Ihor Radchenko, 2022/09/11
- Re: per-file (or, really, per buffer) allowing/disallowing code block execution, Greg Minshall, 2022/09/12
- Re: per-file (or, really, per buffer) allowing/disallowing code block execution, Tim Cross, 2022/09/12
- Re: per-file (or, really, per buffer) allowing/disallowing code block execution, Greg Minshall, 2022/09/13
- Re: per-file (or, really, per buffer) allowing/disallowing code block execution, Rudolf Adamkovič, 2022/09/19
- Re: per-file (or, really, per buffer) allowing/disallowing code block execution, Greg Minshall, 2022/09/19
- Re: per-file (or, really, per buffer) allowing/disallowing code block execution, Rudolf Adamkovič, 2022/09/21