Re: [PATCH] notmuch-addresses: Match on the full name as well as components.
authorJesse Rosenthal <jrosenthal@jhu.edu>
Fri, 30 Dec 2011 19:38:10 +0000 (14:38 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:41:26 +0000 (09:41 -0800)
02/73301a5525a47b6cd4ebf553b9b154ba40a67a [new file with mode: 0644]

diff --git a/02/73301a5525a47b6cd4ebf553b9b154ba40a67a b/02/73301a5525a47b6cd4ebf553b9b154ba40a67a
new file mode 100644 (file)
index 0000000..08d6ce6
--- /dev/null
@@ -0,0 +1,98 @@
+Return-Path: <prvs=338cfd354=jrosenthal@jhu.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id B1F88431FB6\r
+       for <notmuch@notmuchmail.org>; Fri, 30 Dec 2011 11:37:55 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id EVlQdoLOPUVw for <notmuch@notmuchmail.org>;\r
+       Fri, 30 Dec 2011 11:37:54 -0800 (PST)\r
+Received: from ipex2.johnshopkins.edu (ipex2.johnshopkins.edu [162.129.8.151])\r
+       (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 92726429E25\r
+       for <notmuch@notmuchmail.org>; Fri, 30 Dec 2011 11:37:54 -0800 (PST)\r
+X-IronPort-AV: E=Sophos;i="4.71,433,1320642000"; d="scan'208";a="113203161"\r
+Received: from unknown (HELO watt) ([10.161.33.18])\r
+       by ipex2.johnshopkins.edu with ESMTP/TLS/AES256-SHA;\r
+       30 Dec 2011 14:37:53 -0500\r
+Received: from jkr by watt with local (Exim 4.76)\r
+       (envelope-from <jrosenthal@jhu.edu>)\r
+       id 1RgiHK-0004oT-Do; Fri, 30 Dec 2011 14:38:10 -0500\r
+From: Jesse Rosenthal <jrosenthal@jhu.edu>\r
+To: David Edmondson <dme@dme.org>\r
+Subject: Re: [PATCH] notmuch-addresses: Match on the full name as well as\r
+       components.\r
+In-Reply-To: <8739c17ues.fsf@jhu.edu>\r
+References: <1324475357-21700-1-git-send-email-dme@dme.org>\r
+       <8739c17ues.fsf@jhu.edu>\r
+User-Agent: Notmuch/0.10.2 (http://notmuchmail.org) Emacs/23.3.1\r
+       (i686-pc-linux-gnu)\r
+Date: Fri, 30 Dec 2011 14:38:10 -0500\r
+Message-ID: <87wr9d6eal.fsf@jhu.edu>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 30 Dec 2011 19:37:55 -0000\r
+\r
+Oh, and I moved the code to\r
+\r
+http://commonmeasure.org/~jkr/notmuch_addresses.git\r
+\r
+Best,\r
+Jesse\r
+\r
+On Fri, 30 Dec 2011 14:04:43 -0500, Jesse Rosenthal <jrosenthal@jhu.edu> wrote:\r
+> Pushed.\r
+> \r
+> Thanks,\r
+> Jesse\r
+> \r
+> On Wed, 21 Dec 2011 13:49:17 +0000, David Edmondson <dme@dme.org> wrote:\r
+> > ---\r
+> >  notmuch_addresses.py |    7 +++++--\r
+> >  1 files changed, 5 insertions(+), 2 deletions(-)\r
+> > \r
+> > diff --git a/notmuch_addresses.py b/notmuch_addresses.py\r
+> > index bf45151..74a743c 100755\r
+> > --- a/notmuch_addresses.py\r
+> > +++ b/notmuch_addresses.py\r
+> > @@ -164,11 +164,14 @@ class NotmuchAddressMatcher(object):\r
+> >                      addrs.append(v)\r
+> >                      parsed_addrs = email.utils.getaddresses(addrs)\r
+> >              for addr in parsed_addrs:\r
+> > -                mail = addr[1].lower()\r
+> > -                split_names = addr[0].split(" ")\r
+> > +                full_name = addr[0]\r
+> > +                split_names = full_name.split(" ")\r
+> > +                mail = addr[1]\r
+> >                  if (len([name for name in split_names \r
+> >                           if self.match_function(name)]) > 0\r
+> >                      or \r
+> > +                    self.match_function(full_name)\r
+> > +                    or \r
+> >                      self.match_function(mail)):\r
+> >                      \r
+> >                      emails.add_email_and_name(mail, addr[0])\r
+> > -- \r
+> > 1.7.7.3\r
+> > \r