emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: 吴锐扬 <ywwry66@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Confusion about org-confirm-babel-evaluate's behavior while exporting lob calls
Date: Tue, 27 Oct 2020 10:47:04 -0700	[thread overview]
Message-ID: <ABC9D9AD-87AB-493B-827B-BA825303E7AB@gmail.com> (raw)
In-Reply-To: <5362C0A0-632F-4C87-8FA1-915F0F53D8B8@gmail.com>

This is just a follow up to see if anyone have insights on this matter. Thanks

Ruiyang

> On Oct 14, 2020, at 1:18 PM, 吴锐扬 <ywwry66@gmail.com> wrote:
> 
> Hi,
> 
> I have org-confirm-babel-evaluate set to t by default. With this, I expect to be queried with the execution of every code block or lob call. However, this does not happen when exporting lob calls (to latex for example). Here is an example:
> ______________________________________
> 
> 1. Exporting code block (with evaluation)
> #+name: foo
> #+begin_src emacs-lisp :exports both
>  (message "hello world!")
> #+end_src
> 
> When exporting this to latex, I get queried as expected. And there is no way to suppress the query unless I change org-confirm-babel-evaluate to nil.
> 
> 2. Exporting lob call
> #+name: foo
> #+begin_src emacs-lisp
>  (message "hello world!")
> #+end_src
> 
> #+call: foo()
> 
> When exporting this to latex, I don’t get queried. This seems dangerous to me.
> ______________________________________
> 
> I find it hard to explain this inconsistency. If org-confirm-babel-evaluate is designed to be a protective layer, then a user might export an org file that includes malicious code along with a lob call, while unawarely execute that code without being warned. This seems to defeat the purpose of org-confirm-babel-evaluate.
> 
> As I searched the archive, I found this change was introduced in the following thread: https://lists.gnu.org/archive/html/emacs-orgmode/2013-04/msg00764.html
> 
> +             (let (org-confirm-babel-evaluate)
> +               (org-babel-execute-src-block nil info))))))))))
> 
> Do you think this is the intended behavior of org-confirm-babel-evaluate, or am I missing something?
> 
> Thanks,
> Ruiyang
> 



  reply	other threads:[~2020-10-27 17:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14 20:18 Confusion about org-confirm-babel-evaluate's behavior while exporting lob calls 吴锐扬
2020-10-27 17:47 ` 吴锐扬 [this message]
2020-10-28 11:32 ` Eric S Fraga
2020-10-28 17:26   ` Berry, Charles via General discussions about Org-mode.
2020-10-29  1:29     ` 吴锐扬
2020-10-29  3:16       ` Kyle Meyer
2020-10-29 17:17         ` Berry, Charles via General discussions about Org-mode.
2020-11-01 23:44         ` Kyle Meyer
2020-11-02  0:41           ` 吴锐扬
2020-10-29 19:05     ` Achim Gratz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ABC9D9AD-87AB-493B-827B-BA825303E7AB@gmail.com \
    --to=ywwry66@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).