Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 2c / 0c55fad0fb9c07b8093772eb5204c524853a42
1 Return-Path: <dkg@fifthhorseman.net>\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 ADF3E6DE0B38\r
6  for <notmuch@notmuchmail.org>; Fri, 22 Jan 2016 09:02:43 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.013\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.013 tagged_above=-999 required=5\r
12  tests=[AWL=-0.013] autolearn=disabled\r
13 Received: from arlo.cworth.org ([127.0.0.1])\r
14  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
15  with ESMTP id W4AgVm5pY6tx for <notmuch@notmuchmail.org>;\r
16  Fri, 22 Jan 2016 09:02:38 -0800 (PST)\r
17 Received: from che.mayfirst.org (che.mayfirst.org [209.234.253.108])\r
18  by arlo.cworth.org (Postfix) with ESMTP id 4C4F16DE0B2F\r
19  for <notmuch@notmuchmail.org>; Fri, 22 Jan 2016 09:02:38 -0800 (PST)\r
20 Received: from fifthhorseman.net (unknown [38.109.115.130])\r
21  by che.mayfirst.org (Postfix) with ESMTPSA id 000A3F984;\r
22  Fri, 22 Jan 2016 12:02:35 -0500 (EST)\r
23 Received: by fifthhorseman.net (Postfix, from userid 1000)\r
24  id 7376C20112; Fri, 22 Jan 2016 12:02:35 -0500 (EST)\r
25 From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
26 To: Antoine Amarilli <a3nm@a3nm.net>, notmuch@notmuchmail.org\r
27 Subject: Re: Searching messages by size with notmuch\r
28 In-Reply-To: <20160122151318.GA17099@mu.a3nm.net>\r
29 References: <20160122151318.GA17099@mu.a3nm.net>\r
30 User-Agent: Notmuch/0.21+67~g41ad7ff (http://notmuchmail.org) Emacs/24.5.1\r
31  (x86_64-pc-linux-gnu)\r
32 Date: Fri, 22 Jan 2016 12:02:35 -0500\r
33 Message-ID: <87twm5r1hw.fsf@alice.fifthhorseman.net>\r
34 MIME-Version: 1.0\r
35 Content-Type: multipart/mixed; boundary="=-=-="\r
36 X-BeenThere: notmuch@notmuchmail.org\r
37 X-Mailman-Version: 2.1.20\r
38 Precedence: list\r
39 List-Id: "Use and development of the notmuch mail system."\r
40  <notmuch.notmuchmail.org>\r
41 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
42  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
44 List-Post: <mailto:notmuch@notmuchmail.org>\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
46 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
47  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
48 X-List-Received-Date: Fri, 22 Jan 2016 17:02:43 -0000\r
49 \r
50 --=-=-=\r
51 Content-Type: text/plain\r
52 \r
53 On Fri 2016-01-22 10:13:18 -0500, Antoine Amarilli wrote:\r
54 \r
55 > After chatting on #notmuch, I wanted to suggest a feature which would be\r
56 > useful, at least to me: searching for messages by size.\r
57 >\r
58 > My use case would be to look for long messages, but dkg on IRC mentioned\r
59 > that it could also be useful to clean up messages to save disk space.\r
60 >\r
61 > It is unclear whether the size of a message should be defined as that of\r
62 > a single copy of the message, or that of all copies; and it is unclear\r
63 > whether it should be the total size (for my purposes I would have been\r
64 > interested in the size of the plaintext part of the message only).\r
65 \r
66 Note that "the plaintext part of the message" might mean the sum of\r
67 multiple plaintext parts too -- consider this message as an example:\r
68 \r
69 \r
70 --=-=-=\r
71 Content-Type: image/png\r
72 Content-Disposition: inline; filename=stock_smiley-7.png\r
73 Content-Transfer-Encoding: base64\r
74 \r
75 iVBORw0KGgoAAAANSU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UUHLUK/iRksYBDsslluKR80HsLUx6E6itbG6HZavHCoxS8Px66b\r
143 0d2+e+G2fbO9HwHt8lh7Sfn8dAFOzIFqCVIDGsAMsHHzutGrtm4YvWG4po2zxgbx2jHL5PgkI+Or\r
144 qQ9PkiQVVAPqHcZaMBFBlbTfoddp0uk22XukzwvtxHcGkXvuUO+7O/a2vwvsAo4AvdL6+TLrn1YO\r
145 LPUGW0LEJ4TTMLAKmAZmXnvW2BUbVtffUK/FZzaiENaMZJWhJFCLhOFazFC1Qpp7epmj7yD1EYcX\r
146 K66bJzbN/ZED89kTO/cuPOREDgFHgTlg8YSw8cuqkLwswAl9YOkBV3yCR5Z7YwwYAUaSxE5snBm5\r
147 eO1E9aKhip2OIjsWWzukxlRRdaLa8z50Uq9zR1vZ07sP9x7vZ24O6AKdUpZbfbnF/bFIPFkfOAFg\r
148 qR8sz4toGUx8Qp7US7DKMuglI5SHnseUyUtFByfEt1+m9JIIy4+4TgfgJCBmWXjZFcDMMsWPP6I8\r
149 XohkGYiuoOhy0VMpfkqAFUBOhGGZomaFayu9dAWRFa5xKsVPG+BlQJYDcYLSpwI48b2uNBFzmq//\r
150 AxyL7Nqf76KTAAAAAElFTkSuQmCC\r
151 --=-=-=\r
152 Content-Type: text/plain\r
153 \r
154 \r
155 Would you count the total of all related text/plain parts?  or all\r
156 text/* parts?  or, if you have a multipart/alternative node in the MIME\r
157 tree, would you report it as the maximum of any of the text/*\r
158 alternatives? \r
159 \r
160 if you're really interested in textual analysis, then the "size of\r
161 plaintext" might instead be better measured in words or paragraphs,\r
162 rather than octets.  Also, you might want to ignore quoted text and only\r
163 measure non-quoted text (this is particularly relevant for\r
164 conversations where people top-post and don't trim, or else you're\r
165 actually measuring just how deep in the thread a given message is).\r
166 \r
167 I'm not trying to say that these metrics are impossible, just pointing\r
168 out that the underlying data formats can be much more complicated than\r
169 most people think about with mail.  The decision about what to count and\r
170 how to count it greatly effects the possible use cases.\r
171 \r
172 > Ideally I'd say that all of these could make sense.\r
173 \r
174 They could indeed, but I think we could motivate this much better as\r
175 initial work by picking one particular use case, and implementing it.\r
176 The work would be something like:\r
177 \r
178  a) choose the metric we care about, and describe concretely how to\r
179     calculate it for a given rfc822 file.\r
180 \r
181  b) assign and name a new notmuch_value_t to to identify the metric\r
182 \r
183  c) update notmuch_database_add_message to insert that new value when a\r
184     file is added\r
185 \r
186  d) consider what workflows are available to update the database for\r
187     already-indexed documents that do not have this value.\r
188  \r
189  e) resolve what to do about documents associated with multiple filenames\r
190 \r
191  f) define how to include it in searches (this is probably a\r
192     NumberValueRangeProcessor, see\r
193     file:///usr/share/doc/xapian-doc/valueranges.html)\r
194 \r
195  g) update documentation for notmuch cli tools.\r
196 \r
197 \r
198 If you work through this process for one particular "message size" use\r
199 case and document the steps, then we could presumably handle the other\r
200 "message size" metrics in exactly the same way, modifying only steps (a)\r
201 and (e) depending on the metric.\r
202 \r
203 > Would anyone else on the list be interested by such a feature?\r
204 \r
205 I'm definitely interested, but don't have a lot of time to work on it.\r
206 \r
207     --dkg\r
208 \r
209 --=-=-=--\r