emacs-devel
[Top][All Lists]
Advanced

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

Re: Can we make set_point_both less expensive?


From: Eli Zaretskii
Subject: Re: Can we make set_point_both less expensive?
Date: Fri, 20 Mar 2015 23:19:24 +0200

> Date: Fri, 20 Mar 2015 20:53:53 +0100
> From: martin rudalics <address@hidden>
> CC: address@hidden, address@hidden, address@hidden
> 
>  >> Strictly spoken I see no reason why the display engine should not handle
>  >> that property by itself.
>  >
>  > Redisplay never moves point, except when it was forced to keep a
>  > specific window-start position.  In all other cases, it scrolls the
>  > display, but leave point intact.
> 
> But when redisplay moves point (usually after scrolling the window) it
> could check whether it would end up in an intangible region and adjust
> point accordingly.  Why would this be such a big deal?

It could, but AFAIU, this is not the only situation that is being
discussed.  Stefan wants redisplay to move point also in the case
where some Lisp moved point and entered a region of buffer positions
that has a certain text property.  That's not a scrolling scenario you
describe.

>  > And cursor is always set where point is, we have no other strategy for
>  > positioning the cursor.
> 
> After `scroll-left'?

Yes, after scroll-left, too.  We simply put the cursor as close to
point as possible.

>  > So I don't see how handling intangible could
>  > be the job of redisplay, without significant changes.
> 
> Isn't adjust_point_for_property some sort of redisplay revisited?

No.  It does nothing that is related to display.

>  >> Someone would have to handle the scroll margins too when determining
>  >> on which side of the area to move point.
>  >
>  > Scroll margins don't cause point movement; they cause movement of text
>  > wrt the window.
> 
> They would determine the position of the cursor when an intangible area
> starts or ends within them.

Sorry, too much "they" in this sentence, I don't really understand
what you are sayin, or how it is relevant to the issue at hand.



reply via email to

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