Article View: news.software.nn
Article #3495Re: Using NN on MH mail folders
From: Scott Blachowicz
Date: Wed, 09 Dec 1992 18:00
Date: Wed, 09 Dec 1992 18:00
44 lines
2920 bytes
2920 bytes
>>>>> "emv" == Edward Vielmetti <emv@msen.com>
emv> Peter Kaminski (kaminski@netcom.com) wrote:
emv> : For those not familiar with MH, "mail folders" are just directories and
emv> : subdirectories, and "mail messages" are just files with a number for the
emv> : filename, one per message. Just like a news spool!
emv> hehe. yep, and I'd even be willing to build a fake "active" file or
emv> "history" file on the spool just so that I could use the ordinary
emv> tools. (hm, that might be the key...)
Which is easy enough to do (I build an active file on my mail spool each night
when I refile my +inbox into other folders. That way I can use GNUS from Emacs
to read my mail easily enough (I've got "some hacks that need cleanup" to GNUS
3.13 to give me mixed NNTP and MH mail directory access...my .newsrc file has
a lot of mail folders in it. I need to merge them into GNUS 3.14.1, and
cleanup some annoyances.)
At any rate, constructing the active file goes something like this:
# Make sure you don't have any .mh_profile components that would screw up
# the 'pick' command below (like '-seq picked' or something similar).
cd $HOME/Mail
find . -type d ! -name inbox -print |
while read dir
do
fl=`pick +$dir first last 2>/dev/null`
if [ $? -eq 0 ]
then
set -- $fl
echo `echo $dir | tr '/' '.'` ${2:-$1} $1 n
fi
done > mh_active
I trimmed it a little bit to remove some private/local cruft, but that's the
basic idea. It'd probably be faster to something where you do a 'find' for the
message files, piping that into a numeric sort and picking off the 1st last
entries for a directory, then filter the directory path (/ --> .). Running
`pick first last` on each directory is probably not the fastest, but I do it
overnight, so it's no big deal.
--
Scott Blachowicz Ph: 206/283-8802x240 USPS: Statistical Sciences, Inc
1700 Westlake Ave N #500
scott@statsci.com / uunet!statsci!scott Seattle, WA USA 98109
.or.. Scott.Blachowicz@seaslug.org
Technical Details
Message-ID:
<SCOTT.92Dec9100006@arugula.statsci.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!sparky!uunet!statsci!scottReferences:
<1992Dec3.185648.6039@netcom.com> <1flv5oINNpgp@nigel.msen.com>Show Full Headers
Complete Article Headers
Message-ID: <SCOTT.92Dec9100006@arugula.statsci.com> Subject: Re: Using NN on MH mail folders Date: Wed, 9 Dec 1992 18:00:06 GMT From: scott@statsci.com (Scott Blachowicz) References: <1992Dec3.185648.6039@netcom.com> <1flv5oINNpgp@nigel.msen.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!sparky!uunet!statsci!scott Newsgroups: news.software.nn,comp.mail.mh In-Reply-To: emv@msen.com's message of 3 Dec 92 21:45:14 GMT Sender: usenet@statsci.com (Usenet News Account) Reply-To: scott@statsci.com Organization: Statistical Sciences, Inc., Seattle, WA USA Lines: 44