Rudolf Adamkovič <salu...@me.com> writes: > Ihor Radchenko <yanta...@posteo.net> writes: > >>> I did some testing and found no issues. > > Update: Today I needed to run some Bash, and it seems broken. > > PROBLEM 1: WITHOUT A SESSION > ============================ > > CONFIGURATION: > > Emacs 29, Org from Git (2f5e7103e59f06631e985d3dd39af21b5b7464ea) > > REPRODUCTION STEPS: > > Run the following code block: > > #+begin_src bash :results output > echo one > one.txt > echo two > two.txt > diff one.txt two.txt > #+end_src > > ACTUAL RESULTS: > > #+RESULTS: > > EXPECTED RESULTS: > > #+RESULTS: > : 1c1 > : < one > : --- > : > two
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'. > PROBLEM 2: WITH A SESSION > ========================= > > CONFIGURATION: > > Emacs 29, Org from Git (2f5e7103e59f06631e985d3dd39af21b5b7464ea) > > REPRODUCTION STEPS: > > #+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. > ADDENDUM > ======== > > A friend of mine, who uses Org that comes with Emacs 28.1 on Linux, > tried the PROBLEM 1 source block shown above, the one *without* a > session, and he got no results either. > > (We might need better tests.) Better tests are always needed :) https://orgmode.org/list/874k81bsvz.fsf@localhost -- 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>