* mu4e: don't list footers as attachments

This commit is contained in:
djcb 2013-10-14 22:42:58 +03:00
parent b92e2d20fd
commit cf4c658223
1 changed files with 10 additions and 5 deletions

View File

@ -427,12 +427,17 @@ at POINT, or if nil, at (point)."
(lambda (part)
(let* ((mtype (mu4e-message-part-field part :mime-type))
(attachtype (mu4e-message-part-field part :type))
(isattach (or ;; we lost parts marked either
;; "attachment" or "inline" as attachment.
(member 'attachment attachtype)
(member 'inline attachtype))))
(isattach
(or ;; we consider parts marked either
;; "attachment" or "inline" as attachment.
(member 'attachment attachtype)
;; list inline parts as attachment (so they can be
;; saved), unless they are text/plain, which are
;; usually just message footers in mailing lists
(and (member 'inline attachtype)
(not (string-match "^text/plain" mtype))))))
(or ;; remove if it's not an attach *or* if it's an
;; image/audio/application type (but not a signature)
;; image/audio/application type (but not a signature)
isattach
(string-match "^\\(image\\|audio\\)" mtype)
(string= "message/rfc822" mtype)