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 7160C431FB6 for ; Sat, 24 Mar 2012 17:43:26 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.201 X-Spam-Level: X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, 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 fjGrvFC4EDxe for ; Sat, 24 Mar 2012 17:43:26 -0700 (PDT) Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id BF386431FAE for ; Sat, 24 Mar 2012 17:43:25 -0700 (PDT) Received: by wgbds10 with SMTP id ds10so2538106wgb.2 for ; Sat, 24 Mar 2012 17:43:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=tiykjavKjundulvZT1KRcTrUVbDvYs/Tcjo98Ca0Hm8=; b=tuM9CQlp7efsyqYOJweib1piAvueXYyn18Gdbb7FeS0+K4KN1CFySTLYmIda35rqrT zcPVYzzDiIrkAcTMFSIUNcbNuNFavYK7iTBANiTcPW0pCDca/ASg61QedKvIJ892HiY5 9Kfl4xEtd77FE7fpuPY9h07FMZn20YWkTbXShYhNwWi43qjW1mey+dS2+Ge3yPNDCeRW VNjgma5qQ0NPQoQiwYVYsV5T0FvcZ/dnkAJZC1chLm14X84vj7et5OCl1ZrukqM1FPKn DNW2ZECO/kTHeTsaS6rZ4Nm/WlZgwPDIb2pMpRwVA9/A3ZhEZGx5O6iNLkq2SI5puoCe W2oA== Received: by 10.180.107.101 with SMTP id hb5mr9237572wib.3.1332636203015; Sat, 24 Mar 2012 17:43:23 -0700 (PDT) Received: from localhost (94-192-233-223.zone6.bethere.co.uk. [94.192.233.223]) by mx.google.com with ESMTPS id ff9sm27343432wib.2.2012.03.24.17.43.21 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 24 Mar 2012 17:43:22 -0700 (PDT) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH] emacs: content-type comparison should be case insensitive. Date: Sun, 25 Mar 2012 00:43:28 +0000 Message-Id: <1332636208-9784-1-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: References: 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:43:26 -0000 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 '( -- 1.7.9.1