emacs-devel
[Top][All Lists]
Advanced

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

Re: master 370d403: Explain in the manual how to make `cursor-intangible


From: Stefan Monnier
Subject: Re: master 370d403: Explain in the manual how to make `cursor-intangible' work
Date: Sun, 14 Nov 2021 13:24:50 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Lars Ingebrigtsen [2021-11-14 19:13:23] wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> I don't have a preference, but I feel like the text should try and
>> explain that there are options and that the example is just
>> one approach.  At the same time, it seems "out of scope".
>>
>> I guess what I'm getting it is that we should not have to clarify this
>> here but should instead point to some other place that explains those
>> issues in general.
>>
>> Maybe we should point out that the effect of the property is only
>> relevant on *positions* between chars, as defined by
>> `get-pos-property`.
>
> Have some mercy on the poor, poor programmers.  They just want to insert
> some characters into the buffer that the cursor skips over, not gain
> deep, lasting insights in the Emacs display machinery.
>
> An example is worth more than three essays on intervals in general.

Note that in your example of 5 X where you want the cursor to be able to
jump from "just before XXXXX" to "just after XXXXX", your 5 X are not
"intangible" since you can jump from before to after (you might call
them "atomic" maybe, but "intangible" doesn't seem quite right).

That's why the code behaves as it does: If you have " XXXX " and want to
make "XXXX" intangible (i.e. make it so the cursor pretends that "XXXX"
isn't there, i.e. it takes two `C-f` to move from beginning to end),
then you place `cursor-intangible` on those "XXXX" and nothing more.
No special "extra char" or stickness involved.


        Stefan




reply via email to

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