🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.mush
Article #1056

Re: picking and sorting (and a possible date bug)

#1056
From: Barton E. Schaefer
Date: Tue, 06 Mar 1990 00:36
72 lines
3524 bytes
In article <639@kauai.ACA.MCC.COM> duanev@kauai.ACA.MCC.COM (Duane Voth) writes:
} In article <7682@ogicse.ogi.edu>, schaefer@ogicse.ogi.edu (Barton E. Schaefer) writes:
} > In article <619@kauai.ACA.MCC.COM> duanev@kauai.ACA.MCC.COM (Duane Voth) writes:
} > } ... is there a way to "partition" the current folder
} > 
} > [digest idea...] [future cut/paste idea...]
} 
} Actually, I've found something I can live with that works fairly well.
[Description of separator article deleted]
} 
[I presume this should be preceded by the keyword "cmd":]
} 	collect 'pick -t !* | copy ! mail.trash | delete; update;
} 	         merge mail.trash; sh rm mail.trash'
                               ^^ there was a space there, I deleted it
} 
} Now, when I say "collect gwm-*", all articles recieved by me on the
                           ^^^^^ I bet you mean "gwm-.*" (regex syntax)
} gwm-* mailing lists get placed at the end of the folder with the
} separator article preceeding them.  It's aesthetically appealing
} and fairly easy to use!

This is essentially the same thing that happens when you do "undigest",
if you substitute the digest article itself for the separator article
and the messages burst from the digest for the other messages in the
partition created by this "collect" cmd.

} Possible improvements are: a) a shell script (?) that can detect my
} seperator articles and do a "collect" on each thus eliminating my
} argument to collect and making it a "sort the whole folder" command.

This isn't hard.  (I presume that by "shell script (?)" you mean a mush
script.)  The main drawback is that !* isn't expanded in scripts.  So
you'd have to change it to

    cmd collect 'pick -t $to ....'

and then use

    set to='gwm-.*'
    collect
    set to='next mailing list pattern, whatever that is'
    collect
    etc.

(Eventually mush may have a looping construct for this kind of thing.)

} b) some way to merge at the beginning of the folder instead of the end
} (so that ungrouped articles are all at the end of the folder where new
} articles appear).  Any ideas here?

Sure.  You do

    pick -r * -s --gwm----- | from -	# move to first separator article
    copy ! 1-. {.} mail.trash | delete	# copy+delete everything above it
    update; merge mail.trash		# and pull it in
    sh rm -f mail.trash

} One last thing, sort d couldn't correctly sort dates with years above 1999

This will be handled correctly in 7.1 -- along with time zones.  It has
the usual signed-long-integer-seconds-since-1970 limitation of around
2038, but that should suffice for a while at least. :-)

} Is sort looking only at the last two digits of dates?

You guessed it ... actually, mush is only *storing* the last two digits
of the date; sort would handle it right if it had the rest of the info.
-- 
Bart Schaefer          "EARTH: Surrender IMMEDIATELY or we PICKLE DAN QUAYLE"

                                                                    "THPPFT!"
schaefer@cse.ogi.edu (used to be cse.ogc.edu)
Technical Details
Message-ID: <7743@ogicse.ogi.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!ogicse!schaefer
References: <619@kauai.ACA.MCC.COM> <7682@ogicse.ogi.edu> <639@kauai.ACA.MCC.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!ogicse!schaefer
From: schaefer@ogicse.ogi.edu (Barton E. Schaefer)
Newsgroups: comp.mail.mush
Subject: Re: picking and sorting (and a possible date bug)
Message-ID: <7743@ogicse.ogi.edu>
Date: 6 Mar 90 00:36:56 GMT
References: <619@kauai.ACA.MCC.COM> <7682@ogicse.ogi.edu> <639@kauai.ACA.MCC.COM>
Organization: Oregon Graduate Institute (formerly OGC), Beaverton, OR
Lines: 72