From: Ihor Radchenko <yantar92@posteo.net>
To: Samuel Loury <konubinix@gmail.com>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: Make org-mode multi line shell session work sensibly
Date: Sun, 02 Apr 2023 10:19:00 +0000 [thread overview]
Message-ID: <87y1nalh7v.fsf@localhost> (raw)
In-Reply-To: <875z47c08y.fsf@gmail.com>
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>
prev parent reply other threads:[~2023-04-02 10:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-08 8:15 Make org-mode multi line shell session work sensibly Samuel Loury
2023-04-02 10:19 ` Ihor Radchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y1nalh7v.fsf@localhost \
--to=yantar92@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=konubinix@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).