mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
emacs: don't inline message/rfc822 parts without content
This avoids some ugly error messages and exceptions, and hopes that some gnus method will display message/rfc822 parts that have only a file, no :content part.
This commit is contained in:
parent
06b536dae0
commit
9c4037ff19
1 changed files with 17 additions and 15 deletions
|
@ -719,8 +719,10 @@ will return nil if the CID is unknown or cannot be retrieved."
|
|||
t)
|
||||
|
||||
(defun notmuch-show-insert-part-message/rfc822 (msg part _content-type _nth depth _button)
|
||||
(let* ((message (car (plist-get part :content)))
|
||||
(body (car (plist-get message :body)))
|
||||
(let ((message (car (plist-get part :content))))
|
||||
(and
|
||||
message
|
||||
(let ((body (car (plist-get message :body)))
|
||||
(start (point)))
|
||||
;; Override `notmuch-message-headers' to force `From' to be
|
||||
;; displayed.
|
||||
|
@ -732,8 +734,8 @@ will return nil if the CID is unknown or cannot be retrieved."
|
|||
;; Show the body
|
||||
(notmuch-show-insert-bodypart msg body depth)
|
||||
(when notmuch-show-indent-multipart
|
||||
(indent-rigidly start (point) 1)))
|
||||
t)
|
||||
(indent-rigidly start (point) 1))
|
||||
t))))
|
||||
|
||||
(defun notmuch-show-insert-part-text/plain (msg part _content-type _nth depth button)
|
||||
;; For backward compatibility we want to apply the text/plain hook
|
||||
|
|
Loading…
Reference in a new issue