Emacs EasyPG on OS X

Apr 17, 2014   #osx  #emacs  #gpg 

EasyPG is a (built in) gpg encryption package for emacs. It allows you, for instance, to automatically (by default) encrypt on save/decrypt on open files with a .gpg extension. Its usefulness cannot be underestimated.

I recently obtained a PC with OS X installed on it, and emacs would hang when trying to open .gpg files, with “Decrypting /path/to/file.gpg…0%” showing in the minibuffer. It turns out that with gnupg installed from ports, gpg would background a pinentry-ncurses process to take a decryption password from the user. Since emacs was not launched from a terminal, there would be no one to enter the password and emacs would continue waiting for it, indefinitely (or at least longer than my patience).

MacGPG2 is an open source application that alleviated the problem for me; After installing it and relaunching emacs, I would get prompted for the decryption password in a graphical window - very useful!