diff options
author | Vincent Ambo <tazjin@google.com> | 2020-03-09T01·00+0000 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-03-09T01·00+0000 |
commit | 9372f576592bdadfa001cee38f431a65c9c7177d (patch) | |
tree | 7de019d576c2d5afe02711479faafaffa17a9e33 /tools | |
parent | 15ae7fadb8ac5fcfb2339032a2502e543610ca29 (diff) |
feat(tools/emacs): Configure org-journal r/597
Configures org-journal to store journal files on camden and encrypt them to my GPG key. Journal entries are weekly, with weeks starting Saturday (yes, there's a reason for this).
Diffstat (limited to 'tools')
-rw-r--r-- | tools/emacs/config/init.el | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/emacs/config/init.el b/tools/emacs/config/init.el index 1d25fb4414b2..b17c063c3aa0 100644 --- a/tools/emacs/config/init.el +++ b/tools/emacs/config/init.el @@ -117,6 +117,30 @@ :config (setq magit-repository-directories '(("/home/tazjin/projects" . 2) ("/home/tazjin" . 1)))) +(use-package org-journal + ;; Always use my own key to encrypt files. There seems to be no + ;; global way to set this, as `epa-file-encrypt-to' only has an + ;; effect as a file-local variable (?!) + :hook ((org-journal-mode . (lambda () + (setq-local epa-file-encrypt-to + "DCF34CFAC1AC44B87E26333136EE34814F6D294A")))) + + :config + (setq org-journal-dir "/ssh:camden.tazj.in:/home/tazjin/journal" + org-journal-encrypt-journal t + org-journal-file-type 'weekly + org-journal-date-format "%A, %Y-%m-%d" + + ;; Saturday, because reasons. + org-journal-start-on-weekday 6) + + ;; org-journal doesn't actually enter its mode automatically if + ;; encryption is used (I'm not sure why), so this teaches Emacs to + ;; recognise the files. + (add-to-list 'auto-mode-alist '("[0-9]-weekly\\.gpg\\'" . org-journal-mode))) + +(use-package org-ql) + (use-package password-store) (use-package pg) (use-package restclient) |