From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MGK4D3KDGWPn9QAAbAwnHQ (envelope-from ) for ; Thu, 08 Sep 2022 07:53:54 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id GE68D3KDGWMsLAAA9RJhRA (envelope-from ) for ; Thu, 08 Sep 2022 07:53:54 +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 DDC553C38A for ; Thu, 8 Sep 2022 07:53:52 +0200 (CEST) Received: from localhost ([::1]:51548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWAU3-0000CN-NP for larch@yhetil.org; Thu, 08 Sep 2022 01:53:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWATD-0000Au-Fp for emacs-orgmode@gnu.org; Thu, 08 Sep 2022 01:52:59 -0400 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]:33378) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWATA-0003Kv-SR for emacs-orgmode@gnu.org; Thu, 08 Sep 2022 01:52:59 -0400 Received: by mail-pg1-x52e.google.com with SMTP id g4so1711099pgc.0 for ; Wed, 07 Sep 2022 22:52:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date; bh=Lm44GTJRguXmq6I7BjbUc7buIdfZ+HxpYDFg6xZ6iFI=; b=RVcbd8EqjS2jo1CzbDqZMKOl5GrrffXLmT5tkPs8YQkuyshxY5vj9itU4DNTm77A9S HTj8/CCd5COUP/yxbBVOr4HXfz7uox3Wve+HJL5pZvlxLxkwu3lY0Ow1poCDsNoDAaOs DK/2+rKCf3ztYPeKui1N/l9Xl9ZAM478W34ZTXM9DYdYmg8cdpah+kz53WpVQPfwVkJ1 pjbsWpQ64TqsPXaynNnSR/DUuIsW/nPRsFEOmNbkTSPJ+4zqVwu3DO5arimwX8ueaiLX ICqBz55bz1kvZl0wzcjDHiQn5peqM/KrESw2Ms/gFBvQ3vCQ96yC6CAf7ZHx88AaliNe t1CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=Lm44GTJRguXmq6I7BjbUc7buIdfZ+HxpYDFg6xZ6iFI=; b=xO6nl8SmrymkVaFmakrg+m9uptCCZ/Tz67vPvf119zYW+JHK0lDWtP/Wn1xuCmUUzO cbuSgOgkqTLLaasFweJ4mOXLiPnKL17vHlTTHPHCTYCfFXlID0xv/RUfqmpsHodbWFii d/1/nnpuIKfVzFMqrzfykCg/KKZSgZPddHzhZC4Hc5PEryg1vWE/8vpgtEYkXSC0eaOU 8oP10PmpLfgHP9JoFwjiN37XIIF7cVPdnbWCdGd0UW8rl0vOzGnpFXUWNUbo/CL+eWFh EHkV/0wxdbwLweXdCZFEGWQsAlfZFu38P0KC6agmtabNrR29ym6+dLZZVjbe8bs6oPUp FI/Q== X-Gm-Message-State: ACgBeo1SGYfv1JE5cddNI933AiRbnqCF97sAYvWAA8p9ju2VqZff6+cj briGRhlW6lhTQyHdJ1Vpqps= X-Google-Smtp-Source: AA6agR4ZmVno8zpQUA6k938gf5/Z7GqkMz/5H+CzeNG6iyDk9O1ZcHSo1yGh8cTgQHzosYrHjBuUkw== X-Received: by 2002:a63:2bcc:0:b0:434:eb77:28a with SMTP id r195-20020a632bcc000000b00434eb77028amr5243233pgr.168.1662616375264; Wed, 07 Sep 2022 22:52:55 -0700 (PDT) Received: from localhost ([2409:8a70:2b2:5800:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id h23-20020aa796d7000000b0053f9466b1b2sm861001pfq.35.2022.09.07.22.52.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 22:52:54 -0700 (PDT) From: Ihor Radchenko To: Greg Minshall Cc: Fedja Beader , "emacs-orgmode@gnu.org" Subject: Re: per-file (or, really, per buffer) allowing/disallowing code block execution In-Reply-To: <595135.1662491125@archlinux> References: <595135.1662491125@archlinux> Date: Thu, 08 Sep 2022 13:53:49 +0800 Message-ID: <87zgfao1hu.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=yantar92@gmail.com; helo=mail-pg1-x52e.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1662616433; 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=Lm44GTJRguXmq6I7BjbUc7buIdfZ+HxpYDFg6xZ6iFI=; b=tkZ09QaGAob7CMVowo4zFTrtIM0axhQt56etGOHKlZzUSwuvkjOyLSh/8FJC69BxNbSy8e hTJ5P0112+9CZEJMO9ALk65d3vi1aenfzLe8+KpWYHj64QXLNNDy4bP217UdWhoMKkCrT8 /pOpWx2cqNoQrX86doF35mNVqrwjFAgvTT7eMtvNMAP1VoPOjQdpRr3nslPMqT3xKGtxVE xWIdZINXTFM6ey35KW6aRqh73vcLeYFeuSkoCvlMM1XEc8VAzbKAShhohdc6EHXH0OjrVr pzBGEAx6fYkGn5FUxyzVKJexl6tot0FXC8yDGjv4b2SqmK59qODrXYSjlOzv/g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1662616433; a=rsa-sha256; cv=none; b=jNUOYLnrfrjwtKmHIBAXx/gXM4k6elu0eh0aOrVb59XgNWWdtcjmAeFwgCwvqu+/aLOm9V Uwb4FnNI5KhAETTX4Bw7CWRQchrOcMzig1B8/oWSV2RYBnK4Oy3p7Lzjquse+f8OZIjqtp KSkARjw0LoB7HzoS/UZwj2w5RwIKwoqlQsnHhJxa0IrObAquNFjFquoZOM2j04o6ZjKG6o tSii9QinocT61YkmIc2qW6LWEfKyqb2IVyTH3X8pz4yTd2I8AtdwvUNiwDKI25nKnbGm7z F9eZ53JIN6hSvyM8Hwgfd21aTDAMdf3YFkpq/RcHwCEw3pyZsGM+ciBdNAkM9Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=RVcbd8Eq; dmarc=pass (policy=none) header.from=gmail.com; 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.78 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=RVcbd8Eq; dmarc=pass (policy=none) header.from=gmail.com; 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: DDC553C38A X-Spam-Score: -1.78 X-Migadu-Scanner: scn0.migadu.com X-TUID: jt0b2+jV8OSC Greg Minshall writes: > 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. Then, what about the following: 1. Set org-confirm-babel-evaluate globally to t 2. In the files you maintain, you can always put file-local/directory-local value of org-confirm-babel-evaluate to nil. 3. We can modify org-babel-confirm-evaluate _function_ to accept four possible answers: yes, no, yes for all in buffer, no for all in buffer. The extra 2 options will set buffer-local value of org-confirm-babel-evaluate in the current Emacs session. -- Ihor Radchenko, 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