Re: [Nmh-workers] nmh internals: full MIME integration

2014-07-26 Thread Ralph Corderoy
Hi Ken, Right now a call to the MIME parsing routines end up slurping in the whole message, but that's not desirable for a lot of programs (scan, pick). It seems like parsing all of the messages headers is generally worthwhile; that (usually) fits within a single stdio buffer, so doing

Re: [Nmh-workers] nmh internals: full MIME integration

2014-07-26 Thread David Levine
Ralph wrote: Whilst looking at pick's source, I found MHPDEBUG; I don't think it's documented but could be useful for those learning pick? Perhaps it should be -debug instead? It's documented, very briefly, in the mh-profile(5) man page along with a couple of other debug environment

Re: [Nmh-workers] nmh internals: full MIME integration

2014-07-26 Thread Ken Hornstein
If we're having lazy evaluation of MIME parts, which is good, can it also cover the headers? `pick --list-id f...@bar.com' isn't concerned with decoding Subject and all those Received headers. It may not sound like much, but we have folders with tens of thousands of emails. get_header() could

Re: [Nmh-workers] nmh internals: full MIME integration

2014-07-26 Thread Ralph Corderoy
Hi Ken, If we're having lazy evaluation of MIME parts, which is good, can it also cover the headers? `pick --list-id f...@bar.com' isn't concerned with decoding Subject and all those Received headers. It may not sound like much, but we have folders with tens of thousands of emails.

Re: [Nmh-workers] nmh internals: full MIME integration

2014-07-26 Thread Lyndon Nerenberg
On Jul 26, 2014, at 12:07 PM, Ralph Corderoy ra...@inputplus.co.uk wrote: pick may have changed a bit since the above version, but I still shouldn't have to care how much whitespace continuation lines are indented. Shouldn't pick be matching against a logical view of a single line, with

Re: [Nmh-workers] nmh internals: full MIME integration

2014-07-26 Thread Ken Hornstein
pick may have changed a bit since the above version, but I still shouldn't have to care how much whitespace continuation lines are indented. Shouldn't pick be matching against a logical view of a single line, with `CRLF WS*' becoming a single space? Yeah, I agree with you there. I would

Re: [Nmh-workers] nmh internals: full MIME integration

2014-07-26 Thread Ken Hornstein
I think in the general sense of matching a generic header, the semantics of header folding are clear. So did I, until I tried writing the spec. Easier said than done :-( I just reread ยง2.2.3 of RFC 5322; it seems pretty clear to me. So if you could give further detail as to what you mean,

Re: [Nmh-workers] nmh internals: full MIME integration

2014-07-26 Thread Lyndon Nerenberg
On Jul 26, 2014, at 10:02 PM, Ken Hornstein k...@pobox.com wrote: (As an aside, I see that pick does use ^foo[ \t]*: to match on a header, but my reading of RFC 5322 is that spaces are not allowed between the header name and the colon ... but I guess the old syntax did?) The ABNF has never