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'