diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-02-02 09:47:50 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-02-02 09:47:50 -0700 |
commit | 6657acf040fdbca1131ef10c60870718e6300bc8 (patch) | |
tree | d39ab29b0222d2c717d2528579d9000c4eed02c3 /.emacs.d/notmuch-config.el | |
parent | edb19865a595d624253d90e5f671ef2f6907f353 (diff) | |
download | dotfiles-6657acf040fdbca1131ef10c60870718e6300bc8.tar.gz |
add more saved searches for the sake of buffer names
Diffstat (limited to '.emacs.d/notmuch-config.el')
-rw-r--r-- | .emacs.d/notmuch-config.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/.emacs.d/notmuch-config.el b/.emacs.d/notmuch-config.el index d359ef7e..f0077821 100644 --- a/.emacs.d/notmuch-config.el +++ b/.emacs.d/notmuch-config.el @@ -273,6 +273,18 @@ Two ways to read: `(:name ,name :search-type nil :sort-order newest-first :key ,key :query ,query))))) (add-to-list 'notmuch-saved-searches search t) + ;; also add the tag:unread version of the search as a saved search + ;; so that buffers created by `spw/next-unread-group' get a + ;; reasonable name + (let ((keyless-search (copy-sequence search))) + (plist-put keyless-search :key nil) + (plist-put keyless-search + :name + (concat (plist-get search :name) " unread")) + (plist-put keyless-search + :query + (conjoin "tag:unread" (plist-get search :query))) + (add-to-list 'notmuch-saved-searches keyless-search t)) (add-to-list 'spw/lists-browse-searches (cons (plist-get search :name) (conjoin "tag:unread" (plist-get search :query))) |