I'd like to configure AUCTeX to compile without stopping on errors. I can do it from a terminal with

pdflatex -interaction=nonstopmode filename.tex

but AUCTeX apparently does

pdflatex filename.tex

when asked to compile with C-c C-c. How can I force the "-interaction=nonstopmode" option?

  • 2
    Can you do it through M-x customize-group RET TeX-command?
    – Seamus
    Jul 18, 2012 at 11:41
  • Changing the 'TeX Command' and 'LaTeX Command' variables suppresses the display of errors, but compilation still halts on the first error, which is different from the command-line behavior. Jul 18, 2012 at 12:49
  • You may want to use latexmk to handle compiling. Then you can set the flags via .latexmkrc
    – N.N.
    Jul 18, 2012 at 17:35

2 Answers 2


I use Emacs 23.4 on Mac OS 10.7. That's what I've done:

  • Create a LaTeX file so you have all the AUCTeX menus available
  • Go to LaTeX -> Customize AUCTeX -> Browse options
  • Click on TeX Command
  • Expand TeX Command List and press on one INS button
  • Fill the appeared fields as here:
    1. Name: LaTeXnonint
    2. Command: %`%l -interaction=nonstopmode %(mode)%' %t
    3. How: TeX-run-command

In this way, if I try to compile (hitting C-c C-c LaTeXnonint) a file like:



I get no interaction on the present error (\latex instead of \LaTeX)

P.S. the first three points of the list can be made using the shortcut showed by @Seamus

  • Is there a way to make this change in emacs init file ?
    – Anusha
    Apr 24, 2014 at 17:20

Add this in you .emacs file:

(setf (nth 1 (assoc "LaTeX" TeX-command-list))
      "%`%l -interaction=nonstopmode %(mode)%' %t")

You must log in to answer this question.

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