bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6671: moving point and scroll-conservatively


From: Eli Zaretskii
Subject: bug#6671: moving point and scroll-conservatively
Date: Fri, 25 Mar 2011 11:13:01 +0200

> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]