[PATCH] emacs: fix `mm-make-handle' content-type parameter
Dmitry Kurochkin
dmitry.kurochkin at gmail.com
Fri Nov 18 10:13:37 PST 2011
`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
More information about the notmuch
mailing list