From d87a496b54b502d98e49f8bd6596e0562be9d105 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Thu, 27 Oct 2022 11:49:05 +0800 Subject: [PATCH] org-babel-eval-error-notify: Always display exit code * lisp/ob-eval.el (org-babel-eval-error-notify): Display exit code even when stderr is not empty. Link: https://orgmode.org/list/m21qqux0ga.fsf@me.com --- lisp/ob-eval.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lisp/ob-eval.el b/lisp/ob-eval.el index 25a994134..e1278bbad 100644 --- a/lisp/ob-eval.el +++ b/lisp/ob-eval.el @@ -40,10 +40,9 @@ (with-current-buffer buf (goto-char (point-max)) (save-excursion - (insert - (if (string-empty-p stderr) - (format "[ Babel evaluation exited with code %S ]" exit-code) - stderr)))) + (insert stderr) + (unless (bolp) (insert "\n")) + (insert (format "[ Babel evaluation exited with code %S ]\n" exit-code)))) (display-buffer buf)) (message "Babel evaluation exited with code %S" exit-code))