Hi Jeremie, > Thanks for the info. > Unfortunately I couldn't identify the issue > I updated R and org (org 9.3.2, R 3.6.2). > but I'm still getting [the error]
Sorry, I missed the initial property line where you set the ":session" header argument. When I set the ":session" header argument, I get the original buggy behavior that you report. It looks like the reason for this, is that the substrings like "tr>" match `comint-prompt-regexp', and so get stripped out by `org-babel-comint-with-output'. I think a more reliable implementation would be to avoid `org-babel-comint-with-output', and take the approach used in the ":results value" case, which reads the output from a temp file instead of directly from the shell. Actually, that's the approach I use in my ob-session-async package [0], which re-implements ob-R sessions to allow async evaluation. It doesn't suffer from the bug you are reporting. I'll plan to extract that implementation and submit it as a patch here. Long term, I am intending to contribute the full functionality in ob-session-async here, but that's still a ways off. [0] https://github.com/jackkamm/ob-session-async Jack