From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:203:b4db::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yBo5DDT5ymFjTgAAgWs5BA (envelope-from ) for ; Tue, 28 Dec 2021 12:47:00 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id OFiYCTT5ymFRCAAA9RJhRA (envelope-from ) for ; Tue, 28 Dec 2021 12:47:00 +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 D1EC731C8B for ; Tue, 28 Dec 2021 12:46:59 +0100 (CET) Received: from localhost ([::1]:60958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n2AwU-0000B2-Nz for larch@yhetil.org; Tue, 28 Dec 2021 06:46:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2Ava-00009Z-AI for emacs-orgmode@gnu.org; Tue, 28 Dec 2021 06:46:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:33691) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n2Ava-0001lv-19 for emacs-orgmode@gnu.org; Tue, 28 Dec 2021 06:46:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n2Ava-0000x6-0I for emacs-orgmode@gnu.org; Tue, 28 Dec 2021 06:46: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, 28 Dec 2021 11:46:01 +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 Received: via spool by 52545-submit@debbugs.gnu.org id=B52545.16406919493640 (code B ref 52545); Tue, 28 Dec 2021 11:46:01 +0000 Received: (at 52545) by debbugs.gnu.org; 28 Dec 2021 11:45:49 +0000 Received: from localhost ([127.0.0.1]:45237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2AvM-0000we-Rn for submit@debbugs.gnu.org; Tue, 28 Dec 2021 06:45:49 -0500 Received: from mail-lj1-f172.google.com ([209.85.208.172]:33407) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2AvL-0000wR-UE for 52545@debbugs.gnu.org; Tue, 28 Dec 2021 06:45:48 -0500 Received: by mail-lj1-f172.google.com with SMTP id v15so30507662ljc.0 for <52545@debbugs.gnu.org>; Tue, 28 Dec 2021 03:45:47 -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=rWGNXom1GX23F8p05yGBIre2KMqkqe9m2B1T50pzLqk=; b=dN7mdWqQimnpKoVP5Lo94VAkJbP/ZbWsgR2HjhuGCi8f/M1cHe3Kw4p9k5Kw5WXK9m 544MIOAil5GDCQdV1yunRg0zSdUtabDWd/MHs0j9pwDgz/qgm5qwX1+5vtQ3D9MzDkEi 64P8g5haMWjE2oeOHzK+dYtuFEMdpH+t34YI2gyJF2vRlp4Z1gI8fogEhYbekiXJ7iq7 Zmn/CyGipf5CSgA5ZWwDCGoShe/EIe0KbVOYyWGlEaLRtDrTJzMevB4LmXwzG3JdGDlH /lTSX+fJhNFmqSp0IVSKqcyQBLwEdzVqcS3/Ss/orhxx4wQyVyPscPsMrE+tyxE+A2lf a8Xw== 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=rWGNXom1GX23F8p05yGBIre2KMqkqe9m2B1T50pzLqk=; b=IGU0hruzW6djwvEhmCI+Nu0u0Me7wTQb40qe6O+HANq/nD3S4wLJ8lx5yJ1ZHLBcIC FMXilURsbjMh/sj2hBseZlKyINFNz0+bZYYc1R1bfJN9T/ga2KGvTZ+Yf1H8Mw6+PG1P UpM6aPobSSUvGSqe1/Xm+tnASg5ZCHFC7v1MLM38yxxj49MxHWZBF8rwIKrtgOypmHqO hxT/C5noZu9T5g6pT7V8NBwzeYtWHfKJa2lCROIk/+8CQq92HlswamUejV8JRwKJoUwJ JBCeirkWjLATq+hlm4Id2TZ+W8BIyyBCZbloxod7lkuC7AnNCyqDoUS13UrsH++UDza4 I98w== X-Gm-Message-State: AOAM5308rGxdGambuNnDzggtil+aYEvClUQlD0VXq0QQsClQdDc9gjkX CrTJQOf/LuISq0vcLqiyK/E4h651ziU= X-Google-Smtp-Source: ABdhPJzefnoh4aXisgFETdMTaUueWyJV8B+mBVrFO71iMhOnTFvM72r35dVPDonWwdqWUzH+PcUsQg== X-Received: by 2002:a05:651c:545:: with SMTP id q5mr11068333ljp.328.1640691941322; Tue, 28 Dec 2021 03:45:41 -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 18sm1877579ljj.119.2021.12.28.03.45.40 for <52545@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Dec 2021 03:45:40 -0800 (PST) References: <87ilvnx29d.fsf@kyleam.com> <87y24ib5v1.fsf@localhost> <87mtkssmth.fsf@localhost> From: Max Nikulin Message-ID: Date: Tue, 28 Dec 2021 18:45:39 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit 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=1640692020; 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=rWGNXom1GX23F8p05yGBIre2KMqkqe9m2B1T50pzLqk=; b=FOp/WwCEj0sVm+lahbdQI8tnpr7EGA7cJhtXwOEINB+Pa1L0Dnkyxe9D8WjOekJFTOUb8P h53xirxK3BKEf7iH9gscbPI88l6K2JLyJyzR3R5yeyx/mJ+OGaiAxUeksTUhFTx3v6SItG r2HkJp3hLUIAbQfDUiDEM68P44Jjm1sqxO7iv3Lws2Glzx1Bqa1eJbHqU4qE6GM3FQNWYE k2dMbvt+O0WKq2+7skobMVxwZExpXa1XwnqAXZvChjOUamMUaUkT28MtI4qfUMBzgPoNux r/6YAue675UAeaGqotMPAsuH5xIv/lYaWnZnwbx2So0I063ZT0C++NM2wyPgvw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640692020; a=rsa-sha256; cv=none; b=NtTpar0fRV4XE0qPtWvKtXsM3Slb7ALVnAv0tBI9giDuAPC9yzKtWZp0f3DZOyNBArSIy4 kFkI7QL6fjlCSBuVX1wPnJJEH5lJdCV77un/aeC7PqxbafCk1e21olXRckPhN03O+NFR0u rDrtkKimtwgboHAGd43VdVybXlUjcOeh3ouX132/vUk8tT6qM6dxgTaPtnrVFKkh0ZqWpo Axc6I+nUXWBAW1TvEqJjacHiBeq+GYgFQobVEcllMgtU53w0eJY90SKa/Y15m5jh+ix3yd cnK01Bf6X49/OhkqBIw2DMtTbMzKCTUi3puupBKfT4c4e7UngjVTFpjYj9emTg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=dN7mdWqQ; 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: -1.97 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=dN7mdWqQ; 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: D1EC731C8B X-Spam-Score: -1.97 X-Migadu-Scanner: scn1.migadu.com X-TUID: pan33u+FPZ2j On 28/12/2021 04:37, Rudolf Adamkovič wrote: > Max Nikulin writes: > >> Let's consider the following example: >> >> ---- >8 ---- >> Test >> >> #+begin_src elisp >> (message "Test") >> #+end_src >> ---- 8< ----- >> >> emacs -Q -L ~/src/org-mode/lisp/ --eval "(custom-set-variables >> '(org-babel-load-languages '((emacs-lisp . nil))))" babel-exec.org >> >> Do you agree that "No org-babel-execute function for elisp!" is a >> reasonable reaction to `org-babel-execute-buffer`? > > The user did ask Org to load "emacs-lisp" but to never execute it. > Thus, I would expect Org to do just that. What do you think? No, it means instruction to unload support of emacs-lisp even it was loaded before. See info "(org) Languages" https://orgmode.org/manual/Languages.html and `org-babel-do-load-languages' function. The latter may be considered too technical for ordinary user, but examples of its usage are excessively proliferated, e.g. it is mentioned for every supported language on Worg https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-octave.html The function is called when the value of `org-babel-load-languages' is changed through easy customization interface, so (emacs-lisp . nil) is a command rather than a declaration. The use case is to temporary enable support of some language and later to disable it again without terminating of emacs session. Just to avoid accidental execution of some snippet. I can not say that your expectation of the effect of nil is a nonsense, but changing its interpretation may cause silent failures and as a result upset users. Consider that a file that includes source code blocks for different languages is moved to another machine (or configuration changed since previous execution on the same machine). It is better to get explicit error than to copy result in a hurry and to discover that it is incomplete some time later. Per-file and per-block configuration is safer against such pitfalls. I do not insist that current behavior is the best possible. There are still some reasons behind such choice.