From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dani Moncayo Newsgroups: gmane.emacs.bugs Subject: bug#12811: 24.3.50; `scroll-up/down-aggressively' don't seem to work as expected Date: Wed, 7 Nov 2012 10:23:52 +0100 Message-ID: References: <83ip9i3c59.fsf@gnu.org> <831ug62z3c.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1352280259 12915 80.91.229.3 (7 Nov 2012 09:24:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 7 Nov 2012 09:24:19 +0000 (UTC) Cc: 12811@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 07 10:24:29 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 1TW1s3-0006tr-VT for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Nov 2012 10:24:28 +0100 Original-Received: from localhost ([::1]:43485 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TW1ru-0004fc-Bw for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Nov 2012 04:24:18 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TW1rm-0004ef-W4 for bug-gnu-emacs@gnu.org; Wed, 07 Nov 2012 04:24:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TW1ri-00081K-QU for bug-gnu-emacs@gnu.org; Wed, 07 Nov 2012 04:24:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TW1ri-00080w-La for bug-gnu-emacs@gnu.org; Wed, 07 Nov 2012 04:24:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TW1rd-00028f-K8 for bug-gnu-emacs@gnu.org; Wed, 07 Nov 2012 04:24:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dani Moncayo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Nov 2012 09:24: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.13522802348205 (code B ref 12811); Wed, 07 Nov 2012 09:24:01 +0000 Original-Received: (at 12811) by debbugs.gnu.org; 7 Nov 2012 09:23:54 +0000 Original-Received: from localhost ([127.0.0.1]:53400 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TW1rV-00028I-EU for submit@debbugs.gnu.org; Wed, 07 Nov 2012 04:23:53 -0500 Original-Received: from mail-oa0-f44.google.com ([209.85.219.44]:49770) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TW1rS-00028A-SG for 12811@debbugs.gnu.org; Wed, 07 Nov 2012 04:23:51 -0500 Original-Received: by mail-oa0-f44.google.com with SMTP id n5so1308347oag.3 for <12811@debbugs.gnu.org>; Wed, 07 Nov 2012 01:23:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fLiBQNhm5tnNLX1ij6Spzp+ha9YIWtvol8eMp5k/Txk=; b=WOvtXK/cgzNYES3vZD9O7eYQjDQuq8dkx9Es8nrmT1Gl4j2Xlm1hr9EU5OAZqktmIi vjiE56+XZydsMxbyoXqdxLuQXfoOya553Knp5ePMLKmTBYQqfZzEOD94vKS1JfeMh70O 9xoZ8fuCzd6/5dq5cjrqa3bZ+Xy500c+PeAtEpYPXCFG1WhOyMbMUJNXBKZNnp3e+ZsO N9cGtB7Dqdz9c+edmVVrOZjkyBCeLwSAtQrvOBrL2W3aUEHhuy8oILkDB32wEUtwxEKg WacPFX8wHgXBiG9sFLOBpAOmtC8U/Opdu9REG598q/x3qez9e65y1tXKy/Y+Ht7j6bRt 495Q== Original-Received: by 10.60.18.110 with SMTP id v14mr1516008oed.135.1352280233039; Wed, 07 Nov 2012 01:23:53 -0800 (PST) Original-Received: by 10.60.131.168 with HTTP; Wed, 7 Nov 2012 01:23:52 -0800 (PST) In-Reply-To: <831ug62z3c.fsf@gnu.org> 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:66570 Archived-At: >> So I'd like to make this request: >> * Make obsolete the variables `scroll-up/down-aggressively'. >> * Extend the semantics of the variable `scroll-step' to accept also a >> fractional number between 0 and 1, so that for example 0.7 would mean: >> "when point moves out, try to get it back into view by scrolling >> up/down an amount equal to the 70% of the height of the window. If >> that fails, center in the window the line where point is". > > Wouldn't this keep the same semantics, but in one variable instead of > 3? Not exactly: The functionality behind `scroll-up/down-aggressively' (as explained in the manual) make no sense in some cases (after doing a "big jump"), and is similar in spirit to the functionality behind `scroll-step' in the other cases (after doing a "small jump"). Hence my proposal, which aims to get rid of `scroll-up/down-aggressively' and fulfill the small gap of functionality derived from that removal. (see below) > Anyway, it's too late to make such changes now, because a year and a > half so ago, there a was similar discussion about > scroll-conservatively, and people who set it to a large value > explicitly asked for that to work over large scrolls. So the code was > restructured to support that (that's why it was so easy for me to fix > this one); I'm sorry, I fail to see how that is related to the issue at hand. :( > going back means a serious surgery on that code, which I > think is unjustified at this point, as I didn't hear any complaints > about scrolling for a long time. But I don't think my proposal would mean "going back", but the opposite: make both the user interface and the program more simple and coherent, because: * We'll get rid of two variables (well, after a period of obsolescence). * The change related to `scroll-step' should be pretty straightforward, because the spirit of the variable would be untouched: just in the case that the variable holds a floating point value, the amount of lines to scroll should be computed based on that value and the current window height. >> It would not make sense, indeed, but according to the current >> documentation, point should be positioned according to >> `scroll-up/down-aggressively'. > > Well, now it does. ? I've not tested your fix yet, but if now the program behaves like the documentation says, it will be good, but as we've agreed, that behavior is undesirable in some cases (after a big jump). >> > 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. >> >> But that assumption is false in many real-life cases. > > Not when you cause the scroll with C-n or C-p (without numeric > arguments). Then it's true. Of course, but as I say, in many real-life cases (e.g. when doing Isearch) the assumption is false, and so the resulting behavior is undesirable. >> > 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. >> >> Good, thanks. Then perhaps the documentation should be updated to >> reflect this, no? > > What's wrong with the documentation now? The code does what it says, > no? Sorry I didn't get you right: I thought your change was about avoiding that after a big jump the current line will be always centered. -- Dani Moncayo