2020-02-02 Encrypted Org-mode journal

I use the Org-mode capturing feature to write a daily journal, where I record various important events in the case I’m going to need the information about them. Some time ago it occured to me that encrypting that journal could be a good idea, so I decided to explore that possibility.

Now Emacs has this nice feature that if you save a file with the gpg extension, it gets automatically encrypted (during the first save, Emacs will ask you for the keys to use, and if you select none, for a passphrase). It turns out that combining the Org-mode capture templates with handling gpg files turns out to be trivial: it is enough to tell Emacs that the journal file ends with .gpg, like this:

(setq org-capture-templates
 '(("j" "Journal entry" entry
    (file+olp+datetree "~/journal.org.gpg")
    "* %i%?\n"
    :time-prompt t
    :unnarrowed t)))

(I personally like :unnarrowed for journaling, but YMMV) – and that’s it.

CategoryEnglish, CategoryBlog, CategoryEmacs