1 Return-Path: <tomi.ollila@iki.fi>
\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 165AB429E26
\r
6 for <notmuch@notmuchmail.org>; Mon, 3 Nov 2014 01:44:54 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 8qVqfRLDh-dj for <notmuch@notmuchmail.org>;
\r
16 Mon, 3 Nov 2014 01:44:46 -0800 (PST)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id CBB50431FAE
\r
19 for <notmuch@notmuchmail.org>; Mon, 3 Nov 2014 01:44:45 -0800 (PST)
\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])
\r
21 by guru.guru-group.fi (Postfix) with ESMTP id A0250100033;
\r
22 Mon, 3 Nov 2014 11:44:17 +0200 (EET)
\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
24 To: Michal Sojka <sojkam1@fel.cvut.cz>,
\r
25 Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org
\r
26 Subject: Re: [PATCH v6 6/7] cli: search: Add --output=count
\r
27 In-Reply-To: <b1fb8387-6ae4-4f9c-aee6-f4758f010751@email.android.com>
\r
28 References: <1414792441-29555-1-git-send-email-sojkam1@fel.cvut.cz>
\r
29 <1414792441-29555-7-git-send-email-sojkam1@fel.cvut.cz>
\r
30 <87r3xnu3dn.fsf@qmul.ac.uk> <87bnoqbexm.fsf@steelpick.2x.cz>
\r
31 <87d2963q87.fsf@qmul.ac.uk>
\r
32 <b1fb8387-6ae4-4f9c-aee6-f4758f010751@email.android.com>
\r
33 User-Agent: Notmuch/0.18.2+169~g5bcdd1c (http://notmuchmail.org) Emacs/24.3.1
\r
34 (x86_64-unknown-linux-gnu)
\r
35 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
36 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
37 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
38 Date: Mon, 03 Nov 2014 11:44:16 +0200
\r
39 Message-ID: <m2d2947h5b.fsf@guru.guru-group.fi>
\r
41 Content-Type: text/plain; charset=utf-8
\r
42 Content-Transfer-Encoding: quoted-printable
\r
43 X-BeenThere: notmuch@notmuchmail.org
\r
44 X-Mailman-Version: 2.1.13
\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, 03 Nov 2014 09:44:54 -0000
\r
57 On Sun, Nov 02 2014, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
\r
59 > On 2. listopadu 2014 10:29:28 CET, Mark Walters <markwalters1009@gmail.co=
\r
64 >>On Sun, 02 Nov 2014, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
\r
65 >>> On Sat, Nov 01 2014, Mark Walters wrote:
\r
66 >>>> On Fri, 31 Oct 2014, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
\r
67 >>>>> This output can be used with --output=3Drecipients or --output=3Dsend=
\r
69 >>>>> and in addition to the addresses, it prints how many times was each
\r
70 >>>>> address encountered during search.
\r
74 >>>> I have a couple comments on this patch.
\r
77 >>>>> completion/notmuch-completion.bash | 2 +-
\r
78 >>>>> completion/notmuch-completion.zsh | 2 +-
\r
79 >>>>> doc/man1/notmuch-search.rst | 9 +++++--
\r
80 >>>>> notmuch-search.c | 51
\r
81 >>++++++++++++++++++++++++++++++++------
\r
82 >>>>> 4 files changed, 52 insertions(+), 12 deletions(-)
\r
84 >>>>> diff --git a/completion/notmuch-completion.bash
\r
85 >>b/completion/notmuch-completion.bash
\r
86 >>>>> index cfbd389..39cd829 100644
\r
87 >>>>> --- a/completion/notmuch-completion.bash
\r
88 >>>>> +++ b/completion/notmuch-completion.bash
\r
89 >>>>> @@ -294,7 +294,7 @@ _notmuch_search()
\r
93 >>>>> - COMPREPLY=3D( $( compgen -W "summary threads messages files
\r
94 >>tags sender recipients" -- "${cur}" ) )
\r
95 >>>>> + COMPREPLY=3D( $( compgen -W "summary threads messages files
\r
96 >>tags sender recipients count" -- "${cur}" ) )
\r
100 >>>>> diff --git a/completion/notmuch-completion.zsh
\r
101 >>b/completion/notmuch-completion.zsh
\r
102 >>>>> index 3e52a00..d7e5a5e 100644
\r
103 >>>>> --- a/completion/notmuch-completion.zsh
\r
104 >>>>> +++ b/completion/notmuch-completion.zsh
\r
105 >>>>> @@ -53,7 +53,7 @@ _notmuch_search()
\r
106 >>>>> '--max-threads=3D[display only the first x threads from the
\r
107 >>search results]:number of threads to show: ' \
\r
108 >>>>> '--first=3D[omit the first x threads from the search
\r
109 >>results]:number of threads to omit: ' \
\r
110 >>>>> '--sort=3D[sort results]:sorting:((newest-first\:"reverse
\r
111 >>chronological order" oldest-first\:"chronological order"))' \
\r
112 >>>>> - '--output=3D[select what to output]:output:((summary threads
\r
113 >>messages files tags sender recipients))'
\r
114 >>>>> + '--output=3D[select what to output]:output:((summary threads
\r
115 >>messages files tags sender recipients count))'
\r
119 >>>>> diff --git a/doc/man1/notmuch-search.rst
\r
120 >>b/doc/man1/notmuch-search.rst
\r
121 >>>>> index 42f17e4..ec89200 100644
\r
122 >>>>> --- a/doc/man1/notmuch-search.rst
\r
123 >>>>> +++ b/doc/man1/notmuch-search.rst
\r
124 >>>>> @@ -96,9 +96,14 @@ Supported options for **search** include
\r
125 >>>>> Like **sender** but for addresses from *To*, *Cc* and
\r
126 >>>>> *Bcc* headers.
\r
129 >>>>> + Can be used in combination with **sender** or
\r
130 >>>>> + **recipients** to print the count of how many times was
\r
131 >>>>> + the address encountered during search.
\r
133 >>>>> This option can be given multiple times to combine different
\r
134 >>>>> - outputs. Currently, this is only supported for **sender** and
\r
135 >>>>> - **recipients** outputs.
\r
136 >>>>> + outputs. Currently, this is only supported for **sender**,
\r
137 >>>>> + **recipients** and **count** outputs.
\r
139 >>>> It might be worth saying that the results will be slower if count is
\r
142 >>> I wrote something like this in
\r
143 >>> id:1414889400-30977-10-git-send-email-sojkam1@fel.cvut.cz.
\r
146 >>>>> ``--sort=3D``\ (**newest-first**\ \|\ **oldest-first**)
\r
148 >>>> I think sort works as expected if count is not specified, but does
\r
150 >>>> with count.=20
\r
154 >>>> Maybe count can be done by doing two passes?=20
\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
162 > That's what the patch does. Only the second time it iterates the hash.
\r
166 And we loose the order ? (or not ?) do we have "orderedhash" there...
\r
167 I'd like to save the order (but that is not so important) -- but
\r
168 more importantly, are tests robusts --- ah there is sort -n in the test...
\r
177 > Odesl=C3=A1no z m=C3=A9ho telefonu pomoc=C3=AD Kaiten Mail. Omluvte pros=
\r
178 =C3=ADm mou stru=C4=8Dnost.
\r
179 > _______________________________________________
\r
180 > notmuch mailing list
\r
181 > notmuch@notmuchmail.org
\r
182 > http://notmuchmail.org/mailman/listinfo/notmuch
\r