unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jameson Graef Rollins <jrollins@finestructure.net>
To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: content-type comparison should be case insensitive.
Date: Mon, 26 Mar 2012 08:21:55 -0700	[thread overview]
Message-ID: <87398vl758.fsf@servo.finestructure.net> (raw)
In-Reply-To: <1332636208-9784-1-git-send-email-markwalters1009@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1122 bytes --]

On Sun, 25 Mar 2012 00:43:28 +0000, Mark Walters <markwalters1009@gmail.com> wrote:
> The function notmuch-match-content-type was comparing content types
> case sensitively. Fix it so it tests case insensitively.
> 
> This fixes a bug where emacs would not include any body when replying
> to a message with content-type TEXT/PLAIN.
> ---
>  emacs/notmuch-lib.el |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
> index c146748..a754de7 100644
> --- a/emacs/notmuch-lib.el
> +++ b/emacs/notmuch-lib.el
> @@ -185,8 +185,9 @@ the user hasn't set this variable with the old or new value."
>  	(st2 (notmuch-split-content-type t2)))
>      (if (or (string= (cadr st1) "*")
>  	    (string= (cadr st2) "*"))
> -	(string= (car st1) (car st2))
> -      (string= t1 t2))))
> +	;; Comparison of content types should be case insensitive.
> +	(string= (downcase (car st1)) (downcase (car st2)))
> +      (string= (downcase t1) (downcase t2)))))
>  
>  (defvar notmuch-multipart/alternative-discouraged
>    '(

LGTM.

jamie.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

  reply	other threads:[~2012-03-26 15:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-24 21:49 Reply code with TEXT/PLAIN Mark Walters
2012-03-25  0:19 ` Adam Wolfe Gordon
2012-03-25  0:43   ` [PATCH] emacs: content-type comparison should be case insensitive Mark Walters
2012-03-26 15:21     ` Jameson Graef Rollins [this message]
2012-03-26 19:40     ` Tomi Ollila
2012-03-31  0:30     ` David Bremner
2012-03-26 15:21   ` Reply code with TEXT/PLAIN Jameson Graef Rollins
2012-03-26 15:24     ` Daniel Kahn Gillmor
2012-03-26 15:39       ` Jameson Graef Rollins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87398vl758.fsf@servo.finestructure.net \
    --to=jrollins@finestructure.net \
    --cc=markwalters1009@gmail.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).