GNU bug report logs - #12170
save-excursion fails boundary case with recenter

Previous Next

Package: emacs;

Reported by: "Bill Brodie" <wbrodie <at> panix.com>

Date: Fri, 10 Aug 2012 02:01:02 UTC

Severity: normal

Tags: notabug

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


Message #29 received at 12170 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 12170 <at> debbugs.gnu.org, Bill Brodie <wbrodie <at> panix.com>
Subject: Re: bug#12170: save-excursion fails boundary case with recenter
Date: Fri, 10 Aug 2012 12:18:08 -0400
> But I don't have the slightest idea how calling
> 	 (set-window-start (selected-window) ,start t)
> would remedy this.  Eli will soon teach us a lesson here.

The redisplay tries to make sure (window-)point is visible, which can
either be done by changing (window-)point or by changing window-start.

The first happens when you use a scrolling operation (which sets
window-start), the other happens in response to normal navigation in
the buffer.

Knowing which to do when is not obvious, but IIUC if window-start has
not been changed, then the redisplay assumes that it is free to change
(window-)point, whereas otherwise it will assume that it should not
change (window-)point but can instead change window-start.


        Stefan




This bug report was last modified 8 years and 62 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.