Ihor Radchenko writes: > Thanks! > I think that we need to do the same things as with your > `org-babel-comint-async-register' patch: (1) ORG-NEWS; (2) possibly use > more descriptive values. I'm attaching an updated patch with NEWS entry and more descriptive values for the prompt handling, consistent with the `org-babel-comint-async-register' patch. For the NEWS entry, I actually just modified the previous NEWS entry for `org-babel-comint-async-register' since there is so much overlap. But let me know if it would be better to have a separate NEWS entry for each. >> - ;; Filter out prompts. >> - (org-babel-comint--prompt-filter string-buffer))))) >> + (if ,no-cleanup-prompt >> + (save-match-data >> + (string-match (regexp-quote ,eoe-indicator) string-buffer) >> + (org-babel-chomp (substring string-buffer 0 (match-beginning 0)))) >> + (org-babel-comint--prompt-filter string-buffer)))))) > > May you please explain this additional filtering of eoe-indicator here? > Why did it become necessary and why you did not change anything when > NO-CLEANUP-PROMPT is nil - `org-babel-comint--prompt-filter' does > nothing about eoe-endicator. Indeed `org-babel-comint--prompt-filter' does nothing about eoe-indicator, leaving it to the language-specific processing (e.g. in org-babel-execute:) to clean it (e.g. with `butlast'). Since it can be confusing to have 2 different behaviors, I've updated the `disable-prompt-filtering' case to be more consistent, and leave the cleaning of the eoe-indicator to the language-specific implementations in ob-python and ob-R.