I've added two virtual date-range folders as a test. They work great and I
thought others might find them useful (I'm excluding my spam folder here,
but others might want to use tags/other)
(in virtual-mailboxes definition)
"Last 24 hours" "notmuch://?query=`date +%s
--date='yesterday'`.. and
NOT folder:spam" \
"Last 7 days" "notmuch://?query=`date +%s --date='last week'`..
and NOT
folder:spam"
Note that the second element of the date range (after the ..) is not
included as it is only read at mutt startup and thus no new mail would ever
show up in these folders.
This leads to a question: since the date timestamp is only calculated when
the muttrc is read in, these two folders will *expand* in date range over
time (the start timestamp is static, actual space-time isn't), can anyone
come up with a way to refresh this query syntax occasionally?
I thought about breaking out my virtual folder definitions into a separate
muttrc file and sourcing it via a folder-hook (so every time I change
folders, all queries would be udpated) but this merely adds an entirely new
set of identically named virtual folders to the sidebar. (mutt-kz seems to
"collapse" identical query folders to just the last defined folder, but in
this case the timestamps make each sourcing of the folder a unique query).
Best,
Ethan
http://ethanschoonover.com/solarized