1 Return-Path: <mpn@google.com>
\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 075F1431FBF
\r
6 for <notmuch@notmuchmail.org>; Thu, 23 Aug 2012 05:59:33 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.8 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id ue5EX36mbbRD for <notmuch@notmuchmail.org>;
\r
17 Thu, 23 Aug 2012 05:59:32 -0700 (PDT)
\r
18 Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com
\r
19 [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 212D9431FAE
\r
22 for <notmuch@notmuchmail.org>; Thu, 23 Aug 2012 05:59:31 -0700 (PDT)
\r
23 Received: by bkwj4 with SMTP id j4so295739bkw.26
\r
24 for <notmuch@notmuchmail.org>; Thu, 23 Aug 2012 05:59:30 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
\r
26 s=20120113; h=from:to:subject:date:message-id:x-mailer;
\r
27 bh=rdPODBsr+WMasicDr4zWZkarC04wPP7H9WSR9eT0tkg=;
\r
28 b=blrrFOU6QKEHfFCPzMV6+I7eRi92b8PCS6DoYoOod1JwjVV7qh+YbP+hHD7h78mTKn
\r
29 Dw+J6Oc1OMJvLeogGhlNq9wplwWzwUEaoN1U8aAE1DJlb4SR4CdjKt6w9/FUuOlCdswD
\r
30 +/0JHEWKMlurpbsdi2255Eg4vYTxNdKu/1VGFwO1sBinB9Y/5lf4OyYI0ah2j3sHBAVf
\r
31 4N1L12XEgNfFdvCELgdxxdondsxiruRF0yRiN4jitvlIDKiB7lpaDZJVy4kwS0tGD8MO
\r
32 fJ72uU+DMXOYX0BQzOZ9IqP67FhV9CvDzXQrUcXe9UYIzgSTWHRgmgiSqSxBrkcQJALQ hn7w==
\r
33 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
34 d=google.com; s=20120113;
\r
35 h=from:to:subject:date:message-id:x-mailer:x-gm-message-state;
\r
36 bh=rdPODBsr+WMasicDr4zWZkarC04wPP7H9WSR9eT0tkg=;
\r
37 b=dUzYB9dFcEVSh58v0D0KbGF+yydnjI9993s/Iillbae1SCQ+P4ls4vsAjiOQZHAfRi
\r
38 0ygXLKuc+ZZupAXWPqVG7tkivfP5159TI4OEET37irieFkuzg22ZVDK+CrUYnjvp7L0l
\r
39 PX5H67GGrmBzk0+RMNl51rsmbUMaVmaZvUWAGBjjgipkdYtAj9bSIzWL4xg9zx4NLEao
\r
40 rtUfVXNmO5TO4LSFazfIgCh0RUWB5z9XBtcysAG36e3FnYTjtGmYmwBP2N+sh5fH2mvD
\r
41 JN+39Ot34AHZ2v3/CqJmJpIRN/oXWbWdubQE09QbTN46h/aNJF2Gt1LJWBmvp+t7ruBB
\r
43 Received: by 10.205.137.8 with SMTP id im8mr424918bkc.135.1345726770592;
\r
44 Thu, 23 Aug 2012 05:59:30 -0700 (PDT)
\r
45 Received: by 10.205.137.8 with SMTP id im8mr424902bkc.135.1345726770269;
\r
46 Thu, 23 Aug 2012 05:59:30 -0700 (PDT)
\r
47 Received: from mpn-glaptop.corp.google.com
\r
48 (dhcp-172-16-75-166.zrh.corp.google.com [172.16.75.166])
\r
49 by mx.google.com with ESMTPS id 14sm4590735bkw.15.2012.08.23.05.59.28
\r
50 (version=SSLv3 cipher=OTHER); Thu, 23 Aug 2012 05:59:29 -0700 (PDT)
\r
51 From: Michal Nazarewicz <mpn@google.com>
\r
52 To: notmuch@notmuchmail.org
\r
53 Subject: [PATCH] emacs: notmuch-search: fix faces
\r
54 Date: Thu, 23 Aug 2012 14:59:21 +0200
\r
56 <83882f4c8de5317e0184dc091a197b2341e5f015.1345725028.git.mina86@mina86.com>
\r
57 X-Mailer: git-send-email 1.7.7.3
\r
58 X-Gm-Message-State: ALoCoQkDKhR1v4nMB3sCJujrsDe0vOmFr+SB0HlZd9lulPiIyfkXa1tKbTAyUruEHsgJNSx4obXEKlKehvVwiKRM2z+3IaXTauVNFdBNGcv++kO2tlnDe3/Co57qs2PcQHShaCBbRZiU2Cgr2KuOD66Iv8FIdARYr9dlPblLtsC7pZP9YbaCuOf3kZSZihERNJncWR2dqLaxSEnvCDrdMgZAYMqdkdCmxw==
\r
59 X-BeenThere: notmuch@notmuchmail.org
\r
60 X-Mailman-Version: 2.1.13
\r
62 List-Id: "Use and development of the notmuch mail system."
\r
63 <notmuch.notmuchmail.org>
\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
65 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
67 List-Post: <mailto:notmuch@notmuchmail.org>
\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
70 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
71 X-List-Received-Date: Thu, 23 Aug 2012 12:59:33 -0000
\r
73 From: Michal Nazarewicz <mina86@mina86.com>
\r
75 For some reason the faces do not get applied when 'face property is
\r
76 used, but they work correctly with 'font-lock-face property. This
\r
77 commit changes notmuch-search to use the latter.
\r
79 emacs/notmuch.el | 23 +++++++++++++----------
\r
80 1 files changed, 13 insertions(+), 10 deletions(-)
\r
82 diff --git a/emacs/notmuch.el b/emacs/notmuch.el
\r
83 index 7b61e9b..44cbe28 100644
\r
84 --- a/emacs/notmuch.el
\r
85 +++ b/emacs/notmuch.el
\r
86 @@ -692,10 +692,10 @@ propertize appropriately. If no boundary between authors and
\r
87 non-authors is found, assume that all of the authors match."
\r
88 (if (string-match "\\(.*\\)|\\(.*\\)" authors)
\r
89 (concat (propertize (concat (match-string 1 authors) ",")
\r
90 - 'face 'notmuch-search-matching-authors)
\r
91 + 'font-lock-face 'notmuch-search-matching-authors)
\r
92 (propertize (match-string 2 authors)
\r
93 - 'face 'notmuch-search-non-matching-authors))
\r
94 - (propertize authors 'face 'notmuch-search-matching-authors)))
\r
95 + 'font-lock-face 'notmuch-search-non-matching-authors))
\r
96 + (propertize authors 'font-lock-face 'notmuch-search-matching-authors)))
\r
98 (defun notmuch-search-insert-authors (format-string authors)
\r
99 ;; Save the match data to avoid interfering with
\r
100 @@ -741,11 +741,14 @@ non-authors is found, assume that all of the authors match."
\r
101 (setq visible-string (notmuch-search-author-propertize visible-string)
\r
102 ;; The invisible string must contain only non-matching
\r
103 ;; authors, as the visible-string contains both.
\r
104 - invisible-string (propertize invisible-string
\r
105 - 'face 'notmuch-search-non-matching-authors))
\r
107 + (propertize invisible-string
\r
109 + 'notmuch-search-non-matching-authors))
\r
110 ;; The visible string contains only matching authors.
\r
111 (setq visible-string (propertize visible-string
\r
112 - 'face 'notmuch-search-matching-authors)
\r
114 + 'notmuch-search-matching-authors)
\r
115 ;; The invisible string may contain both matching and
\r
116 ;; non-matching authors.
\r
117 invisible-string (notmuch-search-author-propertize invisible-string)))
\r
118 @@ -770,15 +773,15 @@ non-authors is found, assume that all of the authors match."
\r
120 ((string-equal field "date")
\r
121 (insert (propertize (format format-string (plist-get result :date_relative))
\r
122 - 'face 'notmuch-search-date)))
\r
123 + 'font-lock-face 'notmuch-search-date)))
\r
124 ((string-equal field "count")
\r
125 (insert (propertize (format format-string
\r
126 (format "[%s/%s]" (plist-get result :matched)
\r
127 (plist-get result :total)))
\r
128 - 'face 'notmuch-search-count)))
\r
129 + 'font-lock-face 'notmuch-search-count)))
\r
130 ((string-equal field "subject")
\r
131 (insert (propertize (format format-string (plist-get result :subject))
\r
132 - 'face 'notmuch-search-subject)))
\r
133 + 'font-lock-face 'notmuch-search-subject)))
\r
135 ((string-equal field "authors")
\r
136 (notmuch-search-insert-authors format-string (plist-get result :authors)))
\r
137 @@ -786,7 +789,7 @@ non-authors is found, assume that all of the authors match."
\r
138 ((string-equal field "tags")
\r
139 (let ((tags-str (mapconcat 'identity (plist-get result :tags) " ")))
\r
140 (insert (propertize (format format-string tags-str)
\r
141 - 'face 'notmuch-tag-face))))))
\r
142 + 'font-lock-face 'notmuch-tag-face))))))
\r
144 (defun notmuch-search-show-result (result &optional pos)
\r
145 "Insert RESULT at POS or the end of the buffer if POS is null."
\r