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 16:01:46 -0400 Message-ID: <874o6sp9sl.fsf@stupidchicken.com> References: <87vcz9s60m.fsf@stupidchicken.com> <87tyetb258.fsf@stupidchicken.com> <87k4fosg8e.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1300997260 3081 80.91.229.12 (24 Mar 2011 20:07:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 24 Mar 2011 20:07:40 +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 21:07:32 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 1Q2qoZ-0000Th-Eq for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Mar 2011 21:07:32 +0100 Original-Received: from localhost ([127.0.0.1]:57496 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q2qoU-0008LI-KE for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Mar 2011 16:07:22 -0400 Original-Received: from [140.186.70.92] (port=37163 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q2qoN-0008Bz-Fs for bug-gnu-emacs@gnu.org; Thu, 24 Mar 2011 16:07:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q2qoF-0007WN-SV for bug-gnu-emacs@gnu.org; Thu, 24 Mar 2011 16:07:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46512) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q2qoF-0007WJ-Qz for bug-gnu-emacs@gnu.org; Thu, 24 Mar 2011 16:07:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Q2qjK-00044g-MM; Thu, 24 Mar 2011 16:02: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 20:02: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.130099691715650 (code B ref 6671); Thu, 24 Mar 2011 20:02:02 +0000 Original-Received: (at 6671) by debbugs.gnu.org; 24 Mar 2011 20:01:57 +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 1Q2qjE-00044N-0v for submit@debbugs.gnu.org; Thu, 24 Mar 2011 16:01:56 -0400 Original-Received: from vm-emlprdomr-04.its.yale.edu ([130.132.50.145]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q2qjA-00044A-KQ for 6671@debbugs.gnu.org; Thu, 24 Mar 2011 16:01:53 -0400 Original-Received: from furball (dhcp128036014187.central.yale.edu [128.36.14.187]) (authenticated bits=0) by vm-emlprdomr-04.its.yale.edu (8.14.4/8.14.4) with ESMTP id p2OK1kHd023445 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 24 Mar 2011 16:01:46 -0400 Original-Received: by furball (Postfix, from userid 1000) id 43D0D160788; Thu, 24 Mar 2011 16:01:46 -0400 (EDT) In-Reply-To: <87k4fosg8e.fsf@stupidchicken.com> (Chong Yidong's message of "Thu, 24 Mar 2011 11:14:25 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.145 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 24 Mar 2011 16:02: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:45330 Archived-At: Chong Yidong writes: > These change you propose would also necessitate reverting 100619/100620. > Anytime the iterator is forced to traverse thousands (or in this case > tens of thousands) of lines, that's clearly the wrong thing. Well, "the wrong thing" in the sense of "obviously not what the user intended", anyway. I agree that the changes you made cause the redisplay engine to literally follow the documented meaning of scroll-conservatively. Here's a more concrete proposal. We change scroll-conservatively to accept a new value, t, which means "scroll as far as you need". Then try_scrolling can use the "try scrolling for 10 lines" heuristic before failing. In this specific case, a failure changes centering_position, adjusting the window start as though we had really scrolled the full amount. However, it's become idiomatic to set scroll-conservatively to a large number. Users of that idiom, who haven't changed scroll-conservatively to t, would remain affected by the performance hit. To cope with this, let's change the meaning of numeric values of scroll-conservatively: if it's larger than (say) 300, that is equivalent to t (infinity). What do you think?