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.
This commit is contained in:
Ihor Radchenko 2022-06-04 11:51:00 +08:00
parent 548632a15e
commit e156e54251
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 11 additions and 1 deletions

View File

@ -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)