"! File ended while scanning use of" error not handled correctly by TeX-next-error

Bug #790212 reported by Rupert Levene
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
auctex (Debian)
Fix Released
Unknown
auctex (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: auctex

If I run emacs -q and load the following file, ~/test.tex:

\documentclass{beamer}
\begin{document}
\begin{frame}
  $a_{b$
\end{frame}
\end{document}

and hit C-c C-c LaTeX RET, emacs says "LaTeX errors in `*~/test output'. Use C-c ` to display."

Then I hit C-c ` and I expect one buffer called *TeX Help* to be created containing the "Missing } inserted" error, alongside the original test.tex buffer.

But this doesn't happen: instead, two buffers are created: one called *TeX Help*, and a read-only buffer called Debian. Both are empty, and the minibuffer says: Search failed: "^l\\." These two buffers replace the test.tex buffer.

Incidentally, if I go to the new Debian buffer and hit C-x C-w, the minibuffer says "Write file: ~/TeX Live 2009/", which I find rather curious.

If I comment out the \begin{frame} and \end{frame} lines in test.tex, then I do get the expected behaviour.

Version info:
$ lsb_release -rd
Description: Ubuntu 10.04.2 LTS
Release: 10.04
$ apt-cache policy emacs23 auctex
emacs23:
  Installed: 23.1+1-4ubuntu7.2
  Candidate: 23.1+1-4ubuntu7.2
  Version table:
 *** 23.1+1-4ubuntu7.2 0
        500 http://ftp.heanet.ie/pub/ubuntu/ lucid-updates/main Packages
        100 /var/lib/dpkg/status
     23.1+1-4ubuntu7 0
        500 http://ftp.heanet.ie/pub/ubuntu/ lucid/main Packages
auctex:
  Installed: 11.85-1ubuntu1
  Candidate: 11.85-1ubuntu1
  Version table:
 *** 11.85-1ubuntu1 0
        500 http://ftp.heanet.ie/pub/ubuntu/ lucid/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
Rupert Levene (levene) wrote :
Revision history for this message
era (era) wrote :

Could you please enable debugging with (setq debug-on-error t) and repeat the repro steps, then attach the contents of the *Backtrace* buffer you will hopefully get when the error happens.

I am setting the Status of this bug report to Incomplete to mark it as pending on your input. It can be changed back to New once you supply the requested information. Thank you for your patience and cooperation.

Changed in auctex (Ubuntu):
status: New → Incomplete
Revision history for this message
Rupert Levene (levene) wrote :

Backtrace attached.

Revision history for this message
Rupert Levene (levene) wrote :

Here is the LaTeX log file. I imagine that the bug lies in the parsing of this file.

Rupert Levene (levene)
Changed in auctex (Ubuntu):
status: Incomplete → New
Revision history for this message
era (era) wrote :

I am able to reproduce this out of the box on 10.04.2 with emacs23 and auctex from the official repositories. Marking as Confirmed.

Changed in auctex (Ubuntu):
status: New → Confirmed
Revision history for this message
Rupert Levene (levene) wrote :

Here is a simpler test case:

\documentclass{article}
\begin{document}
\emph{
\end{document}

The problem seems to be that TeX-next-error expects every error in the log file to have a line number attached to it. But the error here is

! File ended while scanning use of \emph .

which doesn't generate a line number.

summary: - missing } not handled correctly: Search failed: "^l\\." and mysterious
- Debian buffer
+ "! File ended while scanning use of" error not handled correctly by TeX-
+ next-error
Revision history for this message
era (era) wrote :

I forwarded your bug to Debian's auctex maintainer. Thanks for your effort in diagnosing this!

Changed in auctex (Debian):
status: Unknown → New
Changed in auctex (Debian):
status: New → Confirmed
Revision history for this message
era (era) wrote :

The Debian bug now has a small patch, from a Ubuntu user, no less.

Changed in auctex (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.