emacs-devel
[Top][All Lists]
Advanced

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

Re: cursor-intangible and rear-nonsticky t


From: Stefan Monnier
Subject: Re: cursor-intangible and rear-nonsticky t
Date: Mon, 05 Apr 2021 12:47:50 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> If '(rear-nonsticky t) is among the text properties, the
> `pre-redisplay-functions' do not apparently get called, and so
> 'cursor-intangible fails to function.  

I don't think that's really what happens.  I suspect the issue comes
from the difference between `get-pos-property` and `get-char-property`:
positions (like `point`) are not placed on a character but between two
characters.  But text properties only apply to characters.  So the
properties that are "on a position" are based on what properties would
a character inherit if it where inserted at that position.

By default text properties are front-nonstick and rear-sticky, so
basically a position gets its properties from the char right before it.
But if you set (rear-nonsticky t), then you get no properties at all at
that position.

So, I suspect that you're applying (rear-nonsticky t) a bit too
generously, e.g. to all the chars in the prompt rather than only to the
last one.

> On MacOS ports, enabling `cursor-intangible-mode' causes the frame to
> aggressively regrab focus and re-raise when it loses focus.  This makes
> it unusable.

That's very weird and clearly a bug.


        Stefan




reply via email to

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