Self-contained emacs

21 Feb 2010

One annoying thing about using emacs on remote systems is the absence of your own initialization & configuration code. It’s of course possible to push your own, but often it’s annoying. Configuration often gets rather involved: my own .emacs.d directory contains many packages and libraries that are not shipped with standard emacs distributions. Another common scenario is that you use shared accounts, making editor configurations rather intrusive.

So, I sought to simplify the situation.

make-emacs creates for you a simple, self-contained and relocatable script that allows you to invoke emacs with your own configuration anywhere. For example:

    $ make-emacs ~/.emacs.d /tmp/e
    $ scp /tmp/e remoteserver:
    $ ssh remoteserver
    $ ./e MYFILE
    extracting emacs.d..
    <emacs bliss>

It uses shar to create a self-extracting archive and wraps that extraction code to invoke emacs properly. It also caches the extracted configuration files, so that it only has to perform a potentially costly shar extraction once.

Get it on GitHub here.