浏览代码

ox: Preserve properties when duplicating buffer before exporting

* lisp/ox.el (org-export--generate-copy-script): Preserve properties
  when duplicating buffer before exporting.

Reported-by: John Kitchin <jkitchin@andrew.cmu.edu>
<http://lists.gnu.org/r/emacs-orgmode/2018-11/msg00329.html>
Nicolas Goaziou 6 年之前
父节点
当前提交
3216cbe776
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      lisp/ox.el

+ 1 - 4
lisp/ox.el

@@ -2673,10 +2673,7 @@ The function assumes BUFFER's major mode is `org-mode'."
 				    (quote ,val))
 			      vars))))))
 	 ;; Whole buffer contents.
-	 (insert
-	  ,(org-with-wide-buffer
-	    (buffer-substring-no-properties
-	     (point-min) (point-max))))
+	 (insert ,(org-with-wide-buffer (buffer-string)))
 	 ;; Narrowing.
 	 ,(if (org-region-active-p)
 	      `(narrow-to-region ,(region-beginning) ,(region-end))