X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-show.el;h=90f9af7f2d9d4b5a6b8a78d706b6e6025634a1d8;hb=a378a91ba2db58608640cd58373565d653a7c4e6;hp=6685717719ee63b58123688a0c87a3b081ca34a5;hpb=68a2c7a8b0f749cb33a8ce7cfa2aa7781d2529bb;p=notmuch diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 66857177..90f9af7f 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -65,17 +65,6 @@ any given message." :group 'notmuch :type 'boolean) -(defcustom notmuch-show-elide-same-subject nil - "Do not show the subject of a collapsed message if it is the -same as that of the previous message." - :group 'notmuch - :type 'boolean) - -(defcustom notmuch-show-always-show-subject t - "Should a collapsed message show the `Subject:' line?" - :group 'notmuch - :type 'boolean) - (defvar notmuch-show-markup-headers-hook '(notmuch-show-colour-headers) "A list of functions called to decorate the headers listed in `notmuch-message-headers'.") @@ -519,21 +508,26 @@ current buffer, if possible." t) (defun notmuch-show-insert-part-message/rfc822 (msg part content-type nth depth declared-type) - (let* ((message-part (plist-get part :content)) - (inner-parts (plist-get message-part :content))) - (notmuch-show-insert-part-header nth declared-type content-type nil) + (notmuch-show-insert-part-header nth declared-type content-type nil) + (let* ((message (car (plist-get part :content))) + (headers (plist-get message :headers)) + (body (car (plist-get message :body))) + (start (point))) + ;; Override `notmuch-message-headers' to force `From' to be ;; displayed. (let ((notmuch-message-headers '("From" "Subject" "To" "Cc" "Date"))) - (notmuch-show-insert-headers (plist-get part :headers))) + (notmuch-show-insert-headers (plist-get message :headers))) + ;; Blank line after headers to be compatible with the normal ;; message display. (insert "\n") - ;; Show all of the parts. - (mapc (lambda (inner-part) - (notmuch-show-insert-bodypart msg inner-part depth)) - inner-parts)) + ;; Show the body + (notmuch-show-insert-bodypart msg body depth) + + (when notmuch-show-indent-multipart + (indent-rigidly start (point) 1))) t) (defun notmuch-show-insert-part-text/plain (msg part content-type nth depth declared-type) @@ -727,9 +721,8 @@ current buffer, if possible." ;; If the subject of this message is the same as that of the ;; previous message, don't display it when this message is ;; collapsed. - (when (and notmuch-show-elide-same-subject - (not (string= notmuch-show-previous-subject - bare-subject))) + (when (not (string= notmuch-show-previous-subject + bare-subject)) (forward-line 1)) (setq headers-start (point-marker))) (setq headers-end (point-marker))