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

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

Re: messages that behave like tail -f ?


From: Joe Corneli
Subject: Re: messages that behave like tail -f ?
Date: Tue, 17 Feb 2004 00:22:46 -0600

   You could add a call to `recenter' to window-scroll-functions in
   the *Messages* buffer.
   
   e.g.
   
   (with-current-buffer (get-buffer "*Messages*") 
     (add-hook 'window-scroll-functions (lambda () (recenter -1))))

This is elegant, but there are two problems with it.  First,

 Each [window-scroll-function] is called with *two arguments*,
 the window and its new display-start position.

Second, if I put in "dummy" arguments, viz.,

   (with-current-buffer (get-buffer "*Messages*") 
     (add-hook 'window-scroll-functions (lambda (arg1 arg2) 
                                                (recenter -1))))

(this might be surprising?) -- it only works when *Messages* is the
current buffer (which isn't a great improvement on the default
behavior).




reply via email to

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