From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Question collaborative editing. Date: Wed, 30 Sep 2020 21:08:27 +0300 Message-ID: <83a6x7i1d0.fsf@gnu.org> References: <20200924013655.asv2tem25cbwv5et@Ergus> <2ACED303-9A2C-4363-BE56-2E9AF0B8DC85@posteo.net> <20200925002239.fgg3vw2nylltcoyp@Ergus> <219042AC-556D-48CC-8920-82D9BF2BD3AA@aol.com> <3A81FB67-A558-4281-8285-CDD9B01033E3@posteo.net> <1C949FC9-6023-467E-99EC-75D57B08AFB0@gnu.support> <20200929124513.fd745r2txowwbiir@Ergus> <87blho7af9.fsf@red-bean.com> <20200929215849.zg4wzytbrwx2b7ih@Ergus> <84B86B7C-81F0-42DF-894C-BF577E4B3D6E@mit.edu> <83a6x7js6y.fsf@gnu.org> <83eemji6e8.fsf@gnu.org> <83blhni3kr.fsf@gnu.org> <0B69D727-B2C1-44FC-8382-FDAB6C7CBDAD@mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16506"; mail-complaints-to="usenet@ciao.gmane.io" Cc: spacibba@aol.com, fmfs@posteo.net, bugs@gnu.support, npostavs@gmail.com, emacs-devel@gnu.org, kfogel@red-bean.com, monnier@iro.umontreal.ca To: Qiantan Hong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 30 20:10:17 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNgYS-0004BL-T5 for ged-emacs-devel@m.gmane-mx.org; Wed, 30 Sep 2020 20:10:16 +0200 Original-Received: from localhost ([::1]:55068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNgYQ-0000cq-Vz for ged-emacs-devel@m.gmane-mx.org; Wed, 30 Sep 2020 14:10:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNgWs-0007wD-Hi for emacs-devel@gnu.org; Wed, 30 Sep 2020 14:08:38 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40358) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNgWr-0006V0-Ec; Wed, 30 Sep 2020 14:08:37 -0400 Original-Received: from [176.228.60.248] (port=1964 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kNgWq-0004bU-QA; Wed, 30 Sep 2020 14:08:37 -0400 In-Reply-To: <0B69D727-B2C1-44FC-8382-FDAB6C7CBDAD@mit.edu> (message from Qiantan Hong on Wed, 30 Sep 2020 17:48:13 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:256784 Archived-At: > From: Qiantan Hong > CC: Ergus , Fermin , > Jean Louis > , Noam Postavsky , > Emacs developers > , > Karl Fogel , > Stefan Monnier > > Date: Wed, 30 Sep 2020 17:48:13 +0000 > > > I'm sorry, I probably miss too much background information here, > > because I don't really understand what is the issue you are describing > > here. E.g., why is user intent important, when all you need is to > > keep buffer text synchronized between several sessions? > > That’s the baseline for collaborative editing, there’s apparently > solution that satisfies this single property (convergence property) > but are extremely bad — e.g. the effect of some user input takes > no effect, or a trivial program displaying an empty buffer for > every user. Actually if we only want this property there’s much > simpler way than CRDT/OT, e.g. let the server (or one client) > send the whole buffer periodically. > > One example of diff not preserving user intent is: > suppose in the buffer there is > “one two one” > And users agree that this sentence should always end in “one”. > Now user A deleted the first two words “one two “ > user B inserted “three” between the first “one” and “two” > However, the diff have no idea about users’ agreement > and what exactly user does (unless we get it from modification > hooks). For user A, the diff just see “one” after and assume > that A delete the suffix “two one”. The CRDT then does it job > correctly and gives final synchronization result “one three”. > Clearly, user intent is violated. I understand all that, but (a) you can overcome that by techniques different from CRDT, and (b) unless we mean very different things by "user intent", the intent is not important here. What is important, AFAIU, is to specify the changes in a way that will produce the desired result even if the buffer in the other Emacs was meanwhile modified.