GNU bug report logs -
#12801
24.3.50; `scroll-conservatively' and `scroll-step'
Previous Next
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.
Full log
Message #8 received at 12801 <at> debbugs.gnu.org (full text, mbox):
> 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.
This bug report was last modified 12 years and 278 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.