Howdy. Until recently, I didn't have an mhn-show-text/html entry in my
mhn.defaults, but the other day I got an HTML-only email for the first time,
so I finally stuck a call to netscape in there.
This worked great on that HTML-only mail, but it had an unexpected (to me)
side-effect -- now multipart/alternative messages were preferring the
text/html part over the text/plain part.
This is a pain because it takes a while to pop up a new invocation of
netscape, and once it does come up I have to click to dismiss a dialog box
that complains that it can't modify bookmarks or global history because
there is another invocation of the browser active (I always keep one
running).
Since in my experience the vast majority of multipart/alternative messages
don't have any extra formatting in the html part, I want to break the MIME
convention that says the MUA should show the most richly-formatted version
of the message it is capable of. Besides, MH/nmh is at heart an ASCII
mailer -- I'd rather read messages in my terminal window when possible.
This is especially important with one guy I communicate with, because he
sends me PGP-encoded messages as multipart/alternative (text/plain and
text/html -- stupid, I know). Naturally, netscape doesn't know that it's
supposed to do anything special to decode the PGP message.
I was able to fix mhn to prefer text/plain over text/html with a kludge in
show_text():
*** nmh-0.22/uip/mhn.c.orig Tue Feb 10 01:58:08 1998
--- nmh-0.22/uip/mhn.c Thu Feb 25 12:41:20 1999
***************
*** 3241,3246 ****
--- 3241,3250 ----
char *cp, buffer[BUFSIZ];
CI ci = &ct->c_ctinfo;
+ /* Dan Harkless, 2-25-99: Kludge to prefer text/plain over text/html. */
+ if (alternate && ct->c_subtype != TEXT_PLAIN)
+ return NOTOK;
+
/* Check for mhn-show-type/subtype */
sprintf (buffer, "%s-show-%s/%s", invo_name, ci->ci_type, ci->ci_subtype);
if ((cp = context_find (buffer)) && *cp != '\0')
Of course, if I ever got a multipart/alternative message that had at least
one text version but didn't have a text/plain version, I'd never see it.
Okay, not all that likely a scenario, but is there a cleaner way to do what
I want? I read through the relevant sections of the man pages and the MH
book and didn't see any way to fix this with customization files. But then
I'm not using the latest version of nmh...
---------------------------------------------------------------
Dan Harkless | To prevent SPAM contamination, please
[EMAIL PROTECTED] | do not post this private email address
Unitech Research, Inc. | to the USENET or WWW. Thank you.