summaryrefslogtreecommitdiff
path: root/mu4e
diff options
context:
space:
mode:
authordjcb <djcb@djcbsoftware.nl>2019-04-27 08:38:53 +0300
committerdjcb <djcb@djcbsoftware.nl>2019-04-27 08:38:53 +0300
commita2c27c0c5a8baf834d7c71fc2463dfdc305297d4 (patch)
treec45ceaac237a239e77ede5f5a697f56fabf315bf /mu4e
parent736ed2e0deba5b167a84c79569d16b72a359a9a1 (diff)
mu4e: construct attach map even when not showing header
This is a bit of hack, but solves the problem; even when not _showing_ the attachments-header, construct the corresponding map, so the keybindings work.
Diffstat (limited to 'mu4e')
-rw-r--r--mu4e/mu4e-view.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/mu4e/mu4e-view.el b/mu4e/mu4e-view.el
index 177a1ed..0da6e0a 100644
--- a/mu4e/mu4e-view.el
+++ b/mu4e/mu4e-view.el
@@ -316,6 +316,12 @@ Depending on the value of `mu4e-view-use-gnus', either use mu4e's
internal display mode, or a display mode based on Gnu's
article-mode."
(mu4e~view-define-mode)
+
+ ;; XXX(djcb): only called for the side-effect of setting up
+ ;; `mu4e~view-attach-map'. Instead, we should split that function
+ ;; into setting up the map, and actually producing the header.
+ (mu4e~view-construct-attachments-header msg)
+
;; When MSG is unread, mu4e~view-mark-as-read-maybe will trigger
;; another call to mu4e-view (via mu4e~headers-update-handler as
;; the reply handler to mu4e~proc-move)
@@ -1188,7 +1194,7 @@ the attachment; otherwise (MULTI is non-nil), accept ranges of
attachment numbers, as per `mu4e-split-ranges-to-numbers', and
return the corresponding string."
(let* ((count (hash-table-count mu4e~view-attach-map)) (def))
- (when (zerop count) (mu4e-error "No attachments for this message"))
+ (when (zerop count) (mu4e-warn "No attachments for this message"))
(if (not multi)
(if (= count 1)
(read-number (mu4e-format "%s: " prompt) 1)