From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: raman Newsgroups: gmane.emacs.devel Subject: Re: Detect all changes in a buffer Date: Fri, 15 Jul 2016 19:24:03 -0700 Message-ID: References: <87r3autxu0.fsf@red-bean.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1468636289 1384 80.91.229.3 (16 Jul 2016 02:31:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Jul 2016 02:31:29 +0000 (UTC) Cc: Lars Tveito , emacs-devel@gnu.org To: Karl Fogel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 16 04:31:23 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 1bOFNu-0007N3-5L for ged-emacs-devel@m.gmane.org; Sat, 16 Jul 2016 04:31:18 +0200 Original-Received: from localhost ([::1]:35675 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOFH9-0004B2-AI for ged-emacs-devel@m.gmane.org; Fri, 15 Jul 2016 22:24:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOFH3-0004Am-1z for emacs-devel@gnu.org; Fri, 15 Jul 2016 22:24:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bOFGz-0000ic-OC for emacs-devel@gnu.org; Fri, 15 Jul 2016 22:24:12 -0400 Original-Received: from mail-pa0-x22e.google.com ([2607:f8b0:400e:c03::22e]:33838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOFGz-0000iW-GS for emacs-devel@gnu.org; Fri, 15 Jul 2016 22:24:09 -0400 Original-Received: by mail-pa0-x22e.google.com with SMTP id fi15so44003590pac.1 for ; Fri, 15 Jul 2016 19:24:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=g+3WLwSV6Y1GgNyIEk7s4ALlIOmG2waULdMmyax7G2E=; b=fuynT0iK8ghroRTYVx8DaWK9InA3OrakRV3sv6NQ3NgQ9YwtegQOYyXwjf685Lo6AW RHqd8Ooo+tZYHO43kf+DXhHRvYW3++XdGiDgyPsrOdI5SCyvzm5VySgfWPvob65Bxw2z j1PDvwq202jn3eQHseS+qd0+1O4rC6iUiiXAQ9XcXvFUcpG4RPt4spUDdCGt4LbA8Jln GZPtlZn7DY36+uSJQbc4X9X+mhU0KLf1NRz+I6tbZBwWeyq/Vz8piqoqJRGqQHAKfyBN wXnLQc4rtKYYS+M2PFAe5oNtynZiLLlq71xc6D8LupvAELOTIvRjYLKRJ3clBW/Y3TID mIRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=g+3WLwSV6Y1GgNyIEk7s4ALlIOmG2waULdMmyax7G2E=; b=Y0b0exvYOGHkGWVy6vnxOOyiF/iyjQ579WY3SNF6mM6Hpc3wG67jQyiEux5uSFF70s 1zzeWC4lAZkBsFdmRD1O8vV3mI/s7uaB497rIFiX5JzeRNfABqsYVMrGhBdVUveQkK0C V99DLSbv+FlcfmfHu0Hr/6mzv7GRbQjHhNZZM5RfpXVJdfNYL7/hyi4tmTc34SSqJdL9 lmKCnmMXVFa9JWrVEXxETaSLqJa4DC1lej3Vqn1vljQHL4lWeGAsfkLr01Xqw3mlcgHF t+Etm2/+Rf1wuASnCK4Tqoeuh8t0K2p5QHIqGO05+YIQ+5S2+oYUKGAHhzOVD0wOf7k0 nCvA== X-Gm-Message-State: ALyK8tIk7tj8DerirJYFv6WCt/nl4SWIRTCv+g1K2lsYA6895+ZDI3uYzQbu0tBagjaeHKBV X-Received: by 10.66.86.103 with SMTP id o7mr37119874paz.5.1468635847068; Fri, 15 Jul 2016 19:24:07 -0700 (PDT) Original-Received: from raman-glaptop2 (c-73-170-121-60.hsd1.ca.comcast.net. [73.170.121.60]) by smtp.gmail.com with ESMTPSA id 132sm7085166pfu.6.2016.07.15.19.24.04 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 15 Jul 2016 19:24:05 -0700 (PDT) In-Reply-To: <87r3autxu0.fsf@red-bean.com> (Karl Fogel's message of "Fri, 15 Jul 2016 16:07:03 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c03::22e 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:205749 Archived-At: Karl Fogel writes: there was also an effort based around erlang > Lars Tveito 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, > -Karl > >>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 > --