0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-15 21:46:27 +00:00

ox-latex: Remove all temporary files when compiling

* lisp/ox-latex.el (org-latex-compile): Remove all numbered temporary
  files after compiling.
This commit is contained in:
Nicolas Goaziou 2013-11-08 08:54:52 +01:00
parent 92f89eedba
commit b21c5fa272

View file

@ -2852,9 +2852,13 @@ Return PDF file name or an error if it couldn't be produced."
;; Else remove log files, when specified, and signal end of ;; Else remove log files, when specified, and signal end of
;; process to user, along with any error encountered. ;; process to user, along with any error encountered.
(when (and (not snippet) org-latex-remove-logfiles) (when (and (not snippet) org-latex-remove-logfiles)
(dolist (ext org-latex-logfiles-extensions) (dolist (file (directory-files
(let ((file (concat out-dir base-name "." ext))) out-dir t
(when (file-exists-p file) (delete-file file))))) (concat (regexp-quote base-name)
"\\(?:\\.[0-9]+\\)?"
"\\."
(regexp-opt org-latex-logfiles-extensions))))
(delete-file file)))
(message (concat "Process completed" (message (concat "Process completed"
(if (not errors) "." (if (not errors) "."
(concat " with errors: " errors))))) (concat " with errors: " errors)))))