unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: lekktu@gmail.com, 6671@debbugs.gnu.org
Subject: bug#6671: moving point and scroll-conservatively
Date: Fri, 25 Mar 2011 11:13:01 +0200	[thread overview]
Message-ID: <83lj03tvfm.fsf@gnu.org> (raw)
In-Reply-To: <87lj04dwuz.fsf@stupidchicken.com>

> From: Chong Yidong <cyd@stupidchicken.com>
> Cc: lekktu@gmail.com, 6671@debbugs.gnu.org
> Date: Thu, 24 Mar 2011 17:36:36 -0400
> 
> The solution you suggested was:
> 
> > when point is "far away" (which could be set back to those proverbial
> > 10 screen lines), then, instead of moving one line at a time, move to
> > point in one go, and then compute the window start so that point is at
> > the proper place relative to window start.
> 
> If the current literal meaning of scroll-conservatively is retained, we
> need to count the number of lines involved in performing this "far-away
> scroll", by iterating.  That brings us back to square one.

Granted, I didn't mean to get back to square one, i.e. I didn't mean
to retain the literal meaning of scroll-conservatively.  (It wasn't
interpreted literally before those changes, anyway.  The manual
describes the effect of scroll-conservatively only for small
arguments, so the effect of setting it to a large value like 200000 is
undefined, and we can make it do anything that is reasonable.)

What I mean to do is make it so redisplay always positions point on
the last or first line of the window when scroll-conservatively is a
large number, so it would never-ever recenter in that case, not even
if try_scrolling fails.  (Currently, scroll-conservatively is only
checked inside try_scrolling, and the net effect is that it is
sometimes ignored, under conditions that are not well-defined.  IOW,
its effect is unpredictable for users who want predictable behavior in
this regard.)

Whether the threshold value of scroll-conservatively for never
recentering is 300 or not is not important, as long as we document
that threshold.  (FWIW, I'd go with a lower number, like 100.)  I
don't see a reason for having a variable that gives users control on
that threshold: if the threshold is documented, users can always get
the desired effect by changing the value of scroll-conservatively.

> If you want to avoid this pitfall, your solution and mine become the
> same, i.e. special handling of "sufficiently large" values of
> scroll-conservatively.

Yes, but with 2 important differences:

 . my proposal doesn't introduce a new value for scroll-conservatively

 . it makes sure we never recenter with a large value of that option,
   not even if try_scrolling cannot be used





  reply	other threads:[~2011-03-25  9:13 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <83pqzec9i8.fsf@gnu.org>
2010-07-19 20:25 ` bug#6671: moving point and scroll-conservatively Juanma Barranquero
2010-08-02  0:29   ` Juanma Barranquero
2011-03-24  0:42   ` Chong Yidong
2011-03-24  2:07     ` Juanma Barranquero
2011-03-24  3:58       ` Chong Yidong
2011-03-24  7:23         ` Eli Zaretskii
2011-03-24 15:14           ` Chong Yidong
2011-03-24 20:01             ` Chong Yidong
2011-03-24 20:25               ` Eli Zaretskii
2011-03-24 20:57                 ` Juanma Barranquero
2011-03-24 21:36                 ` Chong Yidong
2011-03-25  9:13                   ` Eli Zaretskii [this message]
2011-03-25 15:58                     ` Chong Yidong
2011-03-24 20:56               ` Juanma Barranquero
2011-03-24 21:47                 ` Chong Yidong
2011-03-24 23:06                   ` Juanma Barranquero
2011-03-25  2:09                     ` Chong Yidong
2011-03-25  8:48                       ` Eli Zaretskii
2011-03-25  9:45                         ` Eli Zaretskii
2011-03-25 11:10                         ` Juanma Barranquero
2011-03-25  9:44                       ` Eli Zaretskii
2011-03-25  9:32             ` Eli Zaretskii
2011-03-26 12:32         ` Eli Zaretskii
2011-03-27  2:39           ` Juanma Barranquero
2011-03-27  3:59             ` Eli Zaretskii
2011-03-28 23:00               ` Juanma Barranquero
2011-03-29  4:03                 ` Eli Zaretskii
2011-03-29 10:54                   ` Juanma Barranquero
2011-03-29 12:42                     ` Eli Zaretskii
2011-03-31 19:19                 ` Eli Zaretskii
2011-03-24  7:25     ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83lj03tvfm.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=6671@debbugs.gnu.org \
    --cc=cyd@stupidchicken.com \
    --cc=lekktu@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).