[PATCH 2/2] emacs: less guessing of character set in messages

Ethan Glasser-Camp ethan.glasser.camp at gmail.com
Sun Nov 18 12:25:56 PST 2012


Tomi Ollila <tomi.ollila at iki.fi> writes:

> The macro with-current-notmuch-show-message executes command
> `notmuch show --format=raw id:...` which just outputs the contents
> of the mail file verbatim (into temporary buffer). In case e.g. utf-8
> locale is used the temporary buffer has buffer-file-coding-system as
> utf-8. In this case Emacs converts the data to multibyte format, guessing
> that input is in utf-8.
> However, the "raw" (MIME) message may contain octet data in any other
> 8bit format, and as no (MIME-)content spesific handling to the message
> is done at this point, conversion to other formats may lose information.
> By setting coding-system-for-read 'no-conversion drops the conversion part
> and makes this handle input as notmuch-get-bodypart-internal() does.
> This marks the broken test in previous change fixed.

This looks good to me, though you might need to apply it with notmuch
show --format="mbox" :).

Ethan


More information about the notmuch mailing list