Bläddra i källkod

org-export: Fix error when exporting a buffer with a code block

* contrib/lisp/org-export.el (org-export-as): Set a default value for
  org-current-export-file.
Nicolas Goaziou 13 år sedan
förälder
incheckning
4b201ab66d
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      contrib/lisp/org-export.el

+ 2 - 1
contrib/lisp/org-export.el

@@ -1885,7 +1885,8 @@ Return code as a string."
 			 (org-export-filter-apply-functions
 			  (plist-get info :filter-parse-tree)
 			  (org-export-with-current-buffer-copy
-			   (org-export-blocks-preprocess)
+			   (let ((org-current-export-file (current-buffer)))
+			     (org-export-blocks-preprocess))
 			   (org-element-parse-buffer nil visible-only))
 			  backend))))
 	;; Initialize the communication system and combine it to INFO.