[Top][All Lists]

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

Re: How to follow the end of *Messages* buffer in Emacs?

From: martin rudalics
Subject: Re: How to follow the end of *Messages* buffer in Emacs?
Date: Mon, 12 Nov 2012 10:56:59 +0100

>> For the moment it should be sufficient if you add your function to
>> `window-configuration-change-hook' instead of `post-command-hook'.  This
>> should allow you to scroll and edit *Messages* without any problems.
> I've just tried and it does not work with that hook, as is.

It doesn't, indeed.  As a matter of fact, `window-point' is reset by
`quit-window' _after_ running `window-configuration-change-hook'.  If
you want to fix this in `window-configuration-change-hook' you have two

(1) In `window-configuration-change-hook' add your function that updates
    the positions to `post-command-hook'.  In the function itself add
    code so the function removes itself from `post-command-hook'.  This
    means that you run the function only when the *Messages* buffer
    reappears on the frame and not when you scroll or modify it.

(2) In the function itself modify the `quit-restore' parameter of the
    window to point to `point-max' instead.

Both approaches are tricky so try them only if you want to play around
with Elisp.  Otherwise, the patch I posted in reply to your bug report
should take care of this.


reply via email to

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