From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sJShKDdm1GFhOwEAgWs5BA (envelope-from ) for ; Tue, 04 Jan 2022 16:22:31 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id wN1aJTdm1GHu7AAAauVa8A (envelope-from ) for ; Tue, 04 Jan 2022 16:22:31 +0100 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 2322A3060A for ; Tue, 4 Jan 2022 16:22:31 +0100 (CET) Received: from localhost ([::1]:59046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n4ldu-0007Fg-88 for larch@yhetil.org; Tue, 04 Jan 2022 10:22:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4lIB-0001YZ-00 for emacs-orgmode@gnu.org; Tue, 04 Jan 2022 10:00:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55108) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n4lIA-0004e8-KU for emacs-orgmode@gnu.org; Tue, 04 Jan 2022 10:00:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n4lIA-0003qx-Eb for emacs-orgmode@gnu.org; Tue, 04 Jan 2022 10:00:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#52545: 29.0.50; Make org-babel-execute-buffer ignore irrelevant src blocks Resent-From: Max Nikulin Original-Sender: "Debbugs-submit" Resent-CC: emacs-orgmode@gnu.org Resent-Date: Tue, 04 Jan 2022 15:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52545 X-GNU-PR-Package: org-mode X-GNU-PR-Keywords: To: "52545@debbugs.gnu.org" <52545@debbugs.gnu.org> Received: via spool by 52545-submit@debbugs.gnu.org id=B52545.164130840014777 (code B ref 52545); Tue, 04 Jan 2022 15:00:02 +0000 Received: (at 52545) by debbugs.gnu.org; 4 Jan 2022 15:00:00 +0000 Received: from localhost ([127.0.0.1]:38421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n4lI8-0003qG-4o for submit@debbugs.gnu.org; Tue, 04 Jan 2022 10:00:00 -0500 Received: from mail-lj1-f181.google.com ([209.85.208.181]:34356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n4lI4-0003ps-LG for 52545@debbugs.gnu.org; Tue, 04 Jan 2022 09:59:58 -0500 Received: by mail-lj1-f181.google.com with SMTP id p7so60315833ljj.1 for <52545@debbugs.gnu.org>; Tue, 04 Jan 2022 06:59:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=SWBF7k6MvjpXyyBMbR4LTuW+CbdvNC8sxfn80N+iO88=; b=kE9S2k7OvxgqQ3GLbGwiyJCCTXvBTqEog3NVn+d0M4jGaXpf+8POukfi8r5+rZ5/tm s/W8rgxreCSsx17QCPcuC+2rUXYOdmvLdOZlDqGIiroRCZSHI1OhrU+TNyaVHJDm/0u0 8q56PafL05TaqA3/w7zY3qHhbvK4Nf+eKJH6rnMKkrj/jyNpBGVsN/xVRjyqVqc6f1Lp 2UtOon96DB6NA3pDTe5sxECvibRSdMyubNIyxW+KSEtdWO7Z6QuBgugq9Y4Fus8x2gxT Z9ILqF0Ix8uMxz/5svp4CIGhX7dgO1hVL88lnmTkoXy90e3ifwJn4c6x6pdIdzIiGEuD cAvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=SWBF7k6MvjpXyyBMbR4LTuW+CbdvNC8sxfn80N+iO88=; b=G26f+lJ68sagVF4WUOct1vA9J8YTSljiUx1oCivxUWqI3Ev+mlzYpxmucFxk0xyd+w TP73Po/XWXvS+jQFG1yy0mxO23gQYjR7kmgWiy58kWL2XfNRDQraq6kz4ZugwN08Ysa1 1aINYK7CMcw9ts+bOrJ490yhwKrhj77C6tuD0XOxC6t6cRjaIw69kWbl3HInNGCw0zca AeL90Y7mzZKZ6T3F/Rp52bHwE6QY0SJt64LsBWeBd5RUpd8etLt1lIYrlF3Pn3PizTXr K4ZixgLdQ7yFRtmDX+awcGydhNjrZ10PJy2NdgV2ii1NwTwQvFdKmDqinAyd6WJN1dg1 XMRA== X-Gm-Message-State: AOAM532HutEpgrxZVRNny64VqcACB7u36UfGp8ZXXgL33R4n5+UpZbg9 hV/SnlLsHSayce/tl1GRGT7nTJC5304= X-Google-Smtp-Source: ABdhPJwXcS5V+ejOPRIwwWe8UcBEOLUf956BtZGHAH6daOiWgwOJ8cN9c3tyKdIgaH6RMS2b+rNMAw== X-Received: by 2002:a2e:994c:: with SMTP id r12mr41591321ljj.350.1641308390220; Tue, 04 Jan 2022 06:59:50 -0800 (PST) Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id p18sm3932337lfc.297.2022.01.04.06.59.49 for <52545@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Jan 2022 06:59:49 -0800 (PST) References: <87ilvnx29d.fsf@kyleam.com> <87y24ib5v1.fsf@localhost> <87mtkssmth.fsf@localhost> <87mtknsdhm.fsf@localhost> From: Max Nikulin Message-ID: Date: Tue, 4 Jan 2022 21:59:48 +0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <87mtknsdhm.fsf@localhost> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: emacs-orgmode@gnu.org 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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641309751; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=SWBF7k6MvjpXyyBMbR4LTuW+CbdvNC8sxfn80N+iO88=; b=qak4HnidXbZEFIzGwHAM1nzpLMplOWhzyf7on2dGp6JPDJtCQ/w3h5ihURlvQM/DZIz6Yq nV0BpB/mAc4wlsy27+xP5PAZKSjeftBEsXZYAM/rgo/Gn6M9UluJkZ/BH6ycg4rilbT+Zn 0KR5vv8XJ5DrKC1PrqVomUvVYYFIiIgcnLWXPca5PqHjef+7ZW1qr4DzAhSJB5XuLNobVq 0xsqarZH25/2IUqYs9Qp+DDlOHqCt2wyicBkRYZEDXhrxMdHKAwz0JxAxmQa6Yi9l9qDsy 9Jp10MRmFkGKv9TPF+t+ELEjEWRC4Bmcfv9YUOZBb0x6Vy7rrzGNwQYlF3I1Dw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641309751; a=rsa-sha256; cv=none; b=XldG9wC7NNxNnRe3IgRG1NsgNp9Btunv61erk/EvGUMy+wMQRAR+WrBCAMzB0a8H5zk6ak X+4q75YGV+tX2h/u7WXa5Wrg1ebT75gD9IHDCviFerODURIWrFngZTb1JPBCXX8Cp45yYf qUfC7LO9UVzzf7WHJ/S5UOkidg6/xT2Gi28i/ja9tseoRxtdE5XAgn/h7WPHDHn15v5uIH QiWn7HqR0zILDW22oRsTUaC0uBXbm4p8MyFcAy3shBZfwrZI+uNdOGXosIZuUoFPXhmqCJ 81Vo+MBpBFL1Aw4fXUCW4TPMP5RE2pe/N7vYMQ0Vq1t4ykYcRSNwX+3fCGpgsw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=kE9S2k7O; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: -2.79 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=kE9S2k7O; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: 2322A3060A X-Spam-Score: -2.79 X-Migadu-Scanner: scn0.migadu.com X-TUID: ipq1B2T84kIL Since debbugs is not the primary bug tracker, it is better to close this issue on debbugs and maybe confirm it for https://updates.orgmode.org/ From my point of view, making babel aware that some widely used languages are data-only (so evaluation does not make sense) improves user experience. On the other hand there is no support of BibTeX in babel, so current behavior is correct: attempt to execute a block of a language that is not enabled causes an error. (While I was reading first messages in this thread, it was not obvious for me that there in no ob-bibtex.el package.) Anyway emacs requires enough customization, so (setq org-babel-default-header-args:bibtex '((:eval . "no"))) globally in inti.el or per-file setting #+property: header-args:bibtex :eval no should not be a problem. User can achieve desired behavior with no changes in org code. On 26/12/2021 20:27, Ihor Radchenko wrote: > > Thanks for reminding about `org-babel-load-languages'. > Note that `org-babel-execute-src-block' (called by > org-babel-execute-buffer) does not really use it. It just checks for > (intern (concat "org-babel-execute:" lang)). > > Maybe we just should not throw an error when lang is not in > `org-babel-load-languages'? Or maybe we can check for this in > `org-babel-confirm-evaluate'. Berry, Charles. Fri, 17 Dec 2021 19:25:52 +0000 https://list.orgmode.org/A4FB4F42-64A8-4D6D-A621-D621E1AA1F04@health.ucsd.edu > If I have a typo in the name of a language, the error message you > quote tells me what my mistake was. Certainly, if some language is mentioned in `org-babel-load-languages' than it is not a typo, but as I wrote earlier, I do not think, nil should work as ":eval no". Side note: to notify users about a typo, it is better to check all source blocks in advance before starting to execute them in `org-babel-execute-buffer'. Export may issue warnings as well even when evaluation is disabled. See P.S. below for one more note. I do not mind using `org-babel-load-languages' more widely. However massive clean up of worg is required to change abundant examples that replace `org-babel-load-languages' by calling `org-babel-do-load-languages'. The latter is intended for `defcustom'. It is better to provide incremental functions to load and unload languages for usage in init files or source blocks. Direct (require 'ob-something) becomes less favorable as well. Some symbol like "noeval" may be added to nit and t as values of `org-babel-load-languages' pairs. Berry, Charles. Fri, 31 Dec 2021 19:11:45 +0000. https://list.orgmode.org/F641D224-52FC-45D8-95F0-9E99F824E1F7@health.ucsd.edu > #+name: yaml_header_1 > #+begin_export yaml Rudy wrote that it prevents tangling. I can add that it prevents export to e.g. HTML for documentation how to configure something that has two representations: executable script and steps that can be followed by manually typing commands and editing configuration files. So I consider data-only languages as a convenient feature. From security reasons I would like to have possibility to disable evaluation in a such way that it is impossible to override through per-file variables or properties. Are we going to change anything related to `org-babel-load-language' and `org-babel-execute-buffer' or maybe just add a set `org-babel-default-header-args:something variables'? P.S. Berry, Charles. Sat, 18 Dec 2021 20:13:15 +0000. https://list.orgmode.org/C61FBF93-064B-4FB2-9378-39D3078F108E@health.ucsd.edu > Also, when exporting it looks `org-babel-exp-results' does not > attempt to run src blocks for which > > (fboundp (intern (concat "org-babel-execute:" lang))) > > is nil. > > So doing an export should `just work'. I would say that it is hardly consistent with mistake detection as a feature.