Explorar o código

ox: Fix cache confusion during export

* lisp/ox.el (org-export--generate-copy-script): Do not share cache
  when copying buffers since keys and values are modified by
  side-effect.
Nicolas Goaziou %!s(int64=11) %!d(string=hai) anos
pai
achega
320ae9021e
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      lisp/ox.el

+ 6 - 1
lisp/ox.el

@@ -2937,7 +2937,12 @@ The function assumes BUFFER's major mode is `org-mode'."
 	       (when (consp entry)
 		 (let ((var (car entry))
 		       (val (cdr entry)))
-		   (and (not (eq var 'org-font-lock-keywords))
+		   (and (not (memq var '(org-font-lock-keywords
+					 ;; Do not share cache across
+					 ;; buffers as both keys and
+					 ;; values are modified by
+					 ;; side effect.
+					 org-element--cache)))
 			(or (memq var
 				  '(default-directory
 				     buffer-file-name