Re: [PATCH] Fix typo in Message.maildir_flags_to_tags
[notmuch-archives.git] / 93 / df265d633902308e62b5e54e854d2546328abb
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 55F48431FD7\r
6         for <notmuch@notmuchmail.org>; Sun,  2 Nov 2014 01:35:05 -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: -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 WZ7WKQDkcHG3 for <notmuch@notmuchmail.org>;\r
16         Sun,  2 Nov 2014 01:34:58 -0800 (PST)\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 BA6A1431FAF\r
19         for <notmuch@notmuchmail.org>; Sun,  2 Nov 2014 01:34:57 -0800 (PST)\r
20 Received: from localhost (unknown [192.168.200.7])\r
21         by max.feld.cvut.cz (Postfix) with ESMTP id 9A79019F2F4D;\r
22         Sun,  2 Nov 2014 10:34:49 +0100 (CET)\r
23 X-Virus-Scanned: IMAP STYX AMAVIS\r
24 Received: from max.feld.cvut.cz ([192.168.200.1])\r
25         by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new,\r
26         port 10044)\r
27         with ESMTP id ta9Icm_g9ktY; Sun,  2 Nov 2014 10:34:44 +0100 (CET)\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 7035619F2F50;\r
30         Sun,  2 Nov 2014 10:34:43 +0100 (CET)\r
31 User-Agent: Kaiten Mail\r
32 In-Reply-To: <87d2963q87.fsf@qmul.ac.uk>\r
33 References: <1414792441-29555-1-git-send-email-sojkam1@fel.cvut.cz>\r
34         <1414792441-29555-7-git-send-email-sojkam1@fel.cvut.cz>\r
35         <87r3xnu3dn.fsf@qmul.ac.uk> <87bnoqbexm.fsf@steelpick.2x.cz>\r
36         <87d2963q87.fsf@qmul.ac.uk>\r
37 MIME-Version: 1.0\r
38 Content-Transfer-Encoding: 8bit\r
39 Content-Type: text/plain;\r
40  charset=UTF-8\r
41 Subject: Re: [PATCH v6 6/7] cli: search: Add --output=count\r
42 From: Michal Sojka <sojkam1@fel.cvut.cz>\r
43 Date: Sun, 02 Nov 2014 10:34:37 +0100\r
44 To: Mark Walters <markwalters1009@gmail.com>,notmuch@notmuchmail.org\r
45 Message-ID: <b1fb8387-6ae4-4f9c-aee6-f4758f010751@email.android.com>\r
46 X-BeenThere: notmuch@notmuchmail.org\r
47 X-Mailman-Version: 2.1.13\r
48 Precedence: list\r
49 List-Id: "Use and development of the notmuch mail system."\r
50         <notmuch.notmuchmail.org>\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
54 List-Post: <mailto:notmuch@notmuchmail.org>\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
58 X-List-Received-Date: Sun, 02 Nov 2014 09:35:05 -0000\r
59 \r
60 \r
61 \r
62 On 2. listopadu 2014 10:29:28 CET, Mark Walters <markwalters1009@gmail.com> wrote:\r
63 >\r
64 >Hi\r
65 >\r
66 >On Sun, 02 Nov 2014, Michal Sojka <sojkam1@fel.cvut.cz> wrote:\r
67 >> On Sat, Nov 01 2014, Mark Walters wrote:\r
68 >>> On Fri, 31 Oct 2014, Michal Sojka <sojkam1@fel.cvut.cz> wrote:\r
69 >>>> This output can be used with --output=recipients or --output=sender\r
70 >>>> and in addition to the addresses, it prints how many times was each\r
71 >>>> address encountered during search.\r
72 >>>\r
73 >>> Hi\r
74 >>>\r
75 >>> I have a couple comments on this patch.\r
76 >>>\r
77 >>>> ---\r
78 >>>>  completion/notmuch-completion.bash |  2 +-\r
79 >>>>  completion/notmuch-completion.zsh  |  2 +-\r
80 >>>>  doc/man1/notmuch-search.rst        |  9 +++++--\r
81 >>>>  notmuch-search.c                   | 51\r
82 >++++++++++++++++++++++++++++++++------\r
83 >>>>  4 files changed, 52 insertions(+), 12 deletions(-)\r
84 >>>>\r
85 >>>> diff --git a/completion/notmuch-completion.bash\r
86 >b/completion/notmuch-completion.bash\r
87 >>>> index cfbd389..39cd829 100644\r
88 >>>> --- a/completion/notmuch-completion.bash\r
89 >>>> +++ b/completion/notmuch-completion.bash\r
90 >>>> @@ -294,7 +294,7 @@ _notmuch_search()\r
91 >>>>        return\r
92 >>>>        ;;\r
93 >>>>    --output)\r
94 >>>> -      COMPREPLY=( $( compgen -W "summary threads messages files\r
95 >tags sender recipients" -- "${cur}" ) )\r
96 >>>> +      COMPREPLY=( $( compgen -W "summary threads messages files\r
97 >tags sender recipients count" -- "${cur}" ) )\r
98 >>>>        return\r
99 >>>>        ;;\r
100 >>>>    --sort)\r
101 >>>> diff --git a/completion/notmuch-completion.zsh\r
102 >b/completion/notmuch-completion.zsh\r
103 >>>> index 3e52a00..d7e5a5e 100644\r
104 >>>> --- a/completion/notmuch-completion.zsh\r
105 >>>> +++ b/completion/notmuch-completion.zsh\r
106 >>>> @@ -53,7 +53,7 @@ _notmuch_search()\r
107 >>>>      '--max-threads=[display only the first x threads from the\r
108 >search results]:number of threads to show: ' \\r
109 >>>>      '--first=[omit the first x threads from the search\r
110 >results]:number of threads to omit: ' \\r
111 >>>>      '--sort=[sort results]:sorting:((newest-first\:"reverse\r
112 >chronological order" oldest-first\:"chronological order"))' \\r
113 >>>> -    '--output=[select what to output]:output:((summary threads\r
114 >messages files tags sender recipients))'\r
115 >>>> +    '--output=[select what to output]:output:((summary threads\r
116 >messages files tags sender recipients count))'\r
117 >>>>  }\r
118 >>>>  \r
119 >>>>  _notmuch()\r
120 >>>> diff --git a/doc/man1/notmuch-search.rst\r
121 >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
127 >>>>        *Bcc* headers.\r
128 >>>>  \r
129 >>>> +  **count**\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
133 >>>> +\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
139 >>>\r
140 >>> It might be worth saying that the results will be slower if count is\r
141 >>> specified.\r
142 >>\r
143 >> I wrote something like this in\r
144 >> id:1414889400-30977-10-git-send-email-sojkam1@fel.cvut.cz.\r
145 >>\r
146 >>>\r
147 >>>>      ``--sort=``\ (**newest-first**\ \|\ **oldest-first**)\r
148 >>>\r
149 >>> I think sort works as expected if count is not specified, but does\r
150 >not\r
151 >>> with count. \r
152 >>\r
153 >> Agreed.\r
154 >>\r
155 >>> Maybe count can be done by doing two passes? \r
156 >>\r
157 >> What do you mean by pass?\r
158 >\r
159 >I mean iterating through the messages twice: so the first time would\r
160 >fill in the count in the hash map, and the second iteration would print\r
161 >the addresses.\r
162 \r
163 That's what the patch does. Only the second time it iterates the hash.\r
164 \r
165 Michal\r
166 \r
167 -- \r
168 Odesláno z mého telefonu pomocí Kaiten Mail. Omluvte prosím mou stručnost.\r