[PATCH] emacs: implement notmuch-search-color-line with dolist.
[notmuch-archives.git] / 59 / b813a0e3e7d0a378b976f44b4c8ce8f12631d5
1 Return-Path: <wking@tremily.us>\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 14256431FBF\r
6         for <notmuch@notmuchmail.org>; Tue,  4 Feb 2014 08:11:48 -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.1\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         RCVD_IN_DNSWL_NONE=-0.0001] 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 s82Sr7G7HGYV for <notmuch@notmuchmail.org>;\r
17         Tue,  4 Feb 2014 08:11:44 -0800 (PST)\r
18 Received: from qmta15.westchester.pa.mail.comcast.net\r
19         (qmta15.westchester.pa.mail.comcast.net [76.96.59.228])\r
20         by olra.theworths.org (Postfix) with ESMTP id 15CFA431FBC\r
21         for <notmuch@notmuchmail.org>; Tue,  4 Feb 2014 08:11:44 -0800 (PST)\r
22 Received: from omta05.westchester.pa.mail.comcast.net ([76.96.62.43])\r
23         by qmta15.westchester.pa.mail.comcast.net with comcast\r
24         id NDmo1n0020vyq2s5FGBj6j; Tue, 04 Feb 2014 16:11:43 +0000\r
25 Received: from odin.tremily.us ([24.18.63.50])\r
26         by omta05.westchester.pa.mail.comcast.net with comcast\r
27         id NGBi1n00h152l3L3RGBjN9; Tue, 04 Feb 2014 16:11:43 +0000\r
28 Received: by odin.tremily.us (Postfix, from userid 1000)\r
29         id 3679FFCCFD4; Tue,  4 Feb 2014 08:11:42 -0800 (PST)\r
30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;\r
31         t=1391530302; bh=Glf6ENRsZMvpYmQY561CbcxBHwd+1peHzU7KHyJaEbo=;\r
32         h=Date:From:To:Cc:Subject:References:In-Reply-To;\r
33         b=SzOh1iNO/rXF5WAWJp8nM7Qdray93mjXGwn7ejihfDaK8Yoc60asG1Irozua4JM8H\r
34         cnp2f6QAZAyaf2LGfQd6E148n9UY5tdx4eikKmg7IMJ9bJdNQp6jWLsXMdFDmwglmd\r
35         GUXIC18ezAfSl9n0ucm3wjC+s8vixAou90PTSGtg=\r
36 Date: Tue, 4 Feb 2014 08:11:42 -0800\r
37 From: "W. Trevor King" <wking@tremily.us>\r
38 To: Tomi Ollila <tomi.ollila@iki.fi>\r
39 Subject: Re: [PATCH 00/17] nmbug-status: Python-3-compabitility and general\r
40         refactoring\r
41 Message-ID: <20140204161142.GS14197@odin.tremily.us>\r
42 References: <cover.1391424512.git.wking@tremily.us>\r
43         <m2ha8frjgg.fsf@guru.guru-group.fi>\r
44         <20140204005331.GQ14197@odin.tremily.us>\r
45         <m2fvnzp3uh.fsf@guru.guru-group.fi>\r
46 MIME-Version: 1.0\r
47 Content-Type: multipart/signed; micalg=pgp-sha1;\r
48         protocol="application/pgp-signature"; boundary="lFtSGh4BwI5kpuz7"\r
49 Content-Disposition: inline\r
50 In-Reply-To: <m2fvnzp3uh.fsf@guru.guru-group.fi>\r
51 OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8;\r
52         url=http://tremily.us/pubkey.txt\r
53 User-Agent: Mutt/1.5.22 (2013-10-16)\r
54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
55         s=q20121106; t=1391530303;\r
56         bh=166rst9kQAmMYzKPjjqyiUyqxenCOVKonwV8mOu/79c=;\r
57         h=Received:Received:Received:Date:From:To:Subject:Message-ID:\r
58         MIME-Version:Content-Type;\r
59         b=AyIEppPDco5NNqqQiLGFUX2dZnFZUCJZJJhu7o+Txy6ADtpLR4iXtOEcYuerWcnSo\r
60         +Eigpu36/46TmmO2kcpfWTtjYNoxwvanLYwYM4Um0neNXeXRQYWXKj3kDAFy0Ut2m5\r
61         KzL9dHu2iNQydI03YUsT54LzmJIBlaqSPzZWff9Z4a5IsDuFW9R0xE6PCJj014H1K7\r
62         zG7PXnm14zkieiIx5LxUVOwZ5xpeYMSRoiup9lpOTACjxWbVjoBW/bL16Dy9akSlHx\r
63         3oo9/MS3Y6r7xBIAsn+clf8owbKVGabrQlsRtlAXXbRnad8BYGhQc61Kd85kMhSxNJ\r
64         kUClvbL4uir2A==\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: Tue, 04 Feb 2014 16:11:48 -0000\r
79 \r
80 \r
81 --lFtSGh4BwI5kpuz7\r
82 Content-Type: text/plain; charset=utf-8\r
83 Content-Disposition: inline\r
84 Content-Transfer-Encoding: quoted-printable\r
85 \r
86 On Tue, Feb 04, 2014 at 12:30:30PM +0200, Tomi Ollila wrote:\r
87 > On Tue, Feb 04 2014, "W. Trevor King" wrote:\r
88 > > On Mon, Feb 03, 2014 at 11:10:23PM +0200, Tomi Ollila wrote:\r
89 > >>   File "devel/nmbug/nmbug-status", line 197, in _write_threads\r
90 > >>     ).format(**message_display_data))\r
91 > >>   File "/usr/lib64/python2.6/codecs.py", line 351, in write\r
92 > >>     data, consumed =3D self.encode(object, self.errors)\r
93 > >> UnicodeEncodeError: 'ascii' codec can't encode character u'\u017b' in\r
94 > >>   position 176: ordinal not in range(128)\r
95 > >\r
96 > > Hmm.  __future__'s unicode_literals should be giving us a Unicode\r
97 > > target, so I'm not sure why we'd have trouble injecting Unicode.  This\r
98 > > works fine for me on Python 2.7 and 3.3.  Maybe you just have a funky\r
99 > > encoding?  =E2=80=A6\r
100 >=20\r
101 > LANG=3Den_US.UTF-8\r
102 > all other LC_* variables en_US.UTF-8 except\r
103 > LC_TIME=3Den_GB.utf8\r
104 > LC_ALL empty (naturally)\r
105 >=20\r
106 > python -c 'import locale; print(locale.getpreferredencoding())'\r
107 > UTF-8\r
108 > python -c 'import sys; print(sys.getdefaultencoding())'\r
109 > ascii\r
110 \r
111 That's very strange.  On Python 2.6.9, with the same encodings:\r
112 \r
113   >>> from __future__ import unicode_literals\r
114   >>> import codecs\r
115   >>> import locale\r
116   >>> import sys\r
117   >>> print(locale.getpreferredencoding())  # same as yours\r
118   UTF-8\r
119   >>> print(sys.getdefaultencoding())  # same as yours\r
120   ascii\r
121   >>> _ENCODING =3D locale.getpreferredencoding() or sys.getdefaultencoding=\r
122 ()\r
123   >>> print(_ENCODING)  # double-check default encodings\r
124   UTF-8\r
125   >>> byte_stream =3D sys.stdout  # copied from Page.write\r
126   >>> stream =3D codecs.getwriter(encoding=3D_ENCODING)(stream=3Dbyte_strea=\r
127 m)\r
128   >>> data =3D {'from': '\u017b'}  # fake the troublesome data\r
129   >>> print(type(data['from']))  # double-check unicode_literals\r
130   <type 'unicode'>\r
131   >>> string =3D '  <td>{from}</td>\n'.format(**data)\r
132   >>> stream.write(string)\r
133     <td>=C5=BB</td>\r
134 \r
135 It looks like you'll have the same _ENCODING as I do (UTF-8).  That\r
136 means your stream should be wrapped in a UTF-8 StreamWriter, so I\r
137 don't understand why it's converting to ASCII.  Can you run through\r
138 the above on your troublesome machine and confirm that stream.write()\r
139 is still raising the exception?  If it doesn't work, can you just\r
140 paste that whole run in your next email?\r
141 \r
142 Thanks,\r
143 Trevor\r
144 \r
145 --=20\r
146 This email may be signed or encrypted with GnuPG (http://www.gnupg.org).\r
147 For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy\r
148 \r
149 --lFtSGh4BwI5kpuz7\r
150 Content-Type: application/pgp-signature; name="signature.asc"\r
151 Content-Description: OpenPGP digital signature\r
152 \r
153 -----BEGIN PGP SIGNATURE-----\r
154 Version: GnuPG v2.0.22 (GNU/Linux)\r
155 \r
156 iQIcBAEBAgAGBQJS8RE7AAoJEKKfehoaNkbtIp8P+wYnJZsXqoGbGtfxvibDe2K1\r
157 xsGvn2gcOk+NgQU6O1v58l/07jetldl0Q2uMVvGgXv7us3VS6ZqttJGfYdTXK2XH\r
158 phJXsrB6C7O68Tff2kHXTwTdtJih5Ly7TiKrQdl+jVAwBZ5LNtHb0x/I0CVe5JpU\r
159 Wu94fPePfufa+SlWSOGOnJqNMY4iXFUAkXNWMogTa3luVkUhShqFvSyacCZXr0ch\r
160 rKlSMk82NgVk/zo2nNsrq9iEOiEtQCShkA72hU1tW3rS1W1xw2yXAa01GGj/yk4Y\r
161 glrt0A8kQNP4/J8MGv+/19AXO1y4B/HWlOqWNJ/mJ/3pRtkCb4xJ4+5cwaBNZw3P\r
162 3bXsKLkoTTReee2lAfpqBedP/bhBUleY2CzTihY49NeoCnOPNGDzj0NEoiaw0Krx\r
163 cyI7pLPEQ2TxOEeewTqvgzUnBGNwuJdF4a13uYqMn+I9+8psnwYgCku0J6gjra8t\r
164 9zsFYid3bB3uEfyoMJ1Jib3ret21/C1QQFbJnkeS1DxjJkGRmoIKaVCUvrE8mtTQ\r
165 8lSoly8IG17tgOvANYzZkHSMM3cVFqG9Qd29xQp/zE7VRVi8ipi/fji8xHvyOWcf\r
166 TYB00ToBpZCus8N6ggC229bU1QhnvVVDJmIpCzeMHKsqSlqClR1xqEZvEGQJktI8\r
167 ZfUAM6Ca4l+VqtTjE0Cu\r
168 =lj0k\r
169 -----END PGP SIGNATURE-----\r
170 \r
171 --lFtSGh4BwI5kpuz7--\r