all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* moving point and scroll-conservatively
@ 2010-06-26 11:34 Eli Zaretskii
  2010-06-26 11:52 ` Juanma Barranquero
                   ` (3 more replies)
  0 siblings, 4 replies; 41+ messages in thread
From: Eli Zaretskii @ 2010-06-26 11:34 UTC (permalink / raw)
  To: emacs-devel

Did any of you who set scroll-conservatively to most-positive-fixnum
notice that moving around an unmodified buffer became much slower,
since revno 100620, when point moves far away?

For example, with this recipe:

  emacs -Q
  M-: (setq scroll-conservatively most-positive-fixnum scroll-step 0) RET
  C-x C-f xdisp.c
  C-u 25000 M-g M-g

it takes Emacs 17 seconds on my 3GHz machine to display xdisp.c around
line 25000, whereas it's instantaneous in Emacs 23.2.

This happens because the try_scrolling method would previously give up
when point was more than 10 screen lines below the current end of the
window.  Emacs would then perform a complete redisplay of the window,
with point located on the middle line.  This "recentering" annoyed
users who set scroll-conservatively to most-positive-fixnum, so revno
100620 modified try_scrolling to _never_ give up due to point being
too far away, when scroll-conservatively is set to such a large value.
However, try_scrolling is used not only for scroll commands such as
the C-n or C-v, but for _any_ motion in a buffer that didn't change.
Thus the unintended effect described above.

I guess we should limit try_scrolling to situations where at least one
screen line from the previous display is left on the screen.
Otherwise, we are going to redisplay the entire window anyway, and
this optimization does not make sense.  Note that the documentation of
scroll-conservatively explicitly says "set it to some small number N";
i.e. it was never the intent that it will be set to such large values.
For the same reason the value of the scroll-*-aggressively variables
is limited to 1.

The resulting recentering when Emacs cannot keep up with the keyboard
auto-repeat rate caused by user leaning on the down arrow should be
handled in some different way (see my suggestion in the "The
unwarranted scrolling assumption" thread).

Btw, what do users of scroll-conservatively = most-positive-fixnum
want from C-v and PageDown keys?  Is it okay to recenter in that case,
or do you want to see the cursor on the last screen line in that case
as well?  (Emacs does not currently distinguish between these two
cases.  In fact, it does not care at all which command caused point to
move.)



^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2011-03-31 19:19 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-26 11:34 moving point and scroll-conservatively Eli Zaretskii
2010-06-26 11:52 ` Juanma Barranquero
2010-06-26 12:25   ` Eli Zaretskii
2010-06-26 13:08     ` David De La Harpe Golden
2010-06-26 14:08       ` Christoph
2010-06-26 21:25     ` Juanma Barranquero
2010-06-28 21:08     ` Juri Linkov
2010-06-26 12:44 ` David De La Harpe Golden
2010-07-19 12:48 ` Juanma Barranquero
2010-07-19 17:39   ` Eli Zaretskii
2010-07-19 20:25 ` bug#6671: " 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
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

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.