[neomutt-users] Search within all mailboxes

Thomas Schneider qsx at qsx.re
Mon Sep 3 18:28:16 CEST 2018

Nicolas Paris <nicolas.paris at riseup.net> writes:

>> NeoMutt hat Notmuch integration, but this will usually change your
>> workflow quite a bit.  mu[0] is less intrusive, see mu-find(1) for
>> .muttrc snippets.
>> [0]: http://www.djcbsoftware.nl/code/mu/
> Great find !
> *mu* outperforms **notmuch** in many ways:
> - much faster to index maildirs

Interesting, I’ve always found notmuch to be faster in most aspects.

> - much better fields to filter (such flag:attach for email with
>   attachment)

Notmuch supports this as well, it’s tag:attachment.  Just for the

> For those interested here is my macro to replace mutt limit filter with
> mu based search. I find it better than the one provided by your link
> which copies all mails into a new maildir:

No, it _symlinks_ them.  Copying would be a bit expensive, hardlinks
would likely do the trick, but symlinks work just as well.

> this one only copy messages-id into a file.
> macro index L "<enter-command>unset wait_key<enter><shell-escape>read -p 'mu query: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`mu find --fields i --quiet 2> /dev/null \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;chomp at a;s/\^id:// for at a;s/\\+/\\\\+/g for at a;s/=/\\\\=/g for at a;$,=\"|\";print at a'\`\"<enter>" "show only messages matching a mu pattern"
> macro index a "<limit>all\n" "show all messages"

Hmm.  This will only limit the results of the current folder to your
query, while the one mentioned in the manpage I linked will search
across all of one’s maildirs.

I mean, if it works for you, whatever floats your goat, I’ve just spent
way too much time with all this and happily share my experience.


More information about the neomutt-users mailing list