So I am using AUCTeX with xetex in emacs and each time after I compile the file I get a split window showing the compilation process. I don't want to completely hide this since I find it useful for debugging, but I want it to appear in a different buffer and not bother me when there are no errors. Is this possible? Another option, although less great, would be to automatically hide it except when there are compilation errors.
I have the option:
(setq TeX-show-compilation t)
Best Answer
I think the best solution it to hook onto
TeX-LaTeX-sentinel
. In this way, you can check for the presence of errors after the compiler has finished its job. Add the following code to your initialization file: