Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!ucbvax!RODAN.ACS.SYR.EDU!jdpeek From: jdpeek@RODAN.ACS.SYR.EDU (Jerry Peek) Newsgroups: comp.mail.mh Subject: Re: Reply formatting - how to format body? Message-ID: <9008310120.AA17537@rodan.acs.syr.edu> Date: 31 Aug 90 01:20:18 GMT References: <88@topgun.UUCP> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 89 > I've looked at the man pages and have figured out that > > From:formatfield="%(putstr(friendly{text})) writes:",nocomponent > > will give me my introductory line. Now I'd like the body > formatted as follows: > > > blah... > > blah... > > blah... > > I can't see how to have every line prefixed by some arbitrary > string. I'd appreciate a solution to this and some more examples > of mh-format and mhl in general. In mhl, the body lines are all treated as components -- just like the header. The body component is named Body:. Here's an example. It shows a simple mhl format file named 'mhl.1' that displays the subject and body. I'll use it on your message: % cat mhl.1 Subject: : Body: % show -form mhl.1 Subject: Reply formatting - how to format body? Body I need some help with MH. Specifically on formatting the body Body of a message in a reply. Body Body I've looked at the man pages and have figured out that ...deleted... If you want to tell mhl not to show a component name, use the "nocomponent" variable. This 'mhl.2' format file does that: $ cat mhl.2 Subject: : Body:nocomponent $ show -form mhl.2 Subject: Reply formatting - how to format body? I need some help with MH. Specifically on formatting the body of a message in a reply. I've looked at the man pages and have figured out that ...deleted... You can use a different name for any component. Do that with the 'component' variable. The 'mhl.3' format file below displays the 'Subject:' component as 'Subj:' and the body component as '> '. Get the idea? $ cat mhl.3 Subject:component="Subj" : Body:nocomponent,component="> " $ show -form mhl.3 Subj: Reply formatting - how to format body? > I need some help with MH. Specifically on formatting the body > of a message in a reply. > > I've looked at the man pages and have figured out that ...deleted... I hope that helps. BTW, the new MH 6.7 mh-format(5) man page has been revised and expanded. Even if you don't have 6.7, you should get that man page! --Jerry Peek; Syracuse University Academic Computing Services; Syracuse, NY jdpeek@rodan.acs.syr.edu, JDPEEK@SUNRISE.BITNET +1 315 443-3995 > P.S. There was a fellow a while back that said he was writing a book on > MH for O'reilly. Still there? A suggestion: put lots of examples > of these format strings in your book. I think many of us could use it. That's me. The book devotes a whole chapter, plus parts of other chapters, to this topic. I think MH formatting is *very* useful -- not only for displaying and scanning messages, but also for extracting information from messages (in shell programming, for instance). They're aiming to release the book in November.