diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-03-05 14:34:28 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-03-05 14:34:28 +0100 |
commit | b420c8e290be3fb343373e9da2320d3113177966 (patch) | |
tree | 7960b5ebbb6b75cd8ee3edbf1cc495edcd4ad7ab | |
parent | 69c5b6c999523ff80bd1c7ca6b3935c1dca97ac2 (diff) | |
download | org-mode-b420c8e290be3fb343373e9da2320d3113177966.tar.gz |
ob-core: Fix last commit
* lisp/ob-core.el (org-babel-execute-src-block): Fix thinko in commit
122bf2997.
-rw-r--r-- | lisp/ob-core.el | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el index fd8e5c7..f84b9f1 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -702,16 +702,17 @@ block." (not (listp r))) (list (list r)) r))) - (let ((file (cdr (assq :file params))) - (result-graphics - (member "graphics" (cdr (assq :result-params params))))) + (let ((file (cdr (assq :file params)))) ;; If non-empty result and :file then write to :file. - ;; Handle :results graphics :file case. Don't write - ;; result to file if result is graphics. - (when (and file result (not result-graphics)) - (with-temp-file file - (insert (org-babel-format-result - result (cdr (assq :sep params))))) + (when file + (let ((graphics? + (member "graphics" (cdr (assq :result-params params))))) + ;; Handle :results graphics :file case. Don't + ;; write result to file if result is graphics. + (when (and result (not graphics?)) + (with-temp-file file + (insert (org-babel-format-result + result (cdr (assq :sep params))))))) (setq result file)) ;; Possibly perform post process provided its ;; appropriate. Dynamically bind "*this*" to the |