emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Make org-mode multi line shell session work sensibly


From: Ihor Radchenko
Subject: Re: Make org-mode multi line shell session work sensibly
Date: Sun, 02 Apr 2023 10:19:00 +0000

Fixed.

Samuel Loury <konubinix@gmail.com> writes:

> The symptom is the following: When I try to run a code block with noop
> lines, like comment, the output gets broken
>
> --8<---------------cut here---------------start------------->8---
> #+BEGIN_SRC sh :results output :exports both :session 
> c66d4791-003d-42af-a4e0-366f5542c604
>   echo a
>   # noop
>   echo b
> #+END_SRC
>
> #+RESULTS:
> :
> : a
> : $ b
> --8<---------------cut here---------------end--------------->8---

This has been fixed on main in a series of other related bugfixes.
Not on bugfix though, so I just cherry-picked the relevant commits from
main. Your example is now working fine on bugfix.

> Then I took though about it. I cannot believe I am the only person
> trying to run multi line shell programs with comment in session, am I?
>
> So here are a few questions: Is there anyone with the same use case as I
> have? If so, how do you cope with the problem I am facing? If I want to
> fix it, what do you think would be the more elegant solution: fixing the
> line by line parsing like I was trying to do or sourcing the code to
> avoid using line by line parsing?

Well. This issue has been introduced in the last minor release when we
attempted to fix another bug with Org babel being too aggressive when
removing anything that looks like prompt, even when it was not prompt.
This whole comint thing is tricky.

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