forked from mirrors/org-mode
org-latex-preview: Clean up tex file on failure
* lisp/org-latex-preview.el (org-latex-preview--create-image-async): Ensure that the latex-preview cleanup callback runs when the preview image extraction process fails. This is to avoid littering the default-directory with temporary tex files.
This commit is contained in:
parent
ce260ed2c9
commit
52fd5cabea
|
@ -1377,7 +1377,8 @@ Returns a list of async tasks started."
|
|||
(list
|
||||
#'org-latex-preview--failure-callback
|
||||
(format "Creating LaTeX preview images failed (exit code %%d). Please see %s for details"
|
||||
(propertize org-latex-preview--image-log 'face 'warning))))
|
||||
(propertize org-latex-preview--image-log 'face 'warning))
|
||||
#'org-latex-preview--cleanup-callback))
|
||||
(pcase processing-type
|
||||
('dvipng
|
||||
(plist-put (cddr img-extract-async) :filter
|
||||
|
|
Loading…
Reference in New Issue