--- /dev/null
+Return-Path: <aneesh.kumar@linux.vnet.ibm.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id B5A8E431FBC\r
+ for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 00:38:07 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id aqAiNv-xzSfP for <notmuch@notmuchmail.org>;\r
+ Sun, 22 Nov 2009 00:38:06 -0800 (PST)\r
+Received: from e23smtp01.au.ibm.com (e23smtp01.au.ibm.com [202.81.31.143])\r
+ by olra.theworths.org (Postfix) with ESMTP id 87081431FAE\r
+ for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 00:38:05 -0800 (PST)\r
+Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.31.245])\r
+ by e23smtp01.au.ibm.com (8.14.3/8.13.1) with ESMTP id nAM8aRqo020784\r
+ for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 19:36:27 +1100\r
+Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139])\r
+ by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id\r
+ nAM8c3x91016030\r
+ for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 19:38:03 +1100\r
+Received: from d23av04.au.ibm.com (loopback [127.0.0.1])\r
+ by d23av04.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id\r
+ nAM8c2Un029968\r
+ for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 19:38:03 +1100\r
+Received: from localhost.localdomain ([9.77.209.175])\r
+ by d23av04.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id\r
+ nAM8c1qb029958; Sun, 22 Nov 2009 19:38:01 +1100\r
+From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>\r
+To: notmuch@notmuchmail.org\r
+Date: Sun, 22 Nov 2009 14:07:56 +0530\r
+Message-Id:\r
+ <1258879076-31883-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>\r
+X-Mailer: git-send-email 1.6.5.2.74.g610f9\r
+Subject: [notmuch] [PATCH -v2] notmuch.el: Add face support to search and\r
+ show mode\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.12\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 22 Nov 2009 08:38:07 -0000\r
+\r
+This add two faces, notmuch-show-subject-face and\r
+notmuch-tag-unread-face. The first face is used to show the subject\r
+line in the notmuch-show-mode and the second one to show the unread\r
+tag in the notmuch-search-mode. We can set additional tags by setting\r
+notmuch-tag-face-alist as below\r
+\r
+(defface notmuch-tag-unread-face\r
+ '((((class color) (background light)) (:foreground "goldenrod" :bold t))\r
+ (((class color) (background dark)) (:foreground "goldenrod" :bold t)))\r
+ "Notmuch search mode face used to highligh tags.")\r
+\r
+(defface notmuch-tag-inbox-face\r
+ '((((class color) (background light)) (:foreground "red" :bold t))\r
+ (((class color) (background dark)) (:foreground "red" :bold t)))\r
+ "Notmuch search mode face used to highligh tags.")\r
+\r
+(setq notmuch-tag-face-alist '(("unread" . 'notmuch-tag-unread-face)\r
+ ("inbox" . 'notmuch-tag-inbox-face)))\r
+(require 'notmuch)\r
+\r
+Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>\r
+---\r
+ notmuch.el | 36 ++++++++++++++++++++++++++++++++++--\r
+ 1 files changed, 34 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/notmuch.el b/notmuch.el\r
+index 0144b61..a0f5aaa 100644\r
+--- a/notmuch.el\r
++++ b/notmuch.el\r
+@@ -637,6 +637,18 @@ which this thread was originally shown."\r
+ (force-window-update)\r
+ (redisplay t))\r
+ \r
++(defface notmuch-show-subject-face\r
++ '((((class color) (background light)) (:foreground "yellow" :bold t))\r
++ (((class color) (background dark)) (:foreground "yellow" :bold t)))\r
++ "Notmuch show mode face used to highligh subject line."\r
++ :group 'notmuch)\r
++\r
++(defvar notmuch-show-font-lock-keywords\r
++ (list ;; header in font-lock-type-face\r
++ (list "\\(Subject:.*$\\)"\r
++ '(1 'notmuch-show-subject-face)))\r
++ "Additonal expression to hightlight in notmuch-show-mode")\r
++\r
+ ;;;###autoload\r
+ (defun notmuch-show-mode ()\r
+ "Major mode for viewing a thread with notmuch.\r
+@@ -677,7 +689,9 @@ view, (remove the \"inbox\" tag from each), with\r
+ (use-local-map notmuch-show-mode-map)\r
+ (setq major-mode 'notmuch-show-mode\r
+ mode-name "notmuch-show")\r
+- (setq buffer-read-only t))\r
++ (setq buffer-read-only t)\r
++ (set (make-local-variable 'font-lock-defaults)\r
++ '(notmuch-show-font-lock-keywords t)))\r
+ \r
+ ;;;###autoload\r
+ \r
+@@ -806,6 +820,17 @@ thread from that buffer can be show when done with this one)."\r
+ (goto-char (point-max))\r
+ (forward-line -1))\r
+ \r
++(defface notmuch-tag-unread-face\r
++ '((((class color) (background light)) (:foreground "goldenrod" :bold t))\r
++ (((class color) (background dark)) (:foreground "goldenrod" :bold t)))\r
++ "Notmuch search mode face used to highligh tags."\r
++ :group 'notmuch)\r
++\r
++(defvar notmuch-tag-face-alist `(("unread" . 'notmuch-tag-unread-face))\r
++ "List containing the tag list that need to be highlighed")\r
++\r
++(defvar notmuch-search-font-lock-keywords nil)\r
++\r
+ ;;;###autoload\r
+ (defun notmuch-search-mode ()\r
+ "Major mode for searching mail with notmuch.\r
+@@ -836,7 +861,14 @@ global search.\r
+ (setq truncate-lines t)\r
+ (setq major-mode 'notmuch-search-mode\r
+ mode-name "notmuch-search")\r
+- (setq buffer-read-only t))\r
++ (setq buffer-read-only t)\r
++ (setq notmuch-search-tags (mapcar 'car notmuch-tag-face-alist))\r
++ (loop for notmuch-search-tag in notmuch-search-tags\r
++ do (add-to-list 'notmuch-search-font-lock-keywords (list\r
++ (concat "\\(" notmuch-search-tag "\\)")\r
++ `(1 ,(cdr (assoc notmuch-search-tag notmuch-tag-face-alist))))))\r
++ (set (make-local-variable 'font-lock-defaults)\r
++ '(notmuch-search-font-lock-keywords t)))\r
+ \r
+ (defun notmuch-search-find-thread-id ()\r
+ (save-excursion\r
+-- \r
+1.6.5.2.74.g610f9\r
+\r