Steps to reproduce: create test.tex with
\documentclass{amsart}
\newtheorem{theorem}{Theorem}
\newtheorem{proposition}{Proposition}
\begin{document}
\begin{theorem}
blah
\end{proposition}
\end{document}
and do C-c C-c followed by C-c `. This jumps to the error, but no help is
available, even though LaTeX-error-description-list contains a relevant
entry.
The issue is that tex generates an error like the following:
LaTeX Error: \begin{theorem} on input line 5 ended by \end{proposition}.
On the other hand, the relevant regular expression in
LaTeX-error-description-list doesn't allow for "on input line X". This
patch generalizes that regular expression so that it matches such output.
Thanks, best,
Paul
From 83407c567891a213935c991e39a94d61ae17eeb8 Mon Sep 17 00:00:00 2001
From: Paul Nelson <[email protected]>
Date: Sun, 5 May 2024 01:26:33 +0200
Subject: [PATCH] Generalize some error description regexp
* latex.el (LaTeX-error-description-list): Generalize regexp for
begin/end mismatch error, so that a line number may be given.
---
latex.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/latex.el b/latex.el
index e2d2d88e..5c6a8510 100644
--- a/latex.el
+++ b/latex.el
@@ -7160,7 +7160,7 @@ error message occurs when the \\\\ is used in a centering or flushing
environment or else in the scope of a centering or flushing
declaration.")
- ("\\\\begin{[^ ]*} ended by \\\\end{[^ ]*}." .
+ ("\\\\begin{[^ ]*} \\(?:on input line [0-9]+ \\)?ended by \\\\end{[^ ]*}." .
"LaTeX has found an \\end command that doesn't match the corresponding
\\begin command. You probably misspelled the environment name in the
\\end command, have an extra \\begin, or else forgot an \\end.")
--
2.39.3 (Apple Git-145)
_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex