Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 2c / 5a0a3df86cff2699da66442856480ff762d393
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 148EB431FAF\r
6         for <notmuch@notmuchmail.org>; Tue, 10 Sep 2013 19:03:05 -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 bmokPi2Za+JQ for <notmuch@notmuchmail.org>;\r
16         Tue, 10 Sep 2013 19:02:57 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-3.mit.edu (dmz-mailsec-scanner-3.mit.edu\r
18         [18.9.25.14])\r
19         by olra.theworths.org (Postfix) with ESMTP id 308D4431FAE\r
20         for <notmuch@notmuchmail.org>; Tue, 10 Sep 2013 19:02:57 -0700 (PDT)\r
21 X-AuditID: 1209190e-b7f988e0000009a7-b9-522fcf4f6bb2\r
22 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
23         by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 5E.4F.02471.F4FCF225; Tue, 10 Sep 2013 22:02:55 -0400 (EDT)\r
25 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
26         by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id r8B22rLY020427; \r
27         Tue, 10 Sep 2013 22:02:54 -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.8/8.12.4) with ESMTP id r8B22qpM006425\r
32         (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
33         Tue, 10 Sep 2013 22:02:53 -0400\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1VJZlY-0001Wd-NT; Tue, 10 Sep 2013 22:02:50 -0400\r
37 From: Austin Clements <amdragon@MIT.EDU>\r
38 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
39 Subject: Re: [PATCH] lib/cli: pass GMIME_ENABLE_RFC2047_WORKAROUNDS to\r
40         g_mime_init()\r
41 In-Reply-To: <1378839078-6298-1-git-send-email-jani@nikula.org>\r
42 References: <1378839078-6298-1-git-send-email-jani@nikula.org>\r
43 User-Agent: Notmuch/0.16+37~g9701e9c (http://notmuchmail.org) Emacs/23.4.1\r
44         (i486-pc-linux-gnu)\r
45 Date: Tue, 10 Sep 2013 22:02:47 -0400\r
46 Message-ID: <8738pcjet4.fsf@awakening.csail.mit.edu>\r
47 MIME-Version: 1.0\r
48 Content-Type: text/plain; charset=us-ascii\r
49 X-Brightmail-Tracker:\r
50  H4sIAAAAAAAAA+NgFnrAIsWRmVeSWpSXmKPExsUixCmqret/Xj/IYO9kHoum6c4W12/OZHZg\r
51         8rh1/zW7x7NVt5gDmKK4bFJSczLLUov07RK4MqZOvcNUcFqi4vGikywNjFeFuxg5OSQETCQu\r
52         nrzPCGGLSVy4t54NxBYS2McocXgadxcjF5C9kVGi6/YjZgjnNJPEojuv2SGcJYwSrw8vZQdp\r
53         YRPQkNi2fznYKBEBK4lzD1+zgNjCAiESy96sYgWxOQXsJRY332GBWGEnMfXLCmYQW1QgTuJa\r
54         50KwOIuAqsS7/ZfA4rxA532cMJ8NwhaUODnzCVgNs4CWxI1/L5kmMArMQpKahSS1gJFpFaNs\r
55         Sm6Vbm5iZk5xarJucXJiXl5qka6xXm5miV5qSukmRnBASvLtYPx6UOkQowAHoxIPr4GifpAQ\r
56         a2JZcWXuIUZJDiYlUV7nk0AhvqT8lMqMxOKM+KLSnNTiQ4wSHMxKIrxTnYByvCmJlVWpRfkw\r
57         KWkOFiVx3vUgKYH0xJLU7NTUgtQimKwMB4eSBG/EOaCsYFFqempFWmZOCUKaiYMTZDgP0PCF\r
58         Z0GGFxck5hZnpkPkTzEqSonzqoE0C4AkMkrz4HphCeMVozjQK8K8miBVPMBkA9f9CmgwE9Dg\r
59         775gg0sSEVJSDYwq6anZhwPEI9be3GZ/+uq/sujyi6/WPny1xPDU6cZZwq+9FrWbcRe//v77\r
60         1lzRhMDMxW8vLvjVzy1q3/v56YybF03La9ueM+yQNjKUllmyN9Ti2cwXx5elC1ocbUhnEVDM\r
61         V39x44/39a0N/sLXL73asTpOTDO35OH1A0Jd+5oYl9+bk/3cWTNbiaU4I9FQi7moOBEAJiI+\r
62         cvMCAAA=\r
63 X-BeenThere: notmuch@notmuchmail.org\r
64 X-Mailman-Version: 2.1.13\r
65 Precedence: list\r
66 List-Id: "Use and development of the notmuch mail system."\r
67         <notmuch.notmuchmail.org>\r
68 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
70 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
71 List-Post: <mailto:notmuch@notmuchmail.org>\r
72 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
73 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
74         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
75 X-List-Received-Date: Wed, 11 Sep 2013 02:03:05 -0000\r
76 \r
77 LGTM in principle, though I'd like to see a test of some of the\r
78 malformed RFC 2047 that this lets us decode.  Is there a summary\r
79 somewhere of exactly what these workarounds enable?\r
80 \r
81 This isn't directly related to this patch, but is there a reason we\r
82 g_mime_init in so many different places?  Both the CLI and\r
83 notmuch_database_open I can understand because the CLI also uses GMime\r
84 and should be sure it's initialized.  Maaaybe\r
85 notmuch_message_file_get_header because notmuch_message_file\r
86 theoretically independent of the database, even though I don't think\r
87 it's possible to call into it without first calling\r
88 notmuch_database_open.  But _notmuch_message_index_file?\r
89 \r
90 On Tue, 10 Sep 2013, Jani Nikula <jani@nikula.org> wrote:\r
91 > As explained by Jeffrey Stedfast, the author of GMime, quoted in [1]:\r
92 >\r
93 >> Passing the GMIME_ENABLE_RFC2047_WORKAROUNDS flag to g_mime_init()\r
94 >> *should* solve the decoding problem mentioned in the thread. This\r
95 >> flag should be safe to pass into g_mime_init() without any bad side\r
96 >> effects and my unit tests do test that code-path.\r
97 >\r
98 > The thread being referred to is [2].\r
99 >\r
100 > [1] id:87bo56viyo.fsf@nikula.org\r
101 > [2] id:08cb1dcd-c5db-4e33-8b09-7730cb3d59a2@gmail.com\r
102 > ---\r
103 >  lib/database.cc    | 2 +-\r
104 >  lib/index.cc       | 2 +-\r
105 >  lib/message-file.c | 2 +-\r
106 >  notmuch.c          | 2 +-\r
107 >  4 files changed, 4 insertions(+), 4 deletions(-)\r
108 >\r
109 > diff --git a/lib/database.cc b/lib/database.cc\r
110 > index 5cc0765..bb4f180 100644\r
111 > --- a/lib/database.cc\r
112 > +++ b/lib/database.cc\r
113 > @@ -655,7 +655,7 @@ notmuch_database_open (const char *path,\r
114 >  \r
115 >      /* Initialize gmime */\r
116 >      if (! initialized) {\r
117 > -     g_mime_init (0);\r
118 > +     g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS);\r
119 >       initialized = 1;\r
120 >      }\r
121 >  \r
122 > diff --git a/lib/index.cc b/lib/index.cc\r
123 > index a2edd6d..78c18cf 100644\r
124 > --- a/lib/index.cc\r
125 > +++ b/lib/index.cc\r
126 > @@ -440,7 +440,7 @@ _notmuch_message_index_file (notmuch_message_t *message,\r
127 >      static bool mbox_warning = false;\r
128 >  \r
129 >      if (! initialized) {\r
130 > -     g_mime_init (0);\r
131 > +     g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS);\r
132 >       initialized = 1;\r
133 >      }\r
134 >  \r
135 > diff --git a/lib/message-file.c b/lib/message-file.c\r
136 > index 4d9af89..a2850c2 100644\r
137 > --- a/lib/message-file.c\r
138 > +++ b/lib/message-file.c\r
139 > @@ -228,7 +228,7 @@ notmuch_message_file_get_header (notmuch_message_file_t *message,\r
140 >      is_received = (strcmp(header_desired,"received") == 0);\r
141 >  \r
142 >      if (! initialized) {\r
143 > -     g_mime_init (0);\r
144 > +     g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS);\r
145 >       initialized = 1;\r
146 >      }\r
147 >  \r
148 > diff --git a/notmuch.c b/notmuch.c\r
149 > index 78d29a8..7300c21 100644\r
150 > --- a/notmuch.c\r
151 > +++ b/notmuch.c\r
152 > @@ -264,7 +264,7 @@ main (int argc, char *argv[])\r
153 >  \r
154 >      local = talloc_new (NULL);\r
155 >  \r
156 > -    g_mime_init (0);\r
157 > +    g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS);\r
158 >  #if !GLIB_CHECK_VERSION(2, 35, 1)\r
159 >      g_type_init ();\r
160 >  #endif\r
161 > -- \r
162 > 1.8.4.rc3\r
163 >\r
164 > _______________________________________________\r
165 > notmuch mailing list\r
166 > notmuch@notmuchmail.org\r
167 > http://notmuchmail.org/mailman/listinfo/notmuch\r