unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] notmuch-addresses: Match on the full name as well as components.
@ 2011-12-21 13:49 David Edmondson
  2011-12-30 19:04 ` Jesse Rosenthal
  0 siblings, 1 reply; 3+ messages in thread
From: David Edmondson @ 2011-12-21 13:49 UTC (permalink / raw)
  To: jrosenthal; +Cc: notmuch

---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-30 19:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-21 13:49 [PATCH] notmuch-addresses: Match on the full name as well as components David Edmondson
2011-12-30 19:04 ` Jesse Rosenthal
2011-12-30 19:38   ` Jesse Rosenthal

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).