emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Org 9.6-pre and Bash sessions


From: Ihor Radchenko
Subject: Re: Org 9.6-pre and Bash sessions
Date: Sun, 23 Oct 2022 04:27:50 +0000

Ihor Radchenko <yantar92@posteo.net> writes:

> 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'.

I improved the error buffer a bit and also made babel return the
available output with non-0 exit code.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=ab7eff9d9c0968392bd9783d72c56a4023bd10be
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f8a9cd23087799519bd709ea5c208ed29cb6587f

>>   #+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.

Fixed.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=1ef420b19d2e310d9ef67e090ef84cdb6da4744d

-- 
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]