[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] sortm's Default of all is Brain-Damaged.
From: |
Paul Fox |
Subject: |
Re: [Nmh-workers] sortm's Default of all is Brain-Damaged. |
Date: |
Thu, 11 Oct 2012 17:14:25 -0400 |
i've recreated your test case, and the '-limit 0' test still gives
reverse date sort:
$ s
1 Thu, 03 Oct 2012 00:12:00 +0000 A
2 Thu, 02 Oct 2012 00:12:00 +0000 A
3 Thu, 02 Oct 2012 00:12:00 +0000 C
4 Thu, 01 Oct 2012 00:12:00 +0000 B
5 Thu, 01 Oct 2012 00:12:00 +0000 A
$ sortm -textf subject -limit 0
$ s
1 Thu, 03 Oct 2012 00:12:00 +0000 A
2 Thu, 02 Oct 2012 00:12:00 +0000 A
3 Thu, 01 Oct 2012 00:12:00 +0000 A
4 Thu, 01 Oct 2012 00:12:00 +0000 B
5 Thu, 02 Oct 2012 00:12:00 +0000 C
so that's odd.
paul
ralph wrote:
> Hi Paul,
>
> > kevin wrote:
> > > I have two use cases for sortm
> > >
> > > 1. sortm +folder
> > > 2. sortm -textfield subject -limit 0 +folder
> >
> > does that actually work for you?
>
> I think so. Initial conditions:
>
> $ type sortm
> sortm is hashed (/usr/bin/mh/sortm)
> $ g -w sortm ~/.mh_profile
> $
> $ s() { scan -forma '%(msg) %{date} %{subject}'; }
> $ s
> 1 Thu, 03 Oct 2012 12:00:00 +0000 A
> 2 Thu, 02 Oct 2012 12:00:00 +0000 A
> 3 Thu, 02 Oct 2012 12:00:00 +0000 C
> 4 Thu, 01 Oct 2012 12:00:00 +0000 B
> 5 Thu, 01 Oct 2012 12:00:00 +0000 A
> $
>
> I restore the folder to the above state before each sortm below.
>
> $ sortm
> $ s
> 1 Thu, 01 Oct 2012 12:00:00 +0000 B
> 2 Thu, 01 Oct 2012 12:00:00 +0000 A
> 3 Thu, 02 Oct 2012 12:00:00 +0000 A
> 4 Thu, 02 Oct 2012 12:00:00 +0000 C
> 5 Thu, 03 Oct 2012 12:00:00 +0000 A
> $
>
> This has sorted by date order, identical dates appear to have preserved
> the original relative order of subject, e.g. 4->1, 5->2. Is sortm
> defined as a stable sort all other things being equal, or does that
> defer to something like the platform's qsort(3)?
>
> $ sortm -textf subject
> $ s
> 1 Thu, 01 Oct 2012 12:00:00 +0000 B
> 2 Thu, 01 Oct 2012 12:00:00 +0000 A
> 3 Thu, 02 Oct 2012 12:00:00 +0000 A
> 4 Thu, 03 Oct 2012 12:00:00 +0000 A
> 5 Thu, 02 Oct 2012 12:00:00 +0000 C
> $
>
> Date then subject, with all `A's coming together as -nolimit is the
> default, as sortm(1) says.
>
> $ sortm -textf subject -limit 0
> $ s
> 1 Thu, 01 Oct 2012 12:00:00 +0000 A
> 2 Thu, 02 Oct 2012 12:00:00 +0000 A
> 3 Thu, 03 Oct 2012 12:00:00 +0000 A
> 4 Thu, 01 Oct 2012 12:00:00 +0000 B
> 5 Thu, 02 Oct 2012 12:00:00 +0000 C
> $
>
> Subject then date, the one in question. Looks good to me. Ubuntu nmh
> 1.3-1.
>
> Cheers, Ralph.
>
> _______________________________________________
> Nmh-workers mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/nmh-workers
=---------------------
paul fox, address@hidden (arlington, ma, where it's 50.5 degrees)
- [Nmh-workers] sortm's Default of all is Brain-Damaged., Ralph Corderoy, 2012/10/11
- Re: [Nmh-workers] sortm's Default of all is Brain-Damaged., Ken Hornstein, 2012/10/11
- Re: [Nmh-workers] sortm's Default of all is Brain-Damaged., Joel Uckelman, 2012/10/11
- Re: [Nmh-workers] sortm's Default of all is Brain-Damaged., norm, 2012/10/11
- Re: [Nmh-workers] sortm's Default of all is Brain-Damaged., rader, 2012/10/11
- Re: [Nmh-workers] sortm's Default of all is Brain-Damaged., Kevin Cosgrove, 2012/10/11
- Re: [Nmh-workers] sortm's Default of all is Brain-Damaged., Paul Fox, 2012/10/11
- Re: [Nmh-workers] sortm's Default of all is Brain-Damaged., Kevin Cosgrove, 2012/10/11
- Re: [Nmh-workers] sortm's Default of all is Brain-Damaged., Ralph Corderoy, 2012/10/11
- Re: [Nmh-workers] sortm's Default of all is Brain-Damaged.,
Paul Fox <=
- Re: [Nmh-workers] sortm's Default of all is Brain-Damaged., Ralph Corderoy, 2012/10/11
- Re: [Nmh-workers] sortm's Default of all is Brain-Damaged., Paul Fox, 2012/10/11
- Re: [Nmh-workers] sortm's Default of all is Brain-Damaged., Ralph Corderoy, 2012/10/11
Re: [Nmh-workers] sortm's Default of all is Brain-Damaged., norm, 2012/10/11
Re: [Nmh-workers] sortm's Default of all is Brain-Damaged., bergman, 2012/10/11
Re: [Nmh-workers] sortm's Default of all is Brain-Damaged., Paul Fox, 2012/10/11