From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QCPDELOeqGCpdAAAgWs5BA (envelope-from ) for ; Sat, 22 May 2021 08:03:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 8Ml1DLOeqGA8SwAA1q6Kng (envelope-from ) for ; Sat, 22 May 2021 06:03:31 +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 507BC265E5 for ; Sat, 22 May 2021 08:03:30 +0200 (CEST) Received: from localhost ([::1]:58076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkKjP-0001VM-Pn for larch@yhetil.org; Sat, 22 May 2021 02:03:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkKiq-0001V9-87 for emacs-orgmode@gnu.org; Sat, 22 May 2021 02:02:52 -0400 Received: from forward102j.mail.yandex.net ([5.45.198.243]:43555) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkKin-0006z2-9Y for emacs-orgmode@gnu.org; Sat, 22 May 2021 02:02:51 -0400 Received: from iva5-76c5c16f2a53.qloud-c.yandex.net (iva5-76c5c16f2a53.qloud-c.yandex.net [IPv6:2a02:6b8:c0c:7bae:0:640:76c5:c16f]) by forward102j.mail.yandex.net (Yandex) with ESMTP id D8AB8F2154C; Sat, 22 May 2021 09:02:45 +0300 (MSK) Received: from iva4-b3ebd202b141.qloud-c.yandex.net (iva4-b3ebd202b141.qloud-c.yandex.net [2a02:6b8:c0c:4e8e:0:640:b3eb:d202]) by iva5-76c5c16f2a53.qloud-c.yandex.net (mxback/Yandex) with ESMTP id sfducfyQ4r-2jJ4WMVS; Sat, 22 May 2021 09:02:45 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1621663365; bh=YmgTU2Ysy2ZlE+MwoAlC+Z5POs70MdjVrK1jjpH4NKU=; h=In-Reply-To:Subject:To:From:Message-ID:Cc:Cc:Date:References; b=u/eLakb3s4JXw3u17SBbDtDQ/FT9LU3cTSWJNjI7mKGAxG5aG2ds5Q0HGXstQEG/F VEHRXlhIBSbFYzCLAHM5aOVBZzmBbcAaSiW1A8iE77E/SQ/5TX/hPeND6SIJLOanAn zkWSSZG4yrdqTDNv5fSKyGCJQJAYYoaEp7e7JZQ8= Received: by iva4-b3ebd202b141.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id l34JLnEtDI-2iLKL32e; Sat, 22 May 2021 09:02:44 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) From: Colin Baxter To: Tom Gillespie Subject: Re: execute elisp link without prompt In-Reply-To: (Tom Gillespie's message of "Fri, 21 May 2021 15:01:03 -0700") References: <87zgwoqd79.fsf@yandex.com> <87wnrsuk3y.fsf@nicolasgoaziou.fr> <8735uf28wt.fsf@yandex.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) X-Face: BHjiJOg/Qmj'BQgsAKL@])L)e62P)C"Y=6T Face: iVBORw0KGgoAAAANSUhEUgAAAEkAAAATAgMAAAChCMjeAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACVBMVEX/zAABCWP///8I RHjYAAAAAWJLR0QCZgt8ZAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+UFEAk5BvqS634A AAAbSURBVBjTY2BgCA1hYA0FAxDDgQEERsXoIAYA2F9Eb3cpB+AAAAAldEVYdGRhdGU6Y3JlYXRl ADIwMjEtMDUtMTZUMTA6NTY6MTcrMDE6MDCh/kkpAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTA1 LTE2VDA5OjU3OjA2KzAxOjAwTyZ6HwAAAABJRU5ErkJggg== Date: Sat, 22 May 2021 07:02:43 +0100 Message-ID: <87wnrrz4os.fsf@yandex.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=5.45.198.243; envelope-from=m43cap@yandex.com; helo=forward102j.mail.yandex.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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: , Cc: , emacs-orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621663411; 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=YmgTU2Ysy2ZlE+MwoAlC+Z5POs70MdjVrK1jjpH4NKU=; b=Bliczu2bpd6p34BxCtEA1CZPqGLiVYXXvTjDGzeyab1PyNUZFn+Q0umUL4+niCNmsflrfi kRwDoWr+rJiMjZedcW3ChLB2olFw6w0orF35aGBZ+DsnhmFZcEraOMJbjuyzTn+hzO2piw gYTb4QJtSs0B4l6ySI7FTamSb2TLwbQFeTOrWrnody/63C5Eur5+0Q3sjQ0ac+v0zOA5JU Dcb4LitSu2VLfVtXShoOHuoBAfzlu9g50rlZRGuH8j6PKhmy/w4ubpsApeesglrQyYrJEG tLGtFSfNOL+HiOTFacjT/EsV5CAekzCm2xY08G7zpf1v4dBmPPDmFymr/3Xccw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621663411; a=rsa-sha256; cv=none; b=c2Kpf4PufbQFkhQjuPbtJ5uBij8WzNrEzyw5x9jzWxplVdxGyR30EILe0xOyiFVv6L15/W akNkIXhuct81Zo5LRgH7dOP7prEvPsk3GwRMO1lcOIu28RRBkCZLj2fhTFXiKHS1+ax/fU D0y4BCyg2p+IOE+u4oxL95IYtPahapfY4qVgb5w0S3s4FuxfCpCd+u1F8/zYG6a+vU8ih4 rhRa58AGOFFys52XHOy/qASkMgaCkezDtbLqMkRTQIimn98KznRQrkl9tYeNQJFgb2wVBy IGF2UEmphMcon3L2nVjL/qSr2Y8ZYIjB7KspcU3tlytBc+RqpdcodAyLqSTMpg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yandex.com header.s=mail header.b="u/eLakb3"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yandex.com (policy=none); 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-Migadu-Spam-Score: -1.33 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yandex.com header.s=mail header.b="u/eLakb3"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yandex.com (policy=none); 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-Migadu-Queue-Id: 507BC265E5 X-Spam-Score: -1.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: aob131Ri5mYS >>>>> Tom Gillespie writes: >> In the end I've set as to nil as a local variable > If you want something a bit more secure you could use a function > that checks the block name ("some-block" in this example). Best! > Tom > (lambda (_lang _body) (not (string= "some-block" (plist-get (cadr > (org-element-at-point)) :name)))) > #+begin_src elisp (setq-local org-confirm-babel-evaluate (lambda > (_lang _body) (not (string= "some-block" (plist-get (cadr > (org-element-at-point)) :name))))) #+end_src > #+name: some-block #+begin_src elisp > (message "yay!") #+end_src > #+RESULTS: some-block : yay! > #+name: some-other-block #+begin_src elisp > (message "I ask to run") #+end_src > #+RESULTS: some-other-block : I ask to run Thanks Tom. I'll try this. Best wishes, Colin Baxter.