The parsing of latex errors assumes that an error begins with a line
beginning with "! ", and afterwards there is a line beginning with "l."
containing the error line number.
However, the "l." lines doesn't already exist.
For example, by putting "\emph{" with no closing bracket,
the error message is 

Runaway argument?
{ \end {document}
! File ended while scanning use of \emph .
<inserted text> 
                \par 

We can remove the check for the "l." line by removing the
"if (prefixIs(tmp, "l.")) {" line in LaTeX::scanLogFile, but we need to be
sure that latex never prints a line beginning with "! " unless there is an
error.
A safer solution is to do the following:

-                       if (prefixIs(tmp, "l.")) {
+                       if (prefixIs(tmp, "l.") ||
+                           contains(token, "File ended while")) {

which only handle the specific type of error which is shown above.
I've attached a patch for this.

patch.gz

Reply via email to