Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!dog.ee.lbl.gov!ucbvax!metolius.wr.tek.COM!jamesp From: jamesp@metolius.wr.tek.COM (James T Perkins) Newsgroups: comp.mail.mh Subject: Re: Full list of MH6.6 mh-format escapes needed Message-ID: <9103061924.AA00791@metolius.WR.TEK.COM> Date: 6 Mar 91 19:24:33 GMT References: <9102281853.AA03389@metolius.WR.TEK.COM> Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: "James T. Perkins" Organization: The Internet Lines: 44 This is a status report on my inquiry of a week ago. Jerry Peek kindly sent me the MH 6.7 mh-format(5) man page, and that gave me enough information to start experimenting with and finding the pitfalls in my MH 6.6 mh-format scanner. I promised I would share whatever result I came up with. Well, it's ugly. I prepare my In-Reply-To line programatically with MH now, with the assumption that the field width is 80 characters. The basic idea is to prepare a string for output, and if it's too long, split it onto the next line. It also uses (note{from}) in preference to (friendly{from}) in preference to {from} for the sender's name, and formats the date in a different format which I found more readable for myself. There's some wierd pussyfooting about with (void(tws{date})) and (eq 0) that seemed to be a hack necessary to get things to function. I didn't find that the escapes, in combination with conditionals, did what seemed natural. Looks like I ought to break down and buy Jerry's book - maybe I just misunderstand things a little. Anyway, without further ado, here's what works for me: %<{date}In-Reply-To: Message from \ %(void(note{from}))%<(nonnull)%(putstr) \ %|%(void(friendly{from}))%<(nonnull)"%(putstr)" \ %|%(void{from})%(putstr)%>%>\ %(void(strlen))%(void(gt 26))%(void(tws{date}))%<(eq 0) \tof %(day{date}), %02(putnumf(mday{date}))-%(month{date})-%02(putnumf(year{date})) %02(putnumf(hour{date})):%02(putnumf(min{date}))%(tzone{date}) \ %|of %(day{date}), %02(putnumf(mday{date}))-%(month{date})-%02(putnumf(year{date})) %02(putnumf(hour{date})):%02(putnumf(min{date}))%(tzone{date}) \t%>\ %<{message-id}%{message-id}%> %>\ James ___ ___ ___ | \ / _ \ / __| James Perkins, jamesp@metolius.wr.tek.com, (503)629-1149 | |> || |_| |\__ \ Logic Analyzers Division, DAS 9200 Engineering |___/ |_| |_||___/ Tektronix, MS 92-725, PO Box 4600, Beaverton, OR 97076 This package is sold by weight, not by volume. Some settling of contents may have occurred during shipping and handling.