3

I want to run compile or recompile, but I don't want to see the *compilation* buffer pop up unless there's an error, or not at all. If the compilation succeeds, I should just see a notification in the echo area. This is how AUCTeX works; I want it for arbitrary compilation commands in arbitrary modes.

This is a small wheel to be sure, but I can't find it built in (as of Emacs 24.3). Before I go on about reinventing it, does this already exist somewhere?

  • I don't know if there is such a thing. But if I wanted to do something like that, I'd start with compilation-start-hook and compilation-filter-hook. First to bury the buffer (and possibly rename it), second to watch for errors and then bring it back up. – wvxvw Mar 1 '16 at 20:15
  • Have a look at (setq outwin (display-buffer outbuf '(nil (allow-no-window . t)))), line 1693 of compile.el in the master branch -- the function compilation-start. If you are an anti-source modifier who relishes advice and so forth (i.e., among the majority of Emacs users), you can set up a display-buffer-alist rule to suit your needs. A couple of years ago I took compile.el and made it my own custom setup -- so I just modify it directly at will. – lawlist Mar 2 '16 at 2:42

Your Answer

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

Browse other questions tagged or ask your own question.