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
This commit is contained in:
Ihor Radchenko 2022-10-27 11:49:05 +08:00
parent 6bbd08f5aa
commit d87a496b54
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 3 additions and 4 deletions

View File

@ -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))