diff --git a/lisp/ob-R.el b/lisp/ob-R.el index 7c9b02426..f72cd9539 100644 --- a/lisp/ob-R.el +++ b/lisp/ob-R.el @@ -444,7 +444,8 @@ last statement in BODY, as elisp." (mapcar (lambda (line) ;; cleanup extra prompts left in output (if (string-match - "^\\([ ]*[>+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)" line) + "^\\([>+.]\\([ ][>.+]\\)*[ ]\\)" + (car (split-string line "\n"))) (substring line (match-end 1)) line)) (org-babel-comint-with-output (session org-babel-R-eoe-output)