diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2013-07-31 14:45:09 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2013-07-31 14:45:09 +0200 |
commit | a3375f3432677ed091a90fbdf33a7747ab1a8e2d (patch) | |
tree | 9c89a60ad5164e9410e974f5514559055448c915 | |
parent | 483977e016334088acdbe743b266f9e102e50d9e (diff) | |
parent | cc10c80d8504d1be59521e291923179170cb3792 (diff) | |
download | org-mode-a3375f3432677ed091a90fbdf33a7747ab1a8e2d.tar.gz |
Merge branch 'maint'
-rw-r--r-- | lisp/ox.el | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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)) |