all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Dani Moncayo <dmoncayo@gmail.com>
Cc: 12801@debbugs.gnu.org
Subject: bug#12801: 24.3.50; `scroll-conservatively' and `scroll-step'
Date: Mon, 05 Nov 2012 05:53:52 +0200	[thread overview]
Message-ID: <837gq04sdr.fsf@gnu.org> (raw)
In-Reply-To: <CAH8Pv0g1DG60n063Rk_suidEXMsVtDAJg1bb36wFZ3+e0KXPKQ@mail.gmail.com>

> Date: Sun, 4 Nov 2012 22:24:53 +0100
> From: Dani Moncayo <dmoncayo@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.





  reply	other threads:[~2012-11-05  3:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-04 21:24 bug#12801: 24.3.50; `scroll-conservatively' and `scroll-step' Dani Moncayo
2012-11-05  3:53 ` Eli Zaretskii [this message]
2012-11-05  7:33   ` Dani Moncayo
2012-11-05  7:36     ` Dani Moncayo
2012-11-05 18:03   ` Eli Zaretskii
2012-11-05 19:12     ` Dani Moncayo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=837gq04sdr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=12801@debbugs.gnu.org \
    --cc=dmoncayo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.