My PoC has matured into something quite usable. The maturing part included making it robust against mismatched or missing `*-change-functions` calls, which it tries to detect (the problem is then passed on to the client in the form of a change with an unknown "before" content). I also wrote a test which makes random changes and verifies that the clients receive correct descriptions. I currently use it only for Eglot and diff-mode, but I'm quite happy with it. For Eglot, it nicely packs up consecutive changes (like consecutive `self-insert-command`s) into a single change yet keeps changes to different parts of the buffer nicely separate. The API is still about the same as before except that `track-changes-register` now takes 3 options: - `immediate` to control when the presence of changes is signaled (default to use `funcall-later` but `immediate` makes it use `funcall` so there is no delay). - `disjoint` to prevent changes to different parts of the buffer from being combined into too large a change change. - `nobefore` which indicates that the client doesn't actually need the `before` contents, so will only get the length thereof (like `after-change-functions` does). I'm proposing we include it into `master`. I have pushed the patch to `scratch/track-changes` (and attached it below). Stefan