I thought about exactly this, and this come up when I was discussing read-only mode with my friends. Currently it doesn’t interact well with crdt.el Currently artist-mode works fine with crdt.el (and it’s fun!), but if variables like tab-width have different value on different peers it doesn’t 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 — with a few annotations, developer should be able to make any Emacs application 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 synchronization primitives for all components in a buffer pretty much everything 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 of buffer text, text-properties, overlays, markers and buffer-local-variables (with annotation) is all implemented, it could be much more powerful than any existing collaborative environment. I’m not sure about the idea of letting the server “dictate” anything. Emotionally I don’t like it — 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: > > 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. > > 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. > > It would not be good if client can choose the mode and change it, that > would influence data, it could be disaster. > > So in that sense, the mode of editing should be set and dictated by > the server. > > Now, what if client does not have some of the modes? This condition > also has to be handled, maybe there should be option > > crdt-allow-client-with-non-existant-mode or similar > > 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. > > From 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. > > ses-mode handles spreadsheets, there may be dismal spreadsheet, and > there may be table modes in Emacs. > > 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.