Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get a quick status from the Emacs compilation buffer?

Tags:

emacs

By default, emacs 22.1.1 only shows the top of the compilation buffer when you first issue the compile command. I would like it to scroll to the bottom automatically when I use the compile command in order to save keystrokes. This way I can easily get a status of the current compilation by just looking at the compile buffer and seeing which files are currently being compiled instead of having to switch windows and scroll to the bottom of the buffer. Any ideas?

like image 294
dr_pepper Avatar asked Sep 22 '08 18:09

dr_pepper


3 Answers

I think the best option is to stop on the first error

(setq compilation-scroll-output 'first-error)

With this configuration, Emacs scrolls compilation mode until the first error happens. This allows you to use next-error and previous-error before compilation finishes.

If there aren't any errors, it scrolls until the end and you can thus easily see that compilation was succesful.

like image 173
Teemu Kurppa Avatar answered Nov 10 '22 03:11

Teemu Kurppa


From Info > emacs > Compilation:

If you set the variable compilation-scroll-output to a non-nil value, then the compilation buffer always scrolls to follow output as it comes in.

like image 44
Blair Conrad Avatar answered Nov 10 '22 03:11

Blair Conrad


(setq compilation-scroll-output t)

or

M-x set-variable compilation-scroll-output t RET

Also, if you get used to using next-error and previous-error before your compilation finishes, you will start to see why the default behavior is desirable.

like image 7
jfm3 Avatar answered Nov 10 '22 04:11

jfm3