GNU bug report logs - #12801
24.3.50; `scroll-conservatively' and `scroll-step'

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Sun, 4 Nov 2012 21:29:02 UTC

Severity: normal

Found in version 24.3.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12801 in the body.
You can then email your comments to 12801 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#12801; Package emacs. (Sun, 04 Nov 2012 21:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dani Moncayo <dmoncayo <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 04 Nov 2012 21:29:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; `scroll-conservatively' and `scroll-step'
Date: Sun, 4 Nov 2012 22:24:53 +0100
[Message part 1 (text/plain, inline)]
Recipe from "emacs -nw -Q" (the "-nw" part is not strictly needed, but
it is cleaner for showing the problem):

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.



In GNU Emacs 24.3.50.1 (i386-mingw-nt6.1.7601)
 of 2012-11-04 on MS-W7-DANI
Bzr revision: 110794 rgm <at> gnu.org-20121104041313-7j1z7vaqtrgopt26
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --with-gcc (4.7) --no-opt --enable-checking --cflags
 -I../../libs/libXpm-3.5.10/include -I../../libs/libXpm-3.5.10/src
 -I../../libs/libpng-1.2.37-lib/include -I../../libs/zlib-1.2.5
 -I../../libs/giflib-4.1.4-1-lib/include
 -I../../libs/jpeg-6b-4-lib/include
 -I../../libs/tiff-3.8.2-1-lib/include
 -I../../libs/libxml2-2.7.8-w32-bin/include/libxml2
 -I../../libs/gnutls-3.0.9-w32-bin/include
 -I../../libs/libiconv-1.9.2-1-lib/include'

Important settings:
  value of $LANG: ESN
  locale-coding-system: cp1252
  default enable-multibyte-characters: t


-- 
Dani Moncayo
[test.txt (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12801; Package emacs. (Mon, 05 Nov 2012 03:58:02 GMT) Full text and rfc822 format available.

Message #8 received at 12801 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 12801 <at> debbugs.gnu.org
Subject: Re: bug#12801: 24.3.50; `scroll-conservatively' and `scroll-step'
Date: Mon, 05 Nov 2012 05:53:52 +0200
> Date: Sun, 4 Nov 2012 22:24:53 +0100
> From: Dani Moncayo <dmoncayo <at> gmail.com>
> 
> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12801; Package emacs. (Mon, 05 Nov 2012 07:37:01 GMT) Full text and rfc822 format available.

Message #11 received at 12801 <at> debbugs.gnu.org (full text, mbox):

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 12801 <at> debbugs.gnu.org
Subject: Re: bug#12801: 24.3.50; `scroll-conservatively' and `scroll-step'
Date: Mon, 5 Nov 2012 08:33:11 +0100
> 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.

Obviously I disagree.

>  I will make the
> documentation more clear on this, though.

Thank you.  IMO that clarification is clearly needed.

-- 
Dani Moncayo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12801; Package emacs. (Mon, 05 Nov 2012 07:40:02 GMT) Full text and rfc822 format available.

Message #14 received at 12801 <at> debbugs.gnu.org (full text, mbox):

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 12801 <at> debbugs.gnu.org
Subject: Re: bug#12801: 24.3.50; `scroll-conservatively' and `scroll-step'
Date: Mon, 5 Nov 2012 08:36:07 +0100
>> 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.
>
> Obviously I disagree.

I mean: I read the info node several times and I couldn't figure out
the intended behavior you've just described when both variables are
set.


-- 
Dani Moncayo




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Mon, 05 Nov 2012 18:07:01 GMT) Full text and rfc822 format available.

Notification sent to Dani Moncayo <dmoncayo <at> gmail.com>:
bug acknowledged by developer. (Mon, 05 Nov 2012 18:07:02 GMT) Full text and rfc822 format available.

Message #19 received at 12801-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: dmoncayo <at> gmail.com
Cc: 12801-done <at> debbugs.gnu.org
Subject: Re: bug#12801: 24.3.50; `scroll-conservatively' and `scroll-step'
Date: Mon, 05 Nov 2012 20:03:14 +0200
> Date: Mon, 05 Nov 2012 05:53:52 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 12801 <at> debbugs.gnu.org
> 
> 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.

Done in revision 110785 on the emacs-24 branch.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12801; Package emacs. (Mon, 05 Nov 2012 19:16:01 GMT) Full text and rfc822 format available.

Message #22 received at 12801-done <at> debbugs.gnu.org (full text, mbox):

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 12801-done <at> debbugs.gnu.org
Subject: Re: bug#12801: 24.3.50; `scroll-conservatively' and `scroll-step'
Date: Mon, 5 Nov 2012 20:12:23 +0100
>> 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.
>
> Done in revision 110785 on the emacs-24 branch.

Thank you.

-- 
Dani Moncayo




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 04 Dec 2012 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 154 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.