From 8d6fbad3e7f471a0dc6e47c7ad62a0d3b6076816 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 7 Jul 2022 17:21:38 -0700 Subject: feat(org-mode): add capture template for emails Add a new template for org-mode capture related to emails. It's useful to create tasks based on an email, and the module `ol-notmuch' helps with that: it extract the subject (among other stuff). Change-Id: Id211c1f9952d1093dac8f7466ffd818537961ee9 Reviewed-on: https://cl.fcuny.net/c/emacs.d/+/614 Tested-by: CI Reviewed-by: Franck Cuny --- emacs/custom/my-org.el | 12 ++++++++---- emacs/init.el | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/emacs/custom/my-org.el b/emacs/custom/my-org.el index 4017483..f338751 100644 --- a/emacs/custom/my-org.el +++ b/emacs/custom/my-org.el @@ -8,7 +8,7 @@ (require 'org-archive) (require 'ox) (require 'ox-md) -(require 'notmuch) +(require 'ol-notmuch) (defvar my/org-directory (if (memq window-system '(mac ns)) @@ -111,12 +111,16 @@ "* %?\n:PROPERTIES:\n:CREATED: %T\n:END:\n") ("f" "feed" entry (file "inbox.org") - ,(concat "* TODO %:elfeed-entry-title\n" + ,(concat "* TO-READ %:elfeed-entry-title :feed:\n" ":PROPERTIES:\n:CREATED: %T\n:END:\n" "%a\n")) - ("m" "mail" entry (file "inbox.org") - (function my/mail-todo-format-string)) + ("m" "email note" entry (file "inbox.org") + ,(concat "* TODO [#A] %:subject :mail:\n" + ":PROPERTIES:\n" + ":CREATED: %T\n" + ":END:\n" + "%a\n%i%?")) ("j" "journal" entry (file+olp+datetree "journal.org") diff --git a/emacs/init.el b/emacs/init.el index cb2fbfa..bf2ceaf 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -43,6 +43,7 @@ nix-mode notmuch orderless + ol-notmuch protobuf-mode rg systemd -- cgit 1.4.1