[PATCH] bound mail-parse-charset, used by some functions on mm-view.el when there is no charset metadata in the html

Konrad Scorciapino konr at konr.mobi
Thu Mar 24 20:25:59 PDT 2011


From: Konrad Scorciapino <konrad at scorciapino.com>

---
 emacs/notmuch-show.el |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index f3150af..2462ec1 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -312,9 +312,10 @@ current buffer, if possible."
 (defun notmuch-show-insert-part-*/* (msg part content-type nth depth declared-type)
   ;; This handler _must_ succeed - it is the handler of last resort.
   (notmuch-show-insert-part-header nth content-type declared-type (plist-get part :filename))
-  (let ((content (notmuch-show-get-bodypart-content msg part nth)))
+  (let* ((content (notmuch-show-get-bodypart-content msg part nth))
+         (mail-parse-charset (first (detect-coding-string content))))
     (if content
-	(notmuch-show-mm-display-part-inline msg part content-type content)))
+        (notmuch-show-mm-display-part-inline msg part content-type content)))
   t)
 
 ;; Functions for determining how to handle MIME parts.
-- 
1.7.4.1



More information about the notmuch mailing list