From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.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 mO5kFA139WUbAAAA62LTzQ:P1 (envelope-from ) for ; Sat, 16 Mar 2024 11:40:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id mO5kFA139WUbAAAA62LTzQ (envelope-from ) for ; Sat, 16 Mar 2024 11:40:13 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=cassou.me header.s=dkim header.b=bU8ilqq4; 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=cassou.me ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710585613; 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=+lDO31uss1+dz1d2/qh3y4UO88qLFYqBeZ1y5cHUKWo=; b=R6b1DLBh6/6YMm/yJ0PmAvaTU4s9N1r/JYb/MViLOaHQfRZNw77XVf4wtAV+9g4EAGSNfR vv9ktlok8dwG71lAVQ3ihaat5IRugm6SyeZtROPXB29yMe2XjsMrk2Vobm9S+dUxG//MO2 mnB5Yu6Gta1L48T04t7RpZJZDVuTsGryA+T1ZhgXiS0l+yxBDU34znDkiytqbdeYZOMeLu XX7OVMcugrtA8cjjpG2NWgzbGSjQrbm03xDUJNi0gxVLZP8HFnVdt+UD58cS8ONg21zI9Y nnBQQaEQ36VcOsyxtrFwKrlmh49hO8+hdEVrlJZjvOTN68PMGB/nzPn/kAG0Pg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=cassou.me header.s=dkim header.b=bU8ilqq4; 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=cassou.me ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710585613; a=rsa-sha256; cv=none; b=WW8/iaXAWZDmcFtN89n/M2NhwTfY+2xbJKnzKkD3vFGdpWg2DPybdrXeFoycd7L8eneMSi hY5rLwaXISJSb+INCZOqhdWtwcQ30SYAZ8dqpPs8DmR0mHvFDYVxuDyQ2yJ7e+5iZoNvSb 6AbMrwBQRKChpZ0n3Bjex9lPqC641cObjaHDWKR0Quif90INWqVEUPgiyjY+Cd1YmJ6zWZ JOQK2ZJnHvsUKPfBI2Eyqqipz9ntrwd7518gcxHkBJ3EbCXacDb3FFpTvXWTkvLUr3+GBt UTBgeXBvdkb6fXf2/OMlK+7fkR/aToraB5ssyhW3FVeHw5xiIEpCDjYjSNmSSA== 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 EAE0E13F87 for ; Sat, 16 Mar 2024 11:40:12 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlRRr-0002we-HU; Sat, 16 Mar 2024 06:39:31 -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 1rlRRo-0002wC-Vz for emacs-orgmode@gnu.org; Sat, 16 Mar 2024 06:39:29 -0400 Received: from mail.reprendre.net ([2001:910:1410:501::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlRRm-0002yH-V9 for emacs-orgmode@gnu.org; Sat, 16 Mar 2024 06:39:28 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id D9C2B2C9044; Sat, 16 Mar 2024 11:39:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cassou.me; s=dkim; t=1710585555; h=from:subject:date:message-id:to:cc:mime-version:content-type: in-reply-to:references; bh=+lDO31uss1+dz1d2/qh3y4UO88qLFYqBeZ1y5cHUKWo=; b=bU8ilqq4ZCpmjpU8kghkASQ8eFP7KkS01j5n4VZj8cik4G5PPCUpViuE5HrVN5kCXcaHuz HTcp25M2alRWDiZYumVIBKFfc2BTZ9FPjrgmmTykVnqRfnU2QR3c8Klf+FrZgxbOG0g6Vi uTVmfAmJFn6L2KiIYMlHz6wI/XIJyEg0YJf/3E6cp71Me7Pe1HOZxmp0KDFHfF8h0ieEiA P9MGTYmJsnhx+NZMNR375OE1Zuy+p6l45ppuoKdlfBAzKqhBHm0ExWA81WXcZdgGj+TEES 6jmzV9AHOYCdKoUmWAzTGcX2pwTUmyrkORA3XAAL4dsLuPBJuSFssn+1zFWlCA== From: Damien Cassou To: Ihor Radchenko 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: <874jdbjga3.fsf@localhost> References: <87zfv7kg0p.fsf@cassou.me> <87h6hbej82.fsf@localhost> <8734sv5fbt.fsf@cassou.me> <874jdbjga3.fsf@localhost> Date: Sat, 16 Mar 2024 11:39:13 +0100 Message-ID: <87h6h65ulq.fsf@cassou.me> MIME-Version: 1.0 Content-Type: text/plain X-Last-TLS-Session-Version: TLSv1.3 Received-SPF: pass client-ip=2001:910:1410:501::1; envelope-from=damien@cassou.me; helo=mail.reprendre.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-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: -6.91 X-Spam-Score: -6.91 X-Migadu-Queue-Id: EAE0E13F87 X-Migadu-Scanner: mx13.migadu.com X-TUID: OZghteLiWjQP Hi Ihor, Ihor Radchenko writes: > 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. If I understand correctly, you are saying that it is better to let the command crash as soon as possible instead of letting it execute potentially problematic code because some previous block has not been executed. I think it makes perfect sense. I'm now convinced that my patch is not desirable. Feel free to close the issue. > Why not simply adding :eval no header argument? Just because I didn't know it exists. Thank you for telling me. I have now added it to all my code blocks generating non-executable results using the :wrap keyword like this: #+name: show-tree #+begin_src sh :exports both :results output drawer :tangle yes :wrap "SRC text :eval no" echo foo #+end_src #+RESULTS: show-tree #+begin_SRC text :eval no foo #+end_SRC It works very well, thanks! Would you say this is how you would have done it as well or is there a better way? -- Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill