Re: [PATCH v4 08/16] reorganize indexing of multipart/signed and multipart/encrypted
[notmuch-archives.git] / 38 / 000f1a2930dd411c91b1b1675d2538fa8d4edc
1 Return-Path: <olivier.berger@it-sudparis.eu>\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 289F2431FD0\r
6         for <notmuch@notmuchmail.org>; Sun, 18 Dec 2011 14:05:42 -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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 IeQviLCahdwf for <notmuch@notmuchmail.org>;\r
16         Sun, 18 Dec 2011 14:05:41 -0800 (PST)\r
17 Received: from smtp4.int-evry.fr (smtp4.int-evry.fr [157.159.10.71])\r
18         by olra.theworths.org (Postfix) with ESMTP id 01727431FB6\r
19         for <notmuch@notmuchmail.org>; Sun, 18 Dec 2011 14:05:40 -0800 (PST)\r
20 Received: from smtp2.it-sudparis.eu (smtp2.int-evry.fr [157.159.10.45])\r
21         by smtp4.int-evry.fr (Postfix) with ESMTP id 219A57B8B13;\r
22         Sun, 18 Dec 2011 23:05:40 +0100 (CET)\r
23 Received: from smtp-ext.int-evry.fr (smtp-ext.int-evry.fr [157.159.11.17])\r
24         by smtp2.it-sudparis.eu (Postfix) with ESMTP id AB82D8E001D;\r
25         Sun, 18 Dec 2011 23:05:35 +0100 (CET)\r
26 Received: from localhost (mag77-1-82-238-14-130.fbx.proxad.net\r
27  [82.238.14.130])       (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
28         (No client certificate requested)       by smtp-ext.int-evry.fr (Postfix) with\r
29  ESMTP id 5852415894A;  Sun, 18 Dec 2011 23:05:35 +0100 (CET)\r
30 From: Olivier Berger <olivier.berger@it-sudparis.eu>\r
31 To: Tomi Ollila <tomi.ollila@iki.fi>\r
32 Subject: Re: notmuch-emacs won't display correctly quoted-printable iso-8859-1\r
33         mails\r
34 In-Reply-To: <yf662hdkgko.fsf@taco2.nixu.fi>\r
35 Date: Sun, 18 Dec 2011 22:42:46 +0100\r
36 References: <20111216160104.24920.82593.reportbug@inf-8657.int-evry.fr>\r
37         <87sjkjyz5i.fsf@inf-8657.int-evry.fr>\r
38         <87liqaas12.fsf@zancas.localnet>\r
39         <8762heexsp.fsf@inf-8657.int-evry.fr>\r
40         <yf662hdkgko.fsf@taco2.nixu.fi>\r
41 User-Agent: Notmuch/0.10.2 (http://notmuchmail.org) Emacs/23.3.1\r
42         (i486-pc-linux-gnu)\r
43 Message-ID: <87r501ilht.fsf@inf-8657.int-evry.fr>\r
44 MIME-Version: 1.0\r
45 Content-Type: text/plain; charset=us-ascii\r
46 X-INT-MailScanner-Information: Please contact the ISP for more information\r
47 X-INT-MailScanner-ID: AB82D8E001D.A75D1\r
48 X-INT-MailScanner: Found to be clean\r
49 X-INT-MailScanner-SpamCheck: \r
50 X-INT-MailScanner-From: olivier.berger@it-sudparis.eu\r
51 Cc: notmuch@notmuchmail.org, 652359@bugs.debian.org\r
52 X-BeenThere: notmuch@notmuchmail.org\r
53 X-Mailman-Version: 2.1.13\r
54 Precedence: list\r
55 List-Id: "Use and development of the notmuch mail system."\r
56         <notmuch.notmuchmail.org>\r
57 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
59 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
60 List-Post: <mailto:notmuch@notmuchmail.org>\r
61 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
62 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
64 X-List-Received-Date: Sun, 18 Dec 2011 22:05:42 -0000\r
65 \r
66 Hi.\r
67 \r
68 (message previously sent privately, and resent to the list and BTS for reference)\r
69 \r
70 On Sun, 18 Dec 2011 18:08:55 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
71 > On Sun, 18 Dec 2011 15:53:26 +0100, Olivier Berger <olivier.berger@it-sudparis.eu> wrote:\r
72 > > On Sun, 18 Dec 2011 10:11:37 -0400, David Bremner <david@tethera.net> wrote:\r
73 > > > Hi Olivier;\r
74 > > > \r
75 > > > Can you try the following patch? If you apply it to git, you can use\r
76 > > > "make debian-snapshot" to build new packages (assuming you have the\r
77 > > > pre-reqs).\r
78 > > > \r
79 > > > Or just patch the notmuch-query.el installed by notmuch-emacs and reload\r
80 > > > it.\r
81 > > > \r
82 > > \r
83 > > I did that over notmuch-emacs 0.10.2-1 Debian package's version of\r
84 > > notmuch-query.el, but that doesn't seem change anything, unfortunately :\r
85 > > the modeline still is '-1:%*-' for the notmuch-show buffer, after\r
86 > > hitting RET over a message's line in a search result list :-(\r
87\r
88 > I tested the same on terminal configured for latin9 and LC_ALL=fi_FI@euro\r
89 > and the change worked for me.\r
90 \r
91 Glad for you... but did it work before too, by any chance ?\r
92 \r
93 Maybe it wasn't clear in my report, bug I'm using emacs23 in X, and not\r
94 in terminal. Which is different from your tests, AFAIU.\r
95 \r
96\r
97 > The buffer modeline is not supposed to change -- the change makes emacs\r
98 > read incoming data encoded in utf-8 format (notmuch outputs everything\r
99 > in utf-8). Before the change emacs expected (in your case) input data being\r
100 > in latin1 format ("guessed" from your locale), but as input was in utf-8 the\r
101 > conversion to emacs internal format went wrong.\r
102 \r
103 My locale is : fr_FR.utf8 ... maybe you're guessing a bit too much, and\r
104 again, emacs runs in X... as for your modeline explanation, it's not\r
105 really clear I'm afraid. I have always had the impression that the\r
106 modeline should be starting with -U:... if I'm supposed to display\r
107 correctly some UTF-8 characters, which is not the case, hence the\r
108 problem. I don't know what else should happen. So AFAICT, the goal is to\r
109 make sure the buffer is indeed "opened" as UTF-8, or rendered as UTF-8,\r
110 although I couldn't tell how emacs does this all, to be able to\r
111 understand the patch correctly.\r
112 \r
113\r
114 > When emacs displays something (buffer content, that is) it converts the\r
115 > internal format to the encoding emacs window is using. \r
116\r
117 > So, my guess is you did something wrong when trying David's patch and\r
118 > you did not get the change evaluated.\r
119\r
120 \r
121 I don't think so.\r
122 \r
123 > This what I did:\r
124\r
125 > I opened emacs/notmuch-query.el to another emacs window while \r
126 > notmuch-hello open in another window.\r
127\r
128 > Then I added line (coding-system-for-read 'utf-8) in line 35:\r
129\r
130 >   (let  ((args '("show" "--format=json"))\r
131 >          (json-object-type 'plist)\r
132 >          (json-array-type 'list)\r
133 >          (coding-system-for-read 'utf-8)\r
134 >          (json-false 'nil))\r
135\r
136 \r
137 Uh, is this really the patch suggested by David ?\r
138 \r
139 Ain't it supposed to be :\r
140   --- a/emacs/notmuch-query.el\r
141   +++ b/emacs/notmuch-query.el\r
142   @@ -38,7 +38,7 @@ is a possibly empty forest of replies.\r
143        (setq args (append args search-terms))\r
144        (with-temp-buffer\r
145          (progn\r
146   -     (apply 'call-process (append (list notmuch-command nil (list t nil) nil) args))\r
147   +     (let ((coding-system-for-read 'utf-8)) (apply 'call-process (append (list notmuch-command nil (list t nil) nil) args)))\r
148           (goto-char (point-min))\r
149           (json-read)))))\r
150 \r
151 Anyway, I had quit emacs, then patched the file with the above patch,\r
152 and restarted it, so I don't know what could have gone wrong.\r
153 \r
154 > then moved cursor to the end of line 44 which shows: (json-read)))))\r
155 > (last line of that function) and entered c-x c-e\r
156 > (eval-last-sexp) -- that re-evaluates the function definition.\r
157\r
158 > And, as said, after that change my emails render correctly on\r
159 > latin1 -terminal (as opposed those did not render correctly before)\r
160\r
161 \r
162 OK, so maybe that's one fix for the terminal, but not yet complete for\r
163 the X/Gtk Emacs windows.\r
164 \r
165 > > Hope this helps.\r
166\r
167 > I hope that I'm right in my guess so we get forward easier... :)\r
168\r
169 \r
170 A bit too much guessing I'm afraid ;)\r
171 \r
172 Thanks anyway for your help.\r
173 \r
174 Best regards,\r
175 \r
176 -- \r
177 Olivier BERGER \r
178 http://www-public.it-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8\r
179 Ingenieur Recherche - Dept INF\r
180 Institut TELECOM, SudParis (http://www.it-sudparis.eu/), Evry (France)\r
181 \r