[Top][All Lists]

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

Re: Detect all changes in a buffer

From: Karl Fogel
Subject: Re: Detect all changes in a buffer
Date: Fri, 15 Jul 2016 16:07:03 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Lars Tveito <address@hidden> writes:
>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.

You might already know about these, but just in case:

There was some work on this in the past -- the effort I remember was based on a 
collaboration protocol called "Obby", but now that I look at 
https://www.emacswiki.org/emacs/CollaborativeEditing I see there were some 
other efforts as well.

I don't know if anything there would save you time, but wanted to point it out 
just in case.

(You raise a good question about `inhibit-modification-hooks', and I don't know 
the answer to it.)

Best regards,

>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]