Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Deleting duplicates from nnml:mail.misc
@ 2013-10-07 23:00 Alex Schroeder
  2013-10-13 18:44 ` Alex Schroeder
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Schroeder @ 2013-10-07 23:00 UTC (permalink / raw)
  To: info-gnus-english

I've started using Gnus again after many years. I had a ton of 
mbox files I had created using fetchmail from my Gmail account, 
but didn't really trust it, ran it a lot, thought that maybe it 
didn't get my sent messages and therefore moved a lot of messages 
from the Gmail IMAP to my nnml:mail.misc using B m ... and now I'm 
suddenly having second thoughts. Is my nnml:mail.misc of about 
60000 messages full of duplicates?

I've been wondering how to find them, if any. I've tried looking at the
.overview file...

#!/bin/env perl
my %count = ();
my %file = ();
my $overview = "/Volumes/Extern/Archives/Mail/mail/misc/.overview";
open(F, $overview) or die "Cannot open $overview: $!";
while(my $line = <F>) {
  my @field = split(/\t/, $line);
  $count{$field[4]}++;
  push(@{$file{$field[4]}}, $field[0]);
}
close(F);
my @keys = sort { $count{$b} cmp $count{$a} } keys %count;
print join("\n", map {
  $_ . "\t" . $count{$_}  . "\t" . join(", ", @{$file{$_}})
} @keys[0 .. 3]) . "\n";

How would I best use this script to delete the duplicate messages? Can I
"regenerate" the overview file without loosing anything, perhaps by
regenrating something in the Server buffer? Or is there an elisp version
of the above that does the right thing?

Cheers
Alex

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

end of thread, other threads:[~2013-10-14  7:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-07 23:00 Deleting duplicates from nnml:mail.misc Alex Schroeder
2013-10-13 18:44 ` Alex Schroeder
2013-10-14  7:16   ` Thien-Thi Nguyen

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