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

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

bug#51095: 28.0.50; Counter-intuitive `cursor-intangible-mode' behavior


From: Lars Ingebrigtsen
Subject: bug#51095: 28.0.50; Counter-intuitive `cursor-intangible-mode' behavior
Date: Sat, 09 Oct 2021 15:17:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Brahimi Saifullah <brahimi.saifullah@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





reply via email to

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