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.

2 Answers 2


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)))

compilation-shell-minor-mode works better than compilation-minor-mode because the keys are compatible with the term mode. Example: RET sends a return instead of trying to go to the next error.

This can be added to your .emacs

(add-hook 'term-mode-hook 'compilation-shell-minor-mode)

Or to turn on in a single term mode buffer:

C-x M-X compilation-shell-minor-mode

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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