only showing relevant messages in mutt by default
Following Steve Kemp’s blog, I’ve made a small but very cool improvement to my mutt setup.
Here are the new lines:
macro index .i "l((~N|~O|~F)!~D)|(~d<1w!~Q)\n"
macro index .n "l~N\n"
macro index .o "l(~N|~O)\n"
macro index .a "l~A\n"
macro index .t "l~d<1d\n"
macro index .y "l~d<2d ~d>1d\n"
folder-hook . push '.i'
The first block of macros sets up . followed by one of i, n, a, t, or y to
change the filter that is applied to the mailbox messages. This is usually triggered
with the l command, which invokes the mutt built-in limit function. In order, these
do the following:
.ishows the new/old/flagged but undeleted messages, and those that arrived in the last week but have not yet been replied to. … i.e. what I should look at first..nshows all new unread messages.oshows all new and old unread messages.ashows all messages (resets the limit fiter).tshows today’s messages.yshows yesterday’s messages
Finally the filter-hook will activate the .i filter when I enter any mailbox.
Thanks Steve!
Tags: