This note is about using Emacs for collaborative editing with help of package called crdt.el.
crdt package, it is simple with
C-x C-ein your Emacs configuration after typing this
(use-package crdt :ensure t)
crdt.el version. Because readme of
Please make sure that you and your peers are on the same
crdt.elversion! It turns out to be one of the most common causes of
crdt.elnot working. Because currently the network protocol is not stablized, behavior when using mismatched versions is unexpectable.
We could get
crdt.el version from
crdt-protocol-version variable using
ELISP> crdt-protocol-version "0.2.5"
This are the steps every collaborator should do. Now let’s see what a collaborative session starter should do.
Session starter side
As a session initiator (you will host a server) you should:
- pick some buffers you want to share
- switch to first buffer and
- then execute same command inside other buffers
You will be asked about:
- display name
Then server will be started. You could list some objects:
As a collaborator (you will connect to the session starter server) you should just call
Then you will be asked for:
- url (ip address or hostname)
- your name
Here you could see how two windows of Emacs with single
crdt.el session looks like:
Using your VPS to connect to each other
crdt.el supports toxvpn, but it is not working for macos collaborators very well. We will setup VPS just for collaboration and use SSH tunnels to secure communication.
Session starter should:
x.x.x.xis you VPS IP address
$ ssh -N -R 127.0.0.1:6530:127.0.0.1:6530 email@example.com
Then collaborators should:
Don’t forget to add your collaborators public SSH keys to
$ ssh -N -L 6530:127.0.0.1:6530 firstname.lastname@example.org
sly-mreplis not working properly (error in minibuffer says
sly-mreplhas no colors on collaborator side