help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automatically scrolling message buffer.


From: Giorgos Keramidas
Subject: Re: Automatically scrolling message buffer.
Date: Tue, 17 Mar 2009 10:58:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (berkeley-unix)

On Tue, 17 Mar 2009 09:39:11 +0100, Nikolaj Schumacher <address@hidden> wrote:
> Hi everyone,
>
> does anyone know a way to keep the *Messages* buffer displaying the end
> of the buffer?
>
> Currently, I do:
>
> (defun scroll-messages ()
>   (let ((window (get-buffer-window "*Messages*")))
>     (and window
>          (not (equal window (selected-window)))
>          (with-selected-window window
>            (set-window-point nil (point-max))
>            (recenter -1)))))
>
> (run-with-timer .2 .2 'scroll-messages)
>
> Any cleaner solutions?  (Unfortunately, buffer modification hooks don't
> seem to be called.)

This might start becoming *very* annoying if you really want to scroll
upwards through a large *Messages* buffer.  A slightly less intrusive
way to do something similar would be to add a hook that fires up every
time you switch _to_ the *Messages* buffer.  This way every time you
switch away from the buffer and back to it, it scrolls down to the last
message, but if you move around while the buffer is active it doesn't
keep annoying you by jumping to the end of the buffer all the time.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]