mirror of https://github.com/djcb/mu.git
* mu4e: don't list footers as attachments
This commit is contained in:
parent
b92e2d20fd
commit
cf4c658223
|
@ -427,12 +427,17 @@ at POINT, or if nil, at (point)."
|
||||||
(lambda (part)
|
(lambda (part)
|
||||||
(let* ((mtype (mu4e-message-part-field part :mime-type))
|
(let* ((mtype (mu4e-message-part-field part :mime-type))
|
||||||
(attachtype (mu4e-message-part-field part :type))
|
(attachtype (mu4e-message-part-field part :type))
|
||||||
(isattach (or ;; we lost parts marked either
|
(isattach
|
||||||
;; "attachment" or "inline" as attachment.
|
(or ;; we consider parts marked either
|
||||||
(member 'attachment attachtype)
|
;; "attachment" or "inline" as attachment.
|
||||||
(member 'inline attachtype))))
|
(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
|
(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
|
isattach
|
||||||
(string-match "^\\(image\\|audio\\)" mtype)
|
(string-match "^\\(image\\|audio\\)" mtype)
|
||||||
(string= "message/rfc822" mtype)
|
(string= "message/rfc822" mtype)
|
||||||
|
|
Loading…
Reference in New Issue