GNU bug report logs - #51095
28.0.50; Counter-intuitive `cursor-intangible-mode' behavior

Previous Next

Package: emacs;

Reported by: Brahimi Saifullah <brahimi.saifullah <at> gmail.com>

Date: Fri, 8 Oct 2021 14:59:01 UTC

Severity: normal

Tags: moreinfo

Found in version 28.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Brahimi Saifullah <brahimi.saifullah <at> gmail.com>
Cc: 51095 <at> debbugs.gnu.org
Subject: bug#51095: 28.0.50; Counter-intuitive `cursor-intangible-mode' behavior
Date: Sat, 09 Oct 2021 15:17:44 +0200
Brahimi Saifullah <brahimi.saifullah <at> gmail.com> writes:

> Let's start with the following example:
> emacs -Q
> M-: (insert "|" (propertize "xxxxx" 'cursor-intangible t) "|")
> M-x cursor-intangible-mode
>
> Result:
> |xxxxx|
>   ^^^^^ You can't move the cursor here
>
> What I expected:
> |xxxxx|
>  ^^^^^ You can't move the cursor here

I can reproduce the behaviour, but unless I misunderstand something,
this seems like it's working as designed.

The cursor is really "between" two characters conceptually -- this is
easier to understand if you use a "bar" cursor.  So if you put the point
here:

|xxxxx|
 ^

then it's before the first x and after the first |.  (You can confirm by
entering a character when it's at that point.)

The behaviour at the end is more puzzling, but as you've found out, it's
because the properties don't have rear-nonsticky, so you can't put point
right after the final x.

So I think everything here is working as designed.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 188 days ago.

Previous Next


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