summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2013-07-31 14:45:09 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2013-07-31 14:45:09 +0200
commita3375f3432677ed091a90fbdf33a7747ab1a8e2d (patch)
tree9c89a60ad5164e9410e974f5514559055448c915
parent483977e016334088acdbe743b266f9e102e50d9e (diff)
parentcc10c80d8504d1be59521e291923179170cb3792 (diff)
downloadorg-mode-a3375f3432677ed091a90fbdf33a7747ab1a8e2d.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/ox.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/ox.el b/lisp/ox.el
index 7bb2f02..5d28a81 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -3101,10 +3101,11 @@ to kill ring. Return output file's name."
;; we'd rather avoid needless transcoding of parse tree.
(unless (file-writable-p file) (error "Output file not writable"))
;; Insert contents to a temporary buffer and write it to FILE.
- (let ((out (org-export-as backend subtreep visible-only body-only ext-plist)))
+ (let ((coding buffer-file-coding-system)
+ (out (org-export-as backend subtreep visible-only body-only ext-plist)))
(with-temp-buffer
(insert out)
- (let ((coding-system-for-write org-export-coding-system))
+ (let ((coding-system-for-write (or org-export-coding-system coding)))
(write-file file)))
;; Maybe add file contents to kill ring.
(when (and (org-export--copy-to-kill-ring-p) (org-string-nw-p out))