Re: notmuch-emacs won't display correctly quoted-printable iso-8859-1 mails
authorTomi Ollila <tomi.ollila@iki.fi>
Sun, 18 Dec 2011 16:08:55 +0000 (18:08 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:41:02 +0000 (09:41 -0800)
07/8b52a72a2bd0c5b38cc2e986aa421778204c9b [new file with mode: 0644]

diff --git a/07/8b52a72a2bd0c5b38cc2e986aa421778204c9b b/07/8b52a72a2bd0c5b38cc2e986aa421778204c9b
new file mode 100644 (file)
index 0000000..265a14e
--- /dev/null
@@ -0,0 +1,135 @@
+Return-Path: <tomi.ollila@nixu.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id B3CF4431FD0\r
+       for <notmuch@notmuchmail.org>; Sun, 18 Dec 2011 08:09:14 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id YbxCDyTqfiyh for <notmuch@notmuchmail.org>;\r
+       Sun, 18 Dec 2011 08:09:13 -0800 (PST)\r
+Received: from mail-gw3.nixu.fi (mail-gw3.nixu.fi [193.209.237.7])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 5F540431FB6\r
+       for <notmuch@notmuchmail.org>; Sun, 18 Dec 2011 08:09:13 -0800 (PST)\r
+Received: from pps.filterd (mail-gw3 [127.0.0.1])\r
+       by mail-gw3.nixu.fi (8.14.4/8.14.4) with SMTP id pBIG8u1x010923;\r
+       Sun, 18 Dec 2011 18:08:56 +0200\r
+Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])\r
+       by mail-gw3.nixu.fi with ESMTP id 114cs0u6v3-1\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Sun, 18 Dec 2011 18:08:56 +0200\r
+Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])\r
+       by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id\r
+       pBIG8tm9001347; Sun, 18 Dec 2011 18:08:56 +0200\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Olivier Berger <olivier.berger@it-sudparis.eu>,\r
+       David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
+Subject: Re: notmuch-emacs won't display correctly quoted-printable iso-8859-1\r
+       mails\r
+In-Reply-To: <8762heexsp.fsf@inf-8657.int-evry.fr>\r
+References: <20111216160104.24920.82593.reportbug@inf-8657.int-evry.fr>\r
+       <87sjkjyz5i.fsf@inf-8657.int-evry.fr>\r
+       <87liqaas12.fsf@zancas.localnet>\r
+       <8762heexsp.fsf@inf-8657.int-evry.fr>\r
+User-Agent: Notmuch/0.10.2+93~g631d290 (http://notmuchmail.org) Emacs/23.3.1\r
+       (i686-pc-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+       $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+       !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Sun, 18 Dec 2011 18:08:55 +0200\r
+Message-ID: <yf662hdkgko.fsf@taco2.nixu.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110,\r
+ 1.0.211,      0.0.0000        definitions=2011-12-18_04:2011-12-16, 2011-12-18,\r
+       1970-01-01 signatures=0\r
+X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0\r
+       ipscore=0 suspectscore=0\r
+       phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0\r
+       reason=mlx\r
+       scancount=1 engine=6.0.2-1012030000 definitions=main-1112180152\r
+Cc: 652359@bugs.debian.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 18 Dec 2011 16:09:14 -0000\r
+\r
+On Sun, 18 Dec 2011 15:53:26 +0100, Olivier Berger <olivier.berger@it-sudparis.eu> wrote:\r
+> On Sun, 18 Dec 2011 10:11:37 -0400, David Bremner <david@tethera.net> wrote:\r
+> > Hi Olivier;\r
+> > \r
+> > Can you try the following patch? If you apply it to git, you can use\r
+> > "make debian-snapshot" to build new packages (assuming you have the\r
+> > pre-reqs).\r
+> > \r
+> > Or just patch the notmuch-query.el installed by notmuch-emacs and reload\r
+> > it.\r
+> > \r
+> \r
+> I did that over notmuch-emacs 0.10.2-1 Debian package's version of\r
+> notmuch-query.el, but that doesn't seem change anything, unfortunately :\r
+> the modeline still is '-1:%*-' for the notmuch-show buffer, after\r
+> hitting RET over a message's line in a search result list :-(\r
+\r
+I tested the same on terminal configured for latin9 and LC_ALL=fi_FI@euro\r
+and the change worked for me.\r
+\r
+The buffer modeline is not supposed to change -- the change makes emacs\r
+read incoming data encoded in utf-8 format (notmuch outputs everything\r
+in utf-8). Before the change emacs expected (in your case) input data being\r
+in latin1 format ("guessed" from your locale), but as input was in utf-8 the\r
+conversion to emacs internal format went wrong.\r
+\r
+When emacs displays something (buffer content, that is) it converts the\r
+internal format to the encoding emacs window is using. \r
+\r
+So, my guess is you did something wrong when trying David's patch and\r
+you did not get the change evaluated.\r
+\r
+This what I did:\r
+\r
+I opened emacs/notmuch-query.el to another emacs window while \r
+notmuch-hello open in another window.\r
+\r
+Then I added line (coding-system-for-read 'utf-8) in line 35:\r
+\r
+  (let  ((args '("show" "--format=json"))\r
+         (json-object-type 'plist)\r
+         (json-array-type 'list)\r
+         (coding-system-for-read 'utf-8)\r
+         (json-false 'nil))\r
+\r
+then moved cursor to the end of line 44 which shows: (json-read)))))\r
+(last line of that function) and entered c-x c-e\r
+(eval-last-sexp) -- that re-evaluates the function definition.\r
+\r
+And, as said, after that change my emails render correctly on\r
+latin1 -terminal (as opposed those did not render correctly before)\r
+\r
+> Hope this helps.\r
+\r
+I hope that I'm right in my guess so we get forward easier... :)\r
+\r
+> \r
+> Best regards,\r
+> -- \r
+> Olivier BERGER \r
+\r
+Tomi\r