From: W. Trevor King Date: Wed, 2 Apr 2014 00:17:37 +0000 (-0700) Subject: .emacs.d/site-lisp/wtk_notmuch.el: Add a "mentions" search X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5d3d6608d18edf2ea25851b9d9abcf42f2e9b53b;p=dotfiles-public.git .emacs.d/site-lisp/wtk_notmuch.el: Add a "mentions" search I watch a number of GitHub repositories that I'm moderately interested in. I don't read *all* of the resulting messages, but it's nice to have them in my email archives so they'll come up in future searches. However, sometimes messages that @mention me may get lost in the deluge. To highlight them, I tag them (using the X-GitHub-Reason header): $ for FILE in $(grep -lr '^X-GitHub-Reason: mention' .); do > MID=$(cat "$FILE" | sed -n 's/^Message-ID: <\(.*\)>.*/\1/p' | head -n1); > notmuch tag +mention -- "id:$MID"; > done This commit adds a saved search [1] that grabs messages mentioning me from my inbox, so notmuch's hello page will show a count, and I can read them over before removing inbox tags. The other entries are straight from the notmuch v0.17 source [2]. [1]: http://notmuchmail.org/emacstips/#index12h2 [2]: http://git.notmuchmail.org/git/notmuch/blob/0.17:/emacs/notmuch-lib.el#l110 --- diff --git a/src/.emacs.d/site-lisp/wtk_notmuch.el b/src/.emacs.d/site-lisp/wtk_notmuch.el index db5b11b..9acdf6f 100644 --- a/src/.emacs.d/site-lisp/wtk_notmuch.el +++ b/src/.emacs.d/site-lisp/wtk_notmuch.el @@ -5,3 +5,11 @@ "mark messages in thread as spam" (interactive) (notmuch-search-tag '("+spam" "-inbox")))) + +(setq notmuch-saved-searches + '( + ("inbox" . "tag:inbox") + ("unread" . "tag:unread") + ("mentions" . "tag:inbox AND tag:mention") + ) + )