If you remember this post from a while ago:
https://groups.google.com/d/msg/mu-discuss/WnqKcFZKk-c/Bj32SZGdCQAJ
I decided also to clean it up a bit and publish the refined
implementation I'm using now:
https://melpa.org/#/mu4e-jump-to-list
`mu4e-jump-to-list' allows to select and view mailing lists
automatically using existing List-ID headers in your mu database.
It's a bid "unorthodox" in that I bind "l" in mu4e-hello and
mu4e-headers view. Let me know if you don't agree with this.
Compared to the one posted in the list, I added several knobs and tweaks
to process the results.
The lists are sorted in order of recency by default, so that you'll see
lists with new messages *first*. This requires a completing read
function that doesn't re-sort though. I set my
mu4e-completing-read-function to ivy-read for this (I otherwise use
ido), which does a really nice job.
My config is as follows:
(setq mu4e-jump-to-list-kill-regexp
'("\\.bugs\\.debian\\.org$" "\\.github\\.com$"))
(setq mu4e-jump-to-list-prefilter "date:1y.. AND NOT %junk")
As an aside, I *still* query the db and process results outside of emacs
using a bunch of classic shell utilities. I did at some point implement
a pure elisp version, but it was quite a bit slower - I ditched it.