1 Return-Path: <m.walters@qmul.ac.uk>
\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 0D57D431FD7
\r
6 for <notmuch@notmuchmail.org>; Sun, 2 Nov 2014 01:29:47 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5
\r
12 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,
\r
13 NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 SyS4H+buG9+z for <notmuch@notmuchmail.org>;
\r
17 Sun, 2 Nov 2014 01:29:39 -0800 (PST)
\r
18 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])
\r
19 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 778FA431FAF
\r
22 for <notmuch@notmuchmail.org>; Sun, 2 Nov 2014 01:29:39 -0800 (PST)
\r
23 Received: from smtp.qmul.ac.uk ([138.37.6.40])
\r
24 by mail2.qmul.ac.uk with esmtp (Exim 4.71)
\r
25 (envelope-from <m.walters@qmul.ac.uk>)
\r
26 id 1XkrTX-0004SS-E6; Sun, 02 Nov 2014 09:29:37 +0000
\r
27 Received: from 5751dfa2.skybroadband.com ([87.81.223.162] helo=localhost)
\r
28 by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71)
\r
29 (envelope-from <m.walters@qmul.ac.uk>)
\r
30 id 1XkrTW-0006nm-RN; Sun, 02 Nov 2014 09:29:31 +0000
\r
31 From: Mark Walters <markwalters1009@gmail.com>
\r
32 To: Michal Sojka <sojkam1@fel.cvut.cz>, notmuch@notmuchmail.org
\r
33 Subject: Re: [PATCH v6 6/7] cli: search: Add --output=count
\r
34 In-Reply-To: <87bnoqbexm.fsf@steelpick.2x.cz>
\r
35 References: <1414792441-29555-1-git-send-email-sojkam1@fel.cvut.cz>
\r
36 <1414792441-29555-7-git-send-email-sojkam1@fel.cvut.cz>
\r
37 <87r3xnu3dn.fsf@qmul.ac.uk> <87bnoqbexm.fsf@steelpick.2x.cz>
\r
38 User-Agent: Notmuch/0.18.1+86~gef5e66a (http://notmuchmail.org) Emacs/23.4.1
\r
39 (x86_64-pc-linux-gnu)
\r
40 Date: Sun, 02 Nov 2014 09:29:28 +0000
\r
41 Message-ID: <87d2963q87.fsf@qmul.ac.uk>
\r
43 Content-Type: text/plain; charset=us-ascii
\r
44 X-Sender-Host-Address: 87.81.223.162
\r
45 X-QM-Geographic: According to ripencc,
\r
46 this message was delivered by a machine in Britain (UK) (GB).
\r
47 X-QM-SPAM-Info: Sender has good ham record. :)
\r
48 X-QM-Body-MD5: fff3332d8322b566dca8b716cdc10c85 (of first 20000 bytes)
\r
49 X-SpamAssassin-Score: -0.1
\r
50 X-SpamAssassin-SpamBar: /
\r
51 X-SpamAssassin-Report: The QM spam filters have analysed this message to
\r
53 spam. We require at least 5.0 points to mark a message as spam.
\r
54 This message scored -0.1 points.
\r
55 Summary of the scoring:
\r
56 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
\r
57 provider * (markwalters1009[at]gmail.com)
\r
58 * -0.1 AWL AWL: From: address is in the auto white-list
\r
59 X-QM-Scan-Virus: ClamAV says the message is clean
\r
60 X-BeenThere: notmuch@notmuchmail.org
\r
61 X-Mailman-Version: 2.1.13
\r
63 List-Id: "Use and development of the notmuch mail system."
\r
64 <notmuch.notmuchmail.org>
\r
65 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
66 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
67 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
68 List-Post: <mailto:notmuch@notmuchmail.org>
\r
69 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
70 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
71 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
72 X-List-Received-Date: Sun, 02 Nov 2014 09:29:47 -0000
\r
77 On Sun, 02 Nov 2014, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
\r
78 > On Sat, Nov 01 2014, Mark Walters wrote:
\r
79 >> On Fri, 31 Oct 2014, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
\r
80 >>> This output can be used with --output=recipients or --output=sender
\r
81 >>> and in addition to the addresses, it prints how many times was each
\r
82 >>> address encountered during search.
\r
86 >> I have a couple comments on this patch.
\r
89 >>> completion/notmuch-completion.bash | 2 +-
\r
90 >>> completion/notmuch-completion.zsh | 2 +-
\r
91 >>> doc/man1/notmuch-search.rst | 9 +++++--
\r
92 >>> notmuch-search.c | 51 ++++++++++++++++++++++++++++++++------
\r
93 >>> 4 files changed, 52 insertions(+), 12 deletions(-)
\r
95 >>> diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash
\r
96 >>> index cfbd389..39cd829 100644
\r
97 >>> --- a/completion/notmuch-completion.bash
\r
98 >>> +++ b/completion/notmuch-completion.bash
\r
99 >>> @@ -294,7 +294,7 @@ _notmuch_search()
\r
103 >>> - COMPREPLY=( $( compgen -W "summary threads messages files tags sender recipients" -- "${cur}" ) )
\r
104 >>> + COMPREPLY=( $( compgen -W "summary threads messages files tags sender recipients count" -- "${cur}" ) )
\r
108 >>> diff --git a/completion/notmuch-completion.zsh b/completion/notmuch-completion.zsh
\r
109 >>> index 3e52a00..d7e5a5e 100644
\r
110 >>> --- a/completion/notmuch-completion.zsh
\r
111 >>> +++ b/completion/notmuch-completion.zsh
\r
112 >>> @@ -53,7 +53,7 @@ _notmuch_search()
\r
113 >>> '--max-threads=[display only the first x threads from the search results]:number of threads to show: ' \
\r
114 >>> '--first=[omit the first x threads from the search results]:number of threads to omit: ' \
\r
115 >>> '--sort=[sort results]:sorting:((newest-first\:"reverse chronological order" oldest-first\:"chronological order"))' \
\r
116 >>> - '--output=[select what to output]:output:((summary threads messages files tags sender recipients))'
\r
117 >>> + '--output=[select what to output]:output:((summary threads messages files tags sender recipients count))'
\r
121 >>> diff --git a/doc/man1/notmuch-search.rst b/doc/man1/notmuch-search.rst
\r
122 >>> index 42f17e4..ec89200 100644
\r
123 >>> --- a/doc/man1/notmuch-search.rst
\r
124 >>> +++ b/doc/man1/notmuch-search.rst
\r
125 >>> @@ -96,9 +96,14 @@ Supported options for **search** include
\r
126 >>> Like **sender** but for addresses from *To*, *Cc* and
\r
130 >>> + Can be used in combination with **sender** or
\r
131 >>> + **recipients** to print the count of how many times was
\r
132 >>> + the address encountered during search.
\r
134 >>> This option can be given multiple times to combine different
\r
135 >>> - outputs. Currently, this is only supported for **sender** and
\r
136 >>> - **recipients** outputs.
\r
137 >>> + outputs. Currently, this is only supported for **sender**,
\r
138 >>> + **recipients** and **count** outputs.
\r
140 >> It might be worth saying that the results will be slower if count is
\r
143 > I wrote something like this in
\r
144 > id:1414889400-30977-10-git-send-email-sojkam1@fel.cvut.cz.
\r
147 >>> ``--sort=``\ (**newest-first**\ \|\ **oldest-first**)
\r
149 >> I think sort works as expected if count is not specified, but does not
\r
154 >> Maybe count can be done by doing two passes?
\r
156 > What do you mean by pass?
\r
158 I mean iterating through the messages twice: so the first time would
\r
159 fill in the count in the hash map, and the second iteration would print
\r
168 >> If it is difficult it might be sufficient to just document that sort
\r
171 > I'd do it this way :)
\r