Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / ac / b7d056e521530994a3f6a8efda181cf544670a
1 Return-Path: <jrollins@finestructure.net>\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 D4159431FCF\r
6         for <notmuch@notmuchmail.org>; Sun, 19 Aug 2012 18:53:08 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.3\r
10 X-Spam-Level: \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 4wgZRT-EVDdG for <notmuch@notmuchmail.org>;\r
16         Sun, 19 Aug 2012 18:53:06 -0700 (PDT)\r
17 Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
18         [131.215.239.19])\r
19         by olra.theworths.org (Postfix) with ESMTP id B5FB2431FAE\r
20         for <notmuch@notmuchmail.org>; Sun, 19 Aug 2012 18:53:06 -0700 (PDT)\r
21 Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
22         by earth-doxen-postvirus (Postfix) with ESMTP id 57BE666E00DF\r
23         for <notmuch@notmuchmail.org>; Sun, 19 Aug 2012 18:53:06 -0700 (PDT)\r
24 X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new\r
25 Received: from finestructure.net (unknown [76.89.192.57])\r
26         (Authenticated sender: jrollins)\r
27         by earth-doxen-submit (Postfix) with ESMTP id 516EF66E00DE\r
28         for <notmuch@notmuchmail.org>; Sun, 19 Aug 2012 18:53:04 -0700 (PDT)\r
29 Received: by finestructure.net (Postfix, from userid 1000)\r
30         id D14928E6; Sun, 19 Aug 2012 18:53:03 -0700 (PDT)\r
31 From: Jameson Graef Rollins <jrollins@finestructure.net>\r
32 To: Notmuch Mail <notmuch@notmuchmail.org>\r
33 Subject: [PATCH 04/11] lib: remove no longer needed author-specific thread\r
34         functions\r
35 Date: Sun, 19 Aug 2012 18:52:43 -0700\r
36 Message-Id: <1345427570-26518-5-git-send-email-jrollins@finestructure.net>\r
37 X-Mailer: git-send-email 1.7.10.4\r
38 In-Reply-To: <1345427570-26518-4-git-send-email-jrollins@finestructure.net>\r
39 References: <1345427570-26518-1-git-send-email-jrollins@finestructure.net>\r
40         <1345427570-26518-2-git-send-email-jrollins@finestructure.net>\r
41         <1345427570-26518-3-git-send-email-jrollins@finestructure.net>\r
42         <1345427570-26518-4-git-send-email-jrollins@finestructure.net>\r
43 X-BeenThere: notmuch@notmuchmail.org\r
44 X-Mailman-Version: 2.1.13\r
45 Precedence: list\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: Mon, 20 Aug 2012 01:53:09 -0000\r
56 \r
57 The _add_author, _add_matched_author, and\r
58 _resolve_thread_authors_string functions have been replaced by the\r
59 more generic _address functions that utilize the new\r
60 notmuch_thread_addresses_t.\r
61 ---\r
62  lib/thread.cc |   91 ---------------------------------------------------------\r
63  1 file changed, 91 deletions(-)\r
64 \r
65 diff --git a/lib/thread.cc b/lib/thread.cc\r
66 index b53ccb0..757e143 100644\r
67 --- a/lib/thread.cc\r
68 +++ b/lib/thread.cc\r
69 @@ -143,97 +143,6 @@ _resolve_thread_addresses_string (notmuch_thread_addresses_t *addresses)\r
70      }\r
71  }\r
72  \r
73 -/* Add each author of the thread to the thread's authors_hash and to\r
74 - * the thread's authors_array. */\r
75 -static void\r
76 -_thread_add_author (notmuch_thread_t *thread,\r
77 -                   const char *author)\r
78 -{\r
79 -    char *author_copy;\r
80 -\r
81 -    if (author == NULL)\r
82 -       return;\r
83 -\r
84 -    if (g_hash_table_lookup_extended (thread->authors_hash,\r
85 -                                     author, NULL, NULL))\r
86 -       return;\r
87 -\r
88 -    author_copy = talloc_strdup (thread, author);\r
89 -\r
90 -    g_hash_table_insert (thread->authors_hash, author_copy, NULL);\r
91 -\r
92 -    g_ptr_array_add (thread->authors_array, author_copy);\r
93 -}\r
94 -\r
95 -/* Add each matched author of the thread to the thread's\r
96 - * matched_authors_hash and to the thread's matched_authors_array. */\r
97 -static void\r
98 -_thread_add_matched_author (notmuch_thread_t *thread,\r
99 -                           const char *author)\r
100 -{\r
101 -    char *author_copy;\r
102 -\r
103 -    if (author == NULL)\r
104 -       return;\r
105 -\r
106 -    if (g_hash_table_lookup_extended (thread->matched_authors_hash,\r
107 -                                     author, NULL, NULL))\r
108 -       return;\r
109 -\r
110 -    author_copy = talloc_strdup (thread, author);\r
111 -\r
112 -    g_hash_table_insert (thread->matched_authors_hash, author_copy, NULL);\r
113 -\r
114 -    g_ptr_array_add (thread->matched_authors_array, author_copy);\r
115 -}\r
116 -\r
117 -/* Construct an authors string from matched_authors_array and\r
118 - * authors_array. The string contains matched authors first, then\r
119 - * non-matched authors (with the two groups separated by '|'). Within\r
120 - * each group, authors are listed in date order. */\r
121 -static void\r
122 -_resolve_thread_authors_string (notmuch_thread_t *thread)\r
123 -{\r
124 -    unsigned int i;\r
125 -    char *author;\r
126 -    int first_non_matched_author = 1;\r
127 -\r
128 -    /* First, list all matched authors in date order. */\r
129 -    for (i = 0; i < thread->matched_authors_array->len; i++) {\r
130 -       author = (char *) g_ptr_array_index (thread->matched_authors_array, i);\r
131 -       if (thread->authors)\r
132 -           thread->authors = talloc_asprintf (thread, "%s, %s",\r
133 -                                              thread->authors,\r
134 -                                              author);\r
135 -       else\r
136 -           thread->authors = author;\r
137 -    }\r
138 -\r
139 -    /* Next, append any non-matched authors that haven't already appeared. */\r
140 -    for (i = 0; i < thread->authors_array->len; i++) {\r
141 -       author = (char *) g_ptr_array_index (thread->authors_array, i);\r
142 -       if (g_hash_table_lookup_extended (thread->matched_authors_hash,\r
143 -                                         author, NULL, NULL))\r
144 -           continue;\r
145 -       if (first_non_matched_author) {\r
146 -           thread->authors = talloc_asprintf (thread, "%s| %s",\r
147 -                                              thread->authors,\r
148 -                                              author);\r
149 -       } else {\r
150 -           thread->authors = talloc_asprintf (thread, "%s, %s",\r
151 -                                              thread->authors,\r
152 -                                              author);\r
153 -       }\r
154 -\r
155 -       first_non_matched_author = 0;\r
156 -    }\r
157 -\r
158 -    g_ptr_array_free (thread->authors_array, TRUE);\r
159 -    thread->authors_array = NULL;\r
160 -    g_ptr_array_free (thread->matched_authors_array, TRUE);\r
161 -    thread->matched_authors_array = NULL;\r
162 -}\r
163 -\r
164  /* clean up the ugly "Lastname, Firstname" format that some mail systems\r
165   * (most notably, Exchange) are creating to be "Firstname Lastname"\r
166   * To make sure that we don't change other potential situations where a\r
167 -- \r
168 1.7.10.4\r
169 \r