When I try to compile this document


A simple fraction with an error $\frac{a}{b$

I obviously get an error because there is a missing } in the fraction and then the minibuffer says:

LaTeX errors in `*c:/Program Files/emacs-23.3/bin/debug_error output*'. Use C-c ` to display.

So I press C-c ` and then the windows splits in half and I have two buffers: the lower is the expected TeX Help buffer and the upper is a strange empty buffer called MiKTeX 2.8 in Nroff mode. I also noticed that this happens when there are errors in math commands or something like that.

How to prevent the MiKTeX 2.8 buffer appear? It would be nice to have a workaround.

EDIT: After reading the documentation I found this:

C-c ‘ should always stay in the current window, also when it finds a new file.

2 Answers 2


Invoking latex with -file-line-error-style will fix most of these problems. Your example, however, it will not. You can read the discussion on this Stack Overflow answer. One work around mentioned there is to change what file is the default to be the master file. That way when latex can't say what file the error was in, then AUCTeX will assume it was in the file you are editing. I suspect this will be right over 90% of the time, and extremely confusing the rest. :-)

Adding the following advice to your .emacs file should do the trick.

(defadvice TeX-parse-reset (after make-master-file-default () activate)
  (push (concat (substring (buffer-name) 1 (- (length (buffer-name)) 8))
                "." TeX-default-extension) TeX-error-file)
  (push nil TeX-error-offset))

This appears to be a bug in AUCTeX, see this post for a brief discussion. It looks like some of the behavior is fixed in the development version, but I have not had the chance to test it on my machine.

  • Yes, some kinds of errors like that open a strange buffer. On my machine (with Aquamacs) it's empty and named TeX Live.
    – egreg
    Apr 20, 2012 at 14:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .