From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 4872B431FAF for ; Sat, 24 Mar 2012 17:19:53 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YSaoMybJFYLj for ; Sat, 24 Mar 2012 17:19:52 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 6D704431FAE for ; Sat, 24 Mar 2012 17:19:52 -0700 (PDT) Received: by lbok6 with SMTP id k6so3500947lbo.26 for ; Sat, 24 Mar 2012 17:19:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=D5vk/FBgLFeABN9KA+99JdZIktiyrmCE3V51VbKTlnU=; b=Xj/skjvABoWZw+PIlkbiVfsIvuU/YBK+NGM3WwCUe5EqOFAWTkvlpoyx7Z+NtYeDXh OqK9OWexK1qMjU0sE3A5nyv/Hb2gnUpcincripunIbM+yCYCzu1/JYtmlBbqgWy6vYep st82IdIdt1jdsGQibRpjHsb6UQZCa+deD7c19gO5nQrBJmxFkJrjq1BuK9v0+JXAbpl2 m8R+rVvN+oTWQQq334v3cE4UrnHfN68I7G5WgEsYlB+CJZ/XDLHYY6iTHwot4byWAgzz YOoPnjXJEacUP8n3xClEKw9+0SOsNgnC8QKXXchtSwO7kXjQ0w91v8MairV468gtHxfu C7UQ== MIME-Version: 1.0 Received: by 10.152.131.3 with SMTP id oi3mr13843270lab.35.1332634790710; Sat, 24 Mar 2012 17:19:50 -0700 (PDT) Sender: awg@xvx.ca Received: by 10.112.29.137 with HTTP; Sat, 24 Mar 2012 17:19:50 -0700 (PDT) X-Originating-IP: [96.52.216.56] In-Reply-To: <87d3814qkv.fsf@qmul.ac.uk> References: <87d3814qkv.fsf@qmul.ac.uk> Date: Sat, 24 Mar 2012 18:19:50 -0600 X-Google-Sender-Auth: r2zOAIQHbCM95wTA2UMJeqmu-gU Message-ID: Subject: Re: Reply code with TEXT/PLAIN From: Adam Wolfe Gordon To: Mark Walters Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQlGPcIKQ1WumrnTKL/KtcThiaYIG32f1c+Ms/4rJwCNnCNXA5yNgp7wTn3o5X82fymsWvJJ Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Mar 2012 00:19:53 -0000 Hi Mark, On Sat, Mar 24, 2012 at 15:49, Mark Walters wro= te: > 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 > text/plain. > > 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 =A0to 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 pa= tch? Cheers.