Gnus development mailing list
 help / color / mirror / Atom feed
* function to mark duplicate messages
@ 2012-11-17  3:45 Eric Abrahamsen
  2012-11-17  4:13 ` Eric Abrahamsen
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Abrahamsen @ 2012-11-17  3:45 UTC (permalink / raw)
  To: ding

We've already got the `nnmail-treat-duplicates' setting for handling
duplicate messages on their way in, but there are times -- for instance
when you've, um, destroyed a bunch of nnml groups and, erm, have no
backups and are reassembling them from a variety of sources -- that you
end up with lots of duplicate messages.

I'm writing a function to go through a group and mark duplicates (likely
for deletion), and just want to make sure my approach makes sense.
Message IDs are the thing to use, right? At the moment the plan is to:

1. Turn off threading temporarily
2. Sort by message ID with a predicate that uses `string<', and
   furthermore sort messages with Gnus-Warning headers to come after
   those without.
3. Loop through messages and add a mark to any message whose message ID
   is string= to the ID before it
4. Leave it at that -- the user can delete or otherwise process.

Anyway, if anyone has any general comments on this, I'd love to hear it.
I'll post it when I'm done, if anyone thinks it would be useful.

Thanks,
Eric




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: function to mark duplicate messages
  2012-11-17  3:45 function to mark duplicate messages Eric Abrahamsen
@ 2012-11-17  4:13 ` Eric Abrahamsen
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Abrahamsen @ 2012-11-17  4:13 UTC (permalink / raw)
  To: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:


[...]

> 1. Turn off threading temporarily
> 2. Sort by message ID with a predicate that uses `string<', and
>    furthermore sort messages with Gnus-Warning headers to come after
>    those without.
> 3. Loop through messages and add a mark to any message whose message ID
>    is string= to the ID before it
> 4. Leave it at that -- the user can delete or otherwise process.

Actually, on second thought, it would fit better with existing gnus
functions to simply sort on message ID, then loop through the messages
and add Gnus-Warning headers to all those that seem to be duplicates.
Separate functions could then act on messages with those headers.

E




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-17  4:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-17  3:45 function to mark duplicate messages Eric Abrahamsen
2012-11-17  4:13 ` Eric Abrahamsen

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).