bhagwan@topgun.UUCP (Allen McPherson) (08/31/90)
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 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. Thanks for the help, Al McPherson Member Holstein Aerobatic Club Los Alamos National Laboratory Advanced Graphics and Parallel Sytems P.O. Box 1663 MEE-10 MS:K488 Los Alamos, NM 87545 bhagwan@agps.lanl.gov (505) 667-8495 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.
scott@wiley.uucp (Scott Simpson) (08/31/90)
Here is how I got reply messages to be preceded by "> ". 1. First, create a symbolic link called rrepl to repl in your path. ln -s `which repl` ~/bin/rrepl 2. Add the line rrepl: -filter filter to your .mh_profile. 3. Create a file called "filter" in your mail directory containing body:component="> " Say "rrepl number" to reply to a message. Scott Simpson TRW scott@coyote.trw.com
davy@itstd.sri.COM (08/31/90)
From: Allen McPherson <sdd.hp.com!elroy.jpl.nasa.gov!jarthur!nntp-server.caltech.edu!mustang!topgun!bhagwan@ucsd.edu> Date: 30 Aug 90 21:28:56 GMT Subject: Reply formatting - how to format body? 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... This seems to come up every so often.... so I saved this reply for just such occasions.... --Dave Date: 2 Jul 88 23:05:58 GMT From: "Brandon S. Allbery" <metavax!oxtrap!hal!ncoast!allbery%umix.cc.umich.edu@ICS.UCI.EDU> Organization: Cleveland Public Access UN*X, Cleveland, Oh Subject: Re: replies As quoted from <26220@bbn.COM> by jwalsh@bbn.com (Jamie Walsh): +--------------- | In article <8806231658.aa14871@ICS.UCI.EDU> goog@a.cs.okstate.EDU (GOOG ??) writes: | >how do i get it to appear on the lines with nothing on them...so that there | >is a solid body of >'s down the lefthand side of the page? | | Easy, DELETE the empty lines (and while you're at it, the previous +--------------- Bah, humbug. Try this on for size: body:component="> ",compwidth=0,formatfield="%<(null)> %|%(putstr)%>" ^ ^ To use a different insert character (I use "|") change the characters pointed to by the carets (^). (I don't know if the "compwidth=0" is necessary, but "if it ain't broke, don't fix it" -- it took me 3 years to figure out the incantation above, I'm not going to risk losing it!) -- Brandon S. Allbery, uunet!marque!ncoast!allbery DELPHI: ALLBERY For comp.sources.misc send mail to ncoast!sources-misc
jdpeek@RODAN.ACS.SYR.EDU (Jerry Peek) (08/31/90)
> 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.
kevinc@tekig5.PEN.TEK.COM (Kevin E Cosgrove) (09/01/90)
In article <9008310120.AA17537@rodan.acs.syr.edu> jdpeek@RODAN.ACS.SYR.EDU (Jerry Peek) writes: > $ 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... The heart of everyone's suggestions on this topic is essentially the same: use an mhl form file. I've tried the form files as advertised, and with a little tweaking of my own, and the closest I can get is that the first line of the body is prefixed with the component characters, e.g. "> ". Does anyone know why I'd only get one line of my body modified instead of all of them? Thanks... -- __________________________________________________________________________ Kevin Cosgrove bucket.UUCP!cathouse!kevinc OSU EE Senior tektronix!tessi!bucket!cathouse!kevinc (503)-297-6067 kevinc%cathouse.uucp@bucket.UUCP __________________________________________________________________________