Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A07D7431FBC for ; Fri, 19 Feb 2010 00:33:02 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.328 X-Spam-Level: X-Spam-Status: No, score=-2.328 tagged_above=-999 required=5 tests=[AWL=0.271, BAYES_00=-2.599] autolearn=ham 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 C2dqtmKvWdTe for ; Fri, 19 Feb 2010 00:33:01 -0800 (PST) Received: from mail-ew0-f222.google.com (mail-ew0-f222.google.com [209.85.219.222]) by olra.theworths.org (Postfix) with ESMTP id 808FB431FAE for ; Fri, 19 Feb 2010 00:33:01 -0800 (PST) Received: by ewy22 with SMTP id 22so225272ewy.30 for ; Fri, 19 Feb 2010 00:33:00 -0800 (PST) Received: by 10.213.97.35 with SMTP id j35mr2259528ebn.4.1266568380618; Fri, 19 Feb 2010 00:33:00 -0800 (PST) Received: from aw.hh.sledj.net (gmp-ea-fw-1b.sun.com [192.18.8.1]) by mx.google.com with ESMTPS id 5sm651954eyh.40.2010.02.19.00.32.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 19 Feb 2010 00:32:59 -0800 (PST) Received: by aw.hh.sledj.net (Postfix, from userid 1000) id 46EB53A09E; Fri, 19 Feb 2010 08:32:42 +0000 (GMT) To: James Westby , notmuch@notmuchmail.org In-Reply-To: <87mxz6a1w4.fsf@jameswestby.net> References: <1266346260-3858-1-git-send-email-jw+debian@jameswestby.net> <871vgl5737.fsf@aw.hh.sledj.net> <87mxz6a1w4.fsf@jameswestby.net> From: David Edmondson Date: Fri, 19 Feb 2010 08:32:42 +0000 Message-ID: <87r5ohwrpx.fsf@aw.hh.sledj.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Subject: Re: [notmuch] [PATCH] Look for text/html content types ignoring case 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: Fri, 19 Feb 2010 08:33:02 -0000 --=-=-= On Thu, 18 Feb 2010 17:29:15 +0000, James Westby wrote: > On Tue, 16 Feb 2010 19:11:24 +0000, David Edmondson wrote: > > On Tue, 16 Feb 2010 18:51:00 +0000, James Westby wrote: > > > Some people send html parts as text/HTML or similar, so do a > > > case-sensitive comparison when checking for html parts. > > > > There are various other places where `equal' is used to compare MIME > > types with strings. Shouldn't they all be fixed? (I see TEXT/PLAIN > > frequently.) > > I don't see any others in notmuch.el, but I'm not experienced in elisp, > so I may be missing some, care to help me out? How about this: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-notmuch.el-Always-compare-lower-case-MIME-types.patch >From e5ae18036ccb1dcaa19d0125976b309c25331892 Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Fri, 19 Feb 2010 08:32:05 +0000 Subject: [PATCH] notmuch.el: Always compare lower-case MIME types. --- notmuch.el | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/notmuch.el b/notmuch.el index 6fad91e..7731a93 100644 --- a/notmuch.el +++ b/notmuch.el @@ -757,8 +757,9 @@ is what to put on the button." (let (mime-message mime-type) (save-excursion (re-search-forward notmuch-show-contentype-regexp end t) - (setq mime-type (car (split-string (buffer-substring - (match-beginning 1) (match-end 1)))))) + (setq mime-type (downcase (car (split-string + (buffer-substring + (match-beginning 1) (match-end 1))))))) (forward-line) -- 1.6.6.1 --=-=-= dme. -- David Edmondson, http://dme.org --=-=-=--