forked from mirrors/org-mode
org-latex-compile: Fix erasing PDF output buffer late
* lisp/ox-latex.el (org-latex-compile): Clear the PDF output log buffer before running compile command. Fixes regression introduced in 0dfbf0c3. Reported-by: John Kitchin <jkitchin@andrew.cmu.edu> Link: https://orgmode.org/list/CALEYq0_t38_gsmjE-qgPCX07-V0P8FYwYEt9R4AT0dZ_SnXRuA@mail.gmail.com
This commit is contained in:
parent
52d9961f50
commit
42e95938ed
|
@ -4307,11 +4307,15 @@ produced."
|
||||||
(?L . ,(shell-quote-argument compiler))))
|
(?L . ,(shell-quote-argument compiler))))
|
||||||
(log-buf-name "*Org PDF LaTeX Output*")
|
(log-buf-name "*Org PDF LaTeX Output*")
|
||||||
(log-buf (and (not snippet) (get-buffer-create log-buf-name)))
|
(log-buf (and (not snippet) (get-buffer-create log-buf-name)))
|
||||||
(outfile (org-compile-file texfile process "pdf"
|
outfile)
|
||||||
(format "See %S for details" log-buf-name)
|
;; Erase compile buffer at the start.
|
||||||
log-buf spec)))
|
|
||||||
(with-current-buffer log-buf
|
(with-current-buffer log-buf
|
||||||
(erase-buffer))
|
(erase-buffer))
|
||||||
|
(setq outfile
|
||||||
|
(org-compile-file
|
||||||
|
texfile process "pdf"
|
||||||
|
(format "See %S for details" log-buf-name)
|
||||||
|
log-buf spec))
|
||||||
(org-latex-compile--postprocess outfile log-buf snippet)
|
(org-latex-compile--postprocess outfile log-buf snippet)
|
||||||
;; Return output file name.
|
;; Return output file name.
|
||||||
outfile))
|
outfile))
|
||||||
|
|
Loading…
Reference in New Issue