forked from mirrors/org-mode
org-latex-preview: Ensure fmt file cache is cleared
* lisp/org-latex-preview.el (org-latex-preview-clear-cache): When running `org-latex-preview-clear-cache', the precompiled format file is only removed from the `org-persist' cache if the preamble has been cached in the current buffer. We require the format file to always be unregistered from the cache, so generate the preamble if necessary so it can be hashed and used as the key to find the corresponding format file in the cache.
This commit is contained in:
parent
23f39f84b5
commit
ded0f98d8f
|
@ -2023,11 +2023,15 @@ the *entire* preview cache will be cleared, and `org-persist-gc' run."
|
|||
(t (list nil nil))))))
|
||||
;; Clear the precompile cache if clearing the whole buffer or everything.
|
||||
(when (or clear-entire-cache (not (or beg end)))
|
||||
(or org-latex-preview--preamble-content
|
||||
(setq org-latex-preview--preamble-content
|
||||
(org-latex-preview--get-preamble)))
|
||||
(dolist (compiler org-latex-compilers)
|
||||
(org-latex--remove-cached-preamble
|
||||
compiler org-latex-preview--preamble-content nil)
|
||||
(org-latex--remove-cached-preamble
|
||||
compiler org-latex-preview--preamble-content t)))
|
||||
compiler org-latex-preview--preamble-content t))
|
||||
(org-latex-preview--clear-preamble-cache))
|
||||
(org-latex-preview-clear-overlays beg end)
|
||||
(if clear-entire-cache
|
||||
(let ((n 0))
|
||||
|
|
Loading…
Reference in New Issue