Re: Sortin problem

1996-03-18 11:32:14
Luis Mandel said:
I am using mhonarc to mantain some WWW-pages, in particular to
mantain a WWW page with lyrics. I have the lyrics in mailbox
format, accesible via ftp, and each lyric is accesible via www.
I would like to sort the lyrics alphabetically but I got some
problems. In fact the index page is "quasi" sorted. Only some mails
get not sorted. Why? no idea. I am running mhonarc with the
following command:

Well, mhonarc tries to be nice and ignores 'a' 'the', 're:' ...
at the beginning of subject lines . Look at line 637:

    631 sub increase_subject {
    632     local($A, $B) = ($Subject{$a}, $Subject{$b});
    633     local($at, $bt) = ((split(/$'X/o, $a))[0], (split(/$'X/o, $b))[0]);
    634     $A =~ tr/A-Z/a-z/;  $B =~ tr/A-Z/a-z/;
    635     1 while $A =~ s/^\s*(re|fwd|fw)[:>-]+\s*//i;
    636     1 while $B =~ s/^\s*(re|fwd|fw)[:>-]+\s*//i;
    637     $A =~ s/^(the|a|an)\s+//i;  $B =~ s/^(the|a|an)\s+//i;
    638     local($sret) = ($A cmp $B);
    639     ($sret == 0 ? $at <=> $bt : $sret);

If you comment out lines 635-637 you get 'strict' case insensitive subject


<Prev in Thread] Current Thread [Next in Thread>