[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org f8a9cd2308 3/3: org-babel-eval: Return command outp
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org f8a9cd2308 3/3: org-babel-eval: Return command output even upon failure |
Date: |
Sun, 23 Oct 2022 00:58:17 -0400 (EDT) |
branch: externals/org
commit f8a9cd23087799519bd709ea5c208ed29cb6587f
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
org-babel-eval: Return command output even upon failure
* lisp/ob-eval.el (org-babel-eval): Return the available command
output even when the command fails.
This is useful for bash scripts that can produce useful output even
upon failing. The error window is still displayed to inform users.
Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://orgmode.org/list/m2czakgpk8.fsf@me.com
---
lisp/ob-eval.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/ob-eval.el b/lisp/ob-eval.el
index fa27d98a94..25a994134a 100644
--- a/lisp/ob-eval.el
+++ b/lisp/ob-eval.el
@@ -71,7 +71,8 @@ its results, otherwise display STDERR with
(compilation-mode))
;; Compilation-mode enforces read-only, but Babel expects the
buffer modifiable.
(setq buffer-read-only nil))))
- nil)
+ ;; Return output, if any.
+ (buffer-string))
(buffer-string)))))
(defun org-babel-eval-read-file (file)