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#12811: 24.3.50; `scroll-up/down-aggressively' don't seem to work as expected Date: Tue, 06 Nov 2012 18:54:26 +0200 Message-ID: <83ip9i3c59.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1352221681 18333 80.91.229.3 (6 Nov 2012 17:08:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Nov 2012 17:08:01 +0000 (UTC) Cc: 12811@debbugs.gnu.org To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 06 18:08:07 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 1TVmd6-0007JU-Ty for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Nov 2012 18:08:01 +0100 Original-Received: from localhost ([::1]:50738 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVmQe-0004WD-9T for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Nov 2012 11:55:08 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVmQX-0004SZ-1O for bug-gnu-emacs@gnu.org; Tue, 06 Nov 2012 11:55:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVmQN-0006vI-1i for bug-gnu-emacs@gnu.org; Tue, 06 Nov 2012 11:55:00 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42467) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVmQM-0006uq-UL for bug-gnu-emacs@gnu.org; Tue, 06 Nov 2012 11:54:50 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TVmTR-00081m-Lh for bug-gnu-emacs@gnu.org; Tue, 06 Nov 2012 11:58:01 -0500 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: Tue, 06 Nov 2012 16:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12811 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12811-submit@debbugs.gnu.org id=B12811.135222107030840 (code B ref 12811); Tue, 06 Nov 2012 16:58:01 +0000 Original-Received: (at 12811) by debbugs.gnu.org; 6 Nov 2012 16:57:50 +0000 Original-Received: from localhost ([127.0.0.1]:52718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVmTF-00081N-LW for submit@debbugs.gnu.org; Tue, 06 Nov 2012 11:57:49 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:34393) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVmTC-00081D-8g for 12811@debbugs.gnu.org; Tue, 06 Nov 2012 11:57:47 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MD200G00S5SJ300@a-mtaout23.012.net.il> for 12811@debbugs.gnu.org; Tue, 06 Nov 2012 18:54:29 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MD200G9ESASG760@a-mtaout23.012.net.il>; Tue, 06 Nov 2012 18:54:29 +0200 (IST) In-reply-to: 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.x 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:66537 Archived-At: > Date: Tue, 6 Nov 2012 00:27:55 +0100 > From: Dani Moncayo > > 1. Visit the attached file. > 2. Adjust the height of the Emacs GUI frame so that only lines 1 to 11 > are visible. With this setup it is easy to tell the relative position > of a line in the window in terms of percentage from the top or bottom, > since each line counts as 10% for such percentages. I guess you meant lines 1 to 10, not 11, because with 10 the percentages are not integral numbers of lines. > 3. Go to line 1. > 4. Type: C-u 1 5 C-n > --> Point goes to line 16, and that line is centered in the window. So > everything is as expected so far. > 5. M-: (setq scroll-up-aggressively 0.7) > 6. Repeat steps #3 and #4. > --> This time I observe that point goes to line 16, but that line is > near the bottom of the window (9th line; 20% from the bottom) when it > should be near the top (4th line; 70% from the bottom). > > > I also observe a misbehavior when testing scroll-down-aggressively: > 1. M-: (setq scroll-down-aggressively 0.7) > 2. Go to line 30 and make that line the last visible one. > 3. Type: C-u 1 1 C-p > --> I observe that point goes to line 19, but that line is the 10th in > the window (90% from the top), when it should be the 8th line (70% > from the top). IMO, it doesn't make sense to expect scroll-up/down-aggressively do anything useful when you move point by more than a window-full. (In your case, the window is 11 (or 10) lines, and you move point by 15 lines.) These variables exist to control the _overlap_ between the current window-full of text and the next/previous one. When you move by more than the window's height, so that there's no overlap at all, these variables are meaningless. E.g., what would you expect them to do with "C-u 100 C-n", or with "C-u 100000 M-x goto-char"? why would it make sense to position point anywhere but the middle of the window for such large scrolls? That is why what you expected never worked in Emacs, at least since v21.1. The code which implements the effect of these variables was written under the assumption that point is only a small ways outside of the window, one or 2 screen lines, because this is what happens when you type "C-n" or "C-p" on the border of the scroll margin. Having said that, since the code already almost did TRT, it is much easier for me to fix it for this use case than to argue about the applicability of these variables. So I did just that in revision 110795 on the emacs-24 branch. Just don't ask me to make C-v and M-v also obey these variables...