Subject: Re: bug#78221: 31.0.50; Improving *-change-functions notifications

From: Stefan Monnier <[email-masked]>
Date: Sun, 04 May 2025 09:43:18 -0400

Ihor Radchenko [2025-05-04 13:08:05] wrote:
> Stefan Monnier <[email-masked]> writes:
>> I see.  But then, why fix it on the side of your `*-change-functions`
>> rather than on using `inhibit-modification-hooks` (so it benefits all
>> the `*-change-functions`)?
> Because I cannot ignore possibility that some third-party config is
> making use of *-change-functions to detect Org putting properties.

Ah, so the same reason why we're also resisting the urge to just just
stop running those hooks for changes to text-properties.

I wonder if someone actually knows of a `*-change-function` which wants
to be triggered when text-properties are modified.  I'm not 100% sure
that I've never seen such a thing, but at least I can't remember seeing
(nor writing) such a thing.

Are these property-modifications spread all over the place or can you
point us to a few important places where they happen?

I'm curious to know as well how those deal with other related "usually
undesired" effects, such as modifying the `buffer-modified-p` flag,
stashing the property modifications into the `buffer-undo-list`, or
signaling errors when the buffer is read-only.

> Also, I cannot guarantee that all third-party packages do not use
> put-text-property outside inhibit-modification-hooks.

🙂

        Stefan