* 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
* 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:39 Nikolaj Schumacher
@ 2009-03-17 9:36 ` Peter Dyballa
2009-03-17 11:23 ` Nikolaj Schumacher
0 siblings, 1 reply; 8+ messages in thread
From: Peter Dyballa @ 2009-03-17 9:36 UTC (permalink / raw)
To: Nikolaj Schumacher; +Cc: help-gnu-emacs
Am 17.03.2009 um 09:39 schrieb Nikolaj Schumacher:
> Any cleaner solutions?
Position the cursor at the buffer's end?
--
Mit friedvollen Grüßen
Pete
Üblicherweise begehen Menschen beim Entwerfen vollkommen
narrensicherer Dinge gerne den Fehler, das Genie des Volltrottels zu
unterschätzen.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Automatically scrolling message buffer.
2009-03-17 9:36 ` Peter Dyballa
@ 2009-03-17 11:23 ` Nikolaj Schumacher
0 siblings, 0 replies; 8+ messages in thread
From: Nikolaj Schumacher @ 2009-03-17 11:23 UTC (permalink / raw)
To: Peter Dyballa; +Cc: help-gnu-emacs
Peter Dyballa <Peter_Dyballa@Web.DE> wrote:
> Am 17.03.2009 um 09:39 schrieb Nikolaj Schumacher:
>
>> Any cleaner solutions?
>
> Position the cursor at the buffer's end?
Indeed. Emacs 23 to the rescue, once again.
regards,
Nikolaj Schumacher
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Automatically scrolling message buffer.
2009-03-17 8:58 ` Automatically scrolling message buffer 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
* 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
* Re: Automatically scrolling message buffer.
2009-03-17 14:33 ` Giorgos Keramidas
@ 2009-03-17 20:49 ` Bernardo
[not found] ` <mailman.3434.1237323087.31690.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 8+ messages in thread
From: Bernardo @ 2009-03-17 20:49 UTC (permalink / raw)
To: help-gnu-emacs
>
> That would be very useful for other things too, i.e. watching log files :)
>
>
isn't auto-revert-mode/auto-revert-tail-mode doing this already?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Automatically scrolling message buffer.
[not found] ` <mailman.3434.1237323087.31690.help-gnu-emacs@gnu.org>
@ 2009-03-17 21:31 ` Giorgos Keramidas
0 siblings, 0 replies; 8+ messages in thread
From: Giorgos Keramidas @ 2009-03-17 21:31 UTC (permalink / raw)
To: help-gnu-emacs
On Wed, 18 Mar 2009 07:49:45 +1100, Bernardo <bernardo.bacic@pobox.com> wrote:
>>
>> That would be very useful for other things too, i.e. watching log files :)
>
> isn't auto-revert-mode/auto-revert-tail-mode doing this already?
Danm, and there I was, thinking for a moment I had an original idea!
Oh well, since this not the first time this happens with Emacs, I guess
it's ok :)
^ 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 --
[not found] <mailman.3384.1237279162.31690.help-gnu-emacs@gnu.org>
2009-03-17 8:58 ` Automatically scrolling message buffer 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
2009-03-17 8:39 Nikolaj Schumacher
2009-03-17 9:36 ` Peter Dyballa
2009-03-17 11:23 ` Nikolaj Schumacher
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.