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
$EDITOR to emacsclient means that I could, for example, run
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.
Recently, I’ve been hacking on a thing which has been using Twisted’s AMP for making remote calls. I’ve developed a bit of a fetish for SSL client certificates, so I was hoping to use that for authenticating clients. AMP does have STARTTLS support builtin, but I couldn’t find any examples! Here’s what I found and figured out, for future hackers:Read on →