Rudel

Introduction

Rudel (German for “pack” as in “pack of wolves”) is a collaborative editing environment for Emacs. Its purpose is to share buffers with other users in order to edit the contents of those buffers collaboratively. It supports multiple backends to enable communication with other collaborative editors using different protocols (most notably Gobby and possibly SubEthaEdit).

Rudel mostly works in the background to change the behavior of the set of Emacs buffers for which it has been activated. These do not even have to have a certain minor mode enabled.

The user interface of Rudel consists of a set of key bindings, a menu entry and some visual status indicators, which are added to the text and mode line of buffers for which Rudel has been activated. This user interface is implemented as a global minor mode.

The image below shows a collaborative editing session with one Gobby and two Rudel clients (only one of these is visible).

http://rudel.sourceforge.net/images/screenshots/emacs-with-gobby.png

Download

If you use GnuEmacs 24 or later then Rudel is part of GNU ELPA, so you can download and install it using ‘M-x list-packages’.

If you use XEmacs or a version of GnuEmacs prior to 24 then you can download an archive of a released version from the download area of the Sourceforge project page.

Development versions are available via:

Requirements

If you use GnuEmacs 24 or later, there are no other requirements.

Rudel should work with any version of GnuEmacs starting with 22. Older versions of GNU Emacs than 22 and versions of XEmacs may or may not work - they are not actively tested.

If you use an Emacs version prior to 24 then CEDET is required. CEDET contains the Emacs object system, EIEIO, which is used in Rudel’s object-oriented implementation. You can obtain CEDET from [1]. You need at least CEDET version 1.0pre6.

If you are using Emacs from trunk (as of October 2009), CEDET is included and does not need to be installed separately. Using Rudel from trunk is much easier to install. On earlier versions of Emacs, CEDET can be difficult to install, so here’s some help:

(defun load-rudel ()
  (interactive)
  ;; Do these in a shell in ~/src:
  ;; cvs -d:pserver:anonymous@cedet.cvs.sourceforge.net:/cvsroot/cedet login
  ;; cvs -z3 -d:pserver:anonymous@cedet.cvs.sourceforge.net:/cvsroot/cedet co -P cedet
  ;; cd cedet && make && cd ..
  ;; svn co https://rudel.svn.sourceforge.net/svnroot/rudel/rudel/trunk rudel
  (add-to-list 'load-path "~/src/cedet/eieio")
  (add-to-list 'load-path "~/src/cedet/common")
  (add-to-list 'load-path "~/src/rudel/")
  (add-to-list 'load-path "~/src/rudel/jupiter")
  (add-to-list 'load-path "~/src/rudel/obby")
  (require 'rudel-mode)
  (require 'rudel-obby)
  (global-rudel-minor-mode))

Autoloads and byte-compilation don’t work for Anonymous due to a strange CEDET dependency problem, but this should get you in a working state.

Installing

To install Rudel, download a released version or the current development version from [2] and place the code in any directory you like.

To make Rudel available for use, perform these steps:

  1. If there is no file rudel-loaddefs.el in your version of Rudel, open and evaluate rudel-compile.el (see below) to generate the file. If rudel-loaddefs.el is already present, no action is required.
  2. Add the following to your personal Emacs configuration:
  (load-file "/PATH/TO/RUDEL/rudel-loaddefs.el")

This will set Rudel up to be loaded on demand (see AutoLoad) when one of the commands ‘rudel-join-session’, ‘rudel-host-session’ or ‘global-rudel-minor-mode’ is invoked. The auto loading information in rudel-loaddefs.el is distributed with older versions of Rudel, but has to be generated using rudel-compile.el in more recent versions.

Compiling

In order to achieve better performance, you can byte-compile the Rudel code. This can be done by opening rudel-compile.el in Emacs and invoking M-x eval-buffer. In recent versions of Rudel, this also generates auto loading information (see above).

Optional

If you want to connect to Gobby servers then you will also need the ‘gnutls-cli’ program (GnuTLS).

Development

If you would like to contribute to Rudel by submitting patches or reporting bugs, use the Questions and Feedback section below, the mailing list or the issue tracker. You can also try #rudel on irc.freenode.net.

When reporting bugs, please make sure to include the Emacs version, the CEDET version, the Rudel version and a descriptions of the steps that lead to the bug.

For long term contributions, becoming a member of the Sourceforge project is more appropriate.

Questions and Feedback

Paste questions and feedback here.

Parts of the contents of this section have been moved to RudelDiscussionArchive.

Can’t get rudel to a join a session more than once. If emacs is exited and reloaded, it will neither recognize a session nor host one, nor is it able to join a session even if the host is specified. It returns a “join denied” error or something like that. It joins exactly one file where the spell checker and flyspell are operable. Additional files create errors.

I’d really like to be able to highlight other participants’ (point) - is this supported in the Obby protocol? Has anybody else looked into this? As a quick hack, i’m looking to notify the user that changes have been made outside of their current window (view of the buffer) - to make it easier to see if someone is editing line 1 when you’re looking at line 1024 for example

The obby protocol does not support highlighting point (or anything regarding the peer’s status that does not involve text changes).

It is easy to add “unofficial” messages to the obby protocol implementation as long as only Rudel clients and a Rudel server are involved. However, this would obviously break interoperability with Gobby. As a short-term workaround, a protocol backend similar to obby could be made available for this case. This would allow developing the necessary user interface.

The long-term solution should probably be based on the infinote protocol (used by Gobby starting with version 0.5), which does support user status, cursor position and selection signaling. Rudel’s infinote support is under development and not yet usable in production.

The alternate approach you suggest would also be nice as a protocol-independent feature. It should not be too hard to implement either. Protocol-independent tracking of user status is already available in a branch. Maybe you can visit the IRC channel to discuss this issue further? --JanMoringen

I would like to use rudel with auctex (with inline preview) for collaborative LaTeX documents. Unfortunately, this is too hard for most mathematicians (me for example) to install. How can this be simplified? With a script or package of some kind? reply here or something.

Probably not the answer you are looking for, but with regard to installing Rudel, the procedure depends on your operating system, the Emacs version and desired install location.

In case you are on a Debian GNU/Linux system (Ubuntu Linux should be equivalent in this case, I suppose), you could try to use the packages provided here: http://www.gergely.risko.hu/cedet/. I have not tried these myself, though.

Alternatively, for a recent version (23) of Emacs, downloading Rudel from http://sourceforge.net/projects/rudel/files/rudel/0.2-4/rudel-0.2-4.tar.gz/download and extracting it somewhere should work. The only additional work in this case is adding

 (load-file "/PATH/TO/EXTRACTED_RUDEL_FILES/rudel-loaddefs.el")
 (global-rudel-minor-mode 1)

to the .emacs init file. After the next restart of Emacs, a “Rudel” menu item should appear.

In case you need additional assistance, try the #rudel IRC channel periodically. Sooner or later somebody who can help should be there. --JanMoringen

I am interested in automating rudel configuration, e.g. as an el-get recipe. The procedure to eval rudel-compile.el to produce rudel-loaddefs.el complicated automatic deployment. The following command worked for me:

    emacs -batch -l rudel-compile.el -eval "(eval-buffer)"

Eventually, it would be nice to have an easier method, e.g. a rudel-initialize function designed to be called from emacs init, tasked with creating or creating rudel-loadefs as needed.

When I try to join with “rudel-join-session”, I get “Joining (joining)” with a spinning pipe and then my emacs 24.2.50 hangs. Just before that, I get these messages:

Discovering Sessions ... [2 times]
Using backend `obby'
Quit
Discovering Sessions ... [2 times]
Using backend `obby'
Use encryption? (y or n)  n
`flet' is an obsolete macro (as of 24.3); use either `cl-flet' or `cl-letf'.
Received Obby welcome message (version 8)
error in process filter: format: Wrong type argument: integerp, nil
error in process filter: Wrong type argument: integerp, nil

I also get stuck on on “Joining (new)”. I don’t get any warning or error messages. I’m running an infinoted 0.5 process remotely with TLS and I’m able to connect securely using the Gobby client. At first I thought it was because of using a self-signed cert, but after switching to a signed cert and no longer getting a warning message from Gobby, Rudel still gets stuck. I use obby as protocol backend, tcp as transport, and use encryption.

Contributed Code

Send Chat Messages (obby Protocol only)

Since this was requested once but is not suitable for Rudel itself, it’s probably the best solution to share it here:

(defun rudel-chat-send-message (text)
  (interactive
   (list (read-string "Text: ")))
  (let ((connection (oref rudel-current-session :connection)))
    (rudel-send connection "obby_message" text)))

(defun rudel-chat-send-current-line ()
  (interactive)
  (let ((end   (point))
	(start (save-excursion
		 (beginning-of-line)
		 (point))))
    (rudel-chat-send-message (buffer-substring start end))
    (delete-region start end)))

;; eval in *rudel-chat-log-buffer*:
(local-set-key (kbd "RET") #'rudel-chat-send-current-line)