[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 58bc18eaf7 11/77: Be more robust against false p
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 58bc18eaf7 11/77: Be more robust against false positive |
Date: |
Fri, 26 Aug 2022 16:06:32 -0400 (EDT) |
branch: externals/auctex
commit 58bc18eaf7bd61e237a1bbaa3df8cacdbe591aee
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
Be more robust against false positive
* tex.el (TeX-TeX-sentinel-check,TeX-parse-error): Check whether
"file" really exists. If not, ignore it.
---
tex.el | 42 +++++++++++++++++++++++++++++-------------
1 file changed, 29 insertions(+), 13 deletions(-)
diff --git a/tex.el b/tex.el
index 747753b319..1d091e1d73 100644
--- a/tex.el
+++ b/tex.el
@@ -8256,7 +8256,12 @@ Return nil only if no errors were found."
(match-string 1 output-file)
"dvi")))))))
(if process (TeX-format-mode-line process))
- (if (re-search-forward "^\\(!\\|.*:[0-9]+:\\) " nil t)
+ (if (catch 'found
+ (while (re-search-forward "^\\(?:!\\|\\(.+?\\):[0-9]+:\\) " nil t)
+ (if (or (not (match-beginning 1))
+ ;; Ignore non-error warning. (bug#55065)
+ (file-exists-p (TeX-match-buffer 1)))
+ (throw 'found t))))
(progn
(message "%s errors in `%s'. Use %s to display." name (buffer-name)
(substitute-command-keys
@@ -8269,6 +8274,9 @@ Return nil only if no errors were found."
'TeX-current-master))
t))
t)
+ ;; In case that there were only non-error warnings of type
+ ;; bug#55065, restore point to the initial position.
+ (goto-char (point-min))
(let (dvi2pdf)
(if (with-current-buffer TeX-command-buffer
(and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI))))
@@ -9272,7 +9280,7 @@ Return non-nil if an error or warning is found."
(let ((regexp
(concat
;; TeX error
- "^\\(!\\|\\(.*?\\):[0-9]+:\\) \\|"
+ "^\\(!\\|\\(.+?\\):[0-9]+:\\) \\|"
;; New file
"(\n?\\([^\n()]+\\)\\|"
;; End of file.
@@ -9302,17 +9310,25 @@ Return non-nil if an error or warning is found."
nil)
;; TeX error
((match-beginning 1)
- (when (match-beginning 2)
- (unless TeX-error-file
- (push nil TeX-error-file)
- (push nil TeX-error-offset))
- (unless (car TeX-error-offset)
- (rplaca TeX-error-file (TeX-match-buffer 2))))
- (setq error-found t)
- (if (looking-at "Preview ")
- t
- (TeX-error store)
- nil))
+ (if (or (not (match-beginning 2))
+ ;; Ignore non-error warning. (bug#55065)
+ (file-exists-p (TeX-match-buffer 2)))
+ (progn
+ (when (match-beginning 2)
+ (unless TeX-error-file
+ (push nil TeX-error-file)
+ (push nil TeX-error-offset))
+ (unless (car TeX-error-offset)
+ (rplaca TeX-error-file (TeX-match-buffer 2))))
+ (setq error-found t)
+ (if (looking-at "Preview ")
+ t
+ (TeX-error store)
+ nil))
+ ;; This wasn't an actual TeX error. Go to the least
+ ;; possible point to search again.
+ (goto-char (1+ (match-beginning 1)))
+ t))
;; LaTeX bad box
((match-beginning 7)
;; In `TeX-error-list' we collect all warnings, also if they're going
- [elpa] externals/auctex d47a6e8716 29/77: Support complex \input path (bug#55511), (continued)
- [elpa] externals/auctex d47a6e8716 29/77: Support complex \input path (bug#55511), Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 9378b66daa 61/77: Add TODO, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 9a3078e510 68/77: Fix comments and doc strings, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 30f7a1ca68 63/77: Don't use void function texinfo-outline-level, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 3447aa75c3 32/77: ; Further fixes about single quotes in docstrings, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex fade32d568 54/77: Don't break line inside \verb-like macro (bug#56160), Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 545129e1c3 55/77: * style/shortvrb.el: Add missing macros incl. fontification., Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 010a1e24be 01/77: Follow up the previous commit, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex fa547aa71e 02/77: Don't increase indentation after \iff, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex f33df119ce 06/77: Ensure "make maintainer-clean" deletes dynvars files, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 58bc18eaf7 11/77: Be more robust against false positive,
Tassilo Horn <=
- [elpa] externals/auctex ba568ead99 24/77: ; Silence the compiler for the change in 37e5a450, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 8404fe8b18 17/77: Provide generic completion functions, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 9ca155cdb0 25/77: Improve fontification of kernel macros, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 46373674e2 22/77: ; Fix completion for counters made in 37e5a450, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex e30fda8130 26/77: ; Really silence the compiler for the change in 37e5a450, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 59ef475125 30/77: Simplify regexp, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 60ca36b5a1 39/77: ; * .gitignore: Exclude temp files produced by 2022-06-01 kernel., Tassilo Horn, 2022/08/26
- [elpa] externals/auctex d1f2c2cdb2 41/77: Add new style/proc.el, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 054b38887b 42/77: Fix (void-variable compilation-in-progress) error, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex b24dcb4feb 40/77: Track changes in LaTeX kernel 2022-06-01, Tassilo Horn, 2022/08/26