Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: remove duplicates from a group
Date: Fri, 20 Oct 2023 07:57:03 -0700	[thread overview]
Message-ID: <871qdp8hq8.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87mswdn5cv.fsf@free.fr>

Julien Cubizolles <j.cubizolles@free.fr> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Julien Cubizolles <j.cubizolles@free.fr> writes:
>>
>>> I've got several nnmaildir groups with many duplicate messages sharing the
>>> same Message-ID. I know Gnus can act on duplicate messages it receives
>>> according to nnmail-treat-duplicates, but how to deal with duplicate
>>> messages already in a nnmaildir group ?
>>>
>>> Ideally, I would like to mark all the duplicate messages in a group. 
>>
>> No, there's nothing like that available right now. Probably we'd want it
>> to be a search function, rather than marking or limiting, since the
>> latter would require you to first open a summary buffer containing all
>> the articles in the group. Search would ensure that you're checking the
>> whole group for duplicates, and then maybe there could be a dedicated
>> marking function after that, for marking all but one of duplicate
>> messages.
>>
>> But none of that exists right now!
>
> Thanks, now I can stop searching for this function and maybe start
> coding…

It's probably easiest to start with the limiting function: once a
newsgroup is open you have access to `gnus-newsgroup-headers`, and it
should be fairly straightforward to sort them by message-id, then pick
out the article numbers of all consecutive duplicates, and pass that to
marking. Then you're halfway there!



      reply	other threads:[~2023-10-20 14:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-18  6:49 Julien Cubizolles
2023-10-18 15:38 ` Eric Abrahamsen
2023-10-20  7:02   ` Julien Cubizolles
2023-10-20 14:57     ` Eric Abrahamsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qdp8hq8.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).