bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#19200: Point adjustemnt moves *into* invisible text


From: Stefan Monnier
Subject: bug#19200: Point adjustemnt moves *into* invisible text
Date: Mon, 21 Mar 2016 14:08:49 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> What would you suggest?

1- Don't use invisible text, remove the text instead.
2- Start any command where it can matter with a call to a function that
   skips forward over invisible text.
3- Make your invisible text intangible (ideally with cursor-intangible,
   since the `intangible' text property has all kinds of nasty side
   effects), so the cursor can't stay inside.
4- Some other solution of your choosing.

> What would a different case that is not a bug in Emacs look like?

Hmm... I did give you examples:

    if the command that moves point started/ended in another buffer, or
    if the command set disable-point-adjustment, plus a few other cases.

> Just adding something that tries to repair what goes wrong is not
> enough.

Why not?

> If cursor movement can end up at a random position inside invisible
> text, we would need to reimplement all moving commands, since we
> cannot derive from the cursor position what the correct position would
> have been.  With other words, I don't see what part of this issue is
> specific to Magit.

Magit is the one which introduces invisible text.
The core functions can't know exactly why the text is invisible and
hence what to do about it in each and every possible case.  Only Magit
knows that.


        Stefan





reply via email to

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