Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / e4 / 7b055d9cf4919f93e28cfd9aeadc435f5ceb77
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 A4A5D429E26\r
6         for <notmuch@notmuchmail.org>; Sat, 19 Nov 2011 10:55:52 -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: -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 jAbuzJRy3eys for <notmuch@notmuchmail.org>;\r
16         Sat, 19 Nov 2011 10:55:51 -0800 (PST)\r
17 Received: from dmz-mailsec-scanner-6.mit.edu (DMZ-MAILSEC-SCANNER-6.MIT.EDU\r
18         [18.7.68.35])\r
19         by olra.theworths.org (Postfix) with ESMTP id 79F35429E21\r
20         for <notmuch@notmuchmail.org>; Sat, 19 Nov 2011 10:55:51 -0800 (PST)\r
21 X-AuditID: 12074423-b7f266d0000008b8-ee-4ec7fbb61b95\r
22 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
23         by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 0D.A8.02232.6BBF7CE4; Sat, 19 Nov 2011 13:55:50 -0500 (EST)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id pAJItni5016446; \r
27         Sat, 19 Nov 2011 13:55:50 -0500\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 pAJItlbZ010619\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Sat, 19 Nov 2011 13:55:48 -0500 (EST)\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 1RRq7G-0008T9-E1; Sat, 19 Nov 2011 13:58:18 -0500\r
37 Date: Sat, 19 Nov 2011 13:58:18 -0500\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
40 Subject: Re: [PATCH] Output unmodified Content-Type header value for JSON\r
41         format.\r
42 Message-ID: <20111119185818.GR9351@mit.edu>\r
43 References: <1321659905-24367-1-git-send-email-dmitry.kurochkin@gmail.com>\r
44         <87fwhkyisj.fsf@servo.finestructure.net> <87wrawq1dz.fsf@gmail.com>\r
45         <20111119045957.GQ9351@mit.edu> <87ty60pts9.fsf@gmail.com>\r
46 MIME-Version: 1.0\r
47 Content-Type: text/plain; charset=us-ascii\r
48 Content-Disposition: inline\r
49 In-Reply-To: <87ty60pts9.fsf@gmail.com>\r
50 User-Agent: Mutt/1.5.21 (2010-09-15)\r
51 X-Brightmail-Tracker:\r
52  H4sIAAAAAAAAA+NgFupmleLIzCtJLcpLzFFi42IRYrdT0d32+7ifQd99bourW/vZLfbs87K4\r
53         fnMmswOzx93TXB47Z91l93i26hZzAHMUl01Kak5mWWqRvl0CV8bF65oFh6Urtu6cyNzAuE60\r
54         i5GTQ0LARGLSpC/sELaYxIV769m6GLk4hAT2MUrMOfUFytnAKHHhyg12COckk8Sn9/OgnCWM\r
55         Ekt3XWTpYuTgYBFQlehbKgMyik1AQ2Lb/uWMILaIgKHErYuvmEFsZoEIiSkzPjKB2MICwRIv\r
56         l7WD2bwC2hJLm1qhtl1klDhw+i0jREJQ4uTMJywQzVoSN/69ZALZxSwgLbH8HwdImFNAXWLV\r
57         8XVgJaICKhJTTm5jm8AoNAtJ9ywk3bMQuhcwMq9ilE3JrdLNTczMKU5N1i1OTszLSy3SNdPL\r
58         zSzRS00p3cQIDnMX5R2Mfw4qHWIU4GBU4uEtnHHMT4g1say4MvcQoyQHk5Io74qfx/2E+JLy\r
59         UyozEosz4otKc1KLDzFKcDArifBeWAeU401JrKxKLcqHSUlzsCiJ88rsdPATEkhPLEnNTk0t\r
60         SC2CycpwcChJ8D77BtQoWJSanlqRlplTgpBm4uAEGc4DNNz1N8jw4oLE3OLMdIj8KUZFKXFe\r
61         HZCEAEgiozQPrheWhl4xigO9Isx7GWQFDzCFwXW/AhrMBDQ4d88RkMEliQgpqQbGiWpvNnjx\r
62         c932fH0/6WwLg072m14uS8bodw8cdA+avPJzfJf9TuAqg8qhyXvO/+vtnLFAuUtQxffa/cB1\r
63         3t5Wb0S5e7KuLL8kLFv+RmaTrk3jDkUDyc0Hgi/MLlLoijRjnbPWUeiVy5pqb1W5H9frTDP6\r
64         Pz7fGbtxihr3Odtbj07XHDnIU79NiaU4I9FQi7moOBEAiubs+h4DAAA=\r
65 Cc: notmuch@notmuchmail.org\r
66 X-BeenThere: notmuch@notmuchmail.org\r
67 X-Mailman-Version: 2.1.13\r
68 Precedence: list\r
69 List-Id: "Use and development of the notmuch mail system."\r
70         <notmuch.notmuchmail.org>\r
71 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
72         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
73 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
74 List-Post: <mailto:notmuch@notmuchmail.org>\r
75 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
76 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
77         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
78 X-List-Received-Date: Sat, 19 Nov 2011 18:55:52 -0000\r
79 \r
80 Quoth Dmitry Kurochkin on Nov 19 at  9:26 am:\r
81 > On Fri, 18 Nov 2011 23:59:57 -0500, Austin Clements <amdragon@MIT.EDU> wrote:\r
82 > > Quoth Dmitry Kurochkin on Nov 19 at  6:42 am:\r
83 > > > Hi Jamie.\r
84 > > > \r
85 > > > On Fri, 18 Nov 2011 17:58:52 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:\r
86 > > > > On Sat, 19 Nov 2011 03:45:05 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:\r
87 > > > > > Before the change, notmuch used g_mime_content_type_to_string(3)\r
88 > > > > > function to output Content-Type header value.  Turns out it outputs\r
89 > > > > > only "type/subtype" part and ignores all parameters.  Also, if there\r
90 > > > > > is no Content-Type header, default "text/plain" value is used.\r
91 > > > > \r
92 > > > > Hi, Dmitry.  Can you explain under what circumstances you would need the\r
93 > > > > extra content-type parameters?\r
94 > > > \r
95 > > > Charset is an example of a parameter which you need to render a part\r
96 > > > correctly.\r
97 > > \r
98 > > Can notmuch convert to a common charset, given that, otherwise, every\r
99 > > client is going to have to implement this conversion anyway?\r
100 > > \r
101\r
102 > Notmuch can handle charset (and any other) parameters but only for known\r
103 > media types (i.e. text/*).  I think it would be useful (especially for\r
104 > human-readable output formats).  But it is a separate issue.\r
105\r
106 > Notmuch can not convert other types it does not know how to handle.\r
107 > E.g. HTML charset conversion is not as simple as for plain text.\r
108\r
109 > AFAIK standard defines charset parameter just for few types.  So in\r
110 > general, charset parameter can have any meaning for some custom media\r
111 > type.\r
112 \r
113 Interesting.  I hadn't realized the content-type specification was so\r
114 open-ended.  However, there are many things that *could* be included\r
115 in the JSON format but aren't; what's included is primarily driven by\r
116 what consumers actually need and it seems like the actual need here is\r
117 charset handling.  Maybe the JSON format *shouldn't* evolve this way,\r
118 but I think it should either be driven by its needs like it is now, or\r
119 we should be taking bigger steps like providing *all* of the headers\r
120 (essentially, a JSON-ification of the MIME structure), which would\r
121 subsume more specific generalizations like exposing just the full\r
122 content-type header.\r
123 \r
124 Regarding charset, specifically, though, the JSON format only includes\r
125 part bodies for text/* types and, according to RFC 2045,\r
126 \r
127   For example, the "charset" parameter is applicable to any subtype of\r
128   "text", ...\r
129 \r
130 Section 4.1.2 (Charset Parameter) of RFC 2046 beats around the bush,\r
131 but I think it's saying essentially the same thing in a lot more\r
132 detail.  Given that, I think it does make sense for notmuch to handle\r
133 the charset parameter and re-coding.\r
134 \r
135 > > (And are there other examples of useful things in the content type?)\r
136\r
137 > What is meant by useful?  All parameters do have some use.  The fact\r
138 > that notmuch does not handle them does not mean they are useless.  And\r
139 > notmuch can not handle all parameters just because the list of\r
140 > parameters is not defined.  So there is no choice but to let notmuch\r
141 > users see and use these parameters.\r
142 \r
143 Yes, I now agree with this, modulo my statements about generality above.\r
144 \r
145 > Regards,\r
146 >   Dmitry\r
147\r
148 \r
149 -- \r
150 Austin Clements                                      MIT/'06/PhD/CSAIL\r
151 amdragon@mit.edu                           http://web.mit.edu/amdragon\r
152        Somewhere in the dream we call reality you will find me,\r
153               searching for the reality we call dreams.\r