From 919722a6a61abb1d17a253e5ecaaccdf8b71bace Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 16 Nov 2014 17:58:11 +0100 Subject: [PATCH] ox-latex: Do not message "PDF file produced" for fragments * lisp/ox-latex.el (org-latex-compile): Do not message "PDF file produced" for fragments. --- lisp/ox-latex.el | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 529b55441..27eb84c15 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -3163,19 +3163,20 @@ Return PDF file name or an error if it couldn't be produced." (error (format "PDF file %s wasn't produced" pdffile)) ;; 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 (file (directory-files - out-dir t - (concat (regexp-quote base-name) - "\\(?:\\.[0-9]+\\)?" - "\\." - (regexp-opt org-latex-logfiles-extensions)))) - (delete-file file))) - (message (concat "PDF file produced" - (cond - ((eq warnings 'error) " with errors.") - (warnings (concat " with warnings: " warnings)) - (t "."))))) + (unless snippet + (when org-latex-remove-logfiles + (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 "PDF file produced" + (cond + ((eq warnings 'error) " with errors.") + (warnings (concat " with warnings: " warnings)) + (t ".")))))) ;; Return output file name. pdffile))))