From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#6671: moving point and scroll-conservatively Date: Mon, 19 Jul 2010 22:25:28 +0200 Message-ID: References: <83pqzec9i8.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1279571456 7410 80.91.229.12 (19 Jul 2010 20:30:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 19 Jul 2010 20:30:56 +0000 (UTC) To: 6671@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 19 22:30:53 2010 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 1OawzA-000291-6n for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Jul 2010 22:30:49 +0200 Original-Received: from localhost ([127.0.0.1]:41359 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oawz9-0002Z2-Hz for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Jul 2010 16:30:47 -0400 Original-Received: from [140.186.70.92] (port=45153 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oawz1-0002Xg-4u for bug-gnu-emacs@gnu.org; Mon, 19 Jul 2010 16:30:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oawyz-0005HH-HH for bug-gnu-emacs@gnu.org; Mon, 19 Jul 2010 16:30:39 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60111) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oawyz-0005H7-Fr for bug-gnu-emacs@gnu.org; Mon, 19 Jul 2010 16:30:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OawuX-0002tx-SJ; Mon, 19 Jul 2010 16:26:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Jul 2010 20:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6671 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Bug-Gnu-Emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.127957114311143 (code B ref -1); Mon, 19 Jul 2010 20:26:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Jul 2010 20:25:43 +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 1OawuE-0002tg-5q for submit@debbugs.gnu.org; Mon, 19 Jul 2010 16:25:42 -0400 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OawuB-0002tb-1c for submit@debbugs.gnu.org; Mon, 19 Jul 2010 16:25:39 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:38900) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OawuW-0003D5-Oc for submit@debbugs.gnu.org; Mon, 19 Jul 2010 16:26:00 -0400 Original-Received: from [140.186.70.92] (port=48323 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OawuV-0000st-7g for bug-gnu-emacs@gnu.org; Mon, 19 Jul 2010 16:26:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OawuU-0004HQ-51 for bug-gnu-emacs@gnu.org; Mon, 19 Jul 2010 16:25:59 -0400 Original-Received: from mail-bw0-f41.google.com ([209.85.214.41]:64819) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OawuT-0004Fi-Uj for bug-gnu-emacs@gnu.org; Mon, 19 Jul 2010 16:25:58 -0400 Original-Received: by bwz9 with SMTP id 9so3198871bwz.0 for ; Mon, 19 Jul 2010 13:25:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=TIFpObz7fYbyWWp1vc+k68f8p2OnvNo5XW38+dFdpSI=; b=ax7juGhvzpOWnY9FnyjQovDzjNQuScyaQRv+Abp5vOyogR/9X+F4ebSgP1OIl2yZEx M2A7u6vMBFNrNORyGDMyGBgAofSwjsD/rCExsr/6W1bx+SVXDf3tom+Kh3ezXkR+i9IO hcbACF4WIxLs4QtYISS7NxVppKlCm811oucjI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=Hly+b4pbFEPuw2zdmGTe3etqzKmD24ct+IV6n7NgnRocrcPGfExJBY3a3/UrijdYwl ahY/URY5AZ8020ItoJ1dU3uAqP1i49nNHlV2t7bjOmMaHp8jBzxHNKIe7GP8cY4cp20G 3sBU65XfLFOqxgvd0WJaCWCsA0ZIG8sDJAAPk= Original-Received: by 10.204.82.200 with SMTP id c8mr1013773bkl.102.1279571148418; Mon, 19 Jul 2010 13:25:48 -0700 (PDT) Original-Received: by 10.204.180.136 with HTTP; Mon, 19 Jul 2010 13:25:28 -0700 (PDT) In-Reply-To: <83pqzec9i8.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 19 Jul 2010 16:26:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:38671 Archived-At: Package: emacs Severity: important Version: 24.0.50 ---------- Forwarded message ---------- From: Eli Zaretskii Date: Sat, Jun 26, 2010 at 13:34 Subject: moving point and scroll-conservatively To: emacs-devel@gnu.org Did any of you who set scroll-conservatively to most-positive-fixnum notice that moving around an unmodified buffer became much slower, since revno 100620, when point moves far away? For example, with this recipe: =C2=A0emacs -Q =C2=A0M-: (setq scroll-conservatively most-positive-fixnum scroll-step 0) R= ET =C2=A0C-x C-f xdisp.c =C2=A0C-u 25000 M-g M-g it takes Emacs 17 seconds on my 3GHz machine to display xdisp.c around line 25000, whereas it's instantaneous in Emacs 23.2. This happens because the try_scrolling method would previously give up when point was more than 10 screen lines below the current end of the window. =C2=A0Emacs would then perform a complete redisplay of the window, with point located on the middle line. =C2=A0This "recentering" annoyed users who set scroll-conservatively to most-positive-fixnum, so revno 100620 modified try_scrolling to _never_ give up due to point being too far away, when scroll-conservatively is set to such a large value. However, try_scrolling is used not only for scroll commands such as the C-n or C-v, but for _any_ motion in a buffer that didn't change. Thus the unintended effect described above. I guess we should limit try_scrolling to situations where at least one screen line from the previous display is left on the screen. Otherwise, we are going to redisplay the entire window anyway, and this optimization does not make sense. =C2=A0Note that the documentation of scroll-conservatively explicitly says "set it to some small number N"; i.e. it was never the intent that it will be set to such large values. For the same reason the value of the scroll-*-aggressively variables is limited to 1. The resulting recentering when Emacs cannot keep up with the keyboard auto-repeat rate caused by user leaning on the down arrow should be handled in some different way (see my suggestion in the "The unwarranted scrolling assumption" thread). Btw, what do users of scroll-conservatively =3D most-positive-fixnum want from C-v and PageDown keys? =C2=A0Is it okay to recenter in that case, or do you want to see the cursor on the last screen line in that case as well? =C2=A0(Emacs does not currently distinguish between these two cases. =C2=A0In fact, it does not care at all which command caused point to move.)