From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
Received: from mp10.migadu.com ([2001:41d0:8:6d80::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms5.migadu.com with LMTPS
	id 4DrgBBzCrWPsUwEAbAwnHQ
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Thu, 29 Dec 2022 17:36:44 +0100
Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp10.migadu.com with LMTPS
	id EGwbBBzCrWMt9gAAG6o9tA
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Thu, 29 Dec 2022 17:36:44 +0100
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 95B72E0BB
	for <larch@yhetil.org>; Thu, 29 Dec 2022 17:36:43 +0100 (CET)
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-orgmode-bounces@gnu.org>)
	id 1pAvsx-00035G-Rl; Thu, 29 Dec 2022 11:36:03 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <yantar92@posteo.net>)
 id 1pAvsv-00034v-VW
 for emacs-orgmode@gnu.org; Thu, 29 Dec 2022 11:36:02 -0500
Received: from mout02.posteo.de ([185.67.36.66])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <yantar92@posteo.net>)
 id 1pAvss-00015J-Du
 for emacs-orgmode@gnu.org; Thu, 29 Dec 2022 11:36:01 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 7EB752401F3
 for <emacs-orgmode@gnu.org>; Thu, 29 Dec 2022 17:35:56 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1672331756; bh=rmITPaASHd/tMd29typw5CbWQv4etdkfXW7LVcsfSJ8=;
 h=From:To:Cc:Subject:Date:From;
 b=gZFFQNUYzhm63HBt0yNhPUVwtpZkcrWlrRPMrTmOtW9hhJnjsZVH8vZg9c5keNPAz
 lxCG/Hv7G1i3Av7b4HCoxR99YnaGCTO+iVq/GhHnA+cOBG0BXdOZF9ebILwOBYiUQW
 C1TSltAiiiTYRVnv8LDXKwLri8lxEWfEH9tIoXPppccSZoyp8rK6FP6q5DxCDHd3/R
 e/mMIP15HDvgrOwFRdfd71xIoAL1/eSzM3SNuS6L+EHULmukTCj1kdzpC0fQzA20En
 OJKMqarD2N6MQGWBTf74L2f5sqGwcvjo7/95uPyQsF2rXzlZpanugOF0t0g584GpR5
 N/GbuA2lwNmKg==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4NjYt32P0vz9rxH;
 Thu, 29 Dec 2022 17:35:53 +0100 (CET)
From: Ihor Radchenko <yantar92@posteo.net>
To: Bastien Guerry <bzg@gnu.org>
Cc: Tom Gillespie <tgbugs@gmail.com>, Kyle Meyer <kyle@kyleam.com>,
 emacs-orgmode@gnu.org
Subject: Re: [PATCH] ob-core: add org-confirm-babel-evaluate-cell custom
 variable
In-Reply-To: <87edsii4mo.fsf@gnu.org>
References: <CA+G3_PNmnJ-ehnYOBkaOOsyNjeb-OJyoy+sg_g5v3AZVGiNoXg@mail.gmail.com>
 <tn3h08$1099$1@ciao.gmane.io>
 <CA+G3_PNHe3J+PHzv_L+X1DR66TGc3sW5FxiJC5HqDd57N75P0w@mail.gmail.com>
 <87359ld5ye.fsf@kyleam.com>
 <CA+G3_PPEbiBFvADivF++x_c6s8hKtyTcy3nmBtTMd_OhBDDPyw@mail.gmail.com>
 <874ju0j538.fsf@localhost>
 <CA+G3_PMwyRrjwJp_AGxnV8P7LbqiPkGfLiQY4rziUo-xcjAUaA@mail.gmail.com>
 <87k02fspxa.fsf@localhost> <87edsii4mo.fsf@gnu.org>
Date: Thu, 29 Dec 2022 16:35:40 +0000
Message-ID: <87h6xetbfn.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net;
 helo=mout02.posteo.de
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 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,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no
X-Spam_action: no action
X-BeenThere: emacs-orgmode@gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=subscribe>
Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org
Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org
X-Migadu-Country: US
X-Migadu-Flow: FLOW_IN
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1672331803; a=rsa-sha256; cv=none;
	b=SWfs/R79d2EcUEeFO0lVHvREw8eaBFluXSHc050tDUCYj0obvFpy9AO9u3iKsOI6BRTT1C
	yoL2apupAW4VptdBwbSVjPCaMG1yUOoGaKAzRM0us4ZjRnSzPfgun+EIDIxa1NXkIkQk/i
	UT/G1THS/XqkapimK37LCLB6xa8TJ+7vkfqXbVtATsg7jx0YIP4koNo8PRP+sqptx5PIG4
	KK22McWRXZokK1Wc9rbUaVUKtEC8Txx1AuseKKUfGzwrKYPT96R0ItwmVmRmTvgsCZrfrX
	DzRWjAhqK0kqxe53TU9Dajx/PJEHoh3HTIyW8FhLVsV/iYgnXDjfwpmYYWsj+g==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=pass header.d=posteo.net header.s=2017 header.b=gZFFQNUY;
	spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org";
	dmarc=pass (policy=none) header.from=posteo.net
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1672331803;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:cc:mime-version:mime-version:
	 content-type:content-type:in-reply-to:in-reply-to:
	 references:references:list-id:list-help:list-unsubscribe:
	 list-subscribe:list-post:dkim-signature;
	bh=eK1W8kO6Ahtpu0pjQRB/mZKCt2JP+BEM02jPb7FYzxw=;
	b=KpAgtN6FvXcBjTcpoOfleJsaCKoYY1vUCHHP/jzEjz20BVOPrtsotGFRuCGeloHVeUp9dP
	xtAeBqNZegQedm6hmFo/jTby9a2qZaNhmJE06Ako1SoU5XW3p8Ogn3HxBIXJuRokGHmPBg
	LFsZHqzUP+lcH789t8RypgnH00l8zMUuz+H9QTU52by3U12aUWYfKvcBc0cggZocawX9YU
	hYu0eTRMIfmT0osriaRlRpD6ds2GROkCO06yJtcaRtBGlqX988s9TSat/3iTGGzer2nLZX
	7cnyTVJ5d1QGUf7AlzWnTYan1Jb1YBQrMmhVTiT1Qx2nQu1Tn+i7j9GuopeRZw==
X-Spam-Score: -7.96
X-Migadu-Queue-Id: 95B72E0BB
Authentication-Results: aspmx1.migadu.com;
	dkim=pass header.d=posteo.net header.s=2017 header.b=gZFFQNUY;
	spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org";
	dmarc=pass (policy=none) header.from=posteo.net
X-Migadu-Scanner: scn0.migadu.com
X-Migadu-Spam-Score: -7.96
X-TUID: W1XdCyjhDWkI

Bastien Guerry <bzg@gnu.org> writes:

> I've skimmed through the discussion but I'm not entirely clear about
> the situation.
>
> Has the situation changed between 9.5 and 9.6?  Tom first message
> seems to suggest it did, but etc/ORG-NEWS does not say.

I considered this change as a bugfix. Though it was more user-facing
than I anticipated.

What changed: The prompt previously displayed on code block evaluation
is now also displayed when expanding header arguments:

#+begin_src emacs-lisp :var x = (message "pwned!")
(concat x "foo")
#+end_src

Before Org 9.6:
1. "pwned!" is displayed
2. Query to evaluate code block is displayed

Org 9.6:
1. Query to evaluate (message "pwned!") is displayed
2. If confirmed, it is evaluated
3. Query to evaluate the whole code block is displayed

> Whether it changed or not, what is the problem in 9.6?

The problem is that Org now displays more queries.

> How does the patch solves this problem?

It allows disabling these new queries about lisp evaluation outside
code blocks without disabling code block eval confirmation completely.

I later suggested disabling the queries by default - mimicking the pre
9.6 behaviour yet keeping the ability for concerned users enable the
extra confirmation.

> Is it a temporary change while we wait for a better change?

Yes. Ideally, we need to improve the code evaluation query. It should
allow confirming evaluation in bulk and add some code blocks/files to
whitelist. Similar to `org--confirm-resource-safe'.

> In particular, I'm not sure I understand why this should be added to
> 9.6.1---I'm not opposed to it, I just try to understand.

A concern have been expressed that more queries may annoy users and
drive them towards setting `org-confirm-babel-evaluate' to nil globally.
Upon doing this, the future more flexible security queries may be not
used by such users.

> Also, org-confirm-babel-evaluate-table-cell seems more explicit than
> org-confirm-babel-evaluate-cell.

But it will not be accurate. The query is now displayed upon executing
`org-babel-read' -- cell refers to Elisp code "cell" here. Not to a
table cell.

-- 
Ihor Radchenko // yantar92,
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>