nmh-workers
[Top][All Lists]
Advanced

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

Re: [Nmh-workers] handling of long header lines by pick (bug #15215)


From: Ralph Corderoy
Subject: Re: [Nmh-workers] handling of long header lines by pick (bug #15215)
Date: Sat, 24 Nov 2012 15:21:51 +0000

Hi David,

> https://savannah.nongnu.org/bugs/?15215
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=268744

That's one of mine.  :-)

> pick currently handles multiple-line header fields by:
> 1) replacing each newline with a space, and
> 2) leaving leading whitespace on continuation lines intact.
>
> The patch below would skip each newline in multiple-line header
> fields, in order to unfold per RFC 2822.  Agreed?
>
> The bug notes that leaving all of the leading whitespace on
> continuation lines intact is inconsistent with what mh-format does,
> which is to collapse into a single space.  But I think we should leave
> this as-is in pick.  It's consistent with its man page and the RFC, I
> think.  And it's easy enough to work around with a regexp, as noted in
> the Debian bug.  Thoughts?

pick's broken anyway due to MIME, e.g.

    $ grep -A 1 ^subject: `mhpath .`
    subject: =?us-ascii?q?=66=6f=6f?=
     =?utf-8?q?=62=61=72?=
    $ scan -format '"%{subject}"' last
    "=?us-ascii?q?=66=6f=6f?= =?utf-8?q?=62=61=72?="
    $ scan -format '"%(decode{subject})"' .
    "foobar"
    $ pick -sub foo .
    pick: no messages match specification
    $ pick -sub ascii .
    1 hit
    $

so I agree this fix seems the simplest.  It then means we have the
file's format, pick's unwrapping to a single line, show and mhl's
no-decode representation that preserves the line splits, and mhshow's
`foobar'.

Searching emails is a hit-and-miss affair.  :-)

Cheers, Ralph.



reply via email to

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