aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Tomi Ollila <tomi.ollila@iki.fi>2012-05-20 19:58:14 +0300
committerGravatar David Bremner <bremner@debian.org>2012-05-23 22:29:32 -0300
commit70ca3444c75beaa693fcac411dd6a2819bd4341e (patch)
treeea713b83766ab56c05df906da2b32124b6b92702 /emacs
parentd15a5e38a90dbf78619cb11bbbb61f0cda38f475 (diff)
emacs: use 'gnus-decoded in notmuch-mm-display-part-inline ()
When mail message is read from emacs, the message structure obtained may contain parts which have content included (`text/plain` for example) and other parts where content is not included (`text/html` for example). In case content is included, the string is already available in emacs' internal format and therefore mm-... functions should not attempt to do further decoding for the data in temp buffer provided for it. Currently when reply buffer is created, notmuch-mm-display-part-inline () is used to provided quoted reply content. This change makes the mm-... functions called by it use 'gnus-decoded as charset whenever the content is already available. File .../emacs-23.3/lisp/gnus/mm-uu.el mentions: "`gnus-decoded' is a fake charset, which means no further decoding."
Diffstat (limited to 'emacs')
-rw-r--r--emacs/notmuch-lib.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 7fa441af..e99b48d1 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -244,7 +244,12 @@ the given type."
current buffer, if possible."
(let ((display-buffer (current-buffer)))
(with-temp-buffer
- (let* ((charset (plist-get part :content-charset))
+ ;; In case there is :content, the content string is already converted
+ ;; into emacs internal format. `gnus-decoded' is a fake charset,
+ ;; which means no further decoding (to be done by mm- functions).
+ (let* ((charset (if (plist-member part :content)
+ 'gnus-decoded
+ (plist-get part :content-charset)))
(handle (mm-make-handle (current-buffer) `(,content-type (charset . ,charset)))))
;; If the user wants the part inlined, insert the content and
;; test whether we are able to inline it (which includes both