From 9c02bf49464beed630aa7b0eda8b5ab90e772fa5 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Mon, 7 Jun 2010 12:58:38 -0700 Subject: [PATCH] babel: more robust newline regexp in `org-babel-comint-with-output' * contrib/babel/lisp/org-babel-comint.el (org-babel-comint-with-output): Placing a more general regexp substitution for matching newlines returned by comint. This new option should definitely cover all cases. --- contrib/babel/lisp/org-babel-comint.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/babel/lisp/org-babel-comint.el b/contrib/babel/lisp/org-babel-comint.el index 5d19eb68d..0189c9a2e 100644 --- a/contrib/babel/lisp/org-babel-comint.el +++ b/contrib/babel/lisp/org-babel-comint.el @@ -97,7 +97,8 @@ during execution of body." (if (and ,remove-echo (string-match (replace-regexp-in-string - "\n" "\r\n" (regexp-quote ,full-body)) string-buffer)) + "\n" "[\r\n]+" (regexp-quote ,full-body)) + string-buffer)) (setq raw (substring string-buffer (match-end 0)))) (split-string string-buffer comint-prompt-regexp))))