Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 34 / 91603e61810ecd6ad9f359ff171c7ebf7aad86
1 Return-Path: <sojka@merica.cz>\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 8DBCD431FCF\r
6         for <notmuch@notmuchmail.org>; Tue,  4 Nov 2014 12:45:37 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.224\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.224 tagged_above=-999 required=5\r
12         tests=[DATE_IN_PAST_03_06=1.076, RCVD_IN_DNSWL_MED=-2.3]\r
13         autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id RxU85UFhStSJ for <notmuch@notmuchmail.org>;\r
17         Tue,  4 Nov 2014 12:45:30 -0800 (PST)\r
18 Received: from relay.felk.cvut.cz (relay.felk.cvut.cz [147.32.80.7])\r
19         by olra.theworths.org (Postfix) with ESMTP id CBC76431FAE\r
20         for <notmuch@notmuchmail.org>; Tue,  4 Nov 2014 12:45:29 -0800 (PST)\r
21 Received: from control.felk.cvut.cz (control.felk.cvut.cz [147.32.87.4])\r
22         by relay.felk.cvut.cz (8.14.9/8.14.9) with ESMTP id sA4FZxMl036846;\r
23         Tue, 4 Nov 2014 16:35:59 +0100 (CET) (envelope-from sojka@merica.cz)\r
24 Received: from CONTROL/SpoolDir by control.felk.cvut.cz (Mercury 1.48);\r
25         4 Nov 14 16:36:00 +0100\r
26 Received: from SpoolDir by CONTROL (Mercury 1.48); 4 Nov 14 16:35:54 +0100\r
27 Received: from rtime.felk.cvut.cz (147.32.86.92) by control.felk.cvut.cz\r
28         (Mercury 1.48) with ESMTP; 4 Nov 14 16:35:53 +0100\r
29 Received: from localhost ([127.0.0.1] helo=steelpick.2x.cz)\r
30         by rtime.felk.cvut.cz with esmtp (Exim 4.80)\r
31         (envelope-from <sojka@merica.cz>)\r
32         id 1Xlg9A-0004xP-Hk; Tue, 04 Nov 2014 16:35:52 +0100\r
33 Received: from wsh by steelpick.2x.cz with local (Exim 4.84)\r
34         (envelope-from <sojka@merica.cz>)\r
35         id 1XlcPB-0002Wr-G1; Tue, 04 Nov 2014 12:36:09 +0100\r
36 From: Michal Sojka <sojkam1@fel.cvut.cz>\r
37 To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
38 Subject: Re: [PATCH v2 08/10] cli: address: Do not output duplicate addresses\r
39 In-Reply-To: <87a947monn.fsf@maritornes.cs.unb.ca>\r
40 References: <1415058622-21162-1-git-send-email-sojkam1@fel.cvut.cz>\r
41         <1415058622-21162-9-git-send-email-sojkam1@fel.cvut.cz>\r
42         <87a947monn.fsf@maritornes.cs.unb.ca>\r
43 User-Agent: Notmuch/0.18.2+157~ga00d359 (http://notmuchmail.org) Emacs/24.3.1\r
44         (x86_64-pc-linux-gnu)\r
45 Date: Tue, 04 Nov 2014 12:36:09 +0100\r
46 Message-ID: <87a947mc46.fsf@steelpick.2x.cz>\r
47 MIME-Version: 1.0\r
48 Content-Type: text/plain\r
49 X-FELK-MailScanner-Information: \r
50 X-MailScanner-ID: sA4FZxMl036846\r
51 X-FELK-MailScanner: Found to be clean\r
52 X-FELK-MailScanner-SpamCheck: not spam, SpamAssassin (not cached,\r
53         score=1.093, required 6, BAYES_00 -0.50, DATE_IN_PAST_03_06 1.59,\r
54         HEADER_FROM_DIFFERENT_DOMAINS 0.00)\r
55 X-FELK-MailScanner-SpamScore: s\r
56 X-FELK-MailScanner-From: sojka@merica.cz\r
57 X-FELK-MailScanner-Watermark: 1415720167.12737@Y0Rgo6YZHp5B4GF9H3aRWg\r
58 X-BeenThere: notmuch@notmuchmail.org\r
59 X-Mailman-Version: 2.1.13\r
60 Precedence: list\r
61 List-Id: "Use and development of the notmuch mail system."\r
62         <notmuch.notmuchmail.org>\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
66 List-Post: <mailto:notmuch@notmuchmail.org>\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
70 X-List-Received-Date: Tue, 04 Nov 2014 20:45:38 -0000\r
71 \r
72 On Tue, Nov 04 2014, David Bremner wrote:\r
73 > Michal Sojka <sojkam1@fel.cvut.cz> writes:\r
74 >\r
75 >>  \r
76 >> +/* Returns TRUE iff name and addr is duplicate. */\r
77 >\r
78 > If you're revising this patch, it would be good to mention the side\r
79 > effect of this function.\r
80 >\r
81 >> -process_address_list (const search_context_t *ctx, InternetAddressList *list)\r
82 >> +process_address_list (const search_context_t *ctx,\r
83 >> +                  InternetAddressList *list)\r
84 >\r
85 > It probably doesn't make any difference, but this looks like a needless\r
86 > whitespace change.\r
87 >\r
88 > This function definitely needs some comment / pointer to\r
89 > documention. And probably not to have _my in the name.\r
90 >\r
91 >> +static void\r
92 >> +_my_talloc_free_for_g_hash (void *ptr)\r
93 >> +{\r
94 >> +    talloc_free (ptr);\r
95 >> +}\r
96 >> +\r
97 >\r
98 > I don't understand the name of the next subtest\r
99 >\r
100 >> +test_begin_subtest "No --output"\r
101 >> +notmuch address --output=sender --output=recipients '*' >OUTPUT\r
102 \r
103 This should be "notmuch address '*' >OUTPUT". I'll fix that.\r
104 \r
105 >> +# Use EXPECTED from previous subtest\r
106 >> +test_expect_equal_file OUTPUT EXPECTED\r
107 >> +\r
108 >> +\r
109 >> +test_done\r
110 >\r
111 > nitpick, extra blank lines\r
112 >\r
113 > So, AIUI, this is all of the series proposed for 0.19. \r
114 \r
115 Agreed.\r
116 \r
117 > It looks close to OK to me, modulo some minor style nits. One\r
118 > anonymous commentator on IRC mentioned the use of module scope\r
119 > variables, I guess in patch 6/10. I'm not sure of a better solution,\r
120 > but it's true in a perfect world we wouldn't have module local state.\r
121 \r
122 A possible solution would be fill in common_options structure\r
123 programmatically, but this would make the code much less readable. I can\r
124 think of a few other solutions but none of them would fit into "perfect\r
125 world" :)\r
126 \r
127 I'll send updated patches in the evening (CET timezone).\r
128 \r
129 Thanks\r
130 -Michal\r