Subject: bug#78221: `inhibit-recording-text-property-changes`

From: Eli Zaretskii <[email-masked]>
Date: Tue, 13 May 2025 14:59:36 +0300

> From: Stefan Monnier <[email-masked]>
> Cc: [email-masked],  Eli Zaretskii <[email-masked]>,  Ihor Radchenko
>  <[email-masked]>,  João Távora
>  <[email-masked]>
> Date: Mon, 12 May 2025 23:48:16 -0400
> 
> I suggest we introduce a new boolean variable
> `inhibit-recording-text-property-changes`: if nil we get the current
> behavior, but if non-nil then all text-property modifications are
> implicitly wrapped in a `with-silent-modifications`: they don't change
> the modified-p flag, they don't change the undo list, they don't run any
> modification hooks.

I don't have a firm opinion on whether we should introduce this, let
alone if this was a "historical mistake" (at least conceptually, since
properties are part of buffer text, it follows that any change in them
is like changes in the text itself).  But if we do decide to introduce
this variable, it should not be a simple boolean, but it should also
be possible to set it to a list of properties whose changes are not
inhibited from producing buffer-change notifications.  This is because
(a) that's the Emacsy way of handling similar features, and (b) it
seems to me that you mainly have simple properties like faces in mind,
whereas the Emacs text properties can be very different in purpose, as
Daniel points out.  It is quite possible that some application, or
even Emacs in general, would want certain properties to always
generate notifications, even if all the rest don't.  I believe Org
uses many different properties for many purposes, so perhaps Ihor
could comment from Org perspective.

P.S. I don't think such a significant feature should be discussed on
the bug tracker.  The right place is emacs-devel.