bartman's blog

only showing relevant messages in mutt by default

bartman

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:

Finally the filter-hook will activate the .i filter when I enter any mailbox.

Thanks Steve!

Tags: