nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] [PATCH] scan message numbers from stdin


From: Paul Fox
Subject: Re: [Nmh-workers] [PATCH] scan message numbers from stdin
Date: Tue, 19 Aug 2008 16:11:11 -0400

chris wrote:
 > If you present them one at a time, they don't get sorted and they get  
 > processed as they appear.  Far less efficient than the patch under  
 > discussion, but it does actually have the same effect.

oh.  right.

paul

 > 
 > Chris
 > 
 > On Aug 19, 2008, at 1:18 PM, Paul Fox wrote:
 > 
 > > chris wrote:
 > >> I meant to say "-n1" below.
 > >
 > > i wondered about that, but because i didn't understand why you
 > > meant "-n" at all.  scan normally processes all of its args, so
 > > why present messages one at a time?
 > >
 > > paul
 > >
 > >>
 > >> On Aug 19, 2008, at 12:49 PM, Chris Garrigues wrote:
 > >>
 > >>> It occurs to me that aside from efficiency issues, that "| xargs -n
 > >>> scan" currently does the same thing as "|scan -" does with the  
 > >>> patch.
 > >>>
 > >>>
 > >>> On Aug 19, 2008, at 11:08 AM, Michael O'Dell wrote:
 > >>>
 > >>>> sorry - i was very unclear in my comment
 > >>>>
 > >>>> my point was that...
 > >>>>
 > >>>> if the commands are going to take text from stdin
 > >>>> for the purpose of emulating "command line behavior",
 > >>>> then the parsing must indeed emulate SHELL parsing
 > >>>> lest it create a massive violation of
 > >>>>
 > >>>>         The Law of Least Amazement
 > >>>>
 > >>>> (KRE can forgive the spelling as required - grin)
 > >>>>
 > >>>> so how does the following not do what is desired?
 > >>>>
 > >>>>         echo 1 2 3 4 5 | xargs scan
 > >>>>
 > >>>> if so, in the original spirit of MH,
 > >>>> exactly what needs fixing?
 > >>>>
 > >>>>         -mo
 > >>>>
 > >>>>
 > >>>>
 > >>>>
 > >>>> Michael O'Dell wrote:
 > >>>>> uh, "whitespace between message numbers" is parsed by the SHELL
 > >>>>> not the MH commands. the commands never see whitespace unless
 > >>>>> it's quoted
 > >>>>>     -mo
 > >>>>> Eric Gillespie wrote:
 > >>>>>> Peter Maydell writes:
 > >>>>>>
 > >>>>>>> Is there any reason why it shouldn't allow any random
 > >>>>>>> whitespace between
 > >>>>>>> message numbers?
 > >>>>>>
 > >>>>>> Room for future expansion?  Folders with spaces in names?
 > >>>>>> I'm just used to thinking of newline-delimited rows, I guess.
 > >>>>>> I'm slightly against allowing spaces, but only slightly.  I guess
 > >>>>>> if I implement folder changing later, we could say not to put
 > >>>>>> message numbers after folders; anything between + and newline is
 > >>>>>> the folder name.
 > >>>>>>
 > >>>>>>>> Peter Maydell writes:
 > >>>>>>>>> I think that it would be nice if 'scan 4 1 2' actually output
 > >>>>>>>>> the messages
 > >>>>>>>>> in the order stated on the command line. I also think that it
 > >>>>>>>>> would be
 > >>>>>>>> I, too, would rather 'scan 3 4' print the lines in that order
 > >>>>>>>> (first 3, then 4).
 > >>>>>>> That it already does. The question is what it does (or should
 > >>>>>>> do) if you
 > >>>>>>> say 'scan 4 3'.
 > >>>>>>
 > >>>>>> Oops, of course I meant 'scan 4 3'.  Obviously 'scan 3 4'
 > >>>>>> couldn't possibly print the messages in any order but 3, 4 :).
 > >>>>>>
 > >>>>>>> Just for consistency (and because you'd probably want to
 > >>>>>>> implement it
 > >>>>>>> by having common code for doing this).
 > >>>>>>
 > >>>>>> I'll take a whack at it, as long as it doesn't mean refactoring
 > >>>>>> too much old, painful code.
 > >>>>>>
 > >>>>>>> less at least seems happy with
 > >>>>>>> stdin being /dev/null, as does my editor, so I think that
 > >>>>>>> argument is
 > >>>>>>> a red herring.
 > >>>>>>
 > >>>>>> Huh, OK.  Bad assumption on my part.
 > >>>>>>
 > >>>>>>> Sounds good. (I couldn't remember whether nmh wrote sequences
 > >>>>>>> in sorted order.)
 > >>>>>>
 > >>>>>> Near as I can tell, it never deals with message numbers in
 > >>>>>> anything but sorted order, by the very nature of the structure it
 > >>>>>> uses for them.
 > >>>>>>
 > >>>>>>> line not being sorted either). [I appreciate that doing things
 > >>>>>>> this
 > >>>>>>> way would be a fairly big change, though.]
 > >>>>>>
 > >>>>>> We'll see.  I'll start with show; do you have any other commands
 > >>>>>> in mind?  I'm just not feeling foo | refile; I don't see any way
 > >>>>>> it's better than refile `foo`, unlike scan and show, where you
 > >>>>>> want to see immediate output.
 > >>>>>>
 > >>>>>> Thanks.
 > >>>>>>
 > >>>>> _______________________________________________
 > >>>>> Nmh-workers mailing list
 > >>>>> address@hidden
 > >>>>> http://lists.nongnu.org/mailman/listinfo/nmh-workers
 > >>>>
 > >>>>
 > >>>>
 > >>>> _______________________________________________
 > >>>> Nmh-workers mailing list
 > >>>> address@hidden
 > >>>> http://lists.nongnu.org/mailman/listinfo/nmh-workers
 > >>>
 > >>>
 > >>> _______________________________________________
 > >>> Nmh-workers mailing list
 > >>> address@hidden
 > >>> http://lists.nongnu.org/mailman/listinfo/nmh-workers
 > >>
 > >>
 > >> _______________________________________________
 > >> Nmh-workers mailing list
 > >> address@hidden
 > >> http://lists.nongnu.org/mailman/listinfo/nmh-workers
 > >
 > > =---------------------
 > >  paul fox, address@hidden (arlington, ma, where it's 66.6  
 > > degrees)
 > >
 > >
 > > _______________________________________________
 > > Nmh-workers mailing list
 > > address@hidden
 > > http://lists.nongnu.org/mailman/listinfo/nmh-workers

=---------------------
 paul fox, address@hidden (arlington, ma, where it's 68.2 degrees)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]