--- /dev/null
+Return-Path: <too@guru-group.fi>\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 56609431FB6\r
+ for <notmuch@notmuchmail.org>; Sun, 20 May 2012 09:58:07 -0700 (PDT)\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 YJ5d1CvO+SXW for <notmuch@notmuchmail.org>;\r
+ Sun, 20 May 2012 09:58:06 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 25B5A431FAE\r
+ for <notmuch@notmuchmail.org>; Sun, 20 May 2012 09:58:05 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id 77F9710064B; Sun, 20 May 2012 19:58:16 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] emacs: use 'gnus-decoded in notmuch-mm-display-part-inline ()\r
+Date: Sun, 20 May 2012 19:58:14 +0300\r
+Message-Id: <1337533094-5467-1-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 1.7.1\r
+Cc: Tomi Ollila <tomi.ollila@iki.fi>\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, 20 May 2012 16:58:07 -0000\r
+\r
+When mail message is read from emacs, the message structure\r
+obtained may contain parts which have content included\r
+(`text/plain` for example) and other parts where content is not\r
+included (`text/html` for example).\r
+\r
+In case content is included, the string is already available in\r
+emacs' internal format and therefore mm-... functions should not\r
+attempt to do further decoding for the data in temp buffer\r
+provided for it.\r
+\r
+Currently when reply buffer is created,\r
+notmuch-mm-display-part-inline () is used to provided quoted reply\r
+content. This change makes the mm-... functions called by it use\r
+'gnus-decoded as charset whenever the content is already available.\r
+\r
+File .../emacs-23.3/lisp/gnus/mm-uu.el mentions:\r
+"`gnus-decoded' is a fake charset, which means no further decoding."\r
+---\r
+\r
+I propose this patch is taken into 0.13.1.\r
+\r
+Please note that I'm not entirely sure my description above\r
+is right. So those who knows more of these issues please check\r
+my "facts".\r
+\r
+Note that before this change the only reference to word 'gnus' in\r
+the whole notmuch repository is:\r
+./emacs/notmuch-wash.el:223: ;; `gnus-art.el'.\r
+\r
+if anybody thinks this matters...\r
+\r
+ emacs/notmuch-lib.el | 7 ++++++-\r
+ 1 files changed, 6 insertions(+), 1 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
+index 7fa441a..e99b48d 100644\r
+--- a/emacs/notmuch-lib.el\r
++++ b/emacs/notmuch-lib.el\r
+@@ -244,7 +244,12 @@ the given type."\r
+ current buffer, if possible."\r
+ (let ((display-buffer (current-buffer)))\r
+ (with-temp-buffer\r
+- (let* ((charset (plist-get part :content-charset))\r
++ ;; In case there is :content, the content string is already converted\r
++ ;; into emacs internal format. `gnus-decoded' is a fake charset,\r
++ ;; which means no further decoding (to be done by mm- functions).\r
++ (let* ((charset (if (plist-member part :content)\r
++ 'gnus-decoded\r
++ (plist-get part :content-charset)))\r
+ (handle (mm-make-handle (current-buffer) `(,content-type (charset . ,charset)))))\r
+ ;; If the user wants the part inlined, insert the content and\r
+ ;; test whether we are able to inline it (which includes both\r
+-- \r
+1.7.1\r
+\r