From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mackenzie Bligh Subject: Contribution of a :confirm-evaluate flag to src blocks Date: Wed, 17 Jul 2019 11:30:38 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000c17eba058de4b2a9" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:56517) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnohy-0004A7-9T for emacs-orgmode@gnu.org; Wed, 17 Jul 2019 14:31:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hnohx-0006Hm-Ak for emacs-orgmode@gnu.org; Wed, 17 Jul 2019 14:31:18 -0400 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]:37295) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hnohx-0006Gz-2w for emacs-orgmode@gnu.org; Wed, 17 Jul 2019 14:31:17 -0400 Received: by mail-pg1-x52c.google.com with SMTP id i70so821000pgd.4 for ; Wed, 17 Jul 2019 11:31:16 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --000000000000c17eba058de4b2a9 Content-Type: multipart/alternative; boundary="000000000000c17eb7058de4b2a7" --000000000000c17eb7058de4b2a7 Content-Type: text/plain; charset="UTF-8" Hi All, First time contributing here, so apologies if I haven't gotten this quite right. As part of my employment I have an org document I have written contains a number of restclient and bash code blocks. The results of some of these src blocks are fed into other src blocks, and having to input "y" multiple times when trying to hit a REST api quickly became cumbersome. I also found the method of supplying a new org-confirm-babel-evaluate to disable the "ask to execute" behavior on a per language basis to be too crude. Therefore, I would like to introduce a new flag for src blocks ":confirm-evaluate", where a value of "n", "no", "f", or "false" will disable the "ask to execute" behavior for that specific block. I believe that this is a safer behavior compared to disabling "ask-to-execute" on a per language basis, and adds convenience to src blocks for literate programming. Thanks for your time, and I welcome any feedback! Sincerely, Mack --000000000000c17eb7058de4b2a7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi All,

First time contributing here, so apologies = if I haven't gotten this quite right. As part of my employment I have a= n org document I have written contains a number of restclient and bash code= blocks. The results of some of these src blocks are fed into other src blo= cks, and having to input "y" multiple times when trying to hit a = REST api quickly became cumbersome. I also found the method of supplying a = new=C2=A0org-confirm-babel-evaluate to di= sable the "ask to execute" behavior on a per language=C2=A0basis = to be too crude. Therefore, I would like to introduce a new flag for src bl= ocks ":confirm-evaluate", where a value of "n", "n= o", "f", or "false" will disable the "ask to = execute" behavior for that specific block. I believe that this is a sa= fer behavior compared to disabling "ask-to-execute" on a per lang= uage basis, and adds convenience to src blocks for literate programming. Th= anks for your time, and I welcome any feedback!

Sincerely,

Ma= ck=C2=A0
--000000000000c17eb7058de4b2a7-- --000000000000c17eba058de4b2a9 Content-Type: application/x-patch; name="0001-ob-core.el-Add-confirm-evaluate-flag-to-src-blocks.patch" Content-Disposition: attachment; filename="0001-ob-core.el-Add-confirm-evaluate-flag-to-src-blocks.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jy535pdc0 RnJvbSBkMDVmMTJiM2RjNjcxMDY1ZTI5ZWJjZDljZjVhMTBkZjAwZDFlNWU5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBCbGlnaCA8bWFja2VuemllYmxpZ2hAZ21haWwuY29tPgpEYXRl OiBNb24sIDE1IEp1bCAyMDE5IDE3OjI4OjAwIC0wNzAwClN1YmplY3Q6IFtQQVRDSF0gb2ItY29y ZS5lbDogQWRkIGNvbmZpcm0tZXZhbHVhdGUgZmxhZyB0byBzcmMgYmxvY2tzCgoqIGxpc3AvIChv cmctYmFiZWwtZXhlY3V0ZS1zcmMtYmxvY2spOiBhZGQg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KGxldCogKChpbnB1dHRlZC1j b25maXJtLWV2YWx1YXRlIChkb3duY2FzZSBpbnB1dHRlZCkpCisgICAgICAgICAgICAgICAgICAg ICAgIChjb25maXJtLWV2YWx1YXRlIChub3QgKG9yIChzdHJpbmc9ICJmYWxzZSIgaW5wdXR0ZWQt Y29uZmlybS1ldmFsdWF0ZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKHN0cmluZz0gImYiIGlucHV0dGVkLWNvbmZpcm0tZXZhbHVhdGUpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzdHJpbmc9ICJu IiBpbnB1dHRlZC1jb25maXJtLWV2YWx1YXRlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAoc3RyaW5nPSAibm8iIGlucHV0dGVkLWNvbmZpcm0tZXZh bHVhdGUpKSkpKQorCisgICAgICAgICAgICAgICAgICAoaWYgY29uZmlybS1ldmFsdWF0ZSAob3Jn LWJhYmVsLWNvbmZpcm0tZXZhbHVhdGUgaW5mbykgInRydWUiKSkKKyAgICAgICAgICAgICAgKG9y Zy1iYWJlbC1jb25maXJtLWV2YWx1YXRlIGluZm8pKSkKIAkgIChsZXQqICgobGFuZyAobnRoIDAg aW5mbykpCiAJCSAocmVzdWx0LXBhcmFtcyAoY2RyIChhc3NxIDpyZXN1bHQtcGFyYW1zIHBhcmFt cykpKQogCQkgOzsgRXhwYW5kIG5vd2ViIHJlZmVyZW5jZXMgaW4gQk9EWSBhbmQgcmVtb3ZlIGFu eQotLSAKMi4yMS4wCgo= --000000000000c17eba058de4b2a9--