about summary refs log tree commit diff
path: root/emacs/.emacs.d/wpc/email.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-02-14T15·35+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-02-14T15·38+0000
commit8105af7b8d9584c354568d8d49c8354d20018387 (patch)
tree7c2bcf279df97a0cf124cb3f72b0602603d57a8e /emacs/.emacs.d/wpc/email.el
parentfa779ab7bfd7bd0b9decaf2501265dbf2e28930b (diff)
Configure saved searches for notmuch
Mimmicking the "action", "review", and "waiting" labels that I had in Gmail
using the equivalent labels as tags in notmuch.
Diffstat (limited to 'emacs/.emacs.d/wpc/email.el')
-rw-r--r--emacs/.emacs.d/wpc/email.el26
1 files changed, 25 insertions, 1 deletions
diff --git a/emacs/.emacs.d/wpc/email.el b/emacs/.emacs.d/wpc/email.el
index 6a266a717cd2..9a980db7a070 100644
--- a/emacs/.emacs.d/wpc/email.el
+++ b/emacs/.emacs.d/wpc/email.el
@@ -5,7 +5,31 @@
 ;; Attempting to configure to `notmuch' for my personal use.
 
 ;;; Code:
-(message "Not implemented.")
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Dependencies
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(require 'notmuch)
+(require 'list)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Configuration
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(setq notmuch-saved-searches '((:name "inbox" :query "tag:inbox" :key "i")
+                               (:name "unread" :query "tag:unread" :key "u")
+                               (:name "flagged" :query "tag:flagged" :key "f")
+                               (:name "sent" :query "tag:sent" :key "t")
+                               (:name "drafts" :query "tag:draft" :key "d")
+                               (:name "all mail" :query "*" :key "A")
+                               (:name "action" :query "tag:action" :key "a")
+                               (:name "review" :query "tag:review" :key "r")
+                               (:name "waiting" :query "tag:waiting" :key "w")))
+
+;; Assert that no two saved searches share share a KBD
+(prelude/assert
+ (list/xs-distinct-by? (lambda (x) (plist-get x :key)) notmuch-saved-searches))
 
 (provide 'email)
 ;;; email.el ends here