From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Tveito Newsgroups: gmane.emacs.devel Subject: Detect all changes in a buffer Date: Fri, 15 Jul 2016 18:37:35 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1468603699 31205 80.91.229.3 (15 Jul 2016 17:28:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Jul 2016 17:28:19 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 15 19:28:09 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bO6uF-00063S-B0 for ged-emacs-devel@m.gmane.org; Fri, 15 Jul 2016 19:28:07 +0200 Original-Received: from localhost ([::1]:34010 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO6uB-0001SS-Dy for ged-emacs-devel@m.gmane.org; Fri, 15 Jul 2016 13:28:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO67e-0002qk-Bu for emacs-devel@gnu.org; Fri, 15 Jul 2016 12:37:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bO67a-0005pH-1S for emacs-devel@gnu.org; Fri, 15 Jul 2016 12:37:53 -0400 Original-Received: from mail-out4.uio.no ([129.240.10.15]:55017) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO67Z-0005od-QS for emacs-devel@gnu.org; Fri, 15 Jul 2016 12:37:49 -0400 Original-Received: from mail-mx2.uio.no ([129.240.10.30]) by mail-out4.uio.no with esmtp (Exim 4.80.1) (envelope-from ) id 1bO67N-0004mp-MM for emacs-devel@gnu.org; Fri, 15 Jul 2016 18:37:37 +0200 Original-Received: from cm-84.208.56.49.getinternet.no ([84.208.56.49] helo=Larss-MacBook-Air.local) by mail-mx2.uio.no with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) user larstvei (Exim 4.80) (envelope-from ) id 1bO67N-0006q9-7c for emacs-devel@gnu.org; Fri, 15 Jul 2016 18:37:37 +0200 X-UiO-SPF-Received: X-UiO-Ratelimit-Test: rcpts/h 1 msgs/h 1 sum rcpts/h 2 sum msgs/h 1 total rcpts 3411 max rcpts/h 72 ratelimit 0 X-UiO-Spam-info: not spam, SpamAssassin (score=-5.0, required=5.0, autolearn=disabled, UIO_MAIL_IS_INTERNAL=-5, uiobl=NO, uiouri=NO) X-UiO-Scanned: 8E7B4024340422FEE43DFB2F1A804C0C7B37632F X-UiO-SPAM-Test: remote_host: 84.208.56.49 spam_score: -49 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 27 max/h 2 blacklist 0 greylist 0 ratelimit 0 X-UiOonly: 733ADC08A951248068C8CB1B4F2990D3EF4F32D1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 129.240.10.15 X-Mailman-Approved-At: Fri, 15 Jul 2016 13:25:07 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:205737 Archived-At: Hi! 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 non-nil. - Lars