Re: How does notmuch track mails?
[notmuch-archives.git] / 0c / fcf8b73f8fbd990fd9dd7864ea9b0bc6dcbb55
1 Return-Path: <sojkam1@fel.cvut.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 B476E431FBC\r
6         for <notmuch@notmuchmail.org>; Fri, 31 Aug 2012 14:00:47 -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 WJ1WEDScjP70 for <notmuch@notmuchmail.org>;\r
16         Fri, 31 Aug 2012 14:00:47 -0700 (PDT)\r
17 Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
18         by olra.theworths.org (Postfix) with ESMTP id 19953431FAF\r
19         for <notmuch@notmuchmail.org>; Fri, 31 Aug 2012 14:00:47 -0700 (PDT)\r
20 Received: from localhost (unknown [192.168.200.4])\r
21         by max.feld.cvut.cz (Postfix) with ESMTP id C4A8A3CFE71;\r
22         Fri, 31 Aug 2012 23:00:42 +0200 (CEST)\r
23 X-Virus-Scanned: IMAP AMAVIS\r
24 Received: from max.feld.cvut.cz ([192.168.200.1])\r
25         by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new,\r
26         port 10044)\r
27         with ESMTP id h8X4-glOLo_r; Fri, 31 Aug 2012 23:00:41 +0200 (CEST)\r
28 Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
29         by max.feld.cvut.cz (Postfix) with ESMTP id 53DFA19F3379;\r
30         Fri, 31 Aug 2012 23:00:41 +0200 (CEST)\r
31 Received: from steelpick.2x.cz (unknown [213.29.198.144])\r
32         (Authenticated sender: sojkam1)\r
33         by imap.feld.cvut.cz (Postfix) with ESMTPSA id 3D478660904;\r
34         Fri, 31 Aug 2012 23:00:41 +0200 (CEST)\r
35 Received: from wsh by steelpick.2x.cz with local (Exim 4.80)\r
36         (envelope-from <sojkam1@fel.cvut.cz>)\r
37         id 1T7YKW-0002DZ-PY; Fri, 31 Aug 2012 23:00:40 +0200\r
38 From: Michal Sojka <sojkam1@fel.cvut.cz>\r
39 To: Jameson Graef Rollins <jrollins@finestructure.net>,\r
40         Notmuch Mail <notmuch@notmuchmail.org>\r
41 Subject: Re: [PATCH 08/11] cli: add thread recipients to search output\r
42 In-Reply-To: <1345427570-26518-9-git-send-email-jrollins@finestructure.net>\r
43 References: <1345427570-26518-1-git-send-email-jrollins@finestructure.net>\r
44         <1345427570-26518-2-git-send-email-jrollins@finestructure.net>\r
45         <1345427570-26518-3-git-send-email-jrollins@finestructure.net>\r
46         <1345427570-26518-4-git-send-email-jrollins@finestructure.net>\r
47         <1345427570-26518-5-git-send-email-jrollins@finestructure.net>\r
48         <1345427570-26518-6-git-send-email-jrollins@finestructure.net>\r
49         <1345427570-26518-7-git-send-email-jrollins@finestructure.net>\r
50         <1345427570-26518-8-git-send-email-jrollins@finestructure.net>\r
51         <1345427570-26518-9-git-send-email-jrollins@finestructure.net>\r
52 User-Agent: Notmuch/0.14+3~g608c52f (http://notmuchmail.org) Emacs/24.1.1\r
53         (x86_64-pc-linux-gnu)\r
54 Date: Fri, 31 Aug 2012 23:00:40 +0200\r
55 Message-ID: <877gseojyf.fsf@steelpick.2x.cz>\r
56 MIME-Version: 1.0\r
57 Content-Type: text/plain\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: Fri, 31 Aug 2012 21:00:48 -0000\r
71 \r
72 On Mon, Aug 20 2012, Jameson Graef Rollins wrote:\r
73 > This adds a "--include-recipients" option to notmuch search.  With\r
74 > structured output formats (e.g. json), a new recipients field will be\r
75 > included that holds recipients of the thread.  Matched and non-matched\r
76 > recipients are delineated as with authors.\r
77 >\r
78 > As mentioned in the previous patch for the underlying lib functions,\r
79 > the need for the option is because message recipients are not stored\r
80 > in the database and therefore retrieving them adds a significant\r
81 > overhead.  If they were included, this option would not be necessary.\r
82 > ---\r
83 >  lib/notmuch.h    |    6 +++++-\r
84 >  lib/query.cc     |    5 +++--\r
85 >  notmuch-search.c |   14 +++++++++++---\r
86 >  notmuch-show.c   |    2 +-\r
87 >  test/json        |    1 -\r
88 >  5 files changed, 20 insertions(+), 8 deletions(-)\r
89 >\r
90 > diff --git a/lib/notmuch.h b/lib/notmuch.h\r
91 > index f9e71c1..8eb455e 100644\r
92 > --- a/lib/notmuch.h\r
93 > +++ b/lib/notmuch.h\r
94 > @@ -642,6 +642,9 @@ notmuch_threads_valid (notmuch_threads_t *threads);\r
95 >  \r
96 >  /* Get the current thread from 'threads' as a notmuch_thread_t.\r
97 >   *\r
98 > + * If the include_recipients flag is TRUE, thread recipients will be\r
99 > + * included in the returned thread object.\r
100 > + *\r
101 >   * Note: The returned thread belongs to 'threads' and has a lifetime\r
102 >   * identical to it (and the query to which it belongs).\r
103 >   *\r
104 > @@ -652,7 +655,8 @@ notmuch_threads_valid (notmuch_threads_t *threads);\r
105 >   * NULL.\r
106 >   */\r
107 >  notmuch_thread_t *\r
108 > -notmuch_threads_get (notmuch_threads_t *threads);\r
109 > +notmuch_threads_get (notmuch_threads_t *threads,\r
110 > +                  notmuch_bool_t include_recipients);\r
111 \r
112 What about adding a new function notmuch_threds_get_with_recipients() to\r
113 not break public API? It would also make the sources more readable.\r
114 \r
115 -M.\r