Re: mass removal of duplicates

Subject: Re: mass removal of duplicates

Date: Tue, 05 Aug 2025 09:44:30 +0200

To: David Bremner, notmuch

Cc:

From: Alan Schmitt


Hello David,

On 2025-08-04 08:39, David Bremner <david@tethera.net> writes:

>> I have a couple followup questions. In emacs, how can I run a query of
>> the form `notmuch search --duplicate=2 --output=messages '*''? I would
>> like to see messages with duplicates from with emacs. I looked at the
>> code for `notmuch-search' and could not find how to add the
>> `--duplicate=2' option.
>
> You may find the function notmuch-show-choose-duplicate (bound to % by
> default) helpful. The info documentation is at (info "(notmuch-emacs)
> Dealing with duplicates").

Thank you for the suggestion. I have found this function and use it in
my own code. My question is: how do I search for duplicates from within
emacs? I looked at the info, and it only mentions displaying duplicates
when they are found, but not finding them. I can get a list of message
ids that correspond to duplicates using the command line, but I do not
know how to display them in emacs.

Maybe an alternative could be to run `notmuch tag' on the output of
`notmuch search --duplicate=2 --output=messages '*'' to first tag the
duplicates. Something like this:

notmuch search --duplicate=2 --output=messages '*' | xargs -I % notmuch tag +dup %

then I could search for the dup tag…

Do I have to use this workaround or is there a more direct way?

Thanks again,

Alan
signature.asc (application/pgp-signature)
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: