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


View this message in rfc822 format

From: "Bill Brodie" <wbrodie <at> panix.com>
To: "'Eli Zaretskii'" <eliz <at> gnu.org>, "'martin rudalics'" <rudalics <at> gmx.at>
Cc: 12170 <at> debbugs.gnu.org
Subject: bug#12170: save-excursion fails boundary case with recenter
Date: Sat, 11 Aug 2012 12:27:42 -0400
From my point of view (the OP), I've generally used save-excursion to
assemble or manipulate information elsewhere in the buffer or in other
buffers, without explicit reference to window displays.  This seems like a
natural restriction.

I've modified my original code to perform the window operations outside the
form.  Thanks for the illuminating discussion.

-----Original Message-----
From: Eli Zaretskii [mailto:eliz <at> gnu.org] 

IMO, save-excursion is simply not designed to make sure display isn't
changed in such cases.  It's for excursions into other portions of the
buffer for processing those other parts, without affecting display.
If the processing also scrolls the screen or calls recenter or
otherwise affects the display, all bets are off, because scrolling can
legitimately move point, and when that happens, it is no longer clear
that restoring point should take precedence over window-start etc.





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.