[PATCH v2 03/14] cli/reply: reuse show_reply_headers() in headers-only format
[notmuch-archives.git] / 06 / bba3d8771208daa63d6aeec43cf75cd7108cf7
1 Return-Path: <amdragon@mit.edu>\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 8C27B431FAF\r
6         for <notmuch@notmuchmail.org>; Thu,  5 Jul 2012 08:18:26 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 Y1bLOMDW8Jid for <notmuch@notmuchmail.org>;\r
16         Thu,  5 Jul 2012 08:18:26 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-2.mit.edu (DMZ-MAILSEC-SCANNER-2.MIT.EDU\r
18         [18.9.25.13])\r
19         by olra.theworths.org (Postfix) with ESMTP id DEC08431FAE\r
20         for <notmuch@notmuchmail.org>; Thu,  5 Jul 2012 08:18:25 -0700 (PDT)\r
21 X-AuditID: 1209190d-b7fd56d000000933-20-4ff5b03f613f\r
22 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
23         by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 73.C1.02355.F30B5FF4; Thu,  5 Jul 2012 11:18:23 -0400 (EDT)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q65FIMRd030477; \r
27         Thu, 5 Jul 2012 11:18:23 -0400\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
29         (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q65FILNf007444\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Thu, 5 Jul 2012 11:18:22 -0400 (EDT)\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1Smnoz-0003df-BI; Thu, 05 Jul 2012 11:18:21 -0400\r
37 Date: Thu, 5 Jul 2012 11:18:21 -0400\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Mark Walters <markwalters1009@gmail.com>\r
40 Subject: Re: [PATCH 2/3] show: output Reply-To headers\r
41 Message-ID: <20120705151821.GF21653@mit.edu>\r
42 References: <1340508470-16606-1-git-send-email-novalazy@gmail.com>\r
43         <1340508470-16606-2-git-send-email-novalazy@gmail.com>\r
44         <87vci471tw.fsf@servo.finestructure.net>\r
45         <20120704115951.GC2342@hili.localdomain>\r
46         <87pq8c6zad.fsf@servo.finestructure.net>\r
47         <20120704182459.GI2342@hili.localdomain>\r
48         <87vci2egr4.fsf@qmul.ac.uk>\r
49 MIME-Version: 1.0\r
50 Content-Type: text/plain; charset=us-ascii\r
51 Content-Disposition: inline\r
52 In-Reply-To: <87vci2egr4.fsf@qmul.ac.uk>\r
53 User-Agent: Mutt/1.5.21 (2010-09-15)\r
54 X-Brightmail-Tracker:\r
55  H4sIAAAAAAAAA+NgFprNKsWRmVeSWpSXmKPExsUixCmqrWu/4au/QfchQ4s9+7wsVs/lsbh+\r
56         cyazxfPWvUwOLB53T3N57Jx1l93j2apbzAHMUVw2Kak5mWWpRfp2CVwZV7dnFuwVqbg0pZG5\r
57         gXGBQBcjJ4eEgIlE/6wpTBC2mMSFe+vZuhi5OIQE9jFKHF1+kBkkISSwnlHi9eMEiMQJJolj\r
58         Nx+yQDhLGCU6D9xiA6liEVCRWLK5AayDTUBDYtv+5YwgtoiAjsTtQwvYQRqYBZoYJVZsPsgC\r
59         khAWMJO4OruNFcTmBSr63nmXCWLqUSaJhe/XMEIkBCVOznwC1sAsoCVx499LoCIOIFtaYvk/\r
60         DhCTE2jZi7miIBWiQDdMObmNbQKj0CwkzbOQNM9CaF7AyLyKUTYlt0o3NzEzpzg1Wbc4OTEv\r
61         L7VI10gvN7NELzWldBMjONwleXcwvjuodIhRgINRiYfXKPeLvxBrYllxZe4hRkkOJiVR3k3r\r
62         vvoL8SXlp1RmJBZnxBeV5qQWH2KU4GBWEuHtzQDK8aYkVlalFuXDpKQ5WJTEea+k3PQXEkhP\r
63         LEnNTk0tSC2CycpwcChJ8G5fD9QoWJSanlqRlplTgpBm4uAEGc4DNLwJpIa3uCAxtzgzHSJ/\r
64         ilGXY92bIzcYhVjy8vNSpcR520GKBECKMkrz4ObA0tQrRnGgt4R5m0GqeIApDm7SK6AlTEBL\r
65         8hZ/AllSkoiQkmpgtPkfv709oGJfwjzOpt5JvVwRxnZOF56tC972gUMpxtGn/+nTKcYLrqp7\r
66         LT84k6XN101xx/988ZlHO1ha7HuMN7z7n3ZbY5rqxY9x9Tv2p0fuf8rklGN3T6ak7VGA1bJV\r
67         /curjVjNuTW2ZrFcX+bwLPjVrYDs2fds5wo6xfVedVnkuSxmikq3EktxRqKhFnNRcSIAMMI2\r
68         Yy4DAAA=\r
69 Cc: notmuch@notmuchmail.org\r
70 X-BeenThere: notmuch@notmuchmail.org\r
71 X-Mailman-Version: 2.1.13\r
72 Precedence: list\r
73 List-Id: "Use and development of the notmuch mail system."\r
74         <notmuch.notmuchmail.org>\r
75 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
76         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
77 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
78 List-Post: <mailto:notmuch@notmuchmail.org>\r
79 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
80 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
81         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
82 X-List-Received-Date: Thu, 05 Jul 2012 15:18:26 -0000\r
83 \r
84 Quoth Mark Walters on Jul 05 at  9:47 am:\r
85 > On Wed, 04 Jul 2012, Peter Wang <novalazy@gmail.com> wrote:\r
86 > > On Tue, 03 Jul 2012 19:22:18 -0700, Jameson Graef Rollins <jrollins@finestructure.net> wrote:\r
87 > >> On Tue, Jul 03 2012, Peter Wang <novalazy@gmail.com> wrote:\r
88 > >> > I want to see what the sender intended, before hitting reply.\r
89 > >> \r
90 > >> Given that there have been requests to see a lot of other headers as\r
91 > >> well, we probably need to have a discussion about which ones are worth\r
92 > >> of emitting, and how we give the user some more general control to see\r
93 > >> the ones they want.  Either that or we just emit them all?\r
94 > >\r
95 > > If we start with the obvious:\r
96 > >\r
97 > >   notmuch show --output-headers=date,from,subject,to,cc,reply-to ...\r
98 > >\r
99 > > with the default being the current set.\r
100 > >\r
101 > > Emitting everything would be easier but seems wasteful.  I just looked\r
102 > > at a random message: in RFC822 syntax the header is 4073 bytes, and the\r
103 > > body is 1116 bytes.  Keeping only the fields that notmuch emits reduces\r
104 > > the header to 295 bytes.  Reply-To is 92 bytes, but not every message\r
105 > > has that.\r
106\r
107 > I wonder if it would make sense for this option to be combined with\r
108 > something like\r
109 > id:"1341041595-5858-1-git-send-email-markwalters1009@gmail.com" which\r
110 > chooses whether to output the body of the message or not.\r
111\r
112 > Maybe something like --output=short|medium|full\r
113 > with short being just the brief headers, medium being the current\r
114 > default of brief headers and text bodies, and full being message with\r
115 > all headers.\r
116\r
117 > I am not sure I like it (as someone will want full headers and no\r
118 > bodies!) but we don't want the command line to get too cluttered.\r
119 \r
120 This option seems like the type of thing that would be used primarily\r
121 by frontends, so it matters much more that they have control over the\r
122 output than that the command line is terse.  We should provide\r
123 reasonable defaults for the occasional flesh and blood call to the\r
124 CLI, but I don't think we need to cater to that use.\r
125 \r
126 > Another possibility for this particular choice: could a list of wanted\r
127 > headers be included in the config file? Since I think you want it for\r
128 > "user wants to see it" reasons rather than "program needs it to do\r
129 > something" reasons that might make sense.\r
130 \r
131 This would make a lot of sense in the frontend configuration (so much\r
132 so that we already have it!  But it's currently limited to removing\r
133 headers).  Also, if it's in the notmuch configuration, then when\r
134 programs do need the headers to do something, it becomes very\r
135 difficult to request what they need.\r