[comp.mail.mush] Help, Mush vs Faces

numb@cs.qmw.ac.uk (Matt Newman) (03/28/91)

How does one have an X-Face: hdr in mush:

I tried:-
my_hdr X-Face:  `cat $HOME/.face`

which would work in elm and I tried:-

my_hdr X-Face:  1}k[HO7YT|g4gb-e<SjDaH]Je"#L/Gw0hj)^]#a%)QRM=I#H*Mo+qrHC5aK0!;$DZ]U(xcQ\
mFOL#4D(1qH]25x!5.2G^w1>{1y5V{GOWDooQMUWdD>jxS(%UB1AIhyeie'Fib`(qFAr{Kj1_M+oNg\
'+YNL4Y$5;1!<j?h0`Q&W?m%7WxUr%={vd)Gp=k7}xc_q,{~xqysN2F}"/m}e2<o8!3Kq'+N{yL>l)\
d]DfqO6Dk}F1{j&YBLLf5AJ^J=X9,p"'24m=p%T`#^1oTw4`y#Uz{tT/H5l<W2F01.}'v,}NICqt9z\
-P#H((So[puO`XIK9o{[G)N;*:nSJ3:$"drj({m:t<(8#;`t~7Q\3^Ic

Which gave :-
DZ: undefined variable

then I tried

my_hdr X-Face:  '1}k[HO7YT|g4gb-e<SjDaH]Je"#L/Gw0hj)^]#a%)QRM=I#H*Mo+qrHC5aK0!;$DZ]U(xcQ\
mFOL#4D(1qH]25x!5.2G^w1>{1y5V{GOWDooQMUWdD>jxS(%UB1AIhyeie'Fib`(qFAr{Kj1_M+oNg\
'+YNL4Y$5;1!<j?h0`Q&W?m%7WxUr%={vd)Gp=k7}xc_q,{~xqysN2F}"/m}e2<o8!3Kq'+N{yL>l)\
d]DfqO6Dk}F1{j&YBLLf5AJ^J=X9,p"'24m=p%T`#^1oTw4`y#Uz{tT/H5l<W2F01.}'v,}NICqt9z\
-P#H((So[puO`XIK9o{[G)N;*:nSJ3:$"drj({m:t<(8#;`t~7Q\3^Ic'

which gave :-
Illegal variable name.

Then I tried:-

my_hdr X-Face:  "1}k[HO7YT|g4gb-e<SjDaH]Je"#L/Gw0hj)^]#a%)QRM=I#H*Mo+qrHC5aK0!;$DZ]U(xcQ\
mFOL#4D(1qH]25x!5.2G^w1>{1y5V{GOWDooQMUWdD>jxS(%UB1AIhyeie'Fib`(qFAr{Kj1_M+oNg\
'+YNL4Y$5;1!<j?h0`Q&W?m%7WxUr%={vd)Gp=k7}xc_q,{~xqysN2F}"/m}e2<o8!3Kq'+N{yL>l)\
d]DfqO6Dk}F1{j&YBLLf5AJ^J=X9,p"'24m=p%T`#^1oTw4`y#Uz{tT/H5l<W2F01.}'v,}NICqt9z\
-P#H((So[puO`XIK9o{[G)N;*:nSJ3:$"drj({m:t<(8#;`t~7Q\3^Ic"

which was accepted by mush but only gave the following header in msgs:-
X-Face: 1}k[HO7YT|g4gb-e<SjDaH]Je

We can't use the sendmail hack that is in the faces manual as we run MMDF, so
what can I do, I would like to be able to put
my_hdr X-Face:  `cat $HOME/.face`

in my .mushrc.

Yours a very frustrated programmer.
--

Matt Newman

schaefer@ogicse.ogi.edu (Barton E. Schaefer) (04/03/91)

In article <numb.670168403@seurat> numb@cs.qmw.ac.uk (Matt Newman) writes:
} 
} How does one have an X-Face: hdr in mush:

I asked Rich Burridge, the author of faces, to respond to this.  His
slightly-edited reply is included below.  Unfortunately, as Rich notes,
his solutions don't cover MMDF.  I'll therefore suggest a couple of
other variations.

The problem is that the compressed face image (usually) contains quote
marks '` ".  Even if these showed up in matched pairs, mush would strip
them off; usually, mush just complains about unmatched quotes.  The face
also includes dollar signs $, which mush tries to expand as variables.
The ELM style of creating this header --   X-Face: `cat .face`  -- doesn't
work because mush's `` mechanism expects to expand mush commands into
message lists, not shell commands into text.

The best way to handle the face image is to create a properly quoted
version of the compressed image -- single quotes ' replaced by "'" and
double " or back ` quotes replaced by '"' or '`', and $ by '$' -- and
put this directly into a my_hdr X-Face: command, either in .mushrc or
in a file sourced by .mushrc.  There's no good way to perform this
quoting automatically (though some perl hacker will probably prove me
wrong), and it is not sufficient to wrap the entire thing in quotes,
which is what Matt Newman originally tried.

Another way to handle it is to set autoedit and edit_hdrs, then have your
$editor and/or $visual set to a script or program that inserts the contents
of the .face file into the message before you edit it.  This is the sort of
thing that the Rnmush script does, and that the sendmail script that Rich
discusses will do as the message is sent out.

With that said, here's Rich's commentary.

From: richb@Aus.Sun.COM (Rich Burridge)
Date: Mon, 1 Apr 1991 15:12:52 +1000
In-Reply-To: schaefer@cse.ogi.edu's message as of Mar 30,  5:47pm.
X-Mailer: Mail User's Shell (7.2.0 10/31/90)
Subject: Re: Mush vs. Faces
X-Face: Y}N{(a7(Nu]wrKSz:kGC&t@v8%uR^Y{y#;Fi*Z]A,qHkF6e(GVt"p^=(_Wyd$
	TS*Z_A\F}5?'8l(le<7AU78a,@J-^5-O>QO"e%Lof2(PtE5w-FnjKk>7sk9T}
	oWMM:)c+EI5G~>+2[oW}?tx)WOH%`A|ivL!71qx'avX*;Nd{BOO2);d](wKt8
	TSbZg'OeegxvS7,YNY,^

} Could you respond to this posting in comp.mail.mush?  I don't remember
} whether faces will read the face from the signature when it isn't in the
} headers, but I thought there had been some discussion of that at one time.

Sure. Feel free to forward this to the news group. I realise this guy is
using MMDF. I don't think I can help him (apart from installing the
unofficial mush patch that is mentioned).

} How does one have an X-Face: hdr in mush:

Here's the excerpt from the faces README file:

5. How to include your compressed face image with mail.
-------------------------------------------------------

As of patch #10 to v1.4, faces is capable of recognising the compressed face
image only in the mail message header. Previous to this, it was also
recognised in the body of the message. The latter case causes problems when
a mail message includes other messages with X-Face: lines.

The following method works for Berkeley Mail (aka /usr/ucb/mail), Open
Windows mailtool and mush. It probably works for others too. Note that the
special patch to the mush mail source is no longer needed. It fact, if you
are using a version of mush which has this patch applied, you should un-apply
it before making the changes listed below, otherwise you will have two sets
of X-Face lines in your mail headers. The file mush.xface.patch can be
removed from this faces distribution.

It is suggested that each user store the compressed image (generated by
compface) in a file called .face in their home directory. The first line
should have the X-Face: prepended; second and subsequent lines should have
a preceding tab, and there should be a trailing blank line. For example, my
.face file contains:

------CUT HERE------START------CUT HERE------
X-Face: *7O.<19S{MCsaxxe=iCc*y5!i:>e,K40m^btp"<`~gNx5>o?eJMzUng=j]%KybY
	\/VaZ/3a4pD%#rGu7D<M$.TDpaDN8#8eJC&^^&Mr]@~}Pa,*F-ePrMg5.}e,,bu
	qROdT{Vzn{!ouXy.&*#V#Q&Zf7a8lX2Kb}"$UT^VhnsJ?){wFU5r+,duO>4@L

------CUT HERE-------END-------CUT HERE------

Each user should add the line:

set sendmail=/usr/local/bin/faces.sendmail

to their ~/.mailrc file, where /usr/local/bin is equivalent to the BINDIR
definition in the Makefile. This small shell script will be installed when
you do a "make install".

----------

Faces is now at v1.4.13. There is an active mailing list. Patch #14 will
be posted to it next week. If you'd like to be added to the mailing list,
send a request to me, and I'll add you.

V1.4.13 of faces can be obtained from the automatic mail archive server.
Send seven messages to rb-archive-server@Aus.Sun.COM each containing the
line:

send faces partn

where n = 1-7. Each part in a uuencode compressed shar file.

Rich Burridge,          DOMAIN: richb@Aus.Sun.COM
Sun Microsystems.       ACSNET: richb@sunaus.sun.oz
PHONE: +61 2 911 4212   UUCP:   {uunet,mcvax,ukc}!munnari!sunaus.oz!richb

-- 
Bart Schaefer                                           schaefer@zipcode.com
Z-Code Software Corporation                             schaefer@cse.ogi.edu