]> git.cworth.org Git - obsolete/notmuch-old/commit
reply: Use RFC 2822/MIME wholly for text format template
authorAustin Clements <amdragon@MIT.EDU>
Fri, 16 Aug 2013 15:35:43 +0000 (11:35 -0400)
committerDavid Bremner <bremner@debian.org>
Sat, 17 Aug 2013 07:06:08 +0000 (09:06 +0200)
commitdc51bf0ad4ce84414e79d2f30752502f7c0d46c0
tree49a37acb48dfbeb0d5aa22c3e9fcb520503b6af0
parent6cdab6e0b77041791f70345ac729d63d865bae5e
reply: Use RFC 2822/MIME wholly for text format template

Previously, reply's default text format used an odd mix of RFC 2045
MIME encoding for the reply template's body and some made-up RFC
2822-like UTF-8 format for the headers.  The intent was to present the
headers to the user in a nice, un-encoded format, but this assumed
that whatever ultimately sent the email would RFC 2047-encode the
headers, while at the same time the body was already RFC 2045 encoded,
so it assumed that whatever sent the email would *not* re-encode the
body.

This can be fixed by either producing a fully decoded UTF-8 reply
template, or a fully encoded MIME-compliant RFC 2822 message.  This
patch does the latter because it is

a) Well-defined by RFC 2822 and MIME (while any UTF-8 format would be
   ad hoc).

b) Ready to be piped to sendmail.  The point of the text format is to
   be minimal, so a user should be able to pop up the template in
   whatever editor they want, edit it, and push it to sendmail.

c) Consistent with frontend capabilities.  If a frontend has the
   smarts to RFC 2047 encode the headers before sending the mail, it
   probably has the smarts to RFC 2047 decode them before presenting
   the template to a user for editing.

Also, as far as I know, nothing automated consumes the reply text
format, so changing this should not cause serious problems.  (And if
anything does still consume this format, it probably gets these
encoding issues wrong anyway.)
Makefile.local
gmime-filter-headers.c [deleted file]
gmime-filter-headers.h [deleted file]
man/man1/notmuch-reply.1
notmuch-reply.c
test/reply
test/reply-to-sender