From 261dfa1b487c318e270c233181d84f54c805c90f Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sat, 2 Jul 2022 14:19:03 -0700 Subject: 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 --- emacs/custom/my-notmuch.el | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'emacs/custom/my-notmuch.el') 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) -- cgit 1.4.1