: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'.")
notmuch-wash-excerpt-citations))
;; Mostly useful for debugging.
-(defcustom notmuch-show-all-multipart/alternative-parts nil
+(defcustom notmuch-show-all-multipart/alternative-parts t
"Should all parts of multipart/alternative parts be shown?"
:group 'notmuch
:type 'boolean)
"Use external viewers to view all attachments from the current message."
(interactive)
(with-current-notmuch-show-message
- ; We ovverride the mm-inline-media-tests to indicate which message
+ ; We override the mm-inline-media-tests to indicate which message
; parts are already sufficiently handled by the original
; presentation of the message in notmuch-show mode. These parts
; will be inserted directly into the temporary buffer of
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)
;; 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))
;; message.
(put-text-property message-start message-end :notmuch-message-extent (cons message-start message-end))
- (let ((headers-overlay (make-overlay headers-start headers-end)))
- (overlay-put headers-overlay 'invisible headers-invis-spec)
+ (let ((headers-overlay (make-overlay headers-start headers-end))
+ (invis-specs (list headers-invis-spec message-invis-spec)))
+ (overlay-put headers-overlay 'invisible invis-specs)
(overlay-put headers-overlay 'priority 10))
(overlay-put (make-overlay body-start body-end) 'invisible message-invis-spec)
messages from the thread matching this search term are shown if
non-nil.
-The optional BUFFER-NAME provides the neame of the buffer in
+The optional BUFFER-NAME provides the name of the buffer in
which the message thread is shown. If it is nil (which occurs
when the command is called interactively) the argument to the
function is used. "
without removing any tags, and '\\[notmuch-show-archive-thread]' to archive an entire thread
without scrolling through with \\[notmuch-show-advance-and-archive]).
-You can add or remove arbitary tags from the current message with
+You can add or remove arbitrary tags from the current message with
'\\[notmuch-show-add-tag]' or '\\[notmuch-show-remove-tag]'.
All currently available key bindings:
(add-to-invisibility-spec spec))))
(defun notmuch-show-message-visible (props visible-p)
- (if visible-p
- ;; When making the message visible, the headers may or not be
- ;; visible. So we check that property separately.
- (let ((headers-visible (plist-get props :headers-visible)))
- (notmuch-show-element-visible props headers-visible :headers-invis-spec)
- (notmuch-show-element-visible props t :message-invis-spec))
- (notmuch-show-element-visible props nil :headers-invis-spec)
- (notmuch-show-element-visible props nil :message-invis-spec))
-
+ (notmuch-show-element-visible props visible-p :message-invis-spec)
(notmuch-show-set-prop :message-visible visible-p props))
(defun notmuch-show-headers-visible (props visible-p)
- (if (plist-get props :message-visible)
- (notmuch-show-element-visible props visible-p :headers-invis-spec))
+ (notmuch-show-element-visible props visible-p :headers-invis-spec)
(notmuch-show-set-prop :headers-visible visible-p props))
;; Functions for setting and getting attributes of the current