Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / cc / c4c37387bbe1457d452c29d86413d706d6b601
1 Return-Path: <dme@dme.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 37009418C3C\r
6         for <notmuch@notmuchmail.org>; Wed, 19 May 2010 01:55:00 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.9\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id k6fnXfWaQW0Q for <notmuch@notmuchmail.org>;\r
16         Wed, 19 May 2010 01:54:48 -0700 (PDT)\r
17 Received: from mail-ew0-f213.google.com (mail-ew0-f213.google.com\r
18         [209.85.219.213])\r
19         by olra.theworths.org (Postfix) with ESMTP id 0614240CAE9\r
20         for <notmuch@notmuchmail.org>; Wed, 19 May 2010 01:53:47 -0700 (PDT)\r
21 Received: by mail-ew0-f213.google.com with SMTP id 5so1814155ewy.0\r
22         for <notmuch@notmuchmail.org>; Wed, 19 May 2010 01:53:47 -0700 (PDT)\r
23 Received: by 10.213.51.212 with SMTP id e20mr3608242ebg.85.1274259227479;\r
24         Wed, 19 May 2010 01:53:47 -0700 (PDT)\r
25 Received: from ut.hh.sledj.net (host83-217-165-81.dsl.vispa.com\r
26         [83.217.165.81])\r
27         by mx.google.com with ESMTPS id 13sm3495931ewy.9.2010.05.19.01.53.43\r
28         (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
29         Wed, 19 May 2010 01:53:45 -0700 (PDT)\r
30 Received: by ut.hh.sledj.net (Postfix, from userid 1000)\r
31         id 562F3594098; Wed, 19 May 2010 08:03:45 +0100 (BST)\r
32 From: David Edmondson <dme@dme.org>\r
33 To: notmuch@notmuchmail.org\r
34 Subject: [PATCH 06/13] emacs: Allow control over faces for search mode\r
35  columns.\r
36 Date: Wed, 19 May 2010 08:03:33 +0100\r
37 Message-Id: <1274252620-1249-7-git-send-email-dme@dme.org>\r
38 X-Mailer: git-send-email 1.7.1\r
39 In-Reply-To: <1274252620-1249-1-git-send-email-dme@dme.org>\r
40 References: <1274252620-1249-1-git-send-email-dme@dme.org>\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Wed, 19 May 2010 08:55:00 -0000\r
54 \r
55 Add face declarations for the date, count, matching author and subject\r
56 columns in search mode and apply those faces when building the search\r
57 mode display.\r
58 ---\r
59  emacs/notmuch.el |   59 +++++++++++++++++++++++++++++++++++++++--------------\r
60  1 files changed, 43 insertions(+), 16 deletions(-)\r
61 \r
62 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
63 index d36a92d..7c9c028 100644\r
64 --- a/emacs/notmuch.el\r
65 +++ b/emacs/notmuch.el\r
66 @@ -285,27 +285,48 @@ For a mouse binding, return nil."\r
67   "Face for the single-line message summary in notmuch-show-mode."\r
68   :group 'notmuch)\r
69  \r
70 -(defface notmuch-tag-face\r
71 +(defface notmuch-search-date\r
72 +  '((t :inherit default))\r
73 +  "Face used in search mode for dates."\r
74 +  :group 'notmuch)\r
75 +\r
76 +(defface notmuch-search-count\r
77 +  '((t :inherit default))\r
78 +  "Face used in search mode for the count matching the query."\r
79 +  :group 'notmuch)\r
80 +\r
81 +(defface notmuch-search-subject\r
82 +  '((t :inherit default))\r
83 +  "Face used in search mode for subjects."\r
84 +  :group 'notmuch)\r
85 +\r
86 +(defface notmuch-search-matching-authors\r
87 +  '((t :inherit default))\r
88 +  "Face used in search mode for authors matching the query."\r
89 +  :group 'notmuch)\r
90 +\r
91 +(defface notmuch-search-non-matching-authors\r
92    '((((class color)\r
93        (background dark))\r
94 -     (:foreground "OliveDrab1"))\r
95 +     (:foreground "grey30"))\r
96      (((class color)\r
97        (background light))\r
98 -     (:foreground "navy blue" :bold t))\r
99 +     (:foreground "grey60"))\r
100      (t\r
101 -     (:bold t)))\r
102 -  "Notmuch search mode face used to highligh tags."\r
103 +     (:italic t)))\r
104 +  "Face used in search mode for authors not matching the query."\r
105    :group 'notmuch)\r
106  \r
107 -(defface notmuch-search-non-matching-authors\r
108 +(defface notmuch-tag-face\r
109    '((((class color)\r
110        (background dark))\r
111 -     (:foreground "grey30"))\r
112 +     (:foreground "OliveDrab1"))\r
113      (((class color)\r
114        (background light))\r
115 -     (:foreground "grey60"))\r
116 -    (t (:italic t)))\r
117 -  "Face used in search mode for authors not matching the query."\r
118 +     (:foreground "navy blue" :bold t))\r
119 +    (t\r
120 +     (:bold t)))\r
121 +  "Face used in search mode face for tags."\r
122    :group 'notmuch)\r
123  \r
124  ;;;###autoload\r
125 @@ -599,21 +620,27 @@ matching will be applied."\r
126             ;; `notmuch-search-process-filter'.\r
127             (save-match-data\r
128               (if (string-match "\\(.*\\)|\\(..*\\)" truncated-string)\r
129 -                 (concat (match-string 1 truncated-string) ","\r
130 +                 (concat (propertize (concat (match-string 1 truncated-string) ",")\r
131 +                                     'face 'notmuch-search-matching-authors)\r
132                           (propertize (match-string 2 truncated-string)\r
133                                       'face 'notmuch-search-non-matching-authors))\r
134 -               truncated-string)))))\r
135 +               (propertize truncated-string 'face 'notmuch-search-matching-authors))))))\r
136  \r
137  (defun notmuch-search-insert-field (field date count authors subject tags)\r
138    (cond\r
139     ((string-equal field "date")\r
140 -    (insert (format (cdr (assoc field notmuch-search-result-format)) date)))\r
141 +    (insert (propertize (format (cdr (assoc field notmuch-search-result-format)) date)\r
142 +                       'face 'notmuch-search-date)))\r
143     ((string-equal field "count")\r
144 -    (insert (format (cdr (assoc field notmuch-search-result-format)) count)))\r
145 +    (insert (propertize (format (cdr (assoc field notmuch-search-result-format)) count)\r
146 +                       'face 'notmuch-search-count)))\r
147 +   ((string-equal field "subject")\r
148 +    (insert (propertize (format (cdr (assoc field notmuch-search-result-format)) subject)\r
149 +                       'face 'notmuch-search-subject)))\r
150 +\r
151     ((string-equal field "authors")\r
152      (notmuch-search-insert-authors (cdr (assoc field notmuch-search-result-format)) authors))\r
153 -   ((string-equal field "subject")\r
154 -    (insert (format (cdr (assoc field notmuch-search-result-format)) subject)))\r
155 +\r
156     ((string-equal field "tags")\r
157      (insert (concat "(" (propertize tags 'font-lock-face 'notmuch-tag-face) ")")))))\r
158  \r
159 -- \r
160 1.7.1\r
161 \r