bug-mailutils
[Top][All Lists]
Advanced

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

Re: [bug-mailutils] Is this a Bug? Readmsg Omits From Line


From: Sergey Poznyakoff
Subject: Re: [bug-mailutils] Is this a Bug? Readmsg Omits From Line
Date: Wed, 14 Feb 2007 12:26:20 +0200

Neil R. Ormos <address@hidden> wrote:

> Nonetheless, I would observe that the elm
> version of readmsg is quite useful for copying
> verbatim one or more messages from one mbox-format
> mailbox into another mbox-format mailbox, using the
> -h option.  It would be useful to have similar
> functionality in the GNU Mailutils readmsg,
> regardless of which option flag must be requested to
> access this functionality, because eventually,
> maintenance of elm will likely cease.

I see. I will apply the 1st patch to CVS head, then.
 
> On my test system (Debian Sarge), after the patch
> you offered on 12 Feb 2007, the invocation
> 
>    readmsg -w 'From_ \' -f source.mbox 5 6 7 >destination.mbox

>From the shell's point of view, 'From_ \' is an error (the closing quote
is missing), that's why I thought it was a typo and tried 'From_ '\'
instead.

Indeed, when using this form literally, I obtain the same results as
you.  It is due to the fact that mailutils word splitter (argcv module)
parses this string in two words: 'From_' and ''.  The first one
instructs readmsg to output From markers, the second one matches any
headers (One can argue that it should not have removed the trailing \,
but that's another story). You would get the same effect with any of the
following (correct from the shells point of view) calls:

  readmsg -w 'From_ ""'
  readmsg -w "From_ ''"

> I have not seen documentation for readmsg that
> specifies that the arguments to -w are treated as
> "patterns",

Well, this is a terminological issue, which can be argued, indeed.
In my understanding, they can be called "patterns" because they do not
match the header names exactly, instead any header whose prefix matches is
selected.

> so I wasn't aware that ! is intended
> to be special.

According to readmsg(1):

  "A list entry may be preceded by an exclamation point to suppress the
  header."

Thus, ! is special. But this is the only mention of its special
meaning in the docs. It does not specify how the matcher should behave
when encountering "X !X" or "!X X".
   
> I was looking at the info page and the (Debian) man page for readmsg.

Yes, the above excerpt was taken from this manpage as well.

Regards,
Sergey




reply via email to

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