Browse Source

org-clone-local-variables: Prevent carrying over cache data

* lisp/org-macs.el (org-unique-local-variables): Add newly added cache
variables.  They must not be copied by `org-clone-local-variables'.
Otherwise, random failure may happen when cache does not correspond to
the buffer text.
Ihor Radchenko 2 years ago
parent
commit
e156e54251
1 changed files with 11 additions and 1 deletions
  1. 11 1
      lisp/org-macs.el

+ 11 - 1
lisp/org-macs.el

@@ -587,7 +587,17 @@ ones and overrule settings in the other lists."
 
 (defconst org-unique-local-variables
   '(org-element--cache
-    org-element--cache-objects
+    org-element--headline-cache
+    org-element--cache-change-tic
+    org-element--cache-change-warning
+    org-element--cache-gapless
+    org-element--cache-hash-left
+    org-element--cache-hash-right
+    org-element--cache-size
+    org-element--headline-cache-size
+    org-element--cache-sync-keys-value
+    org-element--cache-diagnostics-ring
+    org-element--cache-diagnostics-ring-size
     org-element--cache-sync-keys
     org-element--cache-sync-requests
     org-element--cache-sync-timer)