[PATCH 7/9] CLI: add properties to dump output
[notmuch-archives.git] / f9 / 73e9d66d827ee43099d3bbc620b5c97f5671b1
1 Return-Path: <zack@upsilon.cc>\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 CA217431FCB\r
6         for <notmuch@notmuchmail.org>; Sat, 24 Jan 2015 07:21:13 -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.338\r
10 X-Spam-Level: **\r
11 X-Spam-Status: No, score=2.338 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         DNS_FROM_AHBL_RHSBL=2.438] 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 Xh3bIB7Tl7dD for <notmuch@notmuchmail.org>;\r
17         Sat, 24 Jan 2015 07:21:10 -0800 (PST)\r
18 Received: from upsilon.cc (upsilon.cc [178.32.142.91])\r
19         by olra.theworths.org (Postfix) with ESMTP id 793A7431FAE\r
20         for <notmuch@notmuchmail.org>; Sat, 24 Jan 2015 07:21:10 -0800 (PST)\r
21 Received: from timira.takhisis.invalid (unknown [78.194.69.54])\r
22         by upsilon.cc (Postfix) with ESMTPSA id BA56B7A02F;\r
23         Sat, 24 Jan 2015 16:21:07 +0100 (CET)\r
24 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=upsilon.cc; s=mail;\r
25         t=1422112867; bh=NTzuPtBVt7rmQXLrvwjVuWW6uW1a8jway1HJPYBIl0o=;\r
26         h=Date:From:To:Cc:Subject:References:In-Reply-To:From;\r
27         b=BDq2DgvUSocQUWSdoAoEH49+GROx7pLEsoesdveS0l9aDDFdqqa9pwYDKEjCciBgO\r
28         1wHkGmv1tzuKEcEx2DLbwdwCa5wm7snLjnR4CEDzl7hOHMEoNqHiVPqQLwc7uLoKZK\r
29         Vu7o4HgNPbqD6QRQn1k/wOjoyrXmDy3594Uo67dY=\r
30 Received: by timira.takhisis.invalid (Postfix, from userid 1000)\r
31         id 7DF2A600E1; Sat, 24 Jan 2015 16:21:06 +0100 (CET)\r
32 Date: Sat, 24 Jan 2015 16:21:06 +0100\r
33 From: Stefano Zacchiroli <zack@upsilon.cc>\r
34 To: notmuch@notmuchmail.org\r
35 Subject: Re: [PATCH 2/3] notmuch-mutt: support for messages that lack\r
36         Message-ID      headers\r
37 Message-ID: <20150124152106.GA23037@upsilon.cc>\r
38 References: <1422090701-19385-1-git-send-email-zack@upsilon.cc>\r
39         <1422090701-19385-3-git-send-email-zack@upsilon.cc>\r
40         <871tmkql6j.fsf@nikula.org>\r
41 MIME-Version: 1.0\r
42 Content-Type: text/plain; charset=iso-8859-1\r
43 Content-Disposition: inline\r
44 Content-Transfer-Encoding: 8bit\r
45 In-Reply-To: <871tmkql6j.fsf@nikula.org>\r
46 User-Agent: Mutt/1.5.23 (2014-03-12)\r
47 Cc: "Jan N. Klug" <jan.n.klug@rub.de>\r
48 X-BeenThere: notmuch@notmuchmail.org\r
49 X-Mailman-Version: 2.1.13\r
50 Precedence: list\r
51 List-Id: "Use and development of the notmuch mail system."\r
52         <notmuch.notmuchmail.org>\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
56 List-Post: <mailto:notmuch@notmuchmail.org>\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
60 X-List-Received-Date: Sat, 24 Jan 2015 15:21:13 -0000\r
61 \r
62 First of all thanks for your feedback, Jani!\r
63 (both here, and the other day on IRC, of course)\r
64 \r
65 On Sat, Jan 24, 2015 at 04:59:16PM +0200, Jani Nikula wrote:\r
66 > On Sat, 24 Jan 2015, Stefano Zacchiroli <zack@upsilon.cc> wrote:\r
67 > >\r
68 > > For those messages, compute a synthetic Message-ID based on the SHA1\r
69 > > of the whole message, in the same way that notmuch would do. See:\r
70 > > http://git.notmuchmail.org/git/notmuch/blob/HEAD:/lib/sha1.c\r
71\r
72 > As I said on IRC, I think this is a notmuch implementation detail, and\r
73 > we don't make any promises about always generating missing message-ids\r
74 > the same way. That said, I don't see any reason why we'd change this\r
75 > anytime soon, so the solution is probably good enough for now.\r
76 \r
77 ACK. I've noted down the code URL in the patch for reference, and also\r
78 as a warning to keep an eye on.\r
79 \r
80 > > To do the above, rewrite get_message_id() to scan the current message\r
81 > > line by line, incrementally computing a SHA1. As a consequence, drop\r
82 > > the dependency on Mail::Internet.\r
83\r
84 > I am not so sure this is a good idea however, see below.\r
85 \r
86 So, fun part here is that I had initially made a similar comment to Jan.\r
87 Then got convinced to do as the current patch does to avoid loading full\r
88 messages (potentially with large attachments and the like) in memory.\r
89 \r
90 But I didn't think of header folding, and you're absolutely correct in\r
91 saying that might be a problem.\r
92 \r
93 I've just found out Mail::Header->new which I believe solves both\r
94 problems: avoid loading the full message into memory (it will only load\r
95 the headers) and proper parsing folded Message-IDs, without having to\r
96 use more complex regexp hackery.\r
97 \r
98 Jan: do you agree with using Mail::Header->new and fall back to\r
99 line-by-line hasing only in case Message-ID is not found? If so, having\r
100 an updated patch based on the one I've posted here would be awesome! If\r
101 you cannot do that just let me know and I'll get to it, eventually :).\r
102 \r
103 Cheers.\r
104 -- \r
105 Stefano Zacchiroli  . . . . . . .  zack@upsilon.cc . . . . o . . . o . o\r
106 Maître de conférences . . . . . http://upsilon.cc/zack . . . o . . . o o\r
107 Former Debian Project Leader  . . @zack on identi.ca . . o o o . . . o .\r
108 « the first rule of tautology club is the first rule of tautology club »\r