emacs-devel
[Top][All Lists]
Advanced

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

Re: Odd behavior when moving point over invisible text


From: Eli Zaretskii
Subject: Re: Odd behavior when moving point over invisible text
Date: Tue, 06 Jun 2023 15:22:58 +0300

> From: Mats Lidell <matsl@gnu.org>
> Cc: emacs-devel@gnu.org
> Date: Tue, 06 Jun 2023 14:07:07 +0200
> 
>    Put the point one char away from the ellipsis. Press C-f twice and point
>    moves up to the ellipsis and over it. If I instead do C-u 2 C-f the point
>    will stop at the ellipsis.
> 
> > What exactly are your expectations from this heuristic?
> 
> I would expect both ways to move the point to produce the same result.

Why?  In the first case, Emacs knows you stopped between the two
moves, in the second one you didn't.

> For my initial quest to write some unit tests around hidden text I feel better
> equipped now. I understand why (forward-char) twice can't be used in the unit
> test to move past the ellipsis since that behavior is connected to the
> heuristics that will not kick in.

If you are writing tests, you are better off disabling point
adjustments altogether.  See global-disable-point-adjustment.



reply via email to

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