From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YDC5EEnHXGOoOAEAbAwnHQ (envelope-from ) for ; Sat, 29 Oct 2022 08:25:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id EAi0EEnHXGNjZwEA9RJhRA (envelope-from ) for ; Sat, 29 Oct 2022 08:25:13 +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 08C6E22F23 for ; Sat, 29 Oct 2022 08:25:13 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oofGE-0007sy-8z; Sat, 29 Oct 2022 02:24:02 -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 1oof6f-0003XV-UD for emacs-orgmode@gnu.org; Sat, 29 Oct 2022 02:14:09 -0400 Received: from mail.tuxteam.de ([5.199.139.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oof6d-0006At-Uw for emacs-orgmode@gnu.org; Sat, 29 Oct 2022 02:14:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:To:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=SxE9RPeC2fUwUX+2fFOZtNxSJaVUDmeiuzaSWiaGRo0=; b=mQ37ZT3q0ADQHgw0ixVdiJkpQ8 ni9ZbVU8iZjxTjPgPd6su0OTcBVpelu6wn7x6gokf+MbJtwnHnpMJCxsRanOKmQMO5eH8+Emd7jiQ xpudgxITgf6dZSVTDAKIe4ZA6GkYs1m2+kR99gbjvO7MBgTe+uXQTJ0yPHto19gA17Ja5guGB54l6 3GGyp4IkbjyXVL7cG1YGz1GzzbRGfgWedHcXehLMoDP3LvmbkmxqKqhzbEJbkqXthZPYsHD4HM+Ts 7uXqq8mjx4FFc3GC12dBgJRdhd3ngkJi9CFIuyxzq7zIhybvcSwNCJWoA5P6eZMbVjAPWg96sxkMx zFUhTKZg==; Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1oof6a-0002QO-2q for emacs-orgmode@gnu.org; Sat, 29 Oct 2022 08:14:04 +0200 Date: Sat, 29 Oct 2022 08:14:04 +0200 To: emacs-orgmode@gnu.org Subject: Re: [FR] Display stderr contents after executing shell blocks (even when stdout :results output is requested) (was: Org 9.6-pre and Bash sessions) Message-ID: References: <87o7u432tl.fsf@localhost> <87a65o15ut.fsf@localhost> <87fsffqi49.fsf@localhost> <87wn8lorc1.fsf@localhost> <87v8o4krel.fsf@localhost> <87tu3njmv4.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nYrDv04GCd+FOhdT" Content-Disposition: inline In-Reply-To: <87tu3njmv4.fsf@localhost> From: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.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, 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: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org 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=1667024713; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=SxE9RPeC2fUwUX+2fFOZtNxSJaVUDmeiuzaSWiaGRo0=; b=RLX9ylr7Z6HiimNLuaW1kDv1PCNF+f8JVa8I98KsSUFRnfqSCcOViYzb02C+lhvVhrL9iU DnqiMo7RyzfjWH9b2MgvGd4RRbNwcmQi7O/gMn/U5j4AwL39Y++PrMUyOTPfvkfcT6cXuq OqHh7tNnsyJYkueSrV8+pBTcNYazKLkzVScXjSR8GnCXXZY6wLNNSgPHaO/KgEmauX9OLu ubtlG1yKTwukAIBTpIFN2nKW7IUTJgoSm5ghrzz4mI1XYB+qealh1zeQOdqGAGzHcybsvx BZrGVo0kmsAhbLBuIkd+GUYLiJ/Wki2MMQCVA3cFesfhnkpvmlgj5NsP7/xR3A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667024713; a=rsa-sha256; cv=none; b=C+ydXqgTojjYuYOfZ9IseHJsue8WfEMg923SvCKvmEjXfUFY2nP7kSjRTOYDfbQiXSDgrk mfLyGRTftiPLQmTsQVTif8KW1SmEaWvy7TfwHqJeXAdQk+Rnup2ypgIxmUXUc5kvYMmyqA I8xUTibl5SAKHFZP7ee4z0ulB71qLXrWwDBuZsjf3wVkWErRftWnKMLlmRf3Ft25TbQtup FVw+KLBv8Vah0cifw/tPKzIPG5dCNBgnx4l+C6fkcRM1mvieLyKMPjlEiLc4WVbdi/JLCQ Rf6WM5nqH+aZLSfluuoYafTk8Ubl+pZZhFWw5UHS8lzAkC1D0GImxtmdmbujGA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tuxteam.de header.s=mail header.b=mQ37ZT3q; dmarc=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: -0.83 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tuxteam.de header.s=mail header.b=mQ37ZT3q; dmarc=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: 08C6E22F23 X-Spam-Score: -0.83 X-Migadu-Scanner: scn1.migadu.com X-TUID: GCLUDfty2sdI --nYrDv04GCd+FOhdT Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 29, 2022 at 04:05:19AM +0000, Ihor Radchenko wrote: > Rudolf Adamkovi=C4=8D writes: >=20 > > Ihor Radchenko writes: > > > >> I do not think that it make sense to display that buffer when the code > >> finishes successfully. I can see this kind of behaviour > >> breaking/spamming automated scripts or export---code working in the > >> past may throw error output into unsuspecting users. > > > > But the exit code has nothing to do with the standard error. [...] > > For example, I use a program for work that uploads data to a certain > > 3rd-party server. It exits with a zero code but also shows extremely > > important notices on error output. As an "unsuspecting user", if I used > > Babel to run the program, I would end up in a trouble. [...] > Dear All, >=20 > As explained in the above quote, it may be reasonable to display stderr > in the shell (and possibly other) src blocks upon execution. >=20 > + Stderr may contain important information even if the code block > succeeds > - Displaying stderr will raise *Error* buffer, which may or may not be > expected or desired. >=20 > What do you think? My take as an Org user is that this makes a lot of sense. I don't know whether there is an elegant way to accomodate all the use cases in an elegant way, but to provide a concrete example where I'd have found it handy... While preparing a handout for an introduction to shell programming (at a very basic level), I wanted to embed little examples with their results. Org rocks at this kind of task. But in this case it's important to show everything the students are going to see. One could argue that the error part is even the most important. So what I needed was not only the stderr (optionally somehow separated =66rom stdout -- optionally as someone would see it in some terminal session), but also all the above even when the exit code was nonzero. Ideally, a display of that exit code, too. I ended up massaging prologue and epilogue, which worked nicely, but sadly is language dependent for a set of concepts which are, one could argue, independent of the language [1]. So yes, I would be thrilled by such a possibility. Cheers [1] These are OS conventions. So also a language of sorts, but at another level. --=20 tom=C3=A1s --nYrDv04GCd+FOhdT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCY1zEpQAKCRAFyCz1etHa Rk/eAJ9OAVwMVs9wS5pkjP2wYXdkzfzvCQCcC+qGS9fz2+pdnkNZL5kOHLLDqyk= =V/im -----END PGP SIGNATURE----- --nYrDv04GCd+FOhdT--