emacs-devel
[Top][All Lists]
Advanced

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

Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering


From: Eli Zaretskii
Subject: Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3
Date: Mon, 20 Apr 2020 18:01:48 +0300

> Cc: address@hidden, address@hidden, address@hidden, address@hidden,
>  address@hidden
> From: Dmitry Gutov <address@hidden>
> Date: Mon, 20 Apr 2020 06:17:55 +0300
> 
> > It's not a "merge" and not an optimization, it's how Emacs was
> > designed.  It only enters redisplay when it's idle.  If you invoke
> > commands one after another quickly enough, more than one command will
> > be executed before the next redisplay cycle.
> 
> The fact that Emacs's behavior can depend on when redisplay happens, and 
> the user cannot reliably control it, is problematic IMHO.

Please be specific: what Emacs's behavior can depend on when redisplay
happens, apart from whether something was or wasn't updated on
display?

> >> At the beginning of each command, we can save the value of point. If, at
> >> the end, we're still in the same buffer, and the new value of point
> >> fails the scroll-conservatively check, count the lines between the
> >> previous value of point and the new one. If that number is <=
> >> scroll-conservatively, then scroll "conservatively" anyway.
> > 
> > And if not, then what?
> 
> Then give up and move point to the middle of the window.

But that's again "not good" according to your opinion, isn't it?  Or
maybe you assume this will solve most of the cases when we currently
recenter under scroll-conservatively < 101?

> > Anyway, scrolling commands don't normally move point, they move the
> > window-start.  Point then moves because redisplay brings it into
> > view.  So I don't think your algorithm will work, at least not in the
> > usual case.
> 
> I'm a lot less worried about scrolling "conservatively" when the user 
> actually invokes the scrolling commands.

Ahem... the thread's title begins with "scrolling commands",so I
thought we were still discussing that?

> > What you describe might be relevant to "scrolling" that happens if you
> > lean on C-n, not on C-v.
> 
> C-n, or C-M-e, or C-s. These are indeed scenarios when the current 
> behavior can be most surprising.

Is it?  Just out of habit, I suppose.  What Emacs does make a lot of
sense: it shows you the optimal amount of context.  By contrast,
scroll-conservatively shows you only one side of that context, and
usually the wrong side.



reply via email to

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