aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Mark Walters <markwalters1009@gmail.com>2013-05-04 14:01:15 +0100
committerGravatar David Bremner <bremner@debian.org>2013-05-20 15:01:59 -0300
commitc8589e4eb889051516d37ac75b706bbee6782996 (patch)
tree2c9240807d7fecdebac46abaf5342aad046e1254 /emacs
parentb681aa8235a16630e282626d3938862a6c2f7fd0 (diff)
emacs: show: handle inline patch fake parts at top level
The inline patch fake part handler also modifies the content-type so handle this in notmuch-show-insert-bodypart too.
Diffstat (limited to 'emacs')
-rw-r--r--emacs/notmuch-show.el4
-rw-r--r--emacs/notmuch-wash.el2
2 files changed, 4 insertions, 2 deletions
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 652e5dc3..d56154eb 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -815,7 +815,7 @@ message at DEPTH in the current thread."
;; Handler for wash generated inline patch fake parts.
(defun notmuch-show-insert-part-inline-patch-fake-part (msg part content-type nth depth declared-type)
- (notmuch-show-insert-part-*/* msg part "text/x-diff" nth depth "inline patch"))
+ (notmuch-show-insert-part-*/* msg part content-type nth depth declared-type))
(defun notmuch-show-insert-part-text/html (msg part content-type nth depth declared-type)
;; text/html handler to work around bugs in renderers and our
@@ -889,6 +889,8 @@ If HIDE is non-nil then initially hide this part."
(let* ((content-type (downcase (plist-get part :content-type)))
(mime-type (or (and (string= content-type "application/octet-stream")
(notmuch-show-get-mime-type-of-application/octet-stream part))
+ (and (string= content-type "inline patch")
+ "text/x-diff")
content-type))
(nth (plist-get part :id))
(beg (point)))
diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el
index 80c475c6..8a68819c 100644
--- a/emacs/notmuch-wash.el
+++ b/emacs/notmuch-wash.el
@@ -365,7 +365,7 @@ for error."
(setq patch-end (match-beginning 0)))
(save-restriction
(narrow-to-region patch-start patch-end)
- (setq part (plist-put part :content-type "inline-patch-fake-part"))
+ (setq part (plist-put part :content-type "inline patch"))
(setq part (plist-put part :content (buffer-string)))
(setq part (plist-put part :id -1))
(setq part (plist-put part :filename