From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MGsdM8stqGCaMQEAgWs5BA (envelope-from ) for ; Sat, 22 May 2021 00:01:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id QOW/LsstqGCGYwAAbx9fmQ (envelope-from ) for ; Fri, 21 May 2021 22:01:47 +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 2C55E1BE20 for ; Sat, 22 May 2021 00:01:47 +0200 (CEST) Received: from localhost ([::1]:51822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkDDD-0000Qk-Ht for larch@yhetil.org; Fri, 21 May 2021 18:01:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkDCp-0000QX-E8 for emacs-orgmode@gnu.org; Fri, 21 May 2021 18:01:19 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:45828) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lkDCn-0000Bs-38 for emacs-orgmode@gnu.org; Fri, 21 May 2021 18:01:19 -0400 Received: by mail-wm1-x32e.google.com with SMTP id s5-20020a7bc0c50000b0290147d0c21c51so7894273wmh.4 for ; Fri, 21 May 2021 15:01:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=w2plhNhHmci2OPMMNyRHVCI78Q9OwNI1bqw5EmHZHj8=; b=CTewvNswI+or94OFuaaWozaQEPaluEbze+f2xgW39XKJxGJobz/h8yzkGBlvuTZRte X3uHCpp/LYnJlY39SoV6236OzKLCuOPI7hts8nZq6FFv37j+2A7QnVBDcOgGW530RazW mxD09QjReLrcjE+UN4U7B7IDZ/STZ7mJqp0lGV+PaQ+v9fIBhEn4LL9C1bkkXFGaOxZh +uGIjZRRS79+a4Ui4+5nbnCgngy7W7iIDGBM0nXLg7ARFsTMa6ZZDcJWPJwBSqATynKP JF+6Cngz4u/wNHZhlOsS6bzDNno8QXrDRpuxu593k2CCXedugmzm0/jAzfogSdUDlMxC suHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=w2plhNhHmci2OPMMNyRHVCI78Q9OwNI1bqw5EmHZHj8=; b=YA/DODQRafoF/wv7MsphSeXBXkoxDqbsB0ZjiNxoM9+MznkTNHbNCiQIafns6fDN3m MGlNLhju0hsk1JEKc+unOlZLmt13cVMU5cDCvXfXMTlXaHddpXlPQXrXMd3fr1BTuiQX rVjEnzOLjiiPf4YRH5y/EgRIyFCFZn/qU4nhhobhSnxWUuA0uE5s6xJ7MmxNlCr3DKkB FowjR9yUDA+mWeNr1qh202JJ7C6iBrpGQsTJChfzR0hKjJeSX8kLCYYbO3oe0aih1JOt vGvDmdRk/Qb8wtfCjNppBrtWG9CaTrSYA6g7lqvJCvAX8qA5xBum7p1oj8h8M2LmWCgt /7rw== X-Gm-Message-State: AOAM532IyBMhd/3It0r+VWUMpxTvsISUyUN2xcBN5KZLzKie7mm6c2Gt Pena4kUa3Yh7pHWsXwxNFHEj1mwx+2SUes9V95w= X-Google-Smtp-Source: ABdhPJxNvWNUmweOBkLPY9BWGxtZIJ38EjTbd+4TA3WG1i+/3aKRpLiIjnWWGGfs+WID/x7gyl/6xwtV/deREGGNlUg= X-Received: by 2002:a7b:ce0d:: with SMTP id m13mr10681553wmc.90.1621634475150; Fri, 21 May 2021 15:01:15 -0700 (PDT) MIME-Version: 1.0 References: <87zgwoqd79.fsf@yandex.com> <87wnrsuk3y.fsf@nicolasgoaziou.fr> <8735uf28wt.fsf@yandex.com> In-Reply-To: <8735uf28wt.fsf@yandex.com> From: Tom Gillespie Date: Fri, 21 May 2021 15:01:03 -0700 Message-ID: Subject: Re: execute elisp link without prompt To: Colin Baxter Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=tgbugs@gmail.com; helo=mail-wm1-x32e.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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=1621634507; 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=w2plhNhHmci2OPMMNyRHVCI78Q9OwNI1bqw5EmHZHj8=; b=WpVWFlSq4xgbEzLZ4B/yQwpi/2US/QHf7xU1XzWo5viQAYI0OAYDVEKOkyahq+D/9an7uh xX4l39PPLXAb4TBfkbcwg5mbpfQRldw+NHX2IKDPwIB/PKm909iwj+IxiUpdVHpPZRTs6G TbaKKTvaxSjLtpGhysdcUIXH6KV/Y+bNN1Br1ftngD17UyVmYcMGmmcRj4Y/kIwG2+QSsQ Oi3mQKdYE7kdFs44iSYWUp/QSetxPVs1OmTQ0wXoiym5cRNIobFUihRUTGbB9B/9KjhO5c cpzeSiKDqOxAyTLmmlns5CNRS2YSCpglrIRgvTrK2ZlJxiR9N5WyJLl4VCO38w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621634507; a=rsa-sha256; cv=none; b=mViiaUiwY7c+Ah9AaiWJd+Iby/1t4muvzJvVmWDGfMCM9Y/3KxGlRxOzl7KR82vXkXqvw7 cIavQ9tWLxU5/f1Q2vioLP1KNRASVRRpvAetop3I8loF3rtUHrYlgkEtNFlovPbuwTyMOZ ieQwKBUp8ZBWyUjnts/FvBwNfKKjORKQRAGjm5CSibRe7ZZSum0Hx0xF9ibPH8qz2qUsvP QouIIW931AgWPgXqcf5rHhG24t3+Q4No6u5BEi/9riiqVYWSVCLSiijIoGTxOa+YGkmyyU WOnc3v5LHxbeNPLKEAj3rA1+avM0X0NNnH01G5WAZbMJyS7Bsmo1N7nCHeBA8w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=CTewvNsw; dmarc=pass (policy=none) header.from=gmail.com; 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.64 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=CTewvNsw; dmarc=pass (policy=none) header.from=gmail.com; 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: 2C55E1BE20 X-Spam-Score: -1.64 X-Migadu-Scanner: scn1.migadu.com X-TUID: PGbfWIvIFEpb > 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