Last Updated: February 25, 2016
·
402
· jspc

Unsucking emacsen for development

Emacs can be annoying to interact with from the terminal; either one has many emacs windows open from the simple use of

$ emacs scripts/some_crap.rb

Or a single emacs window which one must constantly flip to and C-x f all over the place; an infinitely less satisfying movement when all ready in a shell.

Emacs can run under a client-server model whereby a single emacs instance sits waiting for a client to tell it to switch to a file.

In your .emacs file add the line:

(server-start)

And interact with it by calling emacsclient instead of emacs

Or one could do what I do. In $HOME I have a bin/ directory that lives in my $PATH. In there I override emacs with:

#!/usr/bin/env bash

/usr/bin/emacsclient "${@}" &>/dev/null &