From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id iFweNGlH8GXLhgAA62LTzQ:P1 (envelope-from ) for ; Tue, 12 Mar 2024 13:15:38 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id iFweNGlH8GXLhgAA62LTzQ (envelope-from ) for ; Tue, 12 Mar 2024 13:15:37 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="O/+yqEp5"; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710245737; a=rsa-sha256; cv=none; b=JPFQiW6HCAglTbUHYMZNQeYsLSFmeZESXbmCcYahGRlckyQyD52UJz3FfE8Dsh5e06jx0c VBUhEXgDSfuRWty0ffGpUmlw7AwOk5lsaDkMaEJWLRIpTNnCjAU0fdbJZVZMGOfvqtAxBq z6ZhlJAMdBa6xfYhVAn05RwiZk4milYU2Ro7gFyGlajxZADDHURv8lg6yRTGL5wJcR+jeA Og43qELm8hVRLTPTcoOVnhFkpsL5JkxdcVL6E0+tpYNhkpdmyPy+P8m7mQg/au1/qK2++v iBMDe5vQ+42Se81bf/agidAnTEZz9F1raC5Uyaw1hHChMHSRHXA1PwMDv/lYxQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="O/+yqEp5"; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710245737; 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=Ub2Rkn1Ax/2OY0+NIY9Soi+RIhnXWlSp2kw9rs/BP4E=; b=c4OZ72T1RCZWffND1XkLeX9D2WE2XAUVR+QkvrQJf0FWj1hkFPGJkJNRl92T3CYhcJVX2H ZhtS1JlPfdqE48gYQwdNXgN3MKbFUqOPX4osRIWblZ/wuXKhD/sRvC6q2r1zrXV09WG+B0 W9wna4CbF9VXnLZE7dKsuSc4ec3+9yv2tyjNyhS9taoD5eWMrKZoLDiJviKEh9r+zRnmLD s6B5+IH7uaJ2TeGF+E4pOqwBtujX2/69PmuziF44XN6NLvIh8JgL2LJtFuRgldIBV4Zhnx /z3gV7o0jcy6ME4o6qMfcDkSYJRntjzYiL5WuMop5cd28DtY/C5WrJMND1C0aA== 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 9840CCAB6 for ; Tue, 12 Mar 2024 13:15:37 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rk11u-0007zn-T3; Tue, 12 Mar 2024 08:14:52 -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 1rk11r-0007zH-5H for emacs-orgmode@gnu.org; Tue, 12 Mar 2024 08:14:47 -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 1rk11p-0002IZ-6X for emacs-orgmode@gnu.org; Tue, 12 Mar 2024 08:14:46 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id EB140240028 for ; Tue, 12 Mar 2024 13:14:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1710245682; bh=1+AaomWYEHs5j1NWO4X/ZPUU/gYCQ5EWBFPH8BDHKYg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=O/+yqEp57o05IqumzpgNyvdBVcC6ldh6ouNgMAkht7NQWZ2WKhDHGZU3tUvl5Q1+V Lk4bnC5rJ/Lf4BT3bshc2hpMPWVexCKhaRUCLOopLXYRjcNqeKEUS9/lIRhlgxCJg4 5idEfwYsXGgb7sFW1/aLlS5LYhf+yOZL+aPMg4sJwZOSQ7ol/tmFZSQoCKpcvtwcBk 2haUG23Men2UmWCSUl1rB/FUtQJLbC1ft2EgIVGp4homCOhU/Q1TPvR1v3R4ZgT5RJ JJMEa2aJ+qTu9rX+XgjwkVkZD8U7c6tAP0fxOWKQc4eW9O9BTk9hHNLTILvCNm+ctF iP3P067MCUejg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TvCJ10RBCz9rxK; Tue, 12 Mar 2024 13:14:40 +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: <87zfv7kg0p.fsf@cassou.me> References: <87zfv7kg0p.fsf@cassou.me> Date: Tue, 12 Mar 2024 12:18:53 +0000 Message-ID: <87h6hbej82.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-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -8.27 X-Spam-Score: -8.27 X-Migadu-Queue-Id: 9840CCAB6 X-TUID: 3HmhdpN30BTS Damien Cassou writes: > The command `org-babel-execute-buffer' tries to execute all source code > blocks of the current buffer. When it encounters a block that is not > executable the command crashes. The attached patch makes the command ignore > non-executable blocks and move on. > ... > - (org-babel-execute-src-block arg))))) > + (let* ((info (org-babel-get-src-block-info)) > + (lang (nth 0 info)) > + (cmd (intern (concat "org-babel-execute:" lang)))) > + (when (fboundp cmd) > + (org-babel-execute-src-block arg))))))) 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. May you please provide a concrete use-case when skipping some src code blocks is desired? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at