nmh-workers
[Top][All Lists]
Advanced

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

Re: [nmh-workers] Stupid 'pick' question...


From: Bakul Shah
Subject: Re: [nmh-workers] Stupid 'pick' question...
Date: Sat, 8 Jun 2019 17:17:40 -0700

On Jun 8, 2019, at 11:03 AM, Valdis Klētnieks <address@hidden> wrote:
> 
> On Fri, 07 Jun 2019 16:19:15 -0700, Bakul Shah said:
>> You can directly use search as follows:
>> 
>>      -search 'Subject[ \t]:[ \t]*\[PATCH [45]\.[0-9]'
> 
> [~] grep ^Subject Mail/linux-kernel/321805
> Subject: Re: [PATCH 4.9 04/20] net: Fix for_each_netdev_feature on Big endian
> [~] scan `pick +linux-kernel 321805 -search 'Subject: \[PATCH [45]\.[0-9]' 
> -and -from address@hidden -list`
> 321805      *  Thu 21Feb      7k Greg Kroah-Hartma  Re: [PATCH 4.9 04/20] 
> net: Fix for_each_netdev_feature on Big endian <<On Thu, Feb 21,
> [~] scan `pick +linux-kernel 321805 -search 'Subject: \[WOMBAT [45]\.[0-9]' 
> -and -from address@hidden -list`
> pick: no messages match specification
> scan: no messages match specification


Let us look at what you see (after some cleanup):

  $ grep ^Subject Mail/linux-kernel/321805
  Subject: Re: [PATCH 4.9 04/20] net: Fix for_each_netdev_feature on Big endian
  $ pick +linux-kernel 321805 -search 'Subject: \[PATCH [45]\.[0-9]' -and -from 
address@hidden
  321805
  $ pick +linux-kernel 321805 -search 'Subject: \[WOMBAT [45]\.[0-9]' -and 
-from address@hidden 
  pick: no messages match specification

This makes sense. But note that pick does treat header lines specially.
Using your message as an example:

  $ grep ^Subject: `mhpath cur`
  Subject: Re: [nmh-workers] Stupid 'pick' question...
  Subject: Re: [PATCH 4.9 04/20] net: Fix for_each_netdev_feature on Big endian

The second Subject: line is from the message body.

  $ pick -subj PATCH cur
  pick: no messages match specification
  $ pick -search 'Subject:.*PATH' cur
  14
  $ pick -search 'Subject:.*nmh' cur
  14

So pick runs -search on header lines as well as the body a header specific
option is only run against headers.

And pick matches header line *after* line folding, as tested with Received:

  pick --received 'bakul' cur -- matches but my name is not on the same line as 
Received:
  pick --received '\]\)' cur  -- match )] on the first line
  pick --received '\]\)$' cur -- no match even though the first Received: line 
ends wih )]
  pick --received '0400$' cur -- match as 0400 ends the last line of a 
Received: field.

Conclusion: the man page is not quite accurate! But that is probably ok. 




reply via email to

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