Making elm work with GnuPG

Want to use PGP, or better even, GnuPG, for use with elm? That can be done. It's not most trivial, because elm is not maintained anymore...

Setting up elm for received OpenPGP emails

Install the reader morePGP and, if you like it, their mailpgp as well. I did not like the latter, it adds another layer of operations.

Setting up vi for sending OpenPGP emails

Make a script with a name such as .vim-mail in your homedir, say /home/db/vanrein. It should contain at least these two lines:

map ^E :1,$!gpg --armor --sign --encrypt 2>/dev/null^M^L
map ^Y :1,$!gpg --clearsign 2>/dev/null^M^L
Note that all ^ signs represent control signs; you should type ctrl-V first, then the appropriate ctrl-key combination.

Tell elm to invoke your editor with these modified settings, by setting this in .elm/elmrc:

easyeditor = vim -c 'so /home/db/vanrein/.vim-mail'
editor = vim -c 'so /home/db/vanrein/.vim-mail'
These commands read the aforementioned file with mail settings.


Another hack by Rick van Rein