--- /dev/null
+Return-Path: <jrollins@finestructure.net>\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 D4159431FCF\r
+ for <notmuch@notmuchmail.org>; Sun, 19 Aug 2012 18:53:08 -0700 (PDT)\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 4wgZRT-EVDdG for <notmuch@notmuchmail.org>;\r
+ Sun, 19 Aug 2012 18:53:06 -0700 (PDT)\r
+Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
+ [131.215.239.19])\r
+ by olra.theworths.org (Postfix) with ESMTP id B5FB2431FAE\r
+ for <notmuch@notmuchmail.org>; Sun, 19 Aug 2012 18:53:06 -0700 (PDT)\r
+Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
+ by earth-doxen-postvirus (Postfix) with ESMTP id 57BE666E00DF\r
+ for <notmuch@notmuchmail.org>; Sun, 19 Aug 2012 18:53:06 -0700 (PDT)\r
+X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new\r
+Received: from finestructure.net (unknown [76.89.192.57])\r
+ (Authenticated sender: jrollins)\r
+ by earth-doxen-submit (Postfix) with ESMTP id 516EF66E00DE\r
+ for <notmuch@notmuchmail.org>; Sun, 19 Aug 2012 18:53:04 -0700 (PDT)\r
+Received: by finestructure.net (Postfix, from userid 1000)\r
+ id D14928E6; Sun, 19 Aug 2012 18:53:03 -0700 (PDT)\r
+From: Jameson Graef Rollins <jrollins@finestructure.net>\r
+To: Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: [PATCH 04/11] lib: remove no longer needed author-specific thread\r
+ functions\r
+Date: Sun, 19 Aug 2012 18:52:43 -0700\r
+Message-Id: <1345427570-26518-5-git-send-email-jrollins@finestructure.net>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <1345427570-26518-4-git-send-email-jrollins@finestructure.net>\r
+References: <1345427570-26518-1-git-send-email-jrollins@finestructure.net>\r
+ <1345427570-26518-2-git-send-email-jrollins@finestructure.net>\r
+ <1345427570-26518-3-git-send-email-jrollins@finestructure.net>\r
+ <1345427570-26518-4-git-send-email-jrollins@finestructure.net>\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: Mon, 20 Aug 2012 01:53:09 -0000\r
+\r
+The _add_author, _add_matched_author, and\r
+_resolve_thread_authors_string functions have been replaced by the\r
+more generic _address functions that utilize the new\r
+notmuch_thread_addresses_t.\r
+---\r
+ lib/thread.cc | 91 ---------------------------------------------------------\r
+ 1 file changed, 91 deletions(-)\r
+\r
+diff --git a/lib/thread.cc b/lib/thread.cc\r
+index b53ccb0..757e143 100644\r
+--- a/lib/thread.cc\r
++++ b/lib/thread.cc\r
+@@ -143,97 +143,6 @@ _resolve_thread_addresses_string (notmuch_thread_addresses_t *addresses)\r
+ }\r
+ }\r
+ \r
+-/* Add each author of the thread to the thread's authors_hash and to\r
+- * the thread's authors_array. */\r
+-static void\r
+-_thread_add_author (notmuch_thread_t *thread,\r
+- const char *author)\r
+-{\r
+- char *author_copy;\r
+-\r
+- if (author == NULL)\r
+- return;\r
+-\r
+- if (g_hash_table_lookup_extended (thread->authors_hash,\r
+- author, NULL, NULL))\r
+- return;\r
+-\r
+- author_copy = talloc_strdup (thread, author);\r
+-\r
+- g_hash_table_insert (thread->authors_hash, author_copy, NULL);\r
+-\r
+- g_ptr_array_add (thread->authors_array, author_copy);\r
+-}\r
+-\r
+-/* Add each matched author of the thread to the thread's\r
+- * matched_authors_hash and to the thread's matched_authors_array. */\r
+-static void\r
+-_thread_add_matched_author (notmuch_thread_t *thread,\r
+- const char *author)\r
+-{\r
+- char *author_copy;\r
+-\r
+- if (author == NULL)\r
+- return;\r
+-\r
+- if (g_hash_table_lookup_extended (thread->matched_authors_hash,\r
+- author, NULL, NULL))\r
+- return;\r
+-\r
+- author_copy = talloc_strdup (thread, author);\r
+-\r
+- g_hash_table_insert (thread->matched_authors_hash, author_copy, NULL);\r
+-\r
+- g_ptr_array_add (thread->matched_authors_array, author_copy);\r
+-}\r
+-\r
+-/* Construct an authors string from matched_authors_array and\r
+- * authors_array. The string contains matched authors first, then\r
+- * non-matched authors (with the two groups separated by '|'). Within\r
+- * each group, authors are listed in date order. */\r
+-static void\r
+-_resolve_thread_authors_string (notmuch_thread_t *thread)\r
+-{\r
+- unsigned int i;\r
+- char *author;\r
+- int first_non_matched_author = 1;\r
+-\r
+- /* First, list all matched authors in date order. */\r
+- for (i = 0; i < thread->matched_authors_array->len; i++) {\r
+- author = (char *) g_ptr_array_index (thread->matched_authors_array, i);\r
+- if (thread->authors)\r
+- thread->authors = talloc_asprintf (thread, "%s, %s",\r
+- thread->authors,\r
+- author);\r
+- else\r
+- thread->authors = author;\r
+- }\r
+-\r
+- /* Next, append any non-matched authors that haven't already appeared. */\r
+- for (i = 0; i < thread->authors_array->len; i++) {\r
+- author = (char *) g_ptr_array_index (thread->authors_array, i);\r
+- if (g_hash_table_lookup_extended (thread->matched_authors_hash,\r
+- author, NULL, NULL))\r
+- continue;\r
+- if (first_non_matched_author) {\r
+- thread->authors = talloc_asprintf (thread, "%s| %s",\r
+- thread->authors,\r
+- author);\r
+- } else {\r
+- thread->authors = talloc_asprintf (thread, "%s, %s",\r
+- thread->authors,\r
+- author);\r
+- }\r
+-\r
+- first_non_matched_author = 0;\r
+- }\r
+-\r
+- g_ptr_array_free (thread->authors_array, TRUE);\r
+- thread->authors_array = NULL;\r
+- g_ptr_array_free (thread->matched_authors_array, TRUE);\r
+- thread->matched_authors_array = NULL;\r
+-}\r
+-\r
+ /* clean up the ugly "Lastname, Firstname" format that some mail systems\r
+ * (most notably, Exchange) are creating to be "Firstname Lastname"\r
+ * To make sure that we don't change other potential situations where a\r
+-- \r
+1.7.10.4\r
+\r