From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id MLBiMK9fmF/JWQAA0tVLHw (envelope-from ) for ; Tue, 27 Oct 2020 17:58:07 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id sAM5LK9fmF8yUQAAB5/wlQ (envelope-from ) for ; Tue, 27 Oct 2020 17:58:07 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4EEAC9404E0 for ; Tue, 27 Oct 2020 17:58:07 +0000 (UTC) Received: from localhost ([::1]:43888 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXTET-0005qI-Ew for larch@yhetil.org; Tue, 27 Oct 2020 13:58:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXT3v-0003WE-Tu for emacs-orgmode@gnu.org; Tue, 27 Oct 2020 13:47:11 -0400 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:34721) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kXT3t-000533-LE for emacs-orgmode@gnu.org; Tue, 27 Oct 2020 13:47:11 -0400 Received: by mail-pg1-x529.google.com with SMTP id t14so1225618pgg.1 for ; Tue, 27 Oct 2020 10:47:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=0Dh4YrkmGtk3t//RODBwf4vnbyFy92RKdPnloStqJHM=; b=DY8KyM32dlNztqmAgpWaczg2GFgRHST5s+ajXsOfTQwF29UC/akIF2PSK1gYIhlTIk OBYVzU7V9PAHnU98tmK4zEGuavOGcuXjM2E000e1LFW5teVxr/BcXMF0xmz2MCmXoo92 aMs+n5WwthzEg8LPvIFWb2PIH/RIhH7eXGCpB1Y68ISr/lbZO9npQrPJpHwcvgKayh5e tW3IQxe0Kwydx9OrD9JnERyNdcufs1SefT+2G/BJTaBrGqvYiddzTs91IuKYl3yJFHcT YBfA2CJgGzG3YpaKRLj/ym3wJYZ6IzFJ8hBortn0Ele11oE0sNBe8QChq9wbg1dA3AS/ Iyrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=0Dh4YrkmGtk3t//RODBwf4vnbyFy92RKdPnloStqJHM=; b=uHfdWf8LnFv1hIuj8fbzt+fasZsbHKdpwKAtDQD/aHinNz4NRhK4DIkROTGGrsVWtd aUuv1HpQIZM9ClYS504P7Z1llS1NJwLgkVnsi25AlSAN+ygRDNz97969TfBR5fgXaYAw 1GWA4EfFh+Ld9Y6k1OfUrwXujC6hJaMJrHcL1/3iKEjQdyfWMVSBFdAIVJEtOKyTCO7u lTUC2CUNSvtN0kg7wCFUTjNeEZi5ZCDQI9h5EiKPiQfS6c5HL89schfOMZ8LiRAmTjl8 g4PxxYWqkyFdymoI4/K3ZR59a93wUGfgBqoYDaTdFrbCrmfzxmcQQbE383bVGiMOigvh xzYA== X-Gm-Message-State: AOAM533gHNovS+M+rPQsJXJbsCscClsHvblrrBfK2i7lF1KVclHgJrOt F2ALDwaLDty0PpbREqpcCuZfmy+RnmY= X-Google-Smtp-Source: ABdhPJyK8qlbjzJdur6WrUvlkpGoOZWYqJ6EhIctbTmVINNOi9FzC32sPVaqfRFQdANYP8uw2B//8Q== X-Received: by 2002:aa7:979b:0:b029:152:4223:1b47 with SMTP id o27-20020aa7979b0000b029015242231b47mr3347052pfp.44.1603820826999; Tue, 27 Oct 2020 10:47:06 -0700 (PDT) Received: from ?IPv6:2600:8800:7c85:aa00:19d9:b047:e64f:dac2? ([2600:8800:7c85:aa00:19d9:b047:e64f:dac2]) by smtp.gmail.com with ESMTPSA id v6sm2656039pjh.10.2020.10.27.10.47.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Oct 2020 10:47:06 -0700 (PDT) From: =?utf-8?B?5ZC06ZSQ5oms?= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: Confusion about org-confirm-babel-evaluate's behavior while exporting lob calls Date: Tue, 27 Oct 2020 10:47:04 -0700 References: <5362C0A0-632F-4C87-8FA1-915F0F53D8B8@gmail.com> To: emacs-orgmode@gnu.org In-Reply-To: <5362C0A0-632F-4C87-8FA1-915F0F53D8B8@gmail.com> Message-Id: X-Mailer: Apple Mail (2.3608.120.23.2.4) Received-SPF: pass client-ip=2607:f8b0:4864:20::529; envelope-from=ywwry66@gmail.com; helo=mail-pg1-x529.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=DY8KyM32; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.21 X-TUID: X2MOhkHxuxQx 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, =E5=90=B4=E9=94=90=E6=89=AC = wrote: >=20 > Hi, >=20 > 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: > ______________________________________ >=20 > 1. Exporting code block (with evaluation) > #+name: foo > #+begin_src emacs-lisp :exports both > (message "hello world!") > #+end_src >=20 > 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. >=20 > 2. Exporting lob call > #+name: foo > #+begin_src emacs-lisp > (message "hello world!") > #+end_src >=20 > #+call: foo() >=20 > When exporting this to latex, I don=E2=80=99t get queried. This seems = dangerous to me. > ______________________________________ >=20 > 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. >=20 > 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 >=20 > + (let (org-confirm-babel-evaluate) > + (org-babel-execute-src-block nil info)))))))))) >=20 > Do you think this is the intended behavior of = org-confirm-babel-evaluate, or am I missing something? >=20 > Thanks, > Ruiyang >=20