nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] sortm's Default of all is Brain-Damaged.

2012-10-11 12:51:21
Ken Hornstein <kenh(_at_)pobox(_dot_)com> writes:
Once again I've been bitten by a lone `sortm' defaulting to `all' when I
intended to do `sortm lp'.  On a folder of some 20,000 emails that quite
perturbs incremental backups!  `rmm' doesn't default to `all' so I'm not
sure sortm should;  it's too destructive as the old order may not be
reproducible.

Hm.  I guess to me "sortm" defaulting to "all" makes sense; I mean,
don't you want to that the vast majority of the time?  (I'm guessing
"lp" is a sequence you created?).  And I guess I always figured the
order of messages was ephemeral; that's why sortm exists, after
all.

But I can't claim to be the arbiter of how people use nmh; what do others
think?

While people are thinking about sortm, here are some thoughts.

Generally, mh avoided doing anything if a command found anything wrong anywhere.
This is the extreme opposite to the de-facto UNIX standard, which is always to 
do
whatever you can. There are some exceptions. In particular sortm will try to do
its thing even if it encounters messages with no date field, or an unparseable
date field. There are two good reasons for this, both most relevant to sorting
lots of messages.

First, having to check first would probably impact performance. Secondly,
consider the plight of a user trying sort 15000 messages, who is told he can't
sortm them until he deals with three bad messages.

BUT, after sortm has done its thing, the errant message numbers it reports are 
no
longer valid.

This is what leads me to suggest two more options "-check" and "-nocheck", with
-nocheck the default. With -check, sortm would do nothing if it encountered a
problem.

A less desirable alternative would be "-test". "-notest". With -test, sortm 
would
do nothing except report problems. I suggest this, only because it might be
easier to implement.

    Norman Shapiro

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

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