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
8bda5692ea
commit
0ea2c5bc9b
|
@ -1373,7 +1373,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