Subject: bug#48524: 13.0.11; AUCTeX should not use LaTeX error message for non-LaTeX modes

From: Ikumi Keita <[email-masked]>
Date: Thu, 27 May 2021 21:09:09 +0900

Hi Jean,

>>>>> jfbu <[email-masked]> writes:
> I am of the opinion that AUCTeX should use the original Knuth
> error messages.

> Le 19/05/2021 à 18:16, jfbu a écrit :
> As auctex launches pdftex with -interaction=nonstopmode, the
> additional help messages displayed by TeX/LaTeX end up in the log file.

> So it is only a matter here to fetch the messages from the log,
> rather than using the specific ones incorporated into tex-buf.el

> This mechanism is already in place where tex-bug.el does not have
> an entry matching the message:

>     ERROR: Extra \or.

>     --- TeX said ---
>     l.37 \iftrue\expandafter\fi\or
>                                        --- HELP ---
>     From the .log file...

>     I'm ignoring this; it doesn't match any \if.

> So, it should not be complicated.

> The problem is to avoid in Plain TeX runs (or ConTeXt ? I am not
> familiar with it) to have the auctex generated error help go into
> LaTeX considerations which are not relevant to Plain TeX.

It seems that a similar topic was discussed before[1]. Tassilo's idea
that AUCTeX allows the form (REGEX . FUNCTION) in addition to (REGEX .
STRING) as entries in `TeX-error-description-list' would need some work,
so the attached rough hack might be of some interest for you.

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21595

Bye,
Ikumi Keita