bug-auctex
[Top][All Lists]
Advanced

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

bug#28953: 11.91.0; wrong alert about inexistent LaTeX errors


From: jfbu
Subject: bug#28953: 11.91.0; wrong alert about inexistent LaTeX errors
Date: Mon, 23 Oct 2017 18:35:04 +0200

Le 23 oct. 2017 à 17:09, Mosè Giordano <address@hidden> a écrit :

> 2017-10-23 14:47 GMT+02:00 jfbu <address@hidden>:
>> In real life example the ``:1: `` pattern appeared farther away on the line
>> inside a sentence. To a human, it is obvious it is not a LaTeX error
>> message. I am confident the logic for recognizing such error messages
>> is improvable. I plan to look at it when I get time to make
>> concrete proposal.
> 
> The relevant regexp is at line 1507 of tex-buf.el:
> https://git.savannah.gnu.org/gitweb/?p=auctex.git;a=blob;f=tex-buf.el;h=f458651c2cffc110ef4af4541c6b08af976907fb;hb=HEAD#l1507
> Perhaps ".*" is too greedy, anyway that regexp should match anything
> that is a legal path.  I don't expect it to be supereasy to find a
> regexp matching a path but not a whole sentence ;-)


Indeed. But the regexp is really minimal, is there some documentation
about the underlying difficulties?

Reporting that the LaTeX run had errors, and giving an Error overview
could perhaps be split.

For example if I try this

\documentclass{article}
\begin{document}
Hi
\typeout{./I/am/not/a/file:4: and this is not an error}
\typeout{}
\ERROR
\typeout{}
\typeout{! I am not an error.}

Did it go OK?
\end{document}

with Latexmk, it will only say

Collected error summary (may duplicate other messages):
  latex: Command for 'latex' gave return code 1
      Refer to 'temp2.log' for details

Without the \ERROR, it reports no problem. Now, indeed
Latexmk does not report a detailed error summary like AUCTeX
(it does report undefined references etc...)

For example a \PackageError{foo}{zaza}{tata} will also
cause the latex run to exit with return code 1 on my mac os,
hence the return code detects it independently of log contents.

Could AUCTeX check the return code on platforms allowing it?

If return code is 0, it could then say something like "Log file
contains data looking like errors, but LaTeX run ended with return
code 0". For my example above, with \ERROR commented out,
the return code is 0.

This is why I asked about documentation about the minimal used
regex, because perhaps these were considered already and dismissed
for some reason.

Bye,

Jean-François




reply via email to

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