[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] mhlist output format

From: Ken Hornstein
Subject: Re: [Nmh-workers] mhlist output format
Date: Fri, 18 Apr 2014 13:46:33 -0400

>leaving aside the debug output i quoted, the output represents exactly
>what came with the message.  i'm not sure what one would leave out
>from that.  being destined for a script, and not human consumption,
>i'd say that everything is interesting.  after all, we're not talking
>about that much data -- it's the tree structure of an email message,
>not wikipedia.  my example message did have a fair amount of
>cruft, which is why i chose it.  most messages are much simpler.

Right, but you have things in there like the message size, and stuff
that you don't really care about (for example, if you've already got the
tools to example MIME parts, you don't care about the multipart boundary

>while i'm sure mh-format could do that, frankly, i'd rather spend my
>time programming in shell than writing overly complex mh-format forms.

Oh, no way I was thinking about doing the whole thing, or even a significant
part of it in mh-format.

My thinking was that if we decide on a script-friendly output, that
locks us into a particular output format ... and we need to be very
careful on exactly what that output would look like, the semantics of
that output, etc etc, because once we lock it in we're stuck and we have
to support older scripts.  But if we make just the output controllable
via mh-format, then that lets the script control what the output looks

Here's one example: let's say you get a text part.  It's lacking a charset
parameter.  That means the character set should default to US-ASCII.  Well,
does your script really want the character set of the text?  Or does it
want to know the value of the charset parameter?  If you want the former,
you could do:


If you want the latter, you could do:


Actually, I guess the first example should technically really be:


That's just one example.  My point was that if we let the user specify a
mh-format string that specified exactly what they want, we don't have to
specify an output format: the script can do that for us, and we can avoid
being locked into supporting a particular formatted output.  You may think
the last example is something you want to avoid: if you don't want to do
that, it's totally your choice!  But you can, if you want to.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]