OK, so thank God and Marshall Rose for MH.
The patches towards the bottom of this page are old.
They work fine, but
I've uploaded new versions
fixing the same problems to
the nmh Savannah project
.
These are against nmh-1.1-RC1
and so should apply w/o any fuzz.
Also, the feature where
you can specify preferences when displaying
one part of a
multipart/alternative
list has changed: the order in which
they appear in mhn.defaults
will now set preferences, too.
Command-line switches take precedence,
so you can override an mhn.defaults
that looks like this
mhn-show-text/plain: mhn-show-text/html: lynx -dump -force_html '%F'and will display text in preference to HTML by invoking
mhn
like this
mhn -type text/htmlso that you'd see HTML instead of text if both appeared in an alternative multipart.
The new patches are:
msh leaks file descriptors
free() in mhfree.c:free_encoding()
CRAP BISCUITS: Savannah's swamped with too many clients , and I can't upload the newer version of these patches. Oh, well, the ones below will still apply.
These patches address some problems or add features
to MH in its current incarnation as
nmh.
Hm, I kinda lie here. Really, these patches are against
the nmh-1.0.4 in
the OpenBSD ports tree
as of 16 Nov 2002.
There are three patches, so far:
msh
that plugs a file descriptor leak
mhfree.c
that prevents a double-free
when disposing of the data structure holding a message part's
Content-Encoding
mhshow and mhn
where you can state your preferences
as to which types in a multipart/alternative
you'd rather see. It works by overloading the -type
switch, where the order in which you list various MIME-types
expresses decreasing satisfaction in viewing that particular type.
Too many words, here's an example:
mhn -type text/plain -type text/html .would not only mean "show only MIME-types of
text/plain and
text/html in the current msg",
as stock MH does without this patch,
but also
"prefer text/plain to text/html
when picking a sub-part to display of a
multipart/alternative part."
Overloading -type like this has some unfortunate
side effects where you'll occasionally not see any content at all.
This'll
crop up when viewing nested multiparts, eg, because you haven't
listed multipart/foo as one of the types you want
to see displayed.
Sometimes,
you can fix this by adding a -type multipart as
the last MIME-type to display. I'm thinking about a permanent
fix where the
order you list showprocs for MIME-types in
mhn.defaults specify preferences. That's not
quite the best thing, either, since I'm not sure you
can say "use the the built-in proc to show a type"
from within mhn.defaults. Who knows, mebbe a new entry
in .mh_profile? Or a new file, altogether?
Back to Blasted Heath Consulting LLC
11 Mar 2003: Added mhn.defaults patch and pointed to Savannah