summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-07-02 14:19:03 -0700
committerFranck Cuny <franck@fcuny.net>2022-07-02 14:39:36 -0700
commit261dfa1b487c318e270c233181d84f54c805c90f (patch)
tree338ba6af8c144835ca5656a5c35e1dd205875005
parentref(prog): clean up comment settings (diff)
downloademacs.d-261dfa1b487c318e270c233181d84f54c805c90f.tar.gz
feat(notmuch): define saved searches
Define some saved searches to make it easier to navigate incoming
emails. I can jump to them by using the "j" key.

Change-Id: Ie7faed224de25b72134604dbcf82568e18c2044b
Reviewed-on: https://cl.fcuny.net/c/emacs.d/+/604
Tested-by: CI
Reviewed-by: Franck Cuny <franck@fcuny.net>
-rw-r--r--emacs/custom/my-notmuch.el18
1 files changed, 17 insertions, 1 deletions
diff --git a/emacs/custom/my-notmuch.el b/emacs/custom/my-notmuch.el
index c997b18..69fadd9 100644
--- a/emacs/custom/my-notmuch.el
+++ b/emacs/custom/my-notmuch.el
@@ -7,11 +7,27 @@
 (require 'notmuch)
 
 (setq notmuch-show-logo nil)
-(setq notmuch-search-oldest-first nil)
 (setq notmuch-always-prompt-for-sender t)
 (setq notmuch-show-relative-dates t)
 (setq notmuch-archive-tags '("-inbox" "-unread"))
 
+;; configurations related to search
+(setq notmuch-search-oldest-first nil
+      ;; a few saved search - I can jump to them by hitting 'j'
+      notmuch-saved-searches '((:name "unread":query "tag:unread AND date:this_year.." :key "u")
+                               (:name "inbox unread" :query "tag:inbox AND tag:unread" :key "U")
+                               (:name "today" :query "date:today" :key "t")
+                               (:name "this week" :query "date:this_week.." :key "w")
+                               (:name "inbox" :query "tag:inbox" :key "i")
+                               (:name "focused inbox" :query "tag:inbox AND tag:unread AND date:this_week.." :key "f")
+                               (:name "sent" :query "tag:sent" :key "s")
+                               (:name "all emails" :query "*" :key "a"))
+      ;; make it short and sweet
+      notmuch-search-result-format '(("date" . "%12s ")
+                                     ("authors" . "%-20s ")
+                                     ("tags" . "(%s) ")
+                                     ("subject" . "%s")))
+
 (add-hook 'notmuch-message-mode-hook 'flyspell-mode)
 
 (provide 'my-notmuch)