* Automatically scrolling message buffer.
@ 2009-03-17 8:39 Nikolaj Schumacher
2009-03-17 9:36 ` Peter Dyballa
0 siblings, 1 reply; 8+ messages in thread
From: Nikolaj Schumacher @ 2009-03-17 8:39 UTC (permalink / raw
To: help-gnu-emacs
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.)
regards,
Nikolaj Schumacher
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <mailman.3384.1237279162.31690.help-gnu-emacs@gnu.org>]
* Re: Automatically scrolling message buffer.
[not found] <mailman.3384.1237279162.31690.help-gnu-emacs@gnu.org>
@ 2009-03-17 8:58 ` Giorgos Keramidas
2009-03-17 11:32 ` Nikolaj Schumacher
[not found] ` <mailman.3400.1237289527.31690.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 8+ messages in thread
From: Giorgos Keramidas @ 2009-03-17 8:58 UTC (permalink / raw
To: help-gnu-emacs
On Tue, 17 Mar 2009 09:39:11 +0100, Nikolaj Schumacher <me@nschum.de> 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Automatically scrolling message buffer.
2009-03-17 8:58 ` Giorgos Keramidas
@ 2009-03-17 11:32 ` Nikolaj Schumacher
[not found] ` <mailman.3400.1237289527.31690.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 8+ messages in thread
From: Nikolaj Schumacher @ 2009-03-17 11:32 UTC (permalink / raw
To: Giorgos Keramidas; +Cc: help-gnu-emacs
Giorgos Keramidas <keramida@ceid.upatras.gr> wrote:
> This might start becoming *very* annoying if you really want to scroll
> upwards through a large *Messages* buffer.
That's why I included:
(not (equal window (selected-window)))
> 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.
But that's not what I want. I wanted to observe messages as they occur.
regards,
Nikolaj Schumacher
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <mailman.3400.1237289527.31690.help-gnu-emacs@gnu.org>]
* Re: Automatically scrolling message buffer.
[not found] ` <mailman.3400.1237289527.31690.help-gnu-emacs@gnu.org>
@ 2009-03-17 14:33 ` Giorgos Keramidas
2009-03-17 20:49 ` Bernardo
[not found] ` <mailman.3434.1237323087.31690.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 8+ messages in thread
From: Giorgos Keramidas @ 2009-03-17 14:33 UTC (permalink / raw
To: help-gnu-emacs
On Tue, 17 Mar 2009 12:32:03 +0100, Nikolaj Schumacher <me@nschum.de> wrote:
>Giorgos Keramidas <keramida@ceid.upatras.gr> wrote:
>> This might start becoming *very* annoying if you really want to scroll
>> upwards through a large *Messages* buffer.
>
> That's why I included:
> (not (equal window (selected-window)))
Ah, my apologies then. I misunderstood what you were trying to do :)
>> 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.
>
> But that's not what I want. I wanted to observe messages as they occur.
This is a good idea for watching other sorts of non-selected windows
too. Is there any chance we can convince you to write a minor mode that
can be enabled on visible but not active windows and fires up a timer
after a tunable interval?
This way we could, for example, enable `auto-scroll-minor-mode' on a
buffer, and let it take over. The `auto-scroll-minor-mode' could
consult a buffer-local variable like `auto-scroll-timeout' every time it
is enabled and set up a timer that would scroll the specific buffer.
That would be very useful for other things too, i.e. watching log files :)
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-03-17 21:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-17 8:39 Automatically scrolling message buffer Nikolaj Schumacher
2009-03-17 9:36 ` Peter Dyballa
2009-03-17 11:23 ` Nikolaj Schumacher
[not found] <mailman.3384.1237279162.31690.help-gnu-emacs@gnu.org>
2009-03-17 8:58 ` Giorgos Keramidas
2009-03-17 11:32 ` Nikolaj Schumacher
[not found] ` <mailman.3400.1237289527.31690.help-gnu-emacs@gnu.org>
2009-03-17 14:33 ` Giorgos Keramidas
2009-03-17 20:49 ` Bernardo
[not found] ` <mailman.3434.1237323087.31690.help-gnu-emacs@gnu.org>
2009-03-17 21:31 ` Giorgos Keramidas
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.