From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Qiantan Hong Newsgroups: gmane.emacs.tangents Subject: Re: crdt.el: proposal that server enforces the mode Date: Thu, 22 Oct 2020 00:04:49 +0000 Message-ID: <241BE8A8-1CCE-403F-B9D8-41B01DD1967D@mit.edu> References: <20201018092201.GG9782@protected.rcdrun.com> <2F36D10F-A179-445D-9417-65194F1CF2F1@mit.edu> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Apple-Mail=_35166B77-A90C-4D99-B4FD-AEF91E652829"; protocol="application/pkcs7-signature"; micalg=sha-256 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23995"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "emacs-tangents@gnu.org" To: Jean Louis Original-X-From: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Thu Oct 22 03:14:36 2020 Return-path: Envelope-to: get-emacs-tangents@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 1kVPBb-00068C-Pk for get-emacs-tangents@m.gmane-mx.org; Thu, 22 Oct 2020 03:14:35 +0200 Original-Received: from localhost ([::1]:54944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVPBa-0005th-Bt for get-emacs-tangents@m.gmane-mx.org; Wed, 21 Oct 2020 21:14:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVOBD-0001WD-JG for emacs-tangents@gnu.org; Wed, 21 Oct 2020 20:10:07 -0400 Original-Received: from outgoing-exchange-1.mit.edu ([18.9.28.15]:50443) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVOBA-0004cs-Kv for emacs-tangents@gnu.org; Wed, 21 Oct 2020 20:10:07 -0400 Original-Received: from oc11exedge2.exchange.mit.edu (OC11EXEDGE2.EXCHANGE.MIT.EDU [18.9.3.18]) by outgoing-exchange-1.mit.edu (8.14.7/8.12.4) with ESMTP id 09M04nJU007067; Wed, 21 Oct 2020 20:04:52 -0400 Original-Received: from oc11expo16.exchange.mit.edu (18.9.4.47) by oc11exedge2.exchange.mit.edu (18.9.3.18) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Wed, 21 Oct 2020 20:04:42 -0400 Original-Received: from oc11expo16.exchange.mit.edu (18.9.4.47) by oc11expo16.exchange.mit.edu (18.9.4.47) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Wed, 21 Oct 2020 20:04:49 -0400 Original-Received: from oc11expo16.exchange.mit.edu ([18.9.4.47]) by oc11expo16.exchange.mit.edu ([18.9.4.47]) with mapi id 15.00.1365.000; Wed, 21 Oct 2020 20:04:49 -0400 Thread-Topic: crdt.el: proposal that server enforces the mode Thread-Index: AQHWqAWSlRAz6AhoxUmQbm8EOi/ZYKmjAO2A In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [18.18.245.17] Received-SPF: pass client-ip=18.9.28.15; envelope-from=qhong@mit.edu; helo=outgoing-exchange-1.mit.edu X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/21 20:04:52 X-ACL-Warn: Detected OS = Windows 7 (Websense crawler) X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 21 Oct 2020 21:14:14 -0400 X-BeenThere: emacs-tangents@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-tangents" Xref: news.gmane.io gmane.emacs.tangents:423 Archived-At: --Apple-Mail=_35166B77-A90C-4D99-B4FD-AEF91E652829 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I thought about exactly this, and this come up when I was discussing read-only mode with my friends. Currently it doesn=E2=80=99t interact well with crdt.el Currently artist-mode works fine with crdt.el (and it=E2=80=99s fun!), = but if variables like tab-width have different value on different peers it doesn=E2=80=99t behave well. That leads me to the idea of synchronizing buffer local variables, and more generally: (copied from my post on /r/emacs) My real long-term objective is Emacs as an collaborative operating = system =E2=80=94=20 with a few annotations, developer should be able to make any Emacs = application=20 collaboration-powered. This is based on the observation that lots of = Emacs application is centered around the buffer and buffer-local-variables, and I imagine = by implementing=20 synchronization primitives for all components in a buffer pretty much = everything=20 can be made collaborative. See the crdt-org-sync-overlay-mode as a prototypical example. It's = powered by the synchronization of overlays (also based on CRDT). IMO once the = synchronization=20 of buffer text, text-properties, overlays, markers and = buffer-local-variables (with annotation)=20 is all implemented, it could be much more powerful than any existing = collaborative environment. I=E2=80=99m not sure about the idea of letting the server =E2=80=9Cdictate= =E2=80=9D anything. Emotionally I don=E2=80=99t like it =E2=80=94 I try to avoid power = hierarchy. And technically, I can synchronize Boolean variable also using CRDT. > On Oct 21, 2020, at 7:54 PM, Jean Louis wrote: >=20 > I do not know why, but often when I go do some personal hygiene, my > mind get new ideas. I am programming in Emacs Lisp, but not internals > of Emacs, so I cannot know if following is right or wrong. >=20 > I was thinking of various modes, likes ses-mode for spreadsheet or Org > mode, there is also artist mode and other kind of special modes. >=20 > It would not be good if client can choose the mode and change it, that > would influence data, it could be disaster. >=20 > So in that sense, the mode of editing should be set and dictated by > the server. >=20 > Now, what if client does not have some of the modes? This condition > also has to be handled, maybe there should be option >=20 > crdt-allow-client-with-non-existant-mode or similar >=20 > As maybe some modes are just fine to be edited on server let us say in > Org mode, and fundamental mode could be used on client's side. >=20 > =46rom Internet searches and report of my friend, I got impression = that > major collaboration is on spreadsheet, that is why there is Ethercalc > software, it works online. So if it is on spreadsheets, people wish to > insert their statistics or reports. Spreadsheets are exactly related > to this proposal. >=20 > ses-mode handles spreadsheets, there may be dismal spreadsheet, and > there may be table modes in Emacs. >=20 > For example, in Org mode, table handling, if I press TAB, I can all > the table nicely aligned, if I press TAB in mail-mode I get several > spaces, it would not be same thing, you will say more about that. --Apple-Mail=_35166B77-A90C-4D99-B4FD-AEF91E652829 Content-Disposition: attachment; filename="smime.p7s" Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCCA70w ggO5MIIDIqADAgECAhAaql39NsO1qLVjkS2hl517MA0GCSqGSIb3DQEBCwUAMGwxCzAJBgNVBAYT AlVTMRYwFAYDVQQIEw1NYXNzYWNodXNldHRzMS4wLAYDVQQKEyVNYXNzYWNodXNldHRzIEluc3Rp dHV0ZSBvZiBUZWNobm9sb2d5MRUwEwYDVQQLEwxDbGllbnQgQ0EgdjEwHhcNMjAwODAzMDEyNDIz WhcNMjEwODAxMDEyNDIzWjCBoTELMAkGA1UEBhMCVVMxFjAUBgNVBAgTDU1hc3NhY2h1c2V0dHMx LjAsBgNVBAoTJU1hc3NhY2h1c2V0dHMgSW5zdGl0dXRlIG9mIFRlY2hub2xvZ3kxFTATBgNVBAsT DENsaWVudCBDQSB2MTEVMBMGA1UEAxMMUWlhbnRhbiBIb25nMRwwGgYJKoZIhvcNAQkBFg1xaG9u Z0BNSVQuRURVMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAylUlEQdK4BSXKzoGh6As CKN/TpLmC0k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