nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Relative Message Numbers

2013-04-02 23:51:11
norm@dad.org writes:

Ken Hornstein <kenh@pobox.com> writes:

Hm.  I'm torn.  So, it looks like it's okay in terms of syntax; "_" is
not a valid character in a sequence.  But what are the semantics if
'name' refers to more than one message?

Then name+n is the nth message of name; name_n is the nth to last message of 
name.(1 based ordinals. That is, name+1 is the first message of name and 
name_1 is the last message of name).

Hey Norm, how is this useful? I can't see anyone manually referring to
the nth item in a sequence on the command line. The point of a sequence
is that you don't have to know the constituents. Maybe you have a use
case.

If this is for programmatic use, it seems that something like

    for i in $(mark -list -sequence cur | cut -f 1 -d " " --complement); do
        scan $i;
    done

would be clearer.

Saaay, it just occurred to me. Maybe we should adopt MH-E's syntax.
Norm, please check out MH-E ranges [1]. While it's not identical to your
specification, it sure is nifty for MH-E users. If this works for you,
maybe applying the same syntax to nmh would mean that many more users
would be more familiar with the syntax than with _.

http://mh-e.sourceforge.net/manual/html/Ranges.html

-- 
Bill Wohler <wohler@newt.com> aka <Bill.Wohler@nasa.gov>
http://www.newt.com/wohler/
GnuPG ID:610BD9AD


_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

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