[Top][All Lists]

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

Re: `vertical-motion', `goto-line' set point to invisible text

From: Eli Zaretskii
Subject: Re: `vertical-motion', `goto-line' set point to invisible text
Date: Sun, 03 Jul 2011 16:33:54 +0300

> From: Dmitry Kurochkin <address@hidden>
> Cc: address@hidden
> Date: Sun, 03 Jul 2011 11:31:23 +0400
> Is there a way to ask Emacs to sync point to visible position, so
> that I do not have to do it by hand?

Not sure what that means.  Can you explain more about what you are
looking for?

> I.e. M-: (progn (backward-char) (point)) works fine.  But after that
> M-: (point) returns another position which corresponds to the
> beginning of the hidden line.  I guess this has to do command loop I
> know nothing about.

When a command finishes and Emacs is idle (i.e. has nothing else to
do), it examines the position of point.  If it finds that point is on
some character where it shouldn't be, it moves point to the next
"suitable" character in the direction of last move.  Text where point
shouldn't be includes: invisible text, non-base character that belongs
to a composed character, and text covered by a "replacing" `display'

> IMO Emacs should not touch the point in this case, because it is
> already visible.  Sounds like a bug to me.

If no one comes up with a plausible explanation until tomorrow, feel
free to submit a bug report.

Btw, I just tried past releases, and Emacs 21.4 didn't have this
problem, but Emacs 22.3 did.  I guess that's a side effect of point
adjustment described above, which Emacs 21.4 didn't have: in Emacs
21.4, the cursor stays put for several C-f or C-b commands, as long as
point is on invisible text.

reply via email to

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