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: Mats Lidell
Subject: Re: Odd behavior when moving point over invisible text
Date: Tue, 06 Jun 2023 14:07:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

> Eli Zaretskii writes:
> I don't think I understand what you find odd here.

My initial "odd feeling" comes from this.

   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.

> The commands, like forward-char, aren't changed, they still move by the
> exact number of buffer positions they are told to move.  The heuristic kicks
> in _after_ the command exits, and it (the heuristic) tries to figure out on
> which end of the invisible region to put point.  When point moves from
> "afar" into the invisible region, how to know whether to put it at the
> nearest end or the farthest one?

I understand the difficulties and also the problems related to "fixing" this
is dawning on me. Thanks for the feedback.

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.

%% Mats



reply via email to

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