From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
Received: from mp11.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 4ODUMrQ9sGPKYwAAbAwnHQ
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Sat, 31 Dec 2022 14:48:36 +0100
Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp11.migadu.com with LMTPS
	id QLnYMrQ9sGPTPQAA9RJhRA
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Sat, 31 Dec 2022 14:48:36 +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 979FD2F591
	for <larch@yhetil.org>; Sat, 31 Dec 2022 14:48:36 +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 1pBcDP-0001RF-6K; Sat, 31 Dec 2022 08:48:01 -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 1pBcDH-0001QR-EV
 for emacs-orgmode@gnu.org; Sat, 31 Dec 2022 08:47:52 -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 1pBcDF-0007OB-P2
 for emacs-orgmode@gnu.org; Sat, 31 Dec 2022 08:47:51 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id D8F48240249
 for <emacs-orgmode@gnu.org>; Sat, 31 Dec 2022 14:47:47 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1672494467; bh=U4jocg4Rq/TuxjYd1dGg46+jAeW5cb0xIa2OhMXG7i8=;
 h=From:To:Cc:Subject:Date:From;
 b=E14mFQdWinsbDNoP2CkEPIT45K2dU8R2H2XukpcQkzsk8SbRIXvQJMi7GprSvVKV5
 raHyAIgAeDov6FcghO0Q88OQFWxwEmLv0GXy8qz/tULAOz8pZYYbEvNmqmgh+gMPG6
 S3fRRQQrRTd04CLakNJVU69YOguVaKd2/bBh12fKX/27d6EqRCMAZN61ZSN9TFLSDJ
 +2NZ3oifLexJxa9yfvIXaC5PxsXrxnho8DC7QTzOyFt/APNMboVvHve5yJj7EuZjBZ
 2srCyq1ZuKRQQEVttZe2JJ09MwiNDwu6rJC7ZaKmfi2yWe4VQtDkYws4c2Rm8pOsHt
 fVRi+i+3dSDsQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Nkk364xxJz9rxH;
 Sat, 31 Dec 2022 14:47:46 +0100 (CET)
From: Ihor Radchenko <yantar92@posteo.net>
To: Tom Gillespie <tgbugs@gmail.com>
Cc: Bastien <bzg@gnu.org>, 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: <CA+G3_PPvTv0u9_zyWRbN+jcqqnthb3KkG5uTDa9HFqBJPgGBag@mail.gmail.com>
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>
 <87h6xetbfn.fsf@localhost> <878rips273.fsf@bzg.fr>
 <CA+G3_PPvTv0u9_zyWRbN+jcqqnthb3KkG5uTDa9HFqBJPgGBag@mail.gmail.com>
Date: Sat, 31 Dec 2022 13:48:17 +0000
Message-ID: <878rinadlq.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=1672494516; a=rsa-sha256; cv=none;
	b=CbqNJLJLNatLvmEUdxTnD+QuiR7yubLjUFMwhHPxhqIIrnNAVAfEbQ+fO1HDQdPX6hr3FI
	qsapO8BVT1qKJp5pZXYUjlU44ElkwL552UBkBf2ruOGx3OpjX51eTGtDljPqiwKHTeDQRx
	FLHg6Pr4BLFelyteyOdi+Q/fcRtTKvwKq/C15NO4mnytZTBMNuZCL+axUBxARP9d653t4k
	jdRjQ6nUcB1i4IoJ6+wNJUaZTdhaK0Vwx7dQa9V3BplR0nGIqZuErrTf8yolKJcE2wALlp
	KRcHln2wTlzkO3Fx9OrqU7oigVoHaLwU+N21yisWHg4NgIe40RB6kBCc7/PhIQ==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=pass header.d=posteo.net header.s=2017 header.b=E14mFQdW;
	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=1672494516;
	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=5ncmWrfbf+lIeGnTqQl0J+LWH0g2zPD98REgTrcqatk=;
	b=QXYI+ndIZyOs2VS8fw2IcaWVL7jda/69WMnBtVe02fW7H/p8YlpPcfve08aP4KsPlbDLgf
	74AoyWMHC3+9r71T6T0kU+WfBxk0a3sKqqpUZdhPeaVAYMmIuL29U8Fnzcotpu2ZfVdwd+
	AxhIMJfKj8hM0EsGPSNqEG7zsQLMjGrN2wAFNPHB/ZnxNmHFXkWcxlmewcOUiqG5SPulNS
	Qe6Vz0Rk7P6xdU7XrKZTdcbQX1LZ/jVUVHzfGHYTZlInuTrBTfJv+KBOgBEVjCVkgfAkhG
	gQwJ6niu8gnN98dJqVwA+CH0TP7cyW+d8d/swtUQPsJoYazKV5nTJZTiysHOeQ==
X-Spam-Score: -7.97
X-Migadu-Queue-Id: 979FD2F591
Authentication-Results: aspmx1.migadu.com;
	dkim=pass header.d=posteo.net header.s=2017 header.b=E14mFQdW;
	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.97
X-TUID: BvVPR8YhI6Il

Tom Gillespie <tgbugs@gmail.com> writes:

>> What about modifying `org-confirm-babel-evaluate' to allow these values:
>>
>> - t      : confirm header vars *and* code blocks
>> - 'code  : confirm code blocks
>> - 'vars  : confirm vars
>> - nil    : don't confirm
>>
>> and set the default value to 'code, while allowing concerned users to
>> set it to `t' -- until we have a better system for evaluation query.
>>
>> WDYT?
>
> In short this is not a viable solution because there is no way
> to compose nil for embedded expressions with a function
> for blocks. We really do not want to change the function
> signature for the function to also have to accept whether
> it is a block or an embedded expression. That will break
> code for everyone.

Agree. The value of `org-confirm-babel-evaluate' can be a function. If
we do not change the function signature, there will be no way to provide
the code block vs. code cell granularity we are trying to handle.

We may, however, make `org-confirm-babel-evaluate' function value accept
an extra third argument - context ('code or 'vars). This will retain the
required flexibility without introducing an extra variable.

P.S. Considering intense discussion around the topic, what about
reverting my commit from the release? We can then re-consider the whole
design and apply something more elaborate later.

-- 
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>