Ihor Radchenko writes: > Rudolf Adamkovič writes: > >> : >> : > > hello >> >> on the subsequent runs. >> >> Better than the new version but still wrong. :) > > And this is what drove me crazy during debugging. I do not understand > the logic of all that ob-comint code. > > I have identified that the hang happens because Org does not change PS2 > prompt. Just PS1. But fixing this would yield to > > : org_babel_sh_prompt> org_babel_sh_prompt> hello > > Then, I tried to see how the original code works. And it does not > :facepalm: > > I asked emacs-devel > https://yhetil.org/emacs-devel/87y1tgqhmc.fsf@localhost/T/#u See the attached tentative patch. I'd appreciate some testing. Hopefully, I did not break anything. Comint is tricky.