Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!ora!jerry From: jerry@ora.com (Jerry Peek) Newsgroups: comp.mail.mh Subject: Re: mhl formatting Message-ID: <1991Jun23.074352.1273@ora.com> Date: 23 Jun 91 07:43:52 GMT References: <1991Jun21.020839.16361@agate.berkeley.edu> Organization: O'Reilly and Associates Inc., Cambridge, MA Lines: 40 In article <1991Jun21.020839.16361@agate.berkeley.edu> smoot@linus.Berkeley.EDU (Stephen [Steve] R Smoot) writes: > What I'd like to produce is: > To: my_addr > when that is all there is, and: > To: my_addr cc: other-addrs > when there is a cc. > > I've tried using formatfield... Using formatfield won't help you because the only component escape that's defined in there is %{text}. You can't use %{to} or %{cc} there. As a demo, let's look at a message that has the following headers: Date: Thu, 20 Jun 1991 21:01:18 PDT From: xxx!yyy (Foo Bar) To: Jerry Peek cc: ora!zzzz with a format file named mhl.format.tmp that includes these lines: Date:compress,formatfield="%<(nodate{text})%{text}%|%(pretty{text})%>" From: To:formatfield="to is '%{to}', cc is '%{cc}' and text is '%{text}'" cc: The output with "show -form mhl.format.tmp" is: Date: Thu, 20 Jun 91 21:01:18 PDT From: xxx!yyy (Foo Bar) To: to is '', cc is '' and text is 'Jerry Peek ' cc: ora!zzzz Instead, how about using an awk or perl script as your "-showproc"? Or: - keep mhl as your showproc, and - use a simple "-moreproc" shell script that joins the To: and cc: lines, then feeds the result through a pager. Anybody have better ideas? --Jerry Peek, O'Reilly & Associates, jerry@ora.com or uunet!ora!jerry