Rudolf Adamkovič <salu...@me.com> writes: >>> 1. ob-shell/error-output-after-success >>> >>> We seem to trash error output, such as warnings, on success. I >>> think we should not do this. Now, on the execution of "echo X >>> &>2", Org says "Code block produced no output." But that does >>> hold true. The block did produce output, just on the other output >>> stream, namely error output. > >> Trashing error output is expected by default. [...] I suggest you to >> read through [...] ob-shell follows the spec here. > > I get that ':results output' makes Org capture standard output, but not > error output, for its #+RESULTS. However, if you look at the test in > question, you will see that it expects error output in the *Org-Babel > Error Output* buffer, not in the #+RESULTS. We should not trash error > output; it belongs in the *Org-Babel Error Output* buffer.
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. >>> 3. ob-shell/exit-codes >>> >>> Should we add a newline after the exit code message? > >> Done. > > I updated the tests and now every string needs a final newline, which > does not seem correct. If we let the tests guide our design, all > becomes clear. Buffers that use the 'compilation-mode' never append > data on re-execution. Instead, they clear the buffer. > > Thus, we should > > 1. undo this change and instead > 2. call 'org-babel-eval-wipe-error-buffer' before execution. I do not think that it is a good idea. Code block execution may involve a whole chain of blocks when expanding references. If we wipe the error buffer and multiple blocks are failing, some errors may go unnoticed by the user. -- 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>