[Top][All Lists]

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

Detect all changes in a buffer

From: Lars Tveito
Subject: Detect all changes in a buffer
Date: Fri, 15 Jul 2016 18:37:35 +0200


I am developing a minor mode that enables real-time collaboration. I
wish to detect /all/ changes made to a buffer. So far I'm using
`before-change-functions' to detect deletions and
`after-change-functions' to detect insertions.

The problem is that some functions utilizes
`inhibit-modification-hooks', even though they make changes to the
buffer. An example is `eshell-send-input'.

The first question is whether you have any suggestions as to how to get
around this? The second is whether it is considered OK for functions to
use this hook even though the function makes changes to the buffer? The
documentation for change hooks states "These hook variables let you
arrange to take notice of all changes in all buffers" which is not
really true if changes are done whilst `inhibit-modification-hooks' is

- Lars

reply via email to

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