X-Git-Url: https://git.cworth.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-show.el;h=05524c2eec0a372db4b3097a14488d9428c69516;hp=a4b0c432be98d8e73d3fefd2c5a69abe89e05faf;hb=5ea5a5557d9ad4cef67e61a83bb81abd44dc7f76;hpb=b3d466bf397a6f8d70bb50d6fa22c58e3d44badf diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index a4b0c432..05524c2e 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -530,7 +530,7 @@ Return unchanged ADDRESS if parsing fails." (plist-put msg :height height) height)))) -(defun notmuch-show-insert-headerline (headers date tags depth) +(defun notmuch-show-insert-headerline (headers date tags depth duplicate file-count) "Insert a notmuch style headerline based on HEADERS for a message at DEPTH in the current thread." (let ((start (point)) @@ -550,7 +550,14 @@ message at DEPTH in the current thread." date ") (" (notmuch-tag-format-tags tags tags) - ")\n") + ")") + (insert + (if (> file-count 1) + (let ((txt (format "%d/%d\n" duplicate file-count))) + (concat + (notmuch-show-spaces-n (- (window-width) (+ (current-column) (length txt)))) + txt)) + "\n")) (overlay-put (make-overlay start (point)) 'face 'notmuch-message-summary-face))) @@ -1154,6 +1161,8 @@ is t, hide the part initially and show the button." (defun notmuch-show-insert-msg (msg depth) "Insert the message MSG at depth DEPTH in the current thread." (let* ((headers (plist-get msg :headers)) + (duplicate (or (plist-get msg :duplicate) 0)) + (files (length (plist-get msg :filename))) ;; Indentation causes the buffer offset of the start/end ;; points to move, so we must use markers. message-start message-end @@ -1165,7 +1174,7 @@ is t, hide the part initially and show the button." (or (and notmuch-show-relative-dates (plist-get msg :date_relative)) (plist-get headers :Date)) - (plist-get msg :tags) depth) + (plist-get msg :tags) depth duplicate files) (setq content-start (point-marker)) ;; Set `headers-start' to point after the 'Subject:' header to be ;; compatible with the existing implementation. This just sets it