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

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

[elpa] externals/auctex-cont-latexmk 993c2e62fe 068/100: adapt TeX-forma


From: ELPA Syncer
Subject: [elpa] externals/auctex-cont-latexmk 993c2e62fe 068/100: adapt TeX-format-filter to format log more robustly
Date: Thu, 6 Jun 2024 03:57:57 -0400 (EDT)

branch: externals/auctex-cont-latexmk
commit 993c2e62fe69021b1b565fe24ec51dd1b517b155
Author: Paul Nelson <ultrono@gmail.com>
Commit: Paul Nelson <ultrono@gmail.com>

    adapt TeX-format-filter to format log more robustly
---
 tex-continuous.el | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/tex-continuous.el b/tex-continuous.el
index 21ace8e2fd..8d558618cc 100644
--- a/tex-continuous.el
+++ b/tex-continuous.el
@@ -113,14 +113,24 @@ is an error rather than a warning."
            (replace-regexp-in-string "\n" "" message)
            region))))
 
+(defun tex-continuous--format-log-buffer ()
+  "Format the current log buffer by joining lines suitably.
+Adapted from `TeX-format-filter'"
+  (goto-char (point-max))
+  (while (> (point) (point-min))
+    (end-of-line 0)
+    (when (and (memq (- (point) (line-beginning-position)) '(79 80))
+               (not (memq (char-after (1+ (point))) '(?\n ?\()))
+               (not (and (eq (char-before) ?.)
+                         (char-after (1+ (point)))
+                         (not (eq ?w (char-syntax (char-after (1+ 
(point)))))))))
+      (delete-char 1))))
+
 (defun tex-continuous--error-list (log-file)
   "Retrieve parsed TeX error list from LOG-FILE."
   (with-temp-buffer
     (insert-file-contents log-file)
-    (goto-char (point-min))
-    (while (re-search-forward "Warning:" nil t)
-      (let ((fill-column most-positive-fixnum))
-        (call-interactively 'fill-paragraph)))
+    (tex-continuous--format-log-buffer)
     (TeX-parse-all-errors)
     TeX-error-list))
 



reply via email to

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