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 14:48:36 +0300

> From: Mats Lidell <matsl@gnu.org>
> Cc: emacs-devel@gnu.org
> Date: Tue, 06 Jun 2023 01:30:44 +0200
> 
> But... There is still a thing that I find a little odd but might be the
> desired behavior.
> 
> What happens is: If point is before the first dot in the ellipsis and I call
> (forward-char) multiple times, from a function or test case, not manually, the
> point stays on the first dot (It seems point is really moving in the hidden
> text because if the number of times it is repeated is larger than the hidden
> text the point comes out on the other side so to say.)
> 
> This can also be demonstrated with trying to pass the ellipsis using a prefix
> arg to C-f. It is easiest to demonstrate by having a big text portion that is
> hidden. Put the point before the ellipsis on the right parenthesis in the
> example file and type C-u 10 C-f and notice that point will stop at the first
> dot. Put back the point on the parenthesis and type C-f C-f and point moves
> over the ellipsis.

I don't think I understand what you find odd here.  What exactly are
your expectations from this heuristic?  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?



reply via email to

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