Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 7727D431FD0 for ; Fri, 30 Dec 2011 11:04:28 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g-CECJw1nUk1 for ; Fri, 30 Dec 2011 11:04:28 -0800 (PST) Received: from ipex2.johnshopkins.edu (ipex2.johnshopkins.edu [162.129.8.151]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D6B84431FB6 for ; Fri, 30 Dec 2011 11:04:27 -0800 (PST) X-IronPort-AV: E=Sophos;i="4.71,433,1320642000"; d="scan'208";a="113198651" Received: from unknown (HELO watt) ([10.161.33.18]) by ipex2.johnshopkins.edu with ESMTP/TLS/AES256-SHA; 30 Dec 2011 14:04:27 -0500 Received: from jkr by watt with local (Exim 4.76) (envelope-from ) id 1Rghkx-0004c7-GU; Fri, 30 Dec 2011 14:04:43 -0500 From: Jesse Rosenthal To: David Edmondson Subject: Re: [PATCH] notmuch-addresses: Match on the full name as well as components. In-Reply-To: <1324475357-21700-1-git-send-email-dme@dme.org> References: <1324475357-21700-1-git-send-email-dme@dme.org> User-Agent: Notmuch/0.10.2 (http://notmuchmail.org) Emacs/23.3.1 (i686-pc-linux-gnu) Date: Fri, 30 Dec 2011 14:04:43 -0500 Message-ID: <8739c17ues.fsf@jhu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 19:04:28 -0000 Pushed. Thanks, Jesse On Wed, 21 Dec 2011 13:49:17 +0000, David Edmondson wrote: > --- > notmuch_addresses.py | 7 +++++-- > 1 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/notmuch_addresses.py b/notmuch_addresses.py > index bf45151..74a743c 100755 > --- a/notmuch_addresses.py > +++ b/notmuch_addresses.py > @@ -164,11 +164,14 @@ class NotmuchAddressMatcher(object): > addrs.append(v) > parsed_addrs = email.utils.getaddresses(addrs) > for addr in parsed_addrs: > - mail = addr[1].lower() > - split_names = addr[0].split(" ") > + full_name = addr[0] > + split_names = full_name.split(" ") > + mail = addr[1] > if (len([name for name in split_names > if self.match_function(name)]) > 0 > or > + self.match_function(full_name) > + or > self.match_function(mail)): > > emails.add_email_and_name(mail, addr[0]) > -- > 1.7.7.3 >