I’ve been struggling to get org-caldav working on the desktop.
Nothing to do with the program itself. It’s excellent, fairly intuitive and really well documented. There just seems to be some gremlin in the works, that does not let the darned calendar see my org files.1 Will keep at it.

What this note is for however, was the pleasant realisation that Emacs can transparently work with gpg encrypted files.2
I wanted to keep my calendar user/password credentials in a file, because the to and fro between my Baikal caldav server was generating too many requests for my password.
The org-caldav README suggested that I save it all in an .authinfo file, like so.

machine www.google.com:443 port https login username password secret

which for me translated as

machine my-caldav-server:443 port https login <my-username> password <my-password>

And the connection worked! Without me putting my password in every two seconds.

I was still a bit leery about putting my password into a plaintext file, so I looked it up and it told me to specifically use an authinfo.gpg not the plaintext version. The magic still didn’t strike me, until I tried to save the file. Emacs called up my gpg agent, which popped up a box asking me to unlock my key, and then Emacs went ahead and encrypted my file. Just like that! I tried opening it and the same thing happened in reverse. No mussing around with the command line.

If I save a file with a .gpg extension, Emacs will automatically encrypt it!
If you want to learn more, the great Mickey Petersen knows all!3


Feedback on this post? Mail me at feedback@janusworx.com

P.S. Subscribe to my mailing list!
Forward these posts and letters to your friends and get them to subscribe!
P.P.S. Feed my insatiable reading habit.



  1. Probably because I’m running Baikal ↩︎

  2. via the EasyPG package ↩︎

  3. And ofcourse, I had to find this lovely article, after all my stumbling about! ↩︎