From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Bill Brodie" Newsgroups: gmane.emacs.bugs Subject: bug#12170: save-excursion fails boundary case with recenter Date: Thu, 9 Aug 2012 21:23:04 -0400 Message-ID: <000001cd7696$b0e93d60$12bbb820$@com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0001_01CD7675.29D79D60" X-Trace: dough.gmane.org 1344563578 11116 80.91.229.3 (10 Aug 2012 01:52:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Aug 2012 01:52:58 +0000 (UTC) To: 12170@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 10 03:52:58 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 1SzePJ-0004F9-Vd for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Aug 2012 03:52:58 +0200 Original-Received: from localhost ([::1]:39704 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzePJ-0007v2-56 for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Aug 2012 21:52:57 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzePE-0007uo-2F for bug-gnu-emacs@gnu.org; Thu, 09 Aug 2012 21:52:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzePC-00054t-Qi for bug-gnu-emacs@gnu.org; Thu, 09 Aug 2012 21:52:51 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36130) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzePC-00054n-M5 for bug-gnu-emacs@gnu.org; Thu, 09 Aug 2012 21:52:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SzeX8-00049G-U9 for bug-gnu-emacs@gnu.org; Thu, 09 Aug 2012 22:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Bill Brodie" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Aug 2012 02:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.134456400615880 (code B ref -1); Fri, 10 Aug 2012 02:01:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Aug 2012 02:00:06 +0000 Original-Received: from localhost ([127.0.0.1]:45676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SzeWC-00047z-Tq for submit@debbugs.gnu.org; Thu, 09 Aug 2012 22:00:05 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60998) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sze4X-0003Uc-No for submit@debbugs.gnu.org; Thu, 09 Aug 2012 21:31:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzdwZ-0003LO-Qc for submit@debbugs.gnu.org; Thu, 09 Aug 2012 21:23:16 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:42196) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzdwZ-0003LJ-NQ for submit@debbugs.gnu.org; Thu, 09 Aug 2012 21:23:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzdwY-0002Cu-Gu for bug-gnu-emacs@gnu.org; Thu, 09 Aug 2012 21:23:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzdwV-0003L2-Pt for bug-gnu-emacs@gnu.org; Thu, 09 Aug 2012 21:23:14 -0400 Original-Received: from mailbackend.panix.com ([166.84.1.89]:52054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzdwV-0003Ky-MD for bug-gnu-emacs@gnu.org; Thu, 09 Aug 2012 21:23:11 -0400 Original-Received: from Chianti (cpe-67-250-32-171.nyc.res.rr.com [67.250.32.171]) by mailbackend.panix.com (Postfix) with ESMTP id 0572228FD7; Thu, 9 Aug 2012 21:23:11 -0400 (EDT) X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac12lrCrUpu/i3v/RrS3ANz77XXu7w== Content-Language: en-us X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Thu, 09 Aug 2012 22:00:03 -0400 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:62985 Archived-At: This is a multi-part message in MIME format. ------=_NextPart_000_0001_01CD7675.29D79D60 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Running GNU Emacs 24.1.1 (i386-mingw-nt6.1.7601) of 2012-06-10 on MARVIN under Windows 7. Define: (defun f (n) (save-excursion (forward-line (- n)) (recenter 0))) Let H be the window height in lines, and suppose that point is positioned at the beginning of line L > H. Despite 'save-excursion', (f K) moves point if K = H. It leaves point unchanged for any other value of K, 0 <= K < L. ------=_NextPart_000_0001_01CD7675.29D79D60 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Running = GNU Emacs 24.1.1 (i386-mingw-nt6.1.7601) of 2012-06-10 on MARVIN under = Windows 7.

 

Define:

 

         &= nbsp;      (defun f (n) (save-excursion = (forward-line (- n)) (recenter 0)))

 

Let H be the = window height in lines, and suppose that point is positioned at the = beginning of line L > H.

 

Despite = ‘save-excursion’, (f K) moves point if K =3D H.  It = leaves point unchanged for any other value of K, 0 <=3D K < = L.

 

 

------=_NextPart_000_0001_01CD7675.29D79D60--