all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Mats Lidell <matsl@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Odd behavior when moving point over invisible text
Date: Tue, 06 Jun 2023 14:48:36 +0300	[thread overview]
Message-ID: <83v8g03j6z.fsf@gnu.org> (raw)
In-Reply-To: <87a5xdqyfv.fsf@gnu.org> (message from Mats Lidell on Tue, 06 Jun 2023 01:30:44 +0200)

> 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	other threads:[~2023-06-06 11:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-04 21:43 Odd behavior when moving point over invisible text Mats Lidell
2023-06-05  7:09 ` Karl Fogel
2023-06-05 13:05   ` Eli Zaretskii
2023-06-05 17:51     ` Karl Fogel
2023-06-05 19:38     ` Mats Lidell
2023-06-05 12:59 ` Eli Zaretskii
2023-06-05 23:30   ` Mats Lidell
2023-06-06 11:48     ` Eli Zaretskii [this message]
2023-06-06 12:07       ` Mats Lidell
2023-06-06 12:22         ` Eli Zaretskii
2023-06-06 22:45           ` Mats Lidell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83v8g03j6z.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=matsl@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.