From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#12170: save-excursion fails boundary case with recenter Date: Sat, 11 Aug 2012 19:49:41 +0300 Message-ID: <83has9cr16.fsf@gnu.org> References: <000001cd7696$b0e93d60$12bbb820$@com> <5024D593.7080305@gmx.at> <003601cd76fd$b21cd590$165680b0$@com> <50251EED.3010804@gmx.at> <83393uefkw.fsf@gnu.org> <502626AD.1080505@gmx.at> <83sjbtd6p0.fsf@gnu.org> <50266AAF.4000504@gmx.at> <83mx21cvml.fsf@gnu.org> <502682BA.5050704@gmx.at> <83ipcpcruu.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1344703793 22207 80.91.229.3 (11 Aug 2012 16:49:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 11 Aug 2012 16:49:53 +0000 (UTC) Cc: 12170@debbugs.gnu.org To: rudalics@gmx.at Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 11 18:49:53 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T0Esn-0007KH-IJ for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Aug 2012 18:49:49 +0200 Original-Received: from localhost ([::1]:51718 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0Esm-0003uT-KQ for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Aug 2012 12:49:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0Esi-0003ti-3v for bug-gnu-emacs@gnu.org; Sat, 11 Aug 2012 12:49:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T0Ese-0006TE-KH for bug-gnu-emacs@gnu.org; Sat, 11 Aug 2012 12:49:44 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0Ese-0006Sv-HH for bug-gnu-emacs@gnu.org; Sat, 11 Aug 2012 12:49:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T0F0j-00046X-Ky for bug-gnu-emacs@gnu.org; Sat, 11 Aug 2012 12:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Aug 2012 16:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12170-submit@debbugs.gnu.org id=B12170.134470427915770 (code B ref 12170); Sat, 11 Aug 2012 16:58:01 +0000 Original-Received: (at 12170) by debbugs.gnu.org; 11 Aug 2012 16:57:59 +0000 Original-Received: from localhost ([127.0.0.1]:49712 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0F0h-00046I-EO for submit@debbugs.gnu.org; Sat, 11 Aug 2012 12:57:59 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:64030) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0F0e-000469-O4 for 12170@debbugs.gnu.org; Sat, 11 Aug 2012 12:57:57 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0M8L00I00O0UB600@a-mtaout20.012.net.il> for 12170@debbugs.gnu.org; Sat, 11 Aug 2012 19:49:32 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M8L00I8YO2J9B30@a-mtaout20.012.net.il>; Sat, 11 Aug 2012 19:49:32 +0300 (IDT) In-reply-to: <83ipcpcruu.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:63050 Archived-At: > Date: Sat, 11 Aug 2012 19:31:53 +0300 > From: Eli Zaretskii > Cc: 12170@debbugs.gnu.org, wbrodie@panix.com > > > Date: Sat, 11 Aug 2012 18:05:14 +0200 > > From: martin rudalics > > CC: wbrodie@panix.com, 12170@debbugs.gnu.org > > > > So the difference should be in one of the four assignments > > > > w->start_at_line_beg = 0; > > w->update_mode_line = 1; > > w->last_modified = 0; > > w->last_overlay_modified = 0; > > > > and I'd obviously vote for the first one. Interesting side-effect. > > FWIW, there are only 2 places in redisplay that look at > w->start_at_line_beg, but neither your nor Bill's recipe don't > exercise the code of either of these two places. As another FWIW, running the recipe with save-window-excursion shows that set-window-configuration called after the body tries to set the window start at position 1 and the window point at position 67. But the last position in a 33-line window that starts at position 1 is 33, so these two values cannot be satisfied at once.