summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2018-03-03 10:07:21 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-03-03 10:07:21 +0100
commit122bf29974b34b8c3342d068497e6726a9023e09 (patch)
treec2ee331e342a30d5a32ee9d9c4088fd2c857aab3
parentca5206eed5c7e9718ca49fbfce819f7dd139f70a (diff)
downloadorg-mode-122bf29974b34b8c3342d068497e6726a9023e09.tar.gz
ob-core: Tiny refactoring
* lisp/ob-core.el (org-babel-execute-src-block): Tiny refactoring. Keep lines under 80 columns.
-rw-r--r--lisp/ob-core.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index a948ea7..fd8e5c7 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -703,15 +703,15 @@ block."
(list (list r))
r)))
(let ((file (cdr (assq :file params)))
- (result-graphics (member "graphics" (cdr (assq :result-params params)))))
+ (result-graphics
+ (member "graphics" (cdr (assq :result-params params)))))
;; If non-empty result and :file then write to :file.
- (when file
- ;; handle :results graphics :file case. don't write result to file if result is graphics.
- (unless result-graphics
- (when result
- (with-temp-file file
- (insert (org-babel-format-result
- result (cdr (assq :sep params)))))))
+ ;; 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)))))
(setq result file))
;; Possibly perform post process provided its
;; appropriate. Dynamically bind "*this*" to the