[PATCH 4/4] Update NEWS for user.other_name
[notmuch-archives.git] / 9e / 1b95c41babe653a92c809cd4f9868024300133
1 Return-Path: <chevalier.ronny@gmail.com>\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 arlo.cworth.org (Postfix) with ESMTP id E09966DE1A2E\r
6  for <notmuch@notmuchmail.org>; Tue, 21 Apr 2015 19:01:19 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.465\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.465 tagged_above=-999 required=5 tests=[AWL=0.355,\r
12   DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001,\r
13  RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,\r
14  SPF_PASS=-0.001] autolearn=disabled\r
15 Received: from arlo.cworth.org ([127.0.0.1])\r
16  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
17  with ESMTP id Q_Qu5auWWvsP for <notmuch@notmuchmail.org>;\r
18  Tue, 21 Apr 2015 19:01:16 -0700 (PDT)\r
19 Received: from mail-oi0-f46.google.com (mail-oi0-f46.google.com\r
20  [209.85.218.46])\r
21  by arlo.cworth.org (Postfix) with ESMTPS id 70EAA6DE17ED\r
22  for <notmuch@notmuchmail.org>; Tue, 21 Apr 2015 19:01:16 -0700 (PDT)\r
23 Received: by oiko83 with SMTP id o83so167960094oik.1\r
24  for <notmuch@notmuchmail.org>; Tue, 21 Apr 2015 19:01:14 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26  h=mime-version:in-reply-to:references:date:message-id:subject:from:to\r
27  :cc:content-type;\r
28  bh=CqH9Q3ydLFV5U3QKFjKd0MHE8+RjQayFSkm/WjbBJrk=;\r
29  b=C/kW+SGwvWOzp5G43c2Lm8EsWTMFKx0WA6yeigsN+Ph7xJFqedvwzTCLgXeUtX1Uuu\r
30  tY4MKHXD0FBsYuc/P0ymQNHxn1qrrpS5QNyvqQbCH+mNICFD/C2+mi3GGGm+4jtyZxbb\r
31  /jgtTHnZAmujWbrLicIFWJfu7xsknDDWa38p2QD0KSYsHK88vpiYudYV/rVVuhcd/DN3\r
32  h5D1Ch1NlUul60DviZU74d9DO3gR1MgUAbOevh6Jcchx1FOCK/IUSXgXKDeh+b6GUuW+\r
33  RHIkN8BYDYLonVo+eohELB75nUokvzR91CGBnm2GM0RXzF9U4lD+hDWbyG4YH1E5SPDA\r
34  Dciw==\r
35 MIME-Version: 1.0\r
36 X-Received: by 10.182.137.136 with SMTP id qi8mr20802764obb.51.1429668073833; \r
37  Tue, 21 Apr 2015 19:01:13 -0700 (PDT)\r
38 Received: by 10.202.216.5 with HTTP; Tue, 21 Apr 2015 19:01:13 -0700 (PDT)\r
39 In-Reply-To: <87lhhlhryd.fsf@csail.mit.edu>\r
40 References:\r
41  <CABPZE7L5yX3tJH+1vMotxL7BHYoQd2BJSbzFuKTAxHgC5+6RHA@mail.gmail.com>\r
42  <87618qfk5l.fsf@maritornes.cs.unb.ca>\r
43  <CABPZE7JGzfSMWKpxKqJeCbpsDhX4xj_HoNoKFL8MbYv9xYpQ7w@mail.gmail.com>\r
44  <87lhhlhryd.fsf@csail.mit.edu>\r
45 Date: Wed, 22 Apr 2015 04:01:13 +0200\r
46 Message-ID:\r
47  <CABPZE7JSE-WwTGBNpYZuZSepG=TrQSsMx-C0e2vU+7PT50HLbQ@mail.gmail.com>\r
48 Subject: Re: notmuch_thread_get_authors\r
49 From: Ronny Chevalier <chevalier.ronny@gmail.com>\r
50 To: Austin Clements <aclements@csail.mit.edu>\r
51 Content-Type: text/plain; charset=UTF-8\r
52 Cc: notmuch@notmuchmail.org\r
53 X-BeenThere: notmuch@notmuchmail.org\r
54 X-Mailman-Version: 2.1.18\r
55 Precedence: list\r
56 List-Id: "Use and development of the notmuch mail system."\r
57  <notmuch.notmuchmail.org>\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
59  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
61 List-Post: <mailto:notmuch@notmuchmail.org>\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
64  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
65 X-List-Received-Date: Wed, 22 Apr 2015 02:01:20 -0000\r
66 \r
67 On Wed, Apr 22, 2015 at 3:28 AM, Austin Clements\r
68 <aclements@csail.mit.edu> wrote:\r
69 > On Tue, 21 Apr 2015, Ronny Chevalier <chevalier.ronny@gmail.com> wrote:\r
70 >> On Tue, Apr 21, 2015 at 1:35 AM, David Bremner <david@tethera.net> wrote:\r
71 >>> Ronny Chevalier <chevalier.ronny@gmail.com> writes:\r
72 >> Austin Clements wrote:\r
73 >>> And I think there's a fairly easy way to do it in C code that will\r
74 >>> also prevent library interface bloat: instead of introducing new\r
75 >>> library APIs to get at this information, just use the existing\r
76 >>> notmuch_thread_get_messages API and construct the matched and\r
77 >>> non-matched lists in the CLI.  Doing it in the CLI wouldn't require\r
78 >>> the library to export yet another string list structure, which is\r
79 >>> always a huge pain (thanks C!), and wouldn't introduce more "helper"\r
80 >>> functions into the library API.\r
81 >>\r
82 >> I disagree with what Austin said. Because this does not solve the\r
83 >> issue at all (or I misunderstood). The issue is with the notmuch API,\r
84 >> if someone is using this library there no way it can parse properly\r
85 >> the authors.\r
86 >> In my case I am not using the CLI but the notmuch library, fixing this\r
87 >> in the CLI is just an hack, and it does not fix the issue for the\r
88 >> library users.\r
89 >\r
90 > My suggestion was in no way specific to the CLI. That was the context of\r
91 > the discussion at the time, but for the purposes of this discussion, the\r
92 > CLI is just another library user.\r
93 \r
94 Ok, sorry for misunderstanding.\r
95 \r
96 >\r
97 > You're completely right that there's no way to reliably parse the\r
98 > authors list returned by notmuch_thread_get_authors. So don't do\r
99 > that. Just use notmuch_thread_get_messages, walk the messages list, and\r
100 > build your own authors list. There's no need to introduce additional\r
101 > complexity and surface area into the library API for this specific use\r
102 > case (IMO, even notmuch_thread_get_authors shouldn't exist, but it's\r
103 > there for legacy reasons.) Then you can get author lists for matched,\r
104 > non-matched, matching a specific tag, just the to, just the from, counts\r
105 > of how many times each author appeared, whatever you want.\r
106 >\r
107 \r
108 Ok thanks!\r
109 \r
110 If I read the code correctly, _notmuch_thread_create in lib/thread.cc\r
111 process every message to get information like tags, subject and\r
112 authors. Since notmuch_thread_get_authors is here for legacy reasons,\r
113 would it be better to generate the list of authors only when requested\r
114 with notmuch_thread_get_authors (and cache the result of course)?\r
115 Because, new code will not use this and will do this work manually,\r
116 the generation of the list in intern consumes resources for nothing.\r
117 \r
118 >> Furthermore, I do not see why providing a string list NULL-terminated\r
119 >> in C is a huge pain?\r
120 >\r
121 > See the notmuch_tags_* and notmuch_filesnames_* APIs. Those are just\r
122 > string lists.\r
123 >\r
124 >> Otherwise, I agree with Mark Walters comments on the patch.\r
125 >>\r
126 >> If no one is working to fix this at the moment, I can send a patch?\r
127 >>\r
128 >> Ronny\r