From: Mark Walters Date: Sun, 12 Feb 2012 15:50:00 +0000 (+0000) Subject: Re: [PATCH] emacs: Make highlight-faces for pick configurable X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=d4fe50d82257c7989ab9525b449e3155c341935c;p=notmuch-archives.git Re: [PATCH] emacs: Make highlight-faces for pick configurable --- diff --git a/a8/760dd2632f0000c050da68e9d7ddf38f9c3b15 b/a8/760dd2632f0000c050da68e9d7ddf38f9c3b15 new file mode 100644 index 000000000..10ed0d3f2 --- /dev/null +++ b/a8/760dd2632f0000c050da68e9d7ddf38f9c3b15 @@ -0,0 +1,132 @@ +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 73809429E31 + for ; Sun, 12 Feb 2012 07:48:45 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -1.098 +X-Spam-Level: +X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 JC4VMUg4zlXN for ; + Sun, 12 Feb 2012 07:48:45 -0800 (PST) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id B1C93431FAE + for ; Sun, 12 Feb 2012 07:48:44 -0800 (PST) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1RwbfM-0003HQ-FY; Sun, 12 Feb 2012 15:48:40 +0000 +Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223] + helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) + (envelope-from ) + id 1RwbfM-0004sG-5i; Sun, 12 Feb 2012 15:48:40 +0000 +From: Mark Walters +To: Daniel Schoepe , notmuch@notmuchmail.org +Subject: Re: [PATCH] emacs: Make highlight-faces for pick configurable +In-Reply-To: <1329058038-6029-2-git-send-email-daniel@schoepe.org> +References: <87d39k1gvi.fsf@qmul.ac.uk> + <1329058038-6029-1-git-send-email-daniel@schoepe.org> + <1329058038-6029-2-git-send-email-daniel@schoepe.org> +User-Agent: Notmuch/0.11.1+172~g6a5d2c5 (http://notmuchmail.org) Emacs/23.2.1 + (i486-pc-linux-gnu) +Date: Sun, 12 Feb 2012 15:50:00 +0000 +Message-ID: <87wr7st5jr.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Sender-Host-Address: 94.192.233.223 +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: 9e4141d2d90db30d255d77725cba1325 (of first 20000 bytes) +X-SpamAssassin-Score: -1.8 +X-SpamAssassin-SpamBar: - +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored -1.8 points. + Summary of the scoring: + * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, + * medium trust + * [138.37.6.40 listed in list.dnswl.org] + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay + * domain + * 0.5 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +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, 12 Feb 2012 15:48:45 -0000 + +On Sun, 12 Feb 2012 15:47:18 +0100, Daniel Schoepe wrote: +> --- +> emacs/notmuch-pick.el | 21 ++++++++++++++++++--- +> 1 files changed, 18 insertions(+), 3 deletions(-) +> +> diff --git a/emacs/notmuch-pick.el b/emacs/notmuch-pick.el +> index 4c91d7c..2bf1ae4 100644 +> --- a/emacs/notmuch-pick.el +> +++ b/emacs/notmuch-pick.el +> @@ -42,6 +42,22 @@ +> :group 'notmuch +> :type 'int) +> +> +(defface notmuch-pick-match-face +> + '((((class color) +> + (background dark)) +> + (:foreground "white")) +> + (((class color) +> + (background light)) +> + (:foreground "black")) +> + (t (:bold t))) +> + "Face used in pick mode for matching messages." +> + :group 'notmuch) +> + +> +(defface notmuch-pick-no-match-face +> + '((t (:foreground "gray"))) +> + "Face used in pick mode for messages not matching the query." +> + :group 'notmuch) +> + +> (defvar notmuch-pick-previous-subject "") +> (make-variable-buffer-local 'notmuch-pick-previous-subject) +> +> @@ -415,10 +431,9 @@ unchanged ADDRESS if parsing fails." +> (match (plist-get msg :match)) +> (tags (plist-get msg :tags)) +> (bare-subject (notmuch-show-strip-re (plist-get headers :Subject))) +> - ;; Face should be a defcustom or something MJW +> (message-face (if match +> - '(:foreground "black") +> - '(:foreground "gray")))) +> + 'notmuch-pick-match-face +> + 'notmuch-pick-no-match-face))) +> +> (insert (propertize (concat +> (notmuch-pick-string-width + +This is great. (I had even thought about the hardwired gray: that should +work on both light and dark backgrounds but had forgotten all about the +"black"). + +Anyway this is the correct fix: thanks! + +Mark + +