Skip to content

Commit

Permalink
org-export-ignored-local-variables: Do not copy cache
Browse files Browse the repository at this point in the history
* lisp/ox.el (org-export-ignored-local-variables): Do not copy buffer
cache.  It is large by size (and, thus, slow to `read') and may be
changed destructively by reference, interfering with the original
buffer when calling `org-export-copy-buffer'.

Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://list.orgmode.org/m2zgef774u.fsf@me.com/T/#t
  • Loading branch information
yantar92 committed Oct 7, 2022
1 parent aa90e5b commit 4cb1b8e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lisp/ox.el
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,13 @@ See `org-export-inline-image-p' for more information about
rules.")

(defconst org-export-ignored-local-variables
'(org-font-lock-keywords
org-element--cache-change-tic org-element--cache-change-tic org-element--cache-size
org-element--cache-sync-keys-value org-element--cache-change-warning
org-element--cache org-element--cache-objects org-element--cache-sync-keys
org-element--cache-sync-requests org-element--cache-sync-timer)
'( org-font-lock-keywords org-element--cache-change-tic
org-element--cache-change-tic org-element--cache-size
org-element--headline-cache-size
org-element--cache-sync-keys-value
org-element--cache-change-warning org-element--headline-cache
org-element--cache org-element--cache-sync-keys
org-element--cache-sync-requests org-element--cache-sync-timer)
"List of variables not copied through upon buffer duplication.
Export process takes place on a copy of the original buffer.
When this copy is created, all Org related local variables not in
Expand Down

0 comments on commit 4cb1b8e

Please sign in to comment.