From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id aINtLgrH8GWIAwAAe85BDQ:P1 (envelope-from ) for ; Tue, 12 Mar 2024 22:20:10 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id aINtLgrH8GWIAwAAe85BDQ (envelope-from ) for ; Tue, 12 Mar 2024 22:20:10 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=bk0ikvpn; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710278410; 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=SUKyZ8RnNu+ii3Si0V44wW+BN+Aq2KgkrRqAIiFKNs0=; b=EYblW0IXXICpXfHyU3HXvWvB0mDWX0BqYfKimm4vfqszssbzsjJ11jPtbxkXv8nOAH0qFH 8sAH/SiSM6XMMwGml4n8PnnqVqUCm1NpXXeolxqf5wnDOVeRXZZdFXv/uAJ3l3/MdKsFM3 z9W6oprYdXlbSUwuXCGD5H0NXyNtDHpCHNCGN9rQ1YCipiFwgjK8hRr8hbrOl+z7SfSTO2 PC6FUS6vL6TvwLlDMtcA7q98WOHbnZYti4XtSWbwuhyg7ZnIdLPeR8PvolMpUnNOfv/UQD rF4bR2LWBP/TpdwFFTllQKCR5KMKCE/Mvre1ORCmv9dR3Q8Cib3muXQ/13VjZg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=bk0ikvpn; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710278410; a=rsa-sha256; cv=none; b=XAPzhnDpx4CVLst78xiwTTnUiFfC/MrCbwYTR5aWBNjinh70ysBpyI5mvohZgmf1qYevAG zsS7G/IGq/s7SSz3+4tKxUVhIMs36m4vort92Hnpai+lf0c9fZFyQG9FrhWOa018KaRs8A M3PoIzUeA0J0It8fLcZQJltZB6cOl1Eu67JqpWI4lhgK/yFCMSs3/ii8Su3HY9wrCDzTyQ /gkME1BgX2OCw7wj+a/71U9cSTijmfC8RlDNP+fjQwAzBOLf6vOnuy/nZo7n27vi+jQIb9 rEMO9TW6Tvd2L0v30VQY+ivup4bFmpkWEA1bpH+YgI4O+fjECJSyokvj+5k3vQ== 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 716BC6504C for ; Tue, 12 Mar 2024 22:20:10 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rk9Wv-0002yh-E3; Tue, 12 Mar 2024 17:19:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rk9Wu-0002y5-Dd for emacs-orgmode@gnu.org; Tue, 12 Mar 2024 17:19:24 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rk9Ws-0008OA-6e for emacs-orgmode@gnu.org; Tue, 12 Mar 2024 17:19:24 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 87ADB240029 for ; Tue, 12 Mar 2024 22:19:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1710278359; bh=0jw01riA0NCKo+IXSiT2XeC70IR+Uvl9hn0sP0Eb4SA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=bk0ikvpnUocuogn0UtNahmacWl1NFfDQOOKX3Dmu7p+wyhFQ1hw1+O2CQUnrYHYjr goeDn19qQd+ui3WKoWwpFXM2Z4ldmNLkdH3Ie7p6cE/GLPZc7sUKcCyMfvBeHAU8l7 lcN54rVv9QhmhsTMmX4fv3oawlicHbzsxWosh0aPT85AQ9VCynGT1hdSb/KVAGP0QK Nzo6s6LwOIv1cBakyPTiQWY3IjvK11+a33y9y7VOFi9iyQtlRNdSvIA8QQtTa937Co +0c5QuIbIAuV+mXdFXH5/BKdJTzuf6h+Gg8ikXo//PU5fiF3ixExlvYlt7AZ9FiNLV pWbirLmol0MPw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TvRNQ6c0fz6tmv; Tue, 12 Mar 2024 22:19:18 +0100 (CET) From: Ihor Radchenko To: Damien Cassou Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] [PATCH] org-babel-execute-buffer: Prevent executing non-code blocks [9.6.20 ( @ /home/cassou/.emacs.d/lib/org/lisp/)] In-Reply-To: <8734sv5fbt.fsf@cassou.me> References: <87zfv7kg0p.fsf@cassou.me> <87h6hbej82.fsf@localhost> <8734sv5fbt.fsf@cassou.me> Date: Tue, 12 Mar 2024 21:23:32 +0000 Message-ID: <874jdbjga3.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -8.62 X-Spam-Score: -8.62 X-Migadu-Queue-Id: 716BC6504C X-Migadu-Scanner: mx13.migadu.com X-TUID: jhTIx/HJgaUk Damien Cassou writes: > Ihor Radchenko writes: >> Thanks for the patch, but it is not obvious that skipping src blocks >> that cannot be executed is always a good idea. Consider, for example, >> that some blocks are used as input for other blocks. Then, failing to >> execute them means that other blocks may have unpredictable side >> effects. > > > I don't understand your position. Without this patch, executing > `org-babel-execute-buffer' will just crash if a block can't be > executed. What problem can skipping those could cause? For example, consider #+begin_src bash mkdir foo #+end_src #+begin_src emacs-lisp (write-file "foo/result") #+end_src The second block relies upon side effects of the first block. However, if ob-shell is not loaded, with your patch, the side effect will not happen. One can construct more nasty examples when not executing prior block leads to unexpected or even damaging results. >> May you please provide a concrete use-case when skipping some src code >> blocks is desired? > > I use text-mode blocks to represent output of bash scripts as in: > > #+name: repo-test-check > #+begin_src sh :exports both :results output raw :wrap SRC text > git log --oneline > #+end_src > > #+RESULTS: repo-test-check > #+begin_SRC text > cfd2b (HEAD -> main) Empty > #+end_SRC > > The second block can't be executed because no > `org-babel-execute:text` function exists. Why not simply adding :eval no header argument? The problem with testing that `org-babel-execute:' function exists is that we cannot distinguish between languages that cannot and should not be executed and babel backends that are not loaded for some reason. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at