[Top][All Lists]

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

Re: window.el modify current emacs23 behavior of anything.

From: martin rudalics
Subject: Re: window.el modify current emacs23 behavior of anything.
Date: Tue, 20 Sep 2011 18:07:37 +0200
User-agent: Thunderbird (Windows/20090302)

> So, IIUC this problem appears in a content where only one window is
> involved, and the point movements are always applied to the
> (window-buffer (selected-window)), is that right?
> I hope it's not, in which case it can be explained by the usual issue
> that moving point won't affect window-point if the current-buffer is not
> (window-buffer (selected-window)).

When `bury-buffer' restores the buffer previously shown in the selected
window, it also restores that buffer's `window-start' and `window-point'
position in the window.  If the window is selected, this implicitly
moves the buffer's point to the window's point.  This means that if the
restored buffer's point was changed before calling `bury-buffer', that
position is lost.

I don't know whether this is the cause of Thierry's problem.  If it is,
and people think it is the wrong thing to do in this case, I can make
`bury-buffer' (and `replace-buffer-in-windows') call `other-buffer' as
before.  Alternatively, I could try to not restore `window-start' and
`window-point' if the restored buffer does not appear on another window.
But I'm not sure how intuitive such a change would be.


reply via email to

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