[neomutt-users] RFC: Implementation of query windows

Guyzmo z+mutt+neomutt at m0g.net
Sun Oct 2 19:47:13 CEST 2016

Hello list o/

    following up on a discussion on IRC, I'm considering implementing a
new patch that would be implementing a feature as found in the sup
mailer (for those who tried it) but with notmuch queries in neomutt.

The use case is that to avoid loading too many messages when I'm
browsing my mail, I'm always restricting the search to a time window
(usually it being more or less 2 weeks). So all my searches are like
`date:2w..now and tag:ml and tag:neomutt` to lookup mails for this
mailing list. But sometimes (which happens rarely, though), I need to
move accross the time window, and then what I do is edit the search
query and change from `date:2w..now` to `date:4w..2w` and so and

It's just an early thought, and I have yet to start working on
implementing it (I still have to dig in the sources…). But the way I'd
see it would be to add:

 - a configuration variable that contains the time window that will be
   used for the search queries ;
 - a window-constrained search function ;
 - a couple of functions to move forward/backward on the query with the
   time window.

I'm quite busy, and I'll start working on that when my TODO list will
allow me to do it (i.e. I'm not in a hurry). So, meanwhile I figured I
could ask for comments on the feature… if nobody has started work on a
PR to implement that same idea? What kind of naming scheme would be the
best fit? (like naming it "query_window" is ok?) Whether that feature is
best KISS and focused just on that, or whether we could imagine a
mechanism to automate other parameters?

To be honest, the simpler and smaller it is, the happier I'll be (less
complexity means less code mean less bugs mean more chances to have a
feature that just work and is likely to be painlessly merged ☺).



More information about the neomutt-users mailing list