Mac – Combine compilation-mode and ansi-term-mode in Emacs

compileemacsterminal

In Emacs, I would like to be able to combine the features of ansi-term-mode and compilation-mode. I have a build system for compiling my source code which uses terminal commands for placing the cursor. This is as to have progress bars and stuff. So I can use ansi-term-mode for kicking of the build process, but I lose the error-recognition of compilation-mode. Can I combine both? Either putting the error-recognition and "jumping into file" feature of compilation-mode into ansi-term-mode, or the other way around giving compilation-mode ansi-term features.

And yes, I could force the build tool to output dumb information, but I actually like the compact, progress bar view.

Best Answer

Found the answer to my own problem: the compilation-minor-mode is what I am looking for. You can use customize to add it to the term-mode-hook:

 '(term-mode-hook (quote (compilation-minor-mode)))
Related Question