From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id ODjjLuO7DF83WQAA0tVLHw (envelope-from ) for ; Mon, 13 Jul 2020 19:54:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 2ICzKuO7DF/XdgAAB5/wlQ (envelope-from ) for ; Mon, 13 Jul 2020 19:54:11 +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 30E1E9401CF for ; Mon, 13 Jul 2020 19:54:11 +0000 (UTC) Received: from localhost ([::1]:55618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jv4Wf-00030M-HG for larch@yhetil.org; Mon, 13 Jul 2020 15:54:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jv4WE-0002zB-V1 for emacs-orgmode@gnu.org; Mon, 13 Jul 2020 15:53:42 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:46344) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jv4WD-0003du-0G for emacs-orgmode@gnu.org; Mon, 13 Jul 2020 15:53:42 -0400 Received: by mail-wr1-x435.google.com with SMTP id r12so18045392wrj.13 for ; Mon, 13 Jul 2020 12:53:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=/YQ3ymZAaOyIM1EbB2bV+7l76A4EgZDyTtJT8tA75yA=; b=W02MBHayW34ee8moe9sOtlAp4yuYNtMtn+8eqc7SrTUyEAEy0BljEJX8qZhn3GuApq DxA346YCeJO07H4YFKcI3GMxe8vIFKtzLkVI4F2HsrjLIX/svHssl5OtSdVlb71oaqZD 2yJHcySHW16BPWbZ2AADQrdXWVorXT42TUw5pfNycZVFWCa0QjaOXFxt6QtOJ62TzRJe 3dVe6hL3kdD0an9gXlqzH0T/pY2UF/CWoKkClEKgnvHHpnQBOOkqD6urQ0gqmQLzbJhI Zh0OHS7unThNV6RhDn1boUN08Wswgb4ziCm+/A5JcW17zbvGTNFmLN88DXKSTy9VN3+6 ChEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=/YQ3ymZAaOyIM1EbB2bV+7l76A4EgZDyTtJT8tA75yA=; b=RCf9fvypqMct29/U9LSf3sRPm/PgjT7WnVyAnYf6r5gdus8nM8BSdJTBnY7FPkkfeN tJhgwfxbBEzzYGRewT+p9CXPfSElSEp6XlBRQ/cq/TWT/JTecTI1wc9S8sB1qfcb9F7J K/8YhiLBd+b6jYQYrmHl7kftqBjnT/p/3XUiK6CopbhADgE+srNMW0YwWw/l4BlSUvai 9lHGPPhNteT+wdUKhnnem9f1zcQxhWVZX7t8Q6N2ioY9ogSexC+gu/wN0Kl16q6VdhXt lU9QmV+QR0uj5oPQw/YCltwoAW0Cn7oAXgUUC5OjTcP96etdkzSPdlhdUzzMCEwf6bZO b9+A== X-Gm-Message-State: AOAM530wy5VBN7LHC1iHKAbBWn+dmN4skN1dgWNh8wU7UHYO9VQ8Eox6 LOpanZlWKWUbaRatfzf+2z87MO0zP1zRWfHUQ1fd1FY0 X-Google-Smtp-Source: ABdhPJzrWY8B1YdlVnJp5yBRjQhZeE7BGEqawdeXD4+SWe+aTv4HTKHfHs9ADR6r/mjVefsvsljG1pkcOOMFcznYdZ0= X-Received: by 2002:adf:fc90:: with SMTP id g16mr1164151wrr.42.1594670018701; Mon, 13 Jul 2020 12:53:38 -0700 (PDT) MIME-Version: 1.0 From: Tom Gillespie Date: Mon, 13 Jul 2020 12:53:48 -0700 Message-ID: Subject: [PATCH] lisp/ob-core.el: pass expanded body to org-confirm-babel-evaluate To: emacs-orgmode@gnu.org Content-Type: multipart/mixed; boundary="000000000000ffd35a05aa580b9a" Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=tgbugs@gmail.com; helo=mail-wr1-x435.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=W02MBHay; 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-Spam-Score: -0.61 X-TUID: B4hX2ozEPXco --000000000000ffd35a05aa580b9a Content-Type: text/plain; charset="UTF-8" Hi all, This is a patch to improve the behavior of org-babel-check-confirm-evaluate and the usefulness of org-confirm-babel-evaluate when a function is provided. It is currently made against master, but it might also be possible to make it against maint. The rest is in the commit message. Best! Tom --000000000000ffd35a05aa580b9a Content-Type: text/x-patch; charset="US-ASCII"; name="0001-lisp-ob-core.el-pass-expanded-body-to-org-confirm-ba.patch" Content-Disposition: attachment; filename="0001-lisp-ob-core.el-pass-expanded-body-to-org-confirm-ba.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kckx8mjv0 RnJvbSA2ZDA2OWY5NTMyZjQ0ZWU5ZmJjMWEwZWJkYWFkY2MyZWI4MDdmOGVjIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBUb20gR2lsbGVzcGllIDx0Z2J1Z3NAZ21haWwuY29tPgpEYXRl OiBNb24sIDEzIEp1bCAyMDIwIDEyOjA0OjE4IC0wNzAwClN1YmplY3Q6IFtQQVRDSF0gbGlzcC9v Yi1jb3JlLmVsOiBwYXNzIGV4cGFuZGVkIGJvZHkgdG8KIG9yZy1jb25maXJtLWJhYmVsLWV2YWx1 YXRlCgoqIGxpc3Avb2ItY29yZS5lbCAob3JnLWJhYmVsLWdldC1ib2R5LXRvLWV2YWwpOiBOZXcg ZnVuY3Rpb24gZXh0cmFjdGVkCmZyb20gb3JnLWJhYmVsLWV4ZWN1dGUtc3JjLWJsb2NrIHNvIHRo YXQgaXQgY2FuIGJlIHJldXNlZC4KKG9yZy1iYWJlbC1leGVjdXRlLXNyYy1ibG9jayk6IFVzZSBv cmctYmFiZWwtZ2V0LWJvZHktdG8tZXZhbAoob3JnLWJhYmVsLWNoZWNrLWNvbmZpcm0tZXZhbHVh dGUpOiBVc2Ugb3JnLWJhYmVsLWdldC1ib2R5LXRvLWV2YWwgdG8KcGFzcyB0aGUgZXhwYW5kZWQg Ym9keSBvZiB0aGUgY29kZSB0aGF0IHdpbGwgYWN0dWFsbHkgYmUgZXZhbHVhdGVkIHRvCm9yZy1j b25maXJtLWJhYmVsLWV2YWx1YXRlIGlmIGl0IGlzIGEgZnVuY3Rpb24uCgpUaGlzI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