Jelajahi Sumber

org-element: Fix smart quotes in TITLE

* lisp/org-element.el (org-element-interpret-data): Do not remove
  properties by side-effect when interpreting a string, as it also
  removes them from the parse tree, making the string unusable without
  its :parent property.

If text properties get in the way, it is also possible to use
`substring-no-properties' but then, a compatibility function would be
required for XEmacs.
Nicolas Goaziou 11 tahun lalu
induk
melakukan
8e1386cead
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      lisp/org-element.el

+ 2 - 2
lisp/org-element.el

@@ -4489,8 +4489,8 @@ Return Org syntax as a string."
 	    (mapconcat
 	     (lambda (obj) (org-element-interpret-data obj parent))
 	     (org-element-contents data) ""))
-	   ;; Plain text: remove `:parent' text property from output.
-	   ((stringp data) (org-no-properties data))
+	   ;; Plain text: return it.
+	   ((stringp data) data)
 	   ;; Element/Object without contents.
 	   ((not (org-element-contents data))
 	    (funcall (intern (format "org-element-%s-interpreter" type))