emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] org-babel-comint-with-output: incorrect prompt detection [9.6-pre]
@ 2022-11-10 20:34 Bruno Barbier
  2022-11-11  2:10 ` Ihor Radchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Bruno Barbier @ 2022-11-10 20:34 UTC (permalink / raw)
  To: emacs-orgmode


Hi,

The function `org-babel-comint-with-output' (o-b-c-w-o) may not detect
prompts correctly.

The function o-b-c-w-o checks if the incoming arbitrary chunk of text
contains whole prompts, and replace them.

But the incoming text may contain an incomplete prompt at the
end. When this happens, it will miss that real prompt.

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.

This is with current main (after commit 1ef420b19d2e310d9ef67e090ef84cdb6da4744d).

I'm randomly hit by this bug, when working on tests for ob-haskell.

Let me know if I need to provide more information,

Thanks,

Bruno



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-12-12 12:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-10 20:34 [BUG] org-babel-comint-with-output: incorrect prompt detection [9.6-pre] Bruno Barbier
2022-11-11  2:10 ` Ihor Radchenko
2022-11-11  8:39   ` Bruno Barbier
2022-11-13  3:57     ` Ihor Radchenko
2022-12-12 11:59   ` Ihor Radchenko

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