From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YA0yJIq3XGNDQAEAbAwnHQ (envelope-from ) for ; Sat, 29 Oct 2022 07:18:02 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id oK8xJIq3XGNyVwAA9RJhRA (envelope-from ) for ; Sat, 29 Oct 2022 07:18:02 +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 6C5E390B9 for ; Sat, 29 Oct 2022 07:18:02 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooeDl-0007Nm-35; Sat, 29 Oct 2022 01:17: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 1ood8K-0003IW-P5 for emacs-orgmode@gnu.org; Sat, 29 Oct 2022 00:07:44 -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 1ood5L-0003zH-Ct for emacs-orgmode@gnu.org; Sat, 29 Oct 2022 00:04:41 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 43609240026 for ; Sat, 29 Oct 2022 06:04:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667016277; bh=D04b+cggk2njFl2FhLPIYWo3xpdJ4Hz1O/uk73MvHqc=; h=From:To:Cc:Subject:Date:From; b=bqUq/iE593ygTqgJvkQBe82Q81J6u/pgcVgn2kGjEgTt9cCBQ9wsj0L57TMnmTlSe J57GMVBSYSn26VA9WVqpnJTdKLOBxKUQ/3c4+wOqOd/E8cAP972q6Mikg5Mcanv2Lw kL0kUoWkD81OcVH6XJv95s0907MNPk5MJjdcuNStkngssDa2KljDvVMmhdIoIWym2+ 7Xj2x0g7EOc7qBKPxLlKFTgWZt/PYXiARuhFp6T13lx6TLSPa3eWkdz/O6ykXnDJC5 ZG4g2N1eVt+DIMNM2CD9Z1lb4QPN0kCjE/3SLX2BGsSHBw8PE4gyJU2eYAKYNlvMPr LdZSduCEcAOFg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mzm5H6c50z9rxD; Sat, 29 Oct 2022 06:04:35 +0200 (CEST) From: Ihor Radchenko To: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= Cc: Ihor Radchenko , emacs-orgmode@gnu.org Subject: [FR] Display stderr contents after executing shell blocks (even when stdout :results output is requested) (was: Org 9.6-pre and Bash sessions) In-Reply-To: References: <87edvbysqc.fsf@localhost> <87r0z6j1b1.fsf@localhost> <87pmel68y6.fsf@localhost> <87o7u432tl.fsf@localhost> <87a65o15ut.fsf@localhost> <87fsffqi49.fsf@localhost> <87wn8lorc1.fsf@localhost> <87v8o4krel.fsf@localhost> Date: Sat, 29 Oct 2022 04:05:19 +0000 Message-ID: <87tu3njmv4.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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, 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=1667020682; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=D0GvL3tuQ0M61OPlMmWFkRlwKl4rQCo/05LAtZgL9Uw=; b=OH9IoIV0l2dFg8+oj7iJK2jgMZFtqtQ8gf3+KxcII3HEh3E4RBRwwqy2b6VAkpQowt6tnb bMAqOQ0J+G163mIt9AYz1Ofid++bAE8IReLpJWVISk7O5uSW1hxRDTq4P78kMVxbr+BZaN Mke3YDidVw0eeyG2L2YMuWEvWtZfOTfIcKajtERzP8OPPKRRxYK0VRd0LKWeI94ApoFWfr Qgg4gZHMVXFTc8cr6NHSk4QQuLuyPlo6sc9yTVvf0UAgQD6+WBHZv1/2yfLVbc9jLaYpqM 4nINfEmVHhGKo2AD0l0ROaVqKfTRWz0EQ8bVbkGkCtsv6XeLVLuIroDnJdUHjA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667020682; a=rsa-sha256; cv=none; b=hew/5ELifYftsotrNPaEvOwjvdARdQz2doJwsNh1e7WRk9rKjnbPInATPgQ59IhW0tTWPu 7X2CGCTLN/YtMM/cwShhFkEo96SYCDY87hF2GRrynPAPq2bH1ntfXGz4Cjm0A7K6xbxvZY btyybrETdZAff0BRXlPdjUbAkD9/o6Dbtm/jpHlAwOMuUz9HHE1whHqxsN8mHzMoqzYP8Y 7ffWaVSRuEqyKBY+dyeRERqVKfFg2Lw4OL1QGuX4xsLq/P5BuejJxFvGIZ7vxIB9aIBbir ruMxjWgq+bh9WoX/+IGScUK5IV5wiiqE7ke7iKvgq10+mhrxAaM1mDr513vAfg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="bqUq/iE5"; 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: -8.73 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="bqUq/iE5"; 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: 6C5E390B9 X-Spam-Score: -8.73 X-Migadu-Scanner: scn0.migadu.com X-TUID: q+PN4zz6DSWX Rudolf Adamkovi=C4=8D writes: > 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. > > Unix programs can, and often do, halt with non-zero exit codes while > producing error output containing important information, such as > deprecation warnings. Further, many programs use error output as the > alternative "anything but the result" stream. > > Preserving user data, instead of trashing it, data does not count as > "spamming ... unsuspected users". On the contrary! > > 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. > > So, we should never implicitly trash user-generated data, let alone > based on a "completely made up" belief that a non-zero exit code somehow > implies "no important error output". It does not. > > (I speak only about Unix-like systems here. Perhaps on other operating > systems, things work differently.) Dear All, As explained in the above quote, it may be reasonable to display stderr in the shell (and possibly other) src blocks upon execution. + 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. What do you think? --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at