Collaborative Emacs: Difference between revisions
m (Be consistent in 'press return' indicators) |
|||
Line 9: | Line 9: | ||
# Connect to chochop: | # Connect to chochop: | ||
## <code>ssh USERNAME@145.24.139.16</code> (or to any other address you'd want to <code>ssh</code> to) | ## <code>ssh USERNAME@145.24.139.16</code> (or to any other address you'd want to <code>ssh</code> to), press return. | ||
## Enter your password | ## Enter your password, press return. | ||
# Open emacs: | # Open emacs: | ||
## Enter <code>emacs</code> | ## Enter <code>emacs</code>. Press return. | ||
# <b>IF THIS IS YOUR FIRST TIME COLLABORATING THROUGH EMACS:</b> Install the CRDT package: | # <b>IF THIS IS YOUR FIRST TIME COLLABORATING THROUGH EMACS:</b> Install the CRDT package: | ||
## If you are using MacOS, perform the following steps. Otherwise, skip to 3.2 | ## If you are using MacOS, perform the following steps. Otherwise, skip to 3.2 | ||
### Go to terminal settings | ### Go to terminal settings. | ||
### 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> (or for MacOS <code>Option+X</code>) | ### Close the terminal settings, so that the terminal is in focus again. | ||
## Enter <code>package-install</code> | ## Press <code>Alt+X</code> (or for MacOS <code>Option+X</code>). | ||
## Enter <code>crdt</code> | ## Enter <code>package-install</code>, press return. | ||
## Enter <code>crdt</code>, press return. | |||
# <b>IF YOU ARE THE HOST OF THE SESSION:</b> | # <b>IF YOU ARE THE HOST OF THE SESSION:</b> | ||
## Press <code>Control+X Control+F</code> | ## Press <code>Control+X Control+F</code>. | ||
## Type in the path for the file you want to share, press return. | ## Type in the path for the file you want to share, press return. | ||
## Press <code>Alt+X</code> | ## Press <code>Alt+X</code>. | ||
## Type <code>crdt-share-buffer</code> | ## Type <code>crdt-share-buffer</code>, press return. | ||
# <b>IF YOU ARE JOINING A SESSION:</b> | # <b>IF YOU ARE JOINING A SESSION:</b> | ||
## Press <code>Alt+X</code> | ## Press <code>Alt+X</code> | ||
## Use <code>crdt-connect</code> | ## Use <code>crdt-connect</code>, press return. | ||
## For URL, enter: <code>localhost:6530</code> | ## For URL, enter: <code>localhost:6530</code>. | ||
# For Display, enter: <code>USERNAME</code> | ## For Display, enter: <code>USERNAME</code>. | ||
## Press return. | |||
# Select the the file you want to work on: | # Select the the file you want to work on: | ||
## Use the arrow keys to move to the file you want to work on | ## Use the arrow keys to move to the file you want to work on. | ||
## Press | ## 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... | Should being the operative word.... This works in duos, maybe not in groups of six... | ||
[[Category:Protocol]] | [[Category:Protocol]] |
Revision as of 21:30, 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.
- Connect to chochop:
ssh USERNAME@145.24.139.16
(or to any other address you'd want tossh
to), press return.- Enter your password, press return.
- Open emacs:
- Enter
emacs
. Press return.
- Enter
- IF THIS IS YOUR FIRST TIME COLLABORATING THROUGH EMACS: Install the CRDT package:
- If you are using MacOS, perform the following steps. Otherwise, skip to 3.2
- Go to terminal settings.
- Go to profile.
- Check the box 'Use Option as Meta Key'.
- Close the terminal settings, so that the terminal is in focus again.
- Press
Alt+X
(or for MacOSOption+X
). - Enter
package-install
, press return. - Enter
crdt
, press return.
- If you are using MacOS, perform the following steps. Otherwise, skip to 3.2
- IF YOU ARE THE HOST OF THE SESSION:
- Press
Control+X Control+F
. - Type in the path for the file you want to share, press return.
- Press
Alt+X
. - Type
crdt-share-buffer
, press return.
- Press
- IF YOU ARE JOINING A SESSION:
- Press
Alt+X
- Use
crdt-connect
, press return. - For URL, enter:
localhost:6530
. - For Display, enter:
USERNAME
. - Press return.
- Press
- 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! Should being the operative word.... This works in duos, maybe not in groups of six...