From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Eli Zaretskii <eliz@gnu.org>
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>
 <EE6C26CD-84B3-4A90-B8A2-A5F51A4AF5A7@posteo.net>
 <219042AC-556D-48CC-8920-82D9BF2BD3AA@aol.com>
 <3A81FB67-A558-4281-8285-CDD9B01033E3@posteo.net>
 <CAM-tV--KOi4K=XPvfE7tpBwPSkOOBcndqjt30ukmyRhf7y1Eww@mail.gmail.com>
 <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>
 <A79A8BFC-2A7C-4F2A-B411-34C3FA8AB66A@mit.edu> <83eemji6e8.fsf@gnu.org>
 <D965769C-7957-4F4A-AD6A-7756EFC480A1@mit.edu>
 <A6865EB9-D4E9-4C11-B895-AFA3B68BE040@mit.edu> <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 <qhong@mit.edu>
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 30 20:10:17 2020
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>
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 <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>)
	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 <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>)
	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 <eliz@gnu.org>) 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 <eliz@gnu.org>)
 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 <eliz@gnu.org>)
 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." <emacs-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-devel>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=subscribe>
Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org
Original-Sender: "Emacs-devel"
 <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>
Xref: news.gmane.io gmane.emacs.devel:256784
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/256784>

> From: Qiantan Hong <qhong@mit.edu>
> CC: Ergus <spacibba@aol.com>, Fermin <fmfs@posteo.net>,
>         Jean Louis
> 	<bugs@gnu.support>, Noam Postavsky <npostavs@gmail.com>,
>         Emacs developers
> 	<emacs-devel@gnu.org>,
>         Karl Fogel <kfogel@red-bean.com>,
>         Stefan Monnier
> 	<monnier@iro.umontreal.ca>
> 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.