浏览代码

ob-core: Fix last commit

* lisp/ob-core.el (org-babel-execute-src-block): Fix thinko in commit
  122bf2997.
Nicolas Goaziou 7 年之前
父节点
当前提交
b420c8e290
共有 1 个文件被更改,包括 10 次插入9 次删除
  1. 10 9
      lisp/ob-core.el

+ 10 - 9
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