1 Return-Path: <prvs=338cfd354=jrosenthal@jhu.edu>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 7727D431FD0
\r
6 for <notmuch@notmuchmail.org>; Fri, 30 Dec 2011 11:04:28 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id g-CECJw1nUk1 for <notmuch@notmuchmail.org>;
\r
16 Fri, 30 Dec 2011 11:04:28 -0800 (PST)
\r
17 Received: from ipex2.johnshopkins.edu (ipex2.johnshopkins.edu [162.129.8.151])
\r
18 (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id D6B84431FB6
\r
21 for <notmuch@notmuchmail.org>; Fri, 30 Dec 2011 11:04:27 -0800 (PST)
\r
22 X-IronPort-AV: E=Sophos;i="4.71,433,1320642000"; d="scan'208";a="113198651"
\r
23 Received: from unknown (HELO watt) ([10.161.33.18])
\r
24 by ipex2.johnshopkins.edu with ESMTP/TLS/AES256-SHA;
\r
25 30 Dec 2011 14:04:27 -0500
\r
26 Received: from jkr by watt with local (Exim 4.76)
\r
27 (envelope-from <jrosenthal@jhu.edu>)
\r
28 id 1Rghkx-0004c7-GU; Fri, 30 Dec 2011 14:04:43 -0500
\r
29 From: Jesse Rosenthal <jrosenthal@jhu.edu>
\r
30 To: David Edmondson <dme@dme.org>
\r
31 Subject: Re: [PATCH] notmuch-addresses: Match on the full name as well as
\r
33 In-Reply-To: <1324475357-21700-1-git-send-email-dme@dme.org>
\r
34 References: <1324475357-21700-1-git-send-email-dme@dme.org>
\r
35 User-Agent: Notmuch/0.10.2 (http://notmuchmail.org) Emacs/23.3.1
\r
37 Date: Fri, 30 Dec 2011 14:04:43 -0500
\r
38 Message-ID: <8739c17ues.fsf@jhu.edu>
\r
40 Content-Type: text/plain; charset=us-ascii
\r
41 Cc: notmuch@notmuchmail.org
\r
42 X-BeenThere: notmuch@notmuchmail.org
\r
43 X-Mailman-Version: 2.1.13
\r
45 List-Id: "Use and development of the notmuch mail system."
\r
46 <notmuch.notmuchmail.org>
\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
50 List-Post: <mailto:notmuch@notmuchmail.org>
\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
53 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
54 X-List-Received-Date: Fri, 30 Dec 2011 19:04:28 -0000
\r
61 On Wed, 21 Dec 2011 13:49:17 +0000, David Edmondson <dme@dme.org> wrote:
\r
63 > notmuch_addresses.py | 7 +++++--
\r
64 > 1 files changed, 5 insertions(+), 2 deletions(-)
\r
66 > diff --git a/notmuch_addresses.py b/notmuch_addresses.py
\r
67 > index bf45151..74a743c 100755
\r
68 > --- a/notmuch_addresses.py
\r
69 > +++ b/notmuch_addresses.py
\r
70 > @@ -164,11 +164,14 @@ class NotmuchAddressMatcher(object):
\r
72 > parsed_addrs = email.utils.getaddresses(addrs)
\r
73 > for addr in parsed_addrs:
\r
74 > - mail = addr[1].lower()
\r
75 > - split_names = addr[0].split(" ")
\r
76 > + full_name = addr[0]
\r
77 > + split_names = full_name.split(" ")
\r
79 > if (len([name for name in split_names
\r
80 > if self.match_function(name)]) > 0
\r
82 > + self.match_function(full_name)
\r
84 > self.match_function(mail)):
\r
86 > emails.add_email_and_name(mail, addr[0])
\r