unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Edmondson <dme@dme.org>
To: James Westby <jw+debian@jameswestby.net>, notmuch@notmuchmail.org
Subject: Re: [PATCH] Look for text/html content types ignoring case
Date: Fri, 19 Feb 2010 08:32:42 +0000	[thread overview]
Message-ID: <87r5ohwrpx.fsf@aw.hh.sledj.net> (raw)
In-Reply-To: <87mxz6a1w4.fsf@jameswestby.net>

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

On Thu, 18 Feb 2010 17:29:15 +0000, James Westby <jw+debian@jameswestby.net> wrote:
> On Tue, 16 Feb 2010 19:11:24 +0000, David Edmondson <dme@dme.org> wrote:
> > On Tue, 16 Feb 2010 18:51:00 +0000, James Westby <jw+debian@jameswestby.net> 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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-notmuch.el-Always-compare-lower-case-MIME-types.patch --]
[-- Type: text/x-diff, Size: 917 bytes --]

From e5ae18036ccb1dcaa19d0125976b309c25331892 Mon Sep 17 00:00:00 2001
From: David Edmondson <dme@dme.org>
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


[-- Attachment #3: Type: text/plain, Size: 42 bytes --]


dme.
-- 
David Edmondson, http://dme.org

  reply	other threads:[~2010-02-19  8:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-16 18:51 [PATCH] Look for text/html content types ignoring case James Westby
2010-02-16 19:11 ` David Edmondson
2010-02-18 17:29   ` James Westby
2010-02-19  8:32     ` David Edmondson [this message]
2010-02-19 15:06       ` James Westby

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=87r5ohwrpx.fsf@aw.hh.sledj.net \
    --to=dme@dme.org \
    --cc=jw+debian@jameswestby.net \
    --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).