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#12801: 24.3.50; `scroll-conservatively' and `scroll-step' Date: Mon, 05 Nov 2012 05:53:52 +0200 Message-ID: <837gq04sdr.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1352087704 571 80.91.229.3 (5 Nov 2012 03:55:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Nov 2012 03:55:04 +0000 (UTC) Cc: 12801@debbugs.gnu.org To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 05 04:55:13 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 1TVDmL-00017p-BF for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Nov 2012 04:55:13 +0100 Original-Received: from localhost ([::1]:56295 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVDmC-0006t8-8Z for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Nov 2012 22:55:04 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVDm9-0006sU-7e for bug-gnu-emacs@gnu.org; Sun, 04 Nov 2012 22:55:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVDm7-0007m1-Ni for bug-gnu-emacs@gnu.org; Sun, 04 Nov 2012 22:55:01 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39268) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVDm7-0007lx-KV for bug-gnu-emacs@gnu.org; Sun, 04 Nov 2012 22:54:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TVDp4-0001dB-8N for bug-gnu-emacs@gnu.org; Sun, 04 Nov 2012 22:58:02 -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: Mon, 05 Nov 2012 03:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12801 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12801-submit@debbugs.gnu.org id=B12801.13520878276202 (code B ref 12801); Mon, 05 Nov 2012 03:58:02 +0000 Original-Received: (at 12801) by debbugs.gnu.org; 5 Nov 2012 03:57:07 +0000 Original-Received: from localhost ([127.0.0.1]:49518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVDoA-0001bx-Kx for submit@debbugs.gnu.org; Sun, 04 Nov 2012 22:57:07 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:54661) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVDo7-0001bm-H4 for 12801@debbugs.gnu.org; Sun, 04 Nov 2012 22:57:04 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MCZ00I00XFEFM00@a-mtaout20.012.net.il> for 12801@debbugs.gnu.org; Mon, 05 Nov 2012 05:53:59 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MCZ00IIXXHY2Z50@a-mtaout20.012.net.il>; Mon, 05 Nov 2012 05:53:59 +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:66464 Archived-At: > Date: Sun, 4 Nov 2012 22:24:53 +0100 > From: Dani Moncayo > > 1. Set the variable `scroll-step' to 3. > 2. Visit the attached file. > 3. Adjust the vertical space (empty lines) between "first line" and > "last visible line" until the latter becomes indeed the last visible > line in the window. > 4. Move point to the "last visible line". > 5. Move point two lines down in a single command: C-u 2 C-n > > I observe that after step #5 the window is scrolled by `scroll-step' > lines (3 lines), which is TRT. > > But if I set `scroll-conservatively' to 1 and repeat the experiment > (from step #4), then I observe that this time the line where point > goes to ("2") is centered in the window. > > After reading (info "(emacs) Auto Scrolling"), I think that this is > either a bug in the program or in the documentation. This paragraph > in particular doesn't match the observed behavior in the second case: > > The variable `scroll-step' determines how many lines to scroll the > window when point moves off the screen. If moving by that number of > lines fails to bring point back into view, point is centered instead. > The default value is zero, which causes point to always be centered > after scrolling. If you set scroll-conservatively, scroll-step is ignored for the purposes of deciding how much to scroll when point is off the window. So the code works as intended. The documentation is not wrong, as it describes scroll-conservatively before scroll-step, and the description quite naturally should lead one to the above conclusion, because these two variables contradict each other. I will make the documentation more clear on this, though.