]> git.notmuchmail.org Git - notmuch/commit
emacs: Rewrite content ID handling
authorAustin Clements <amdragon@mit.edu>
Sat, 24 Jan 2015 21:17:02 +0000 (16:17 -0500)
committerDavid Bremner <david@tethera.net>
Sun, 25 Jan 2015 17:39:13 +0000 (18:39 +0100)
commitf84cbb1d4d65b097507381491d953272a50fe2f8
treec1a42e698d45d1d88b74a79a7ea163cd85a8b11b
parentb0b5ced82b0a8cca2bbbe7b8b8c887c68b5afff0
emacs: Rewrite content ID handling

Besides generally cleaning up the code and separating the general
content ID handling from the w3m-specific code, this fixes several
problems.

Foremost is that, previously, the code roughly assumed that referenced
parts would be in the same multipart/related as the reference.
According to RFC 2392, nothing could be further from the truth:
content IDs are supposed to be globally unique and globally
addressable.  This is nonsense, but this patch at least fixes things
so content IDs can be anywhere in the same message.

As a side-effect of the above, this handles multipart/alternate
content-IDs more in line with RFC 2046 section 5.1.2 (not that I've
ever seen this in the wild).  This also properly URL-decodes cid:
URLs, as per RFC 2392 (the previous code did not), and applies crypto
settings from the show buffer (the previous code used the global
crypto settings).
emacs/notmuch-show.el