Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

When I try to compile this document

\documentclass{article}
\usepackage{amsmath}

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

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.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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))
share|improve this answer

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.

share|improve this answer
    
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 '12 at 14:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.