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 B1F88431FB6
\r
6 for <notmuch@notmuchmail.org>; Fri, 30 Dec 2011 11:37:55 -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 EVlQdoLOPUVw for <notmuch@notmuchmail.org>;
\r
16 Fri, 30 Dec 2011 11:37:54 -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 92726429E25
\r
21 for <notmuch@notmuchmail.org>; Fri, 30 Dec 2011 11:37:54 -0800 (PST)
\r
22 X-IronPort-AV: E=Sophos;i="4.71,433,1320642000"; d="scan'208";a="113203161"
\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:37:53 -0500
\r
26 Received: from jkr by watt with local (Exim 4.76)
\r
27 (envelope-from <jrosenthal@jhu.edu>)
\r
28 id 1RgiHK-0004oT-Do; Fri, 30 Dec 2011 14:38:10 -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: <8739c17ues.fsf@jhu.edu>
\r
34 References: <1324475357-21700-1-git-send-email-dme@dme.org>
\r
35 <8739c17ues.fsf@jhu.edu>
\r
36 User-Agent: Notmuch/0.10.2 (http://notmuchmail.org) Emacs/23.3.1
\r
38 Date: Fri, 30 Dec 2011 14:38:10 -0500
\r
39 Message-ID: <87wr9d6eal.fsf@jhu.edu>
\r
41 Content-Type: text/plain; charset=us-ascii
\r
42 Cc: notmuch@notmuchmail.org
\r
43 X-BeenThere: notmuch@notmuchmail.org
\r
44 X-Mailman-Version: 2.1.13
\r
46 List-Id: "Use and development of the notmuch mail system."
\r
47 <notmuch.notmuchmail.org>
\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
51 List-Post: <mailto:notmuch@notmuchmail.org>
\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
55 X-List-Received-Date: Fri, 30 Dec 2011 19:37:55 -0000
\r
57 Oh, and I moved the code to
\r
59 http://commonmeasure.org/~jkr/notmuch_addresses.git
\r
64 On Fri, 30 Dec 2011 14:04:43 -0500, Jesse Rosenthal <jrosenthal@jhu.edu> wrote:
\r
70 > On Wed, 21 Dec 2011 13:49:17 +0000, David Edmondson <dme@dme.org> wrote:
\r
72 > > notmuch_addresses.py | 7 +++++--
\r
73 > > 1 files changed, 5 insertions(+), 2 deletions(-)
\r
75 > > diff --git a/notmuch_addresses.py b/notmuch_addresses.py
\r
76 > > index bf45151..74a743c 100755
\r
77 > > --- a/notmuch_addresses.py
\r
78 > > +++ b/notmuch_addresses.py
\r
79 > > @@ -164,11 +164,14 @@ class NotmuchAddressMatcher(object):
\r
81 > > parsed_addrs = email.utils.getaddresses(addrs)
\r
82 > > for addr in parsed_addrs:
\r
83 > > - mail = addr[1].lower()
\r
84 > > - split_names = addr[0].split(" ")
\r
85 > > + full_name = addr[0]
\r
86 > > + split_names = full_name.split(" ")
\r
87 > > + mail = addr[1]
\r
88 > > if (len([name for name in split_names
\r
89 > > if self.match_function(name)]) > 0
\r
91 > > + self.match_function(full_name)
\r
93 > > self.match_function(mail)):
\r
95 > > emails.add_email_and_name(mail, addr[0])
\r