From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#6671: moving point and scroll-conservatively Date: Thu, 24 Mar 2011 17:36:36 -0400 Message-ID: <87lj04dwuz.fsf@stupidchicken.com> References: <87vcz9s60m.fsf@stupidchicken.com> <87tyetb258.fsf@stupidchicken.com> <87k4fosg8e.fsf@stupidchicken.com> <874o6sp9sl.fsf@stupidchicken.com> <83oc50tgez.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1301002641 3573 80.91.229.12 (24 Mar 2011 21:37:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 24 Mar 2011 21:37:21 +0000 (UTC) Cc: lekktu@gmail.com, 6671@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 24 22:37:16 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q2sDU-0007wP-3v for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Mar 2011 22:37:16 +0100 Original-Received: from localhost ([127.0.0.1]:39886 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q2sDT-00051u-JB for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Mar 2011 17:37:15 -0400 Original-Received: from [140.186.70.92] (port=41931 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q2sDN-00051p-6F for bug-gnu-emacs@gnu.org; Thu, 24 Mar 2011 17:37:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q2sDL-0006D2-PO for bug-gnu-emacs@gnu.org; Thu, 24 Mar 2011 17:37:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q2sDL-0006Cx-MN for bug-gnu-emacs@gnu.org; Thu, 24 Mar 2011 17:37:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Q2sDG-0006AJ-7S; Thu, 24 Mar 2011 17:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Mar 2011 21:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6671 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6671-submit@debbugs.gnu.org id=B6671.130100260723681 (code B ref 6671); Thu, 24 Mar 2011 21:37:02 +0000 Original-Received: (at 6671) by debbugs.gnu.org; 24 Mar 2011 21:36:47 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q2sD0-00069t-Ge for submit@debbugs.gnu.org; Thu, 24 Mar 2011 17:36:46 -0400 Original-Received: from vm-emlprdomr-03.its.yale.edu ([130.132.50.144]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q2sCy-00069b-KP for 6671@debbugs.gnu.org; Thu, 24 Mar 2011 17:36:45 -0400 Original-Received: from furball (dhcp128036014187.central.yale.edu [128.36.14.187]) (authenticated bits=0) by vm-emlprdomr-03.its.yale.edu (8.14.4/8.14.4) with ESMTP id p2OLaaRj032382 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 24 Mar 2011 17:36:37 -0400 Original-Received: by furball (Postfix, from userid 1000) id 51BD816066A; Thu, 24 Mar 2011 17:36:36 -0400 (EDT) In-Reply-To: <83oc50tgez.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 24 Mar 2011 22:25:08 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.144 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 24 Mar 2011 17:37:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:45334 Archived-At: Eli Zaretskii writes: > I would like to try fixing that code along the lines I suggested in a > previous mail. That looks like the best alternative, since it doesn't > have any user-level changes (except for the bug that it should fix). The solution you suggested was: > when point is "far away" (which could be set back to those proverbial > 10 screen lines), then, instead of moving one line at a time, move to > point in one go, and then compute the window start so that point is at > the proper place relative to window start. If the current literal meaning of scroll-conservatively is retained, we need to count the number of lines involved in performing this "far-away scroll", by iterating. That brings us back to square one. Think about it this way: suppose scroll-conservatively is 200000. Taken literally, this means that if we move point 200000 (screen) lines down, redisplay should leave the cursor at the bottom of the window; if we move point 200001 (screen) lines down, redisplay should recenter. There is only one way to determine the number of screen lines between the bottom of our current window and the new value of point: a big expensive redisplay iteration. If you want to avoid this pitfall, your solution and mine become the same, i.e. special handling of "sufficiently large" values of scroll-conservatively.