Re: ANNOUNCE: nottoomuch-addresses.pl

Subject: Re: ANNOUNCE: nottoomuch-addresses.pl

Date: Mon, 05 Dec 2011 14:35:03 +0200

To: Bart Bunting, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Mon, 05 Dec 2011 23:04:43 +1100, Bart Bunting <bart@ursys.com.au> wrote:
> Hi Tomi,
> 
> Another observation.  Not sure if this is a bug or a design decision:
> I have the address:
> "Zac Hamed" <zhamed@xxxxxxxxxx.xxx.au>
> a serch like:
> ./nottoomuch-addresses.pl  zham
> 
> shows it up as expected.
> 
> However if I search on the name part like:
> ./nottoomuch-addresses.pl  zac
> 
> It doesn't find the match.
> 
> Is this expected behaviour?

Yes, the search is deliberately case sensitive. Note, however, that
email address part is (also deliberately) lowercased before address line
is added to the list... 

This has suited me good so far... (maybe I need to add this to the doc)...

...(or change the behaviour it if is too confusing / more inconvenient
that convenient).

If you want to experiment with case insensitive search you could check the
line 35:

	print grep { index($_, $search_str) >= 0 } <I>;

Change this to

	print grep { /\Q$search_str\E/oi } <I>;

(without \Q and \E you also get regular expression matches)

> 
> Kind regards

Thanks... actually I put the above change into use; let's see if it
work better for me than the other :)

> 
> Bart

Tomi


> 
> 
> 
> 
>  On Mon, 05 Dec 2011 13:51:16 +0200, Tomi Ollila <tomi.ollila@nixu.com> wrote:
> > Hi
> > 
> > Thanks to Bart's findings those things are now fixed in
> > version 1.1 of nottoomuch-addresses.pl 
> > 
> > Get it:
> > 
> > (wget) http://www.iki.fi/too/nottoomuch/nottoomuch-addresses.pl 
> > 
> > Sha1 digest is now 4ed74ef9eaabb73804e55caa2c29682e643d2b78
> > 
> > Installation instructions & some other info now available at:
> > 
> > http://www.iki.fi/too/nottoomuch/nottoomuch-addresses/
> > 
> > 
> > Tomi
> 

Thread: