From f0dfbf0c3999e44ef7b6704e6584aa2a5d43f2d8 Mon Sep 17 00:00:00 2001 From: TEC Date: Sun, 25 Dec 2022 00:59:21 +0800 Subject: [PATCH] ox-latex: Erase compile buffer at the start * lisp/ox-latex.el (org-latex-compile): Before running the compile command, erase the log buffer to ensure that stale/old logging is cleared. --- lisp/ox-latex.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 156940703..dc2062df5 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -4301,6 +4301,8 @@ produced." (outfile (org-compile-file texfile process "pdf" (format "See %S for details" log-buf-name) log-buf spec))) + (with-current-buffer log-buf + (erase-buffer)) (org-latex-compile--postprocess outfile log-buf snippet) ;; Return output file name. outfile))