GNU bug report logs - #78221
31.0.50; Improving *-change-functions notifications

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Fri, 2 May 2025 21:49:02 UTC

Severity: normal

Found in version 31.0.50

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: 78221 <at> debbugs.gnu.org, Alan Mackenzie <acm <at> muc.de>
Subject: bug#78221: 31.0.50; Improving *-change-functions notifications
Date: Sun, 04 May 2025 09:01:35 -0400
>>> Org mode currently has to resort to (eq
>>> org-fold-core--last-buffer-chars-modified-tick
>>> (buffer-chars-modified-tick)) checks to filter out changes in
>>> text properties.
>> Interesting.  What made you do that?  IME, it's fairly rare for
>> text-property changes to trigger such notifications.
> Some parts of Org mode (org-agenda, org-sparse-tree) use text properties
> and trigger the notifications; usually that happens across the whole
> buffer. And when that does happen, expensive processing of buffer
> changes makes things very slow.

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`)?

IME, most ELisp code which calls things like `put-text-property` usually
does so within a `with-silent-modifications` wrapper, and not only to
avoid running `*-change-functions`: also to avoid setting the
`buffer-modified-p` flag or getting prompted if some other session is
modifying the same file at the same time, etc...


        Stefan





This bug report was last modified 33 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.