[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scroll output in compilation mode
From: |
Will Parsons |
Subject: |
Re: Scroll output in compilation mode |
Date: |
2 Apr 2007 21:46:04 GMT |
User-agent: |
slrn/0.9.8.1 (Debian) |
danjhiggi3@gmail.com wrote:
> I've spend about 8 hours trying to track this down.
>
> I would like to the compilation buffer output to scroll even when my
> cursor is not in it.
> I have seen all of the recommendations to enter use the following...
>
> (setq compilation-scroll-output t)
>
> But this doesn't work as I had hoped.
>
> Again,
> I would like to have my cursor in the code,
> use the compile command,
> The window will spit
> my cursor stays in the code window
> the compilation window will scroll as it goes along.
>
> I KNOW this can be done. I had it set up this way years ago and I
> can't remember how I did it.
I picked this up from someplace a long time ago and have been carrying it
around in my .emacs file ever since (but setting compilation-scroll-output
works for me too):
(eval-after-load "compile"
'(defadvice compile-internal
(after compile-my-scroll activate compile)
"Forces compile buffer to scroll. See around line 363 in compile.el"
(let* ((ob (current-buffer)))
(save-excursion
(select-window (get-buffer-window ad-return-value))
(goto-char (point-max))
(select-window (get-buffer-window ob))
))))