diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2013-11-08 08:56:39 +0100 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2013-11-08 08:56:39 +0100 |
commit | 71152dd69146f619c286978b2ebea617d76c770b (patch) | |
tree | 900d57c6601cc71a6b46de8943d2a14aedf2162b | |
parent | 2b25b5d978b3ab5abe42afa4808438f895176c82 (diff) | |
parent | b21c5fa2724ea3a0efc073f7231cce6349a397cf (diff) | |
download | org-mode-71152dd69146f619c286978b2ebea617d76c770b.tar.gz |
Merge branch 'maint'
-rw-r--r-- | lisp/ox-latex.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index f14a1f9..1da5f52 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -2900,9 +2900,13 @@ Return PDF file name or an error if it couldn't be produced." ;; Else remove log files, when specified, and signal end of ;; process to user, along with any error encountered. (when (and (not snippet) org-latex-remove-logfiles) - (dolist (ext org-latex-logfiles-extensions) - (let ((file (concat out-dir base-name "." ext))) - (when (file-exists-p file) (delete-file file))))) + (dolist (file (directory-files + out-dir t + (concat (regexp-quote base-name) + "\\(?:\\.[0-9]+\\)?" + "\\." + (regexp-opt org-latex-logfiles-extensions)))) + (delete-file file))) (message (concat "Process completed" (if (not errors) "." (concat " with errors: " errors))))) |