From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 aBrPK3jjF2ObHgAAbAwnHQ (envelope-from ) for ; Wed, 07 Sep 2022 02:19:04 +0200 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 CGT1KnjjF2NoQgEAG6o9tA (envelope-from ) for ; Wed, 07 Sep 2022 02:19:04 +0200 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 1E7CB1EADD for ; Wed, 7 Sep 2022 02:19:03 +0200 (CEST) Received: from localhost ([::1]:48266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVimT-0004UE-HQ for larch@yhetil.org; Tue, 06 Sep 2022 20:19:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVill-0004U5-T4 for emacs-orgmode@gnu.org; Tue, 06 Sep 2022 20:18:18 -0400 Received: from bumble.maple.relay.mailchannels.net ([23.83.214.25]:5864) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVilj-0005MW-Gq for emacs-orgmode@gnu.org; Tue, 06 Sep 2022 20:18:17 -0400 X-Sender-Id: a2hosting|x-authuser|steve@stevenharris.info Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 5215A4C159F for ; Wed, 7 Sep 2022 00:17:32 +0000 (UTC) Received: from mi3-ss8.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id AB5564C1D2C for ; Wed, 7 Sep 2022 00:17:31 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1662509851; a=rsa-sha256; cv=none; b=oEuQ2IevI5T/+kInSZUpqr+qYuw1iKl+lf7Hd5wzW0sLrhZdlPyvuUn40b5IVS3NWE5V6R uO/swDURJJ0yQkELhy9uWTT3SGx0Zvh9R7ohnMtFqei1KdtlEBJf1iR+9usI5Ku2LE06Dq t4+gj2z8nbCFFw1Ffl5u7ElcEn0bLPoZKPO2bajU7qAiSFRjFzN7OQEmUKL2yyv7WOll0K aPuhZkhYmFe77cgsGDIV5RSuqrgr7re9Bu5XQWLotekDgRgsCPWpV3m/yxAv7z8PGgq/OS DhefkX3Uie/rfVL1SCqOKB/EV624jr2pRE5ySaFDdTj2nFuThaeV764/ZUvM4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1662509851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=b3yNGb8Z8CU3JLt2nZbeXJ6iiF4pIPH/QfD3MA0YV/g=; b=p/zAjlmkEr3uKs1h6yfQTYYiWsfwMMJ9ilzoTosJ3dgDt9vWQ93I44CP21Ivfh/2pc5Wxx 9jjJBQsL4lhKiifTf2eFgEuDO+s/6v0URqlC2xG263vfFuLRKNKu5qMJEV+KYsx1d5OdUU UflXtqrBUYuAvHTyfqoDceA7xp5BqrHEgwyaWvMHpi/03GyvB7xVgLub+xGH40r/+IdHnX yb4cyD7fiYvRVDv7aBM/LbwTmY/Wy5r7TMaroVp1znmF1GBOFkTNH2hdct+KlyeaLIWJ7h WWUY2jjfJkZqejujgIhJQXmI4SFufIiuClnmom0Ol49Rs90Imq01xsc2dPkHig== ARC-Authentication-Results: i=1; rspamd-686945db84-lvkj2; auth=pass smtp.auth=a2hosting smtp.mailfrom=steve@stevenharris.info X-Sender-Id: a2hosting|x-authuser|steve@stevenharris.info X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|steve@stevenharris.info X-MailChannels-Auth-Id: a2hosting X-Belong-Reign: 655d6b1546e12980_1662509852044_2911559180 X-MC-Loop-Signature: 1662509852044:2239982390 X-MC-Ingress-Time: 1662509852043 Received: from mi3-ss8.a2hosting.com (mi3-ss8.a2hosting.com [68.66.200.203]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.126.240.197 (trex/6.7.1); Wed, 07 Sep 2022 00:17:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stevenharris.info; s=default; h=Content-Type:To:Subject:Message-ID:Date: From:In-Reply-To:References:MIME-Version:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=b3yNGb8Z8CU3JLt2nZbeXJ6iiF4pIPH/QfD3MA0YV/g=; b=mhJ+CRga/65OtoKU2x8kFtENVw pbuLF0myhIipBeZB2A/nflvQXD1CiKr5WEqOXYqJ4kosaQ/qxdtNe3Lo7DzhByN7ZJ2P+ci4V0ZMi j3KOrAp5s+d1L70kQbNaEPIzr3jAAsVipN8JjzOtdst1zf+WXG3vaxopDXg8OP/z6mw2BBA8nFsMH AlX/YGL58BJd8XxWtZ1IFobhghbBv+mc69nbuU74LatpZv44HrLNzXqTic6osg6DNyOyaBa9l/4GW ma/Cwq93QssAHs5pdUSHZ+084+xI6jzeg5QXFhbHPZfPcS3USZIlFRG+XHAQucW9Z3g3fr3TU8VWA ymuZ7vQg==; Received: from mail-wm1-f52.google.com ([209.85.128.52]:50741) by mi3-ss8.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.95) (envelope-from ) id 1oVil0-0006da-39 for emacs-orgmode@gnu.org; Tue, 06 Sep 2022 20:17:30 -0400 Received: by mail-wm1-f52.google.com with SMTP id j26so7789031wms.0 for ; Tue, 06 Sep 2022 17:17:30 -0700 (PDT) X-Gm-Message-State: ACgBeo2RacS2fFCfewD9wls3OZBu+W2AP6FaoNYlX4bIVT1ofBz+6WWE 1HjCzk5dQXBP+EZY//RXc3FXDggSUw7m/KxZ/4M= X-Google-Smtp-Source: AA6agR52Q/8rX9JoD546N2QuTWo5VTeBp5Ys9kYHEJ7Z2TTAEYWTe+8am/ji2pfYjdMkmdOrdCfIgBbgL5ljlIGvNpQ= X-Received: by 2002:a05:600c:228c:b0:3a8:3d5d:5729 with SMTP id 12-20020a05600c228c00b003a83d5d5729mr445655wmf.144.1662509849739; Tue, 06 Sep 2022 17:17:29 -0700 (PDT) MIME-Version: 1.0 References: <595135.1662491125@archlinux> In-Reply-To: <595135.1662491125@archlinux> From: Steven Harris Date: Wed, 7 Sep 2022 10:17:17 +1000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: per-file (or, really, per buffer) allowing/disallowing code block execution To: emacs-orgmode Content-Type: multipart/alternative; boundary="00000000000007882205e80b3d41" X-AuthUser: steve@stevenharris.info Received-SPF: permerror client-ip=23.83.214.25; envelope-from=steve@stevenharris.info; helo=bumble.maple.relay.mailchannels.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_FAIL=0.001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1662509944; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=b3yNGb8Z8CU3JLt2nZbeXJ6iiF4pIPH/QfD3MA0YV/g=; b=ZZxwYXgyjYmDKbWfQEwqRvHqcTLPbk79rIhxbol7VJE1U/VXVpOntnfuFYyz2D3C9fcha7 Zlj+gdCdqnGn2rAZScCWvDwh/R/S5tpf+StYdT//FM60/AvWWdzFYRW8vpEx595o7/z3fr Hqu0sKDZHSNfUFsjFMdcb6lsSLJ9jarKjQF2gEhNpHPCE41vmU8Y2sTaQh8xlt/HOAVMrK Yksln/RxdgnXlEC79kntqf8BSXfHNpn+t+CGzAuUezp/ZJbHkV+WkV1kuXDnz5x0GTGkkE qa0+uw2uf+6Hh9ehzWY+Q2G2OX8TNbC/1FzOCouEj1T6Tes1twnrGNKK6AIbKQ== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1662509944; a=rsa-sha256; cv=pass; b=nwuBZGHEhPpJs917xGQkUMx5fxFD0R8sN5Iv0xZCkgrWaDADCoatPauafVldVfPcpecmx1 VCUxmX2V8esxQaQoIyIyPn3e6MNk/wPWZvd3zxFfiyt2iuvDarb8VZk+V8WabQZAXMCF7v xJWWfoIz23Mko0jPeprZX2JKghBOou0rgcZpQlPtM9KjkiivnXppMwIuBO4i1DeJ5SAA1N maP1D7orYbWuqc257wbQtaTzvTlJxamECMlkXgQ437LvRY/dFsSQ2PLxxP99xF2CIafslW LMEbpxfld9dsTIadcLFBe4OkwefyoysOkwy81Em87d4Fma1b06Qtuv3+yMjMEQ== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=stevenharris.info header.s=default header.b=mhJ+CRga; arc=pass ("mailchannels.net:s=arc-2022:i=1"); dmarc=none; 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" X-Migadu-Spam-Score: 1.73 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=stevenharris.info header.s=default header.b=mhJ+CRga; arc=pass ("mailchannels.net:s=arc-2022:i=1"); dmarc=none; 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" X-Migadu-Queue-Id: 1E7CB1EADD X-Spam-Score: 1.73 X-Migadu-Scanner: scn1.migadu.com X-TUID: oytXhGLULSHR --00000000000007882205e80b3d41 Content-Type: text/plain; charset="UTF-8" There is a neat solution to this problem using * Local Variables :noexport: see the discussion at stackoverflow Cheers, Steven On Wed, 7 Sept 2022 at 05:07, Greg Minshall wrote: > Fedja, > > > What I would like to have, to safely and easily use org-mode > > as an interactive notebook, is to not have to overload this > > function and to be asked only once per buffer/file whether to: > > 1) Unconditionally allow executing all code blocks > > 2) Unconditionally disallow executing all code blocks > > 3) Ask for every block. > > i think that is an interesting idea, and maybe a more pleasant user > interface than what we currently have. > > probably, for me, it would allow me to drop a number of buffer-local > variable customizations, as i'm typically evaluating code in a given > buffer over and over again (and, so, would be happy to pay the price of > saying "yes" once per buffer (per emacs instance). > > i'd be curious to hear what the downsides might be, especially anyone > who sees security-related downsides. > > Ihor, > > > 1) You can set org-confirm-babel-evaluate buffer-locally > > 2) Same or set :eval no header arg. (see > > https://orgmode.org/org.html#Evaluating-Code-Blocks) > > 3) You can set :eval query header arg. > > for me the use case is 1) disabling all (or setting to "query") when, > e.g., you are exporting some file you received via e-mail and so trust > *none* of the code blocks; 2) enabling all for some file that you > yourself maintain, and so trust *all* the code blocks. at least > initially, this seems a nice direction. > > cheers, Greg > > --00000000000007882205e80b3d41 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
There is a neat solution to this problem = using=C2=A0
* Local Variables :noexport:=
s=
ee the discussion at stackoverflow=
Cheers, 
Steven 

On Wed, 7 Sept 2022 at 05:07, Greg Minshall <minshall@umich.edu> wrote:
Fedja,

> What I would like to have, to safely and easily use org-mode
> as an interactive notebook, is to not have to overload this
> function and to be asked only once per buffer/file whether to:
> 1) Unconditionally allow executing all code blocks
> 2) Unconditionally disallow executing all code blocks
> 3) Ask for every block.

i think that is an interesting idea, and maybe a more pleasant user
interface than what we currently have.=C2=A0

probably, for me, it would allow me to drop a number of buffer-local
variable customizations, as i'm typically evaluating code in a given buffer over and over again (and, so, would be happy to pay the price of
saying "yes" once per buffer (per emacs instance).

i'd be curious to hear what the downsides might be, especially anyone who sees security-related downsides.

Ihor,

> 1) You can set org-confirm-babel-evaluate buffer-locally
> 2) Same or set :eval no header arg. (see
> https://orgmode.org/org.html#Evaluating-Code= -Blocks)
> 3) You can set :eval query header arg.

for me the use case is 1) disabling all (or setting to "query") w= hen,
e.g., you are exporting some file you received via e-mail and so trust
*none* of the code blocks; 2) enabling all for some file that you
yourself maintain, and so trust *all* the code blocks.=C2=A0 at least
initially, this seems a nice direction.

cheers, Greg

--00000000000007882205e80b3d41--