unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Daniel Schoepe <daniel@schoepe.org>
To: notmuch@notmuchmail.org
Subject: [PATCH] emacs: Make highlight-faces for pick configurable
Date: Sun, 12 Feb 2012 15:47:18 +0100	[thread overview]
Message-ID: <1329058038-6029-2-git-send-email-daniel@schoepe.org> (raw)
In-Reply-To: <1329058038-6029-1-git-send-email-daniel@schoepe.org>

---
 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
-- 
1.7.9

  reply	other threads:[~2012-02-12 14:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-12 10:32 RFC notmuch-pick: an emacs threaded message view with split-pane Mark Walters
2012-02-12 10:36 ` [RFC PATCH 1/3] cli: notmuch-show changes to support pick Mark Walters
2012-02-12 10:36 ` [RFC PATCH 2/3] emacs: changes to other files to support notmuch-pick Mark Walters
2012-02-12 10:36 ` [RFC PATCH 3/3] emacs: add notmuch-pick itself Mark Walters
     [not found] ` <87ehu0cf16.fsf@schoepe.localhost>
2012-02-12 14:31   ` RFC notmuch-pick: an emacs threaded message view with split-pane Daniel Schoepe
2012-02-12 14:47 ` [PATCH 0/1] emacs: Make highlight-faces for pick configurable Daniel Schoepe
2012-02-12 14:47   ` Daniel Schoepe [this message]
2012-02-12 15:50     ` [PATCH] " Mark Walters
2012-02-12 20:46 ` RFC notmuch-pick: an emacs threaded message view with split-pane Jameson Graef Rollins
2012-02-12 20:59   ` Daniel Schoepe
2012-02-12 21:43     ` Mark Walters

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=1329058038-6029-2-git-send-email-daniel@schoepe.org \
    --to=daniel@schoepe.org \
    --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).