Forcing AucTex to properly show error messages

From the very-detailed-information dept:

I use Auctex with on my Mac to write papers. It’s the best editor I’ve come across for Latex support.

I was having trouble with one feature, however. If your source file contains an error (e.g., an unescaped underscore), the engine via Auctex will complain when you try to compile. In my case, I always use pdflatex to generate PDF output.

At that point you will get "Latex errors in `Document.tex output'. Use C-c ` to display". If you type C-c ` (TeX-next-error), the idea is that Emacs splits into two windows, with one window showing the error message, and the other showing the location of the problem in the source file. For some reason this wasn’t working on my machine, and I kept getting this strange blank window.

After some digging, I’ve determined the problem to be that pdflatex does not report errors using file-name, only line number. This means Auctex cannot determine the proper source file to open.

Following information on this mailing list post, the following steps should fix it (on a Mac):

  1. Edit the file /usr/local/texlive/2010/texmf.cnf. This is where user-specific customizations to the general config file for TexLive live.
  2. Add the line file-line-error = t at the end. This forces pdflatex to output the file name for each error.
  3. Update TexLive using sudo tlmgr update -all which, in addition to updating all the packages in your installation, will recognize your new config option. Possibly there is a shorter way to do this, but who doesn’t want to update their packages?
  4. Done!

4 thoughts on “Forcing AucTex to properly show error messages”

  1. I was searching Google for this problem, and yours was one of the first pages that came up. Thank for put up the solution. I used your solution (with the fix suggested by Marius), and it worked. Also, as you suggested, there is in fact a faster way to reload the configuration change than running a full update. Just run the program mktexlsr (with root permissions if texlive is installed by root on your system). I am just putting it up there for the next person who might find this page looking about this problem. Thanks again for posting this solution, and please feel free to delete this comment if it does not agree with your policies.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s