Reply code with TEXT/PLAIN
Adam Wolfe Gordon
awg+notmuch at xvx.ca
Sat Mar 24 17:19:50 PDT 2012
On Sat, Mar 24, 2012 at 15:49, Mark Walters <markwalters1009 at gmail.com> wrote:
> I am not certain if this is a bug or a request to work around broken
> mailers. I tried replying to a message today (with recent git) and got
> an empty message. I looked at the json output for reply and it contains
> the message but the content type is TEXT/PLAIN rather than
> This seems to mean it doesn't match in notmuch-match-content-type
> (notmuch-lib.el) called from notmuch-mua-get-quotable-parts (in
> notmuch-mua.el); and so does not get included.
> Making the match case-insensitive `fixed' the problem.
> I don't know whether content-types are allowed to be upper-case but I
> seem to have several mails where they are. I am also not sure whether
> the correct fix is in the emacs code, or in the cli reply format
> (i.e. perhaps the reply format should lower-case the content-type).
A bit of Googling indicates that MIME types should be case insensitive
(i.e. TEXT/PLAIN should match text/plain). Given this, I think it
makes sense to change the emacs function regardless of whether it
makes sense for the CLI to output them in lower-case.
notmuch-match-content-type was put in notmuch-lib.el instead of in
notmuch-mua.el because it was thought that it might become useful
elsewhere later, so having it compare mime types correctly ensures
that future uses don't need to sanitize input to it.
Since you've already made the change for yourself, do you want to send a patch?
More information about the notmuch