[comp.mail.mh] mh-format questions

hodges@jessica.Stanford.EDU (Jeff Hodges) (12/01/89)

I'm trying to customize my replcomps file and am wontering what the
following mh-format escapes are supposed to do (they don't seem to be
documented in the man page)...

	lit
	void
	width

Additionally, does anyone successfully use the "mymbox" escape; if so, how?

Finally, is there any way to determine if one's address appears in the
"to" or "cc" field of a msg being replied to (note that there could be
several addresses in these fields)?

Thanks,

Jeff Hodges                        Networking & Communication Systems
                                   Pine Hall, Rm 115
415-723-2452                       Stanford CA 94305-4122

gregg@cbnewsc.ATT.COM (gregg.g.wonderly) (12/02/89)

From article <7131@portia.Stanford.EDU>, by hodges@jessica.Stanford.EDU (Jeff Hodges):
> I'm trying to customize my replcomps file and am wontering what the
> following mh-format escapes are supposed to do (they don't seem to be
> documented in the man page)...

> 	lit
> 	void
> 	width

%(lit some-text) is one use for %(lit).  It appears to be in several format
files to cure a used to be NULL pointer bug that left the internal string
register, str, pointing at garbage.

%(void) is used to evaluate an expression.  The value of the expression
is then used for tests.  The difference between

	%(void(width))

and

	%(width)

is that the first lets you test the value while the second generates the
string representing the value in the output stream.  Look at the use
in the "scan.*" files in the MHETC directory for examples of this usage.

%(width) tells you how wide the output device really is.  This is only
useful for making use of a 132 column terminal vs a 80 column terminal
(or something along those lines).

> Additionally, does anyone successfully use the "mymbox" escape; if so, how?

%<(mymbox{from})%{to}%|%(friendly{from})%> is a pretty classic use of
%(mymbox).  This is again something like what is in the MHETC/scan*
format files.

> Finally, is there any way to determine if one's address appears in the
> "to" or "cc" field of a msg being replied to (note that there could be
> several addresses in these fields)?

%(mymbox{to}) tells you if you are the sole receipient of a message.
%(mymbox{cc}) tells you if you are one of several receipients of a message.

-- 
-----
gregg.g.wonderly@att.com   (AT&T bell laboratories)

schwager@m.cs.uiuc.edu (12/03/89)

> /* ---------- "mh-format questions" ---------- */
> I'm trying to customize my replcomps file and am wontering what the
> following mh-format escapes are supposed to do (they don't seem to be
> documented in the man page)...
> 
> 	lit
> 	void
> 	width
> 
> Finally, is there any way to determine if one's address appears in the
> "to" or "cc" field of a msg being replied to (note that there could be
> several addresses in these fields)?
> 

Wow!  The very next batch of MH questions that I was going to ask!  Could
the replies be posted to the net??  Thanks!   

Specifically, whenever I want to reply to a message that was sent to 2 or
more people, I want to send the reply to everyone BUT myself.  Is this
possible?  Right now I've got a shell script with editing commands to take
my name out of the To: and Cc: fields, but it's getting more and more
unwieldy, and I still haven't gotten every case.  I would think it should
be pretty easy to take yourself out of the To: and Cc: fields when you're
replying to groups of people, n'est-ce pas? 
-Mike Schwager
INTERNET:schwager@cs.uiuc.edu | "I find it hard to believe you
UUCP:{uunet|convex|pur-ee}!uiucdcs!schwager | 	don't know the beauty you
are BITNET:schwager%cs.uiuc.edu@uiucvmd | But if you don't, let me be your
University of Illinois, Dept. of Comp. Sci. | eyes and enter your darkness
                                               So you won't be afraid"
                                              -Lou Reed, _Velvet Underground_

pjg@urth.acsu.buffalo.edu (Paul Graham) (12/03/89)

In article <5186@cbnewsc.ATT.COM>, gregg@cbnewsc (gregg.g.wonderly) writes:
>%(lit some-text) is one use for %(lit).  It appears to be in several format
>files to cure a used to be NULL pointer bug that left the internal string
>register, str, pointing at garbage.

aha.  it's not that i'm an mh dilettante but i guess am.  i just used
that contruct to bandage a formataddr problem on my sun4's running
mh6.6 but clearly the problem has been fixed.  can someone point me to
a place where i can find (preferably ftp) some semi-official (or
better) patches to mh that fix this and, no doubt, other problems.

please send me mail and i'll fend off other requests for the same. if any.
--

dhesi%cirrusl@oliveb.ATC.olivetti.com (Rahul Dhesi) (12/07/89)

In article <38200010@m.cs.uiuc.edu> schwager@m.cs.uiuc.edu writes:
>Specifically, whenever I want to reply to a message that was sent to 2 or
>more people, I want to send the reply to everyone BUT myself.

Half an answer from my .mh_profile:

   repl: -inplace -editor vi -anno -cc all -nocc me -fcc +inbox

The "-nocc me" removes me from the list of addressees.  The
"-fcc +inbox" saves a copy of the outgoing reply.  The reply
goes to everybody but me.

Rahul Dhesi <dhesi%cirrusl@oliveb.ATC.olivetti.com>
UUCP:  oliveb!cirrusl!dhesi

bgg@yarra.UUCP (Benjamin G. Golding) (12/08/89)

In article <1155@cirrusl.UUCP> dhesi%cirrusl@oliveb.ATC.olivetti.com (Rahul Dhesi) writes:
> In article <38200010@m.cs.uiuc.edu> schwager@m.cs.uiuc.edu writes:
>>Specifically, whenever I want to reply to a message that was sent to 2 or
>>more people, I want to send the reply to everyone BUT myself.
>
> Half an answer from my .mh_profile:
>
>    repl: -inplace -editor vi -anno -cc all -nocc me -fcc +inbox
>
> The "-nocc me" removes me from the list of addressees.

It may be useful to add an "Alternate-Mailboxes:" line to your
.mh_profile to remove the permutations of your mailbox name that can
arrive.  I use:

Alternate-Mailboxes: bgg@yarra, bgg@yarra.oz, bgg@yarra.oz.au, yarra!bgg

which picks up most of the names I get called.

Ben.