notmuch-mutt: support for duplicate message removal

Jani Nikula jani at nikula.org
Wed Aug 1 04:24:24 PDT 2012


On Wed, 01 Aug 2012, Stefano Zacchiroli <zack at upsilon.cc> wrote:
> Heya,
>   here is a patchset originating from a feature contributed by Kevin
> J. McCarthy: duplicate message removal for notmuch-mutt searches.
>
> I've reviewed the main patch and gone through various iterations of it
> with Kevin. I consider it suitable for application in its present
> form, and I've added a subsequent patch to fix the Debian packaging
> accordingly.
>
> Can someone with commit access be so kind of applying this patchset to
> the master branch?
>
> Also, if you've further comments on the patch, do not hesitate!

I'm guessing you get the duplicates because you have dupes in the mail
store, and 'notmuch search --output=files' prints all the filenames
associated with each matching message, rather than any other reason. The
presented approach will only remove identical files, and will leave
behind files that are basically the same message, but have differing
headers, e.g. due to being received through different channels. Is this
what you want?

Perhaps an option to 'notmuch search --output=files' to print only one
filename (even if there are many) per message would be interesting. IIRC
the first filename is used by 'notmuch show' to display the message
anyway. At a glance, this should be trivial to implement, but would it
cover your needs?


BR,
Jani.


More information about the notmuch mailing list