> On Apr 5, 2021, at 12:47 PM, Stefan Monnier wrote: > >> 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. Interesting, so `rear-nonsticky t` is rather powerful in suppressing text-properties within contiguous text. I believe `comint-output-filter` is the one responsible for setting `rear-nonsticky t` across the entire prompt: (let ((prompt-start (save-excursion (forward-line 0) (point))) (inhibit-read-only t)) ... (add-text-properties prompt-start (point) '(rear-nonsticky t)))