From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YbFqGCQYVmO8CQAAbAwnHQ (envelope-from ) for ; Mon, 24 Oct 2022 06:44:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8FVwFyQYVmPzpQAA9RJhRA (envelope-from ) for ; Mon, 24 Oct 2022 06:44:20 +0200 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 1CF0D2A32C for ; Mon, 24 Oct 2022 06:44:20 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omkOl-00028r-Ic for larch@yhetil.org; Sun, 23 Oct 2022 19:28:55 -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 1omSa0-0005oX-4b for emacs-orgmode@gnu.org; Sun, 23 Oct 2022 00:27:20 -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 1omSZx-0000A5-Gv for emacs-orgmode@gnu.org; Sun, 23 Oct 2022 00:27:19 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id CD479240026 for ; Sun, 23 Oct 2022 06:27:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666499233; bh=alL8innHcOddaGcXuP/cxpcWkx5WdMFtajsUxyuBQJE=; h=From:To:Cc:Subject:Date:From; b=GqIQ9O46MsbXiQALD1nBP6N+tJ81FiK1yLWr1VDTC4HIbcvv/vL6VmrIAsodGd3kF qLDX8cD/t2gBmfxISN069yreB9IKdQFee1sgzgRin9egtmlZc08L6esnJTYVHtFq95 T8gbcjXHJi9diUrJH9uDWZ2J3F7ToFR+H1qJETM5CcZRV5yWugp4jAObeqMB0eqjyx XolVZFlQlI4WgTZVK5qYHCSSipWTco4eM/tk7w2z8pr1w4vrH6q2a/oJf50V96SBWM GwjQVobO2cS/BEBnmEmufq6qz6u8hwqalPYYBTqJeHhj1z3H+djPogRlZK+U4NT47V eh0wgQ8wBHC7g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mw4t66st7z9rxG; Sun, 23 Oct 2022 06:27:10 +0200 (CEST) From: Ihor Radchenko To: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= Cc: Ihor Radchenko , emacs-orgmode@gnu.org Subject: Re: Org 9.6-pre and Bash sessions In-Reply-To: <87a65o15ut.fsf@localhost> References: <87edvbysqc.fsf@localhost> <87r0z6j1b1.fsf@localhost> <87pmel68y6.fsf@localhost> <87o7u432tl.fsf@localhost> <87a65o15ut.fsf@localhost> Date: Sun, 23 Oct 2022 04:27:50 +0000 Message-ID: <87fsffqi49.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: -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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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" 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=1666586660; 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=N3KZnKNYi9dJ3voEGR/4pCcMbQ28UP2OSefivSB5ISM=; b=QywYxGs7bB50d/x6fFPQx0Dd52x5OQmoR1VFNf4o2sFS0N6xkmAyYoZmzle2kOTtFUQWDj TlyXt/jNkkv8cyB/K/h9JSrqPkGUWiO60GY4bLu4buKTfRrmFHon6MDnvMFzavlH4KYTTH W+zVTVjXgwldk29FdLHNEcf3AuIKbdXco+NXX24M4hU62DFXloR0lgOoeeh/J1J27nST4Z EyIPHgFGs1Lz0+a9emMbW0VemWzVWxh2wZiTlcWGttg98WyPnuaodb3sI/6vKk7qYB5gQP FIdCqFlxcU7IhEsGAf1Kzaq6G6wei2AhdlK/T8yWg5B2yVgmam5aBrHdtLfHnA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666586660; a=rsa-sha256; cv=none; b=syKzezwMNTGt8LijQf4bX6FneYN38gCrkAia4bLkJcRLK4GOd/O2CTYA0aaSg/2k9Vn0kk C5LJ2UzwZyV2le/apytozpm7IRjTQKT/4wHeLlsHi12+hBYG7ig/clzf6o6UrU4VRiCZo5 Nl8fIwT85kC0MPuFB+mBzttLKj0/VDLdncBjYcfwJt96S9G8Sxvo3HfsxGXTU9x8NhY5gr lMWXF4C6LpaVpizj6z331Ossz5q69bxi0i3Sf6mkp11sSue3aVspZdYK1OIgrA5dx+SIIN 0V/NZiErOyKpABEgspHwmqsXKmdkdw6WLitsJrOA5D6BtF4aD1VGevch9EvwZg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=GqIQ9O46; 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" X-Migadu-Spam-Score: -5.71 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=GqIQ9O46; 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" X-Migadu-Queue-Id: 1CF0D2A32C X-Spam-Score: -5.71 X-Migadu-Scanner: scn0.migadu.com X-TUID: G6M6hGoi1IQk Ihor Radchenko writes: > This is actually expected. Without session, ob-shell discards results of > src blocks that fail and display *Error* window (empty in this case). > > If you try > > #+begin_src bash :results output > echo one > one.txt > echo two > two.txt > diff one.txt two.txt || true > #+end_src > > things will work as expected. > > I guess we can display a bit more info in `org-babel-eval'. I improved the error buffer a bit and also made babel return the available output with non-0 exit code. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=ab7eff9d9c0968392bd9783d72c56a4023bd10be https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f8a9cd23087799519bd709ea5c208ed29cb6587f >> #+begin_src bash :session bash :results output >> echo one > one.txt >> echo two > two.txt >> diff one.txt two.txt >> #+end_src >> >> ACTUAL: >> >> #+RESULTS: >> : org_babel_sh_prompt> 1c1 >> : < one >> : --- >> : > two >> >> EXPECTED: >> >> #+RESULTS: >> : 1c1 >> : < one >> : --- >> : > two > > Confirmed. > I know what is the problem. It is comint sometimes throwing output > without newlines, which leads to comint-prompt-regexp not matching all > the prompts after concatenating. Will take a look tomorrow. Fixed. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=1ef420b19d2e310d9ef67e090ef84cdb6da4744d -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at