Collaborative Emacs: Difference between revisions

From XPUB & Lens-Based wiki
(Add explaining text to guide)
Line 18: Line 18:
### Go to profile
### Go to profile
### Check the box 'Use Option as Meta Key'
### Check the box 'Use Option as Meta Key'
## Press <code>Alt+X</code> (Mac <code>Option+X</code>)
## Press <code>Alt+X</code> (or for MacOS <code>Option+X</code>)
## Enter <code>package-install</code>  
## Enter <code>package-install</code>  
## Enter <code>crdt</code>
## Enter <code>crdt</code>

Revision as of 21:23, 26 September 2023

When collaborating on a project, all kinds of problems can occur. In particular, version conflicts can be difficult to resolve and can be interruptive of a workflow. For this problem (and others), version control systems like Git may be used. (Not needed for this page)

Moreover, while collaborating it might be nice to see eachother's changes in real time: a particularly difficult case of version control. To this end, the CRDT datastructure is created. Several editors have an implementation of CRDT to allow for collaboration.

This page focusses on CRDT collaboration with Emacs. Emacs open in the terminal, and hence this guide allows for collaborative work live on the server.

Step by step guide

The following is a step by step guide to setting up a collaboration session within Emacs. It assumes the user is in a terminal.

  1. Connect to chochop:
    1. ssh USERNAME@145.24.139.16 (or to any other address you'd want to ssh to)
    2. Enter your password
  2. Open emacs:
    1. Enter emacs
  3. IF THIS IS YOUR FIRST TIME COLLABORATING THROUGH EMACS: Install the CRDT package:
    1. If you are using MacOS, perform the following steps. Otherwise, skip to 3.2
      1. Go to terminal settings
      2. Go to profile
      3. Check the box 'Use Option as Meta Key'
    2. Press Alt+X (or for MacOS Option+X)
    3. Enter package-install
    4. Enter crdt
  4. IF YOU ARE THE HOST OF THE SESSION:
    1. Press Control+X Control+F
    2. Type in the path for the file you want to share, press return.
    3. Press Alt+X
    4. Type crdt-share-buffer
    5. Press return
  1. IF YOU ARE JOINING A SESSION:
    1. Press Alt+X
    2. Use crdt-connect
    3. For URL, enter: localhost:6530
  2. For Display, enter: USERNAME
  3. Select the the file you want to work on:
    1. Use the arrow keys to move to the file you want to work on
    2. Press enter

You should now be able to collaborate! Should being the operative word.... This works in duos, maybe not in groups of six...