Collaborative Emacs: Difference between revisions

From XPUB & Lens-Based wiki
(Create template for the collaborate emacs guide)
 
(Add wordhole category)
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==
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)


1. Connect to the server:
Moreover, while collaborating it might be nice to see each other's changes in real time: a particularly difficult case of version control. To this end, the [https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type CRDT] datastructure can be used. Several [[HTML_%2B_CSS#code_editors|editors]] have an implementation of CRDT to allow for collaboration.
  a. <code>USERNAME@145.24.139.16</code>
 
  b. Enter your password
This page focusses on CRDT collaboration with Emacs. Emacs opens in the terminal, and hence this guide allows for collaborative work live on the server.
2. Open emacs:
 
  a. Use <emacs> to enter emacs
===Step by step guide===
3. <b>IF THIS IS YOUR FIRST TIME COLLABORATING THROUGH EMACS:</b> Install ...
The following is a step by step guide to setting up a collaboration session within Emacs. It assumes the user is in a terminal.
  a. Press <code>Alt+X</code>
 
  b.
# Connect to chochop:
4. <b>IF YOU ARE THE HOST OF THE SESSION:</b>
## <code>ssh USERNAME@145.24.139.16</code> (or to any other address you'd want to <code>ssh</code> to), press return.
  a. Press <code>Alt+X</code>
## Enter your password, press return.
  b.
# Open emacs:
4. <b>IF YOU ARE JOINING A SESSION:</b>
## Enter <code>emacs</code>. Press return.
  a. Press <code>Alt+X</code>
# <b>IF THIS IS YOUR FIRST TIME COLLABORATING THROUGH EMACS:</b> Install the CRDT package:
  b. Use <crdt>
## If you are using MacOS, perform the following steps. Otherwise, skip to 3.2
  c. For URL, enter:  
### Go to terminal settings.
  d. For Display, enter:
### Go to profile.
### Check the box 'Use Option as Meta Key'.
### Close the terminal settings, so that the terminal is in focus again.
## Press <code>Alt+X</code> (or for MacOS <code>Option+X</code>).
## Enter <code>package-install</code>, press return.  
## Enter <code>crdt</code>, press return.
# <b>IF YOU ARE HOSTING A SESSION:</b>
## Press <code>Control+X Control+F</code>.
## Type in the path for the file you want to share, press return.
## Press <code>Alt+X</code>.
## Type <code>crdt-share-buffer</code>, press return.
 
# <b>IF YOU ARE JOINING A SESSION:</b>
## Press <code>Alt+X</code>
## Use <code>crdt-connect</code>, press return.
## Fill in the open parameters:
### For URL, enter: <code>localhost:6530</code>.
### For Display, enter: <code>USERNAME</code>.
### Press return.
## Select the the file you want to work on:
### Use the arrow keys to move to the file you want to work on.
### Press return.


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

Latest revision as of 15:16, 1 November 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 each other's changes in real time: a particularly difficult case of version control. To this end, the CRDT datastructure can be used. Several editors have an implementation of CRDT to allow for collaboration.

This page focusses on CRDT collaboration with Emacs. Emacs opens 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), press return.
    2. Enter your password, press return.
  2. Open emacs:
    1. Enter emacs. Press return.
  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'.
      4. Close the terminal settings, so that the terminal is in focus again.
    2. Press Alt+X (or for MacOS Option+X).
    3. Enter package-install, press return.
    4. Enter crdt, press return.
  4. IF YOU ARE HOSTING A 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, press return.
  1. IF YOU ARE JOINING A SESSION:
    1. Press Alt+X
    2. Use crdt-connect, press return.
    3. Fill in the open parameters:
      1. For URL, enter: localhost:6530.
      2. For Display, enter: USERNAME.
      3. Press return.
    4. 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 return.

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