Re: Reply code with TEXT/PLAIN
authorAdam Wolfe Gordon <awg+notmuch@xvx.ca>
Sun, 25 Mar 2012 00:19:50 +0000 (18:19 +1800)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:45:42 +0000 (09:45 -0800)
bf/06aabef8b63af2b310e0e35baf387ddd2e5327 [new file with mode: 0644]

diff --git a/bf/06aabef8b63af2b310e0e35baf387ddd2e5327 b/bf/06aabef8b63af2b310e0e35baf387ddd2e5327
new file mode 100644 (file)
index 0000000..44d19ec
--- /dev/null
@@ -0,0 +1,103 @@
+Return-Path: <awg@xvx.ca>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 4872B431FAF\r
+       for <notmuch@notmuchmail.org>; Sat, 24 Mar 2012 17:19:53 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id YSaoMybJFYLj for <notmuch@notmuchmail.org>;\r
+       Sat, 24 Mar 2012 17:19:52 -0700 (PDT)\r
+Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com\r
+       [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 6D704431FAE\r
+       for <notmuch@notmuchmail.org>; Sat, 24 Mar 2012 17:19:52 -0700 (PDT)\r
+Received: by lbok6 with SMTP id k6so3500947lbo.26\r
+       for <notmuch@notmuchmail.org>; Sat, 24 Mar 2012 17:19:50 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=mime-version:sender:x-originating-ip:in-reply-to:references:date\r
+       :x-google-sender-auth:message-id:subject:from:to:cc:content-type\r
+       :content-transfer-encoding:x-gm-message-state;\r
+       bh=D5vk/FBgLFeABN9KA+99JdZIktiyrmCE3V51VbKTlnU=;\r
+       b=Xj/skjvABoWZw+PIlkbiVfsIvuU/YBK+NGM3WwCUe5EqOFAWTkvlpoyx7Z+NtYeDXh\r
+       OqK9OWexK1qMjU0sE3A5nyv/Hb2gnUpcincripunIbM+yCYCzu1/JYtmlBbqgWy6vYep\r
+       st82IdIdt1jdsGQibRpjHsb6UQZCa+deD7c19gO5nQrBJmxFkJrjq1BuK9v0+JXAbpl2\r
+       m8R+rVvN+oTWQQq334v3cE4UrnHfN68I7G5WgEsYlB+CJZ/XDLHYY6iTHwot4byWAgzz\r
+       YOoPnjXJEacUP8n3xClEKw9+0SOsNgnC8QKXXchtSwO7kXjQ0w91v8MairV468gtHxfu\r
+       C7UQ==\r
+MIME-Version: 1.0\r
+Received: by 10.152.131.3 with SMTP id oi3mr13843270lab.35.1332634790710; Sat,\r
+       24 Mar 2012 17:19:50 -0700 (PDT)\r
+Sender: awg@xvx.ca\r
+Received: by 10.112.29.137 with HTTP; Sat, 24 Mar 2012 17:19:50 -0700 (PDT)\r
+X-Originating-IP: [96.52.216.56]\r
+In-Reply-To: <87d3814qkv.fsf@qmul.ac.uk>\r
+References: <87d3814qkv.fsf@qmul.ac.uk>\r
+Date: Sat, 24 Mar 2012 18:19:50 -0600\r
+X-Google-Sender-Auth: r2zOAIQHbCM95wTA2UMJeqmu-gU\r
+Message-ID:\r
+ <CAMoJFUuGS_y4Sqtug5Ohdic3M43_fexWOt7cAw-ebuZ_SVUnjQ@mail.gmail.com>\r
+Subject: Re: Reply code with TEXT/PLAIN\r
+From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
+To: Mark Walters <markwalters1009@gmail.com>\r
+Content-Type: text/plain; charset=ISO-8859-1\r
+Content-Transfer-Encoding: quoted-printable\r
+X-Gm-Message-State:\r
+ ALoCoQlGPcIKQ1WumrnTKL/KtcThiaYIG32f1c+Ms/4rJwCNnCNXA5yNgp7wTn3o5X82fymsWvJJ\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 25 Mar 2012 00:19:53 -0000\r
+\r
+Hi Mark,\r
+\r
+On Sat, Mar 24, 2012 at 15:49, Mark Walters <markwalters1009@gmail.com> wro=\r
+te:\r
+> I am not certain if this is a bug or a request to work around broken\r
+> mailers. I tried replying to a message today (with recent git) and got\r
+> an empty message. I looked at the json output for reply and it contains\r
+> the message but the content type is TEXT/PLAIN rather than\r
+> text/plain.\r
+>\r
+> This seems to mean it doesn't match in notmuch-match-content-type\r
+> (notmuch-lib.el) called from notmuch-mua-get-quotable-parts (in\r
+> notmuch-mua.el); and so does not get included.\r
+>\r
+> Making the match case-insensitive `fixed' the problem.\r
+>\r
+> I don't know whether content-types are allowed =A0to be upper-case but I\r
+> seem to have several mails where they are. I am also not sure whether\r
+> the correct fix is in the emacs code, or in the cli reply format\r
+> (i.e. perhaps the reply format should lower-case the content-type).\r
+\r
+A bit of Googling indicates that MIME types should be case insensitive\r
+(i.e. TEXT/PLAIN should match text/plain). Given this, I think it\r
+makes sense to change the emacs function regardless of whether it\r
+makes sense for the CLI to output them in lower-case.\r
+notmuch-match-content-type was put in notmuch-lib.el instead of in\r
+notmuch-mua.el because it was thought that it might become useful\r
+elsewhere later, so having it compare mime types correctly ensures\r
+that future uses don't need to sanitize input to it.\r
+\r
+Since you've already made the change for yourself, do you want to send a pa=\r
+tch?\r
+\r
+Cheers.\r