For quite a while now, I’ve done a large amount of my text editing in emacs
over ssh using TRAMP. It’s extremely convenient to be able to run one
instance of emacs locally instead of spawning an editor remotely and
interacting with it over ssh. I’ve tried using sshfs in the past, but it’s
never worked well for me in the general case. But, this isn’t a post about
justifying my choices.
The other crucial part of my local emacs setup has been emacsclient. Setting
my local $EDITOR
to emacsclient means that I could, for example, run git
commit
in a terminal and edit the commit message without having to spawn a
new emacs instance. Instead, emacsclient tells the existing emacs what files
to edit, and waits until emacs says it’s done with them.
Until just yesterday, there was a major flaw in my setup: I couldn’t activate
my local emacs instance through emacsclient on a remote host. This meant that
$EDITOR
had to be set to something that spawned an editor on the remote host,
which was becoming increasingly frustrating.
Read on →