emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org 4d0295b315 5/5: Avoid ignoring LaTeX export output


From: ELPA Syncer
Subject: [elpa] externals/org 4d0295b315 5/5: Avoid ignoring LaTeX export output errors
Date: Sun, 31 Jul 2022 03:57:43 -0400 (EDT)

branch: externals/org
commit 4d0295b315b86d4cc1d85565b3e83ded494a1e67
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>

    Avoid ignoring LaTeX export output errors
    
    * lisp/org-macs.el (org-compile-file): When PROCESS is a list, keep
    output of all the listed commands, not just the last one.
    * lisp/ox-latex.el (org-latex-pdf-process): Clarify that the process
    output is parsed to detect compilation errors/warnings.
---
 lisp/org-macs.el | 9 +++++++--
 lisp/ox-latex.el | 3 +++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index 1dc0b70807..b90341e84e 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -315,8 +315,13 @@ it for output."
                               (?F . ,(shell-quote-argument full-name))
                               (?o . ,(shell-quote-argument out-dir))
                               (?O . ,(shell-quote-argument output))))))
-          (dolist (command process)
-            (shell-command (format-spec command spec) log-buf))
+           ;; Combine output of all commands in PROCESS.
+           (with-current-buffer log-buf
+             (let (buffer-read-only)
+               (erase-buffer)))
+           (let ((shell-command-dont-erase-buffer t))
+            (dolist (command process)
+              (shell-command (format-spec command spec) log-buf)))
           (when log-buf (with-current-buffer log-buf (compilation-mode)))))
        (_ (error "No valid command to process %S%s" source err-msg))))
     ;; Check for process failure.  Output file is expected to be
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index c56f9d3475..0654bf52c6 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1399,6 +1399,9 @@ A better approach is to use a compiler suit such as 
`latexmk'."
       "%latex -interaction nonstopmode -output-directory %o %f"))
   "Commands to process a LaTeX file to a PDF file.
 
+The command output will be parsed to extract compilation errors and
+warnings according to `org-latex-known-warnings'.
+
 This is a list of strings, each of them will be given to the
 shell as a command.  %f in the command will be replaced by the
 relative file name, %F by the absolute file name, %b by the file



reply via email to

[Prev in Thread] Current Thread [Next in Thread]