emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FR] Display stderr contents after executing shell blocks (even when std


From: Ihor Radchenko
Subject: [FR] Display stderr contents after executing shell blocks (even when stdout :results output is requested) (was: Org 9.6-pre and Bash sessions)
Date: Sat, 29 Oct 2022 04:05:19 +0000

Rudolf Adamkovič <salutis@me.com> writes:

> Ihor Radchenko <yantar92@posteo.net> 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?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]