emacs: Prefer Content-Description over filename for part buttons content-description
authorW. Trevor King <wking@tremily.us>
Mon, 3 Feb 2014 09:02:44 +0000 (01:02 -0800)
committerW. Trevor King <wking@tremily.us>
Sat, 5 Apr 2014 19:25:38 +0000 (12:25 -0700)
commite33db18537d36f88d231ee2181ccadbd6d6611d5
treee3cd19818982be4be5b5a73a37b6cb0deaddec30
parentac2148d39a1db1b2b24060eaf1119fd1f8899ff2
emacs: Prefer Content-Description over filename for part buttons

On the rss2email list, Victor Orlikowski pointed out [1] that a number
of MUAs don't use the Subject header of attached message/rfc822 parts
to label multipart/digest subparts [2].  Instead, notmuch and several
other MUAs use the filename parameter [3] as a content hint.  Using
the filename parameter seems more sane than diving into the
message/rfc822 part header, but that's still not what the filename
parameter was designed for.  It makes more sense to me to use the
message/rfc822 part's Content-Description header (which I just taught
notmuch-show to export), falling back on the filename parameter if
Content-Description isn't set.

[1]: http://article.gmane.org/gmane.mail.rss2email/211
[2]: Digests: http://tools.ietf.org/html/rfc2046#section-5.1.5
[3]: Filename: http://tools.ietf.org/search/rfc2183#section-2.3
NEWS
emacs/notmuch-show.el
test/T450-emacs-show.sh
test/corpus/bar/baz/24:2,
test/emacs-show.expected-output/notmuch-show-buttons-content-description [new file with mode: 0644]
test/emacs-show.expected-output/notmuch-show-buttons-filename [new file with mode: 0644]