# lualatex keeps tex source open on error

I edit `LaTeX` source in emacs and invoke `lualatex` with `compile-command`. If the source contains an error the compilation stops and I see the reason in the `*compilation*` buffer. When I go to fix the error, emacs tells me I can't save the source file. It seems as if lualatex keeps it open. If I kill the compilation I can proceed.

The environment is MikTex 2.9, GNU Emacs 24.2, Windows 7.

This does not happen with pdflatex.

Any suggestions, other than changing my workflow?

-
Does your compile command use `-interaction=nonstopmode`? –  Paul Gaborit Feb 24 '13 at 16:25
@PaulGaborit Now it does. Post this as an answer so I can accept it. –  Ethan Bolker Feb 24 '13 at 16:30

Two solutions:

1. Add `-interaction=nonstopmode` in your compile command.
2. Use the `LaTeX` command of AUCTeX using `luatex` as `TeX-engine` value.
-