emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [BUG] org-babel-comint-with-output: incorrect prompt detection [9.6-


From: Ihor Radchenko
Subject: Re: [BUG] org-babel-comint-with-output: incorrect prompt detection [9.6-pre]
Date: Fri, 11 Nov 2022 02:10:22 +0000

Bruno Barbier <perso.bruno.barbier@free.fr> writes:

> For example, using a haskell prompt, let say the prompt is "Prelude> ",
> the first incoming text is "Pre", the second incoming text is
> "lude> ", o-b-c-w-o will wrongly infer that "lude> " is the prompt,
> and that "Pre" was part of the previous value/output.

The problem is that Bash can send incoming text like

"prompt> " "prompt> " "prompt> output\n".

"prompt> prompt> prompt> output\n".

So, we cannot reliably distinguish your case from other possibly comint
quirks based on newline.

One possible fix could be replacing `comint-prompt-regexp' one more time
at the very end in addition to `org-babel-comint-prompt-separator'. We
must also make `comint-prompt-regexp' more precise to avoid "lude> "
being detected as a prompt.

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