Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id BDBE7429E25 for ; Fri, 18 Nov 2011 10:13:57 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CLetshj0aQnJ for ; Fri, 18 Nov 2011 10:13:57 -0800 (PST) Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 2E799431FD0 for ; Fri, 18 Nov 2011 10:13:56 -0800 (PST) Received: by faan15 with SMTP id n15so5339987faa.26 for ; Fri, 18 Nov 2011 10:13:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:x-mailer; bh=4V5vS3gxPmCgRe6WMyjxM0COE1GjOs/rp4lwHM1MHI0=; b=X/gaZGa636H8JdJeyEzL7/v+/gAMKTsp6BQ4fuc3qlD3tpl3huXXWjMy0FV8WxlwBu a3ADvBk6XG6c9KexYGFxWFPg2lZj5Vr5i1/dFXP1dusTsQRp1PhM2HfkbLXUowxQgyqk Mbh1xMWvwYcJToUyk98+xWqV8zSbwPeDJIH1I= Received: by 10.204.130.140 with SMTP id t12mr4434244bks.136.1321640034275; Fri, 18 Nov 2011 10:13:54 -0800 (PST) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id e18sm1355452bkr.15.2011.11.18.10.13.53 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 Nov 2011 10:13:53 -0800 (PST) From: Dmitry Kurochkin To: notmuch@notmuchmail.org Subject: [PATCH] emacs: fix `mm-make-handle' content-type parameter Date: Fri, 18 Nov 2011 22:13:37 +0400 Message-Id: <1321640017-25414-1-git-send-email-dmitry.kurochkin@gmail.com> X-Mailer: git-send-email 1.7.7.3 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Nov 2011 18:13:57 -0000 `notmuch-show-mm-display-part-inline' uses undocumented `mm-make-handle' function. One of the parameters for `mm-make-handle' is charset. Before the change, an unparsed content-type was given to `mm-make-handle' (this was probably copied from Gnus source which uses simple hard-coded values in a similar manner). But in fact, `mm-make-handle' expects a content-type value parsed by `mail-header-parse-content-type'. In particular, this is needed for MIME display functions to correctly determine charset. --- emacs/notmuch-show.el | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index d5c95d8..9fafafa 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -316,7 +316,8 @@ current buffer, if possible." (let ((display-buffer (current-buffer))) (with-temp-buffer (insert content) - (let ((handle (mm-make-handle (current-buffer) (list content-type)))) + (let ((handle (mm-make-handle (current-buffer) + (mail-header-parse-content-type content-type)))) (set-buffer display-buffer) (if (and (mm-inlinable-p handle) (mm-inlined-p handle)) -- 1.7.7.3