From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.help Subject: Re: Automatically scrolling message buffer. Date: Tue, 17 Mar 2009 10:58:49 +0200 Organization: SunSITE.dk - Supporting Open source Message-ID: <87d4cgle46.fsf@kobe.laptop> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1237283041 24545 80.91.229.12 (17 Mar 2009 09:44:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Mar 2009 09:44:01 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 17 10:45:17 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LjVrG-0003ml-4i for geh-help-gnu-emacs@m.gmane.org; Tue, 17 Mar 2009 10:45:14 +0100 Original-Received: from localhost ([127.0.0.1]:45412 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LjVpt-0002cy-TL for geh-help-gnu-emacs@m.gmane.org; Tue, 17 Mar 2009 05:43:49 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!goblin1!goblin.stu.neva.ru!uio.no!news.banetele.no!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (berkeley-unix) Cancel-Lock: sha1:uPu1oQqVOdXsVsU81bpJXcblO1E= Original-Lines: 29 Original-NNTP-Posting-Host: 77.49.245.96 Original-X-Trace: news.sunsite.dk DXC=Y; NaHh=H; @:RV[Kf06ReB9YSB=nbEKnk; ML^Mj7bH?lJH1Tkj List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:63007 Archived-At: On Tue, 17 Mar 2009 09:39:11 +0100, Nikolaj Schumacher 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.