RelatedSoftware/Emacs

Emacs modes for darcs

Material on Emacs and darcs is collected at the Emacs wiki.

You will probably be interested in DarcsumMode and/or VC integration. Darcsum is a darcs-specific mode, somewhat analogous to the PCL-CVS mode for CVS, but with a neat treatment of changes available for selective recording.

There are two implementations of VC integration, differing in implementation and somewhat in their handling of “revisions”:

The latter supports the relevant features of VC in Emacs 21 and above, and may still work with darcs 1. The former has more limited support. See the commentary in both versions for more details and discussion of the issues supporting a patch-based system in VC.

There is support for `programmable completion http://sacha.free.net.ph/notebook/emacs/pcmpl-darcs.el` in the Emacs shell.

Use Emacs as an external merge tool for darcs

(There’s a more comprehensive example in the manual for darcs 1.0.5.)

Create the following wrapper script:

#!/bin/sh
#
# 3 way merge using emacs from the command line

emacs --eval="(ediff-merge-files-with-ancestor \"$1\" \"$2\" \"$3\" nil \"$4\")"

then invoke darcs pull as follows:

$ darcs pull --external-merge='/path/to/the/wrapper/script.sh %1 %2 %a %o'

or just put the following line into ~/.darcs/defaults:

ALL external-merge /path/to/the/wrapper/script.sh %1 %2 %a %o

Wishlists

People have created wishlists of what an “ideal” darcs mode for emacs would require.

  • There’s one in DarcsumMode.

  • Why not use DVC? Darcs will become a backend to the emacs Distributed Version Control mode (http://wiki.gnuarch.org/xtla#DVC) DVC people begin the darcs backend: https://mail.gna.org/public/xtla-el-dev/2006-03/msg00087.html

  • I’m thinking the same. Yesterday found out about DVC and saw at http://download.gna.org/dvc/ that darcs back-end is not advancing nicely. Maybe the effort could be directed towards DVC back-end. It would be nice having common DVC interface for people that have to work with several distributed rcs. However, I’m not (yet) familiar with darcsum.el so cannot judge/compare its interface with DVC.

    [I had a shufti at DVC a while ago and couldn’t make much sense of it – Dave Love]