GNU bug report logs - #19200
Point adjustment moves *into* invisible text

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Date: Wed, 26 Nov 2014 22:23:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: Jonas Bernoulli <jonas <at> bernoul.li>, 19200 <at> debbugs.gnu.org
Subject: bug#19200: Point adjustemnt moves *into* invisible text
Date: Mon, 21 Mar 2016 14:08:49 -0400
> 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




This bug report was last modified 2 years and 204 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.