Re: [PATCH] Fix typo in Message.maildir_flags_to_tags
[notmuch-archives.git] / 81 / fa09b6d580148ba33cffc177d5cef23407c536
1 Return-Path: <marmstrong@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 arlo.cworth.org (Postfix) with ESMTP id CA01D6DE02DB\r
6  for <notmuch@notmuchmail.org>; Thu, 21 Jul 2016 14:31:26 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.935\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.935 tagged_above=-999 required=5 tests=[AWL=0.087,\r
12   DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13  RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.211, SPF_PASS=-0.001,\r
14  T_RP_MATCHES_RCVD=-0.01] autolearn=disabled\r
15 Received: from arlo.cworth.org ([127.0.0.1])\r
16  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
17  with ESMTP id JnRJuX7qrHq0 for <notmuch@notmuchmail.org>;\r
18  Thu, 21 Jul 2016 14:31:19 -0700 (PDT)\r
19 Received: from mail-pf0-f175.google.com (mail-pf0-f175.google.com\r
20  [209.85.192.175])\r
21  by arlo.cworth.org (Postfix) with ESMTPS id ED8876DE0361\r
22  for <notmuch@notmuchmail.org>; Thu, 21 Jul 2016 14:30:51 -0700 (PDT)\r
23 Received: by mail-pf0-f175.google.com with SMTP id y134so34055412pfg.0\r
24  for <notmuch@notmuchmail.org>; Thu, 21 Jul 2016 14:30:51 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\r
26  s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
27  bh=C+PNQx3HLycQNruRrGQLPmThPD4j2GUyx4CIhHu0rmM=;\r
28  b=Sucx91TNoju5bgcb2TlE62INnUIXF/gImo08r7FpW2iyMJh7WZa/8ICAuPGKOHukpx\r
29  I8GPb0yrzBvr6WiOlAz6OBii+xQf3aeN3sPxfrFIJs6rF2mbokP6HomiP2OGDF05K/JU\r
30  f2roc8aJJQ0sYQUif6/UvLuO3+CTPImOAbcxAS9m6DhkCp6P1ff0KBkd29TJy1ijIrtl\r
31  nKZscEY4ebGZLO87KEOR7TkbhgZPizn/+2RTcKnKfKHGDxpgkzBSWVBkqOlFXo8glztB\r
32  fN7OIlEzdGlqJPDqMm6sIRfGfmaSwSXwKPV7x7adWlNYGrZZfVKqkQWW42IzusEal+zG lOZA==\r
33 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
34  d=1e100.net; s=20130820;\r
35  h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
36  :references;\r
37  bh=C+PNQx3HLycQNruRrGQLPmThPD4j2GUyx4CIhHu0rmM=;\r
38  b=IvlcF56MoyivAk6c2rL0dYykVUDuOSWmcZZDlLBJdeb17XOemSNNqtMZfahhbk4i+w\r
39  3pdxXH8etOdTW+tLFXzaZBPPSnS5wwP+mo7umHIBHxwSuNgZSqpRjkXxn0DanFKG5I6w\r
40  dQ8ikKXOxD3FDSx9dGjwxDH0DZ0Fz1JC9SnaXnQIpw6CG7h62uZL8F0FnMY5v7Fsb9Y2\r
41  2T9GPLIqa+IWsFOzZbpy6hFAQ0ENUvzfRWnQnfsDyoNG2RB5ERqiEnDtAB4BlXRb6nIp\r
42  seZSu/b0xzQJL0Z+8N/Vi96KmoNRn6ErWBgl6S933MonU267Cv4G6ldOysVGDTWe/u3C\r
43  WUBg==\r
44 X-Gm-Message-State:\r
45  AEkoouu/+jptLSg3IunmT1pTc4v4ljdpttgAP2lGh7xiWDCAIsPoxQ+ibHi+1kFEiz4X4rQ+\r
46 X-Received: by 10.98.213.130 with SMTP id d124mr596780pfg.118.1469136651164;\r
47  Thu, 21 Jul 2016 14:30:51 -0700 (PDT)\r
48 Received: from marmstrong-linux.kir.corp.google.com ([172.31.9.105])\r
49  by smtp.gmail.com with ESMTPSA id ra13sm14496645pac.29.2016.07.21.14.30.48\r
50  (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\r
51  Thu, 21 Jul 2016 14:30:50 -0700 (PDT)\r
52 From: Matt Armstrong <marmstrong@google.com>\r
53 To: notmuch@notmuchmail.org\r
54 Subject: [PATCH 2/2] emacs: express notmuch-search-line-faces in terms of two\r
55  new faces: notmuch-search-flagged-face and notmuch-search-unread-face.\r
56 Date: Thu, 21 Jul 2016 14:30:33 -0700\r
57 Message-Id: <1469136633-19235-3-git-send-email-marmstrong@google.com>\r
58 X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020\r
59 In-Reply-To: <1469136633-19235-1-git-send-email-marmstrong@google.com>\r
60 References: <1469136633-19235-1-git-send-email-marmstrong@google.com>\r
61 X-BeenThere: notmuch@notmuchmail.org\r
62 X-Mailman-Version: 2.1.20\r
63 Precedence: list\r
64 List-Id: "Use and development of the notmuch mail system."\r
65  <notmuch.notmuchmail.org>\r
66 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
67  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
68 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
69 List-Post: <mailto:notmuch@notmuchmail.org>\r
70 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
71 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
72  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
73 X-List-Received-Date: Thu, 21 Jul 2016 21:31:26 -0000\r
74 \r
75 This makes it easier to find the relevant face by customizing\r
76 notmuch-faces.  I plan to do the same to the other alists of faces\r
77 found elsewhere.\r
78 ---\r
79  NEWS             |  7 +++++++\r
80  emacs/notmuch.el | 39 ++++++++++++++++++++++++++++++++-------\r
81  2 files changed, 39 insertions(+), 7 deletions(-)\r
82 \r
83 diff --git a/NEWS b/NEWS\r
84 index ab661d4..49f8bb5 100644\r
85 --- a/NEWS\r
86 +++ b/NEWS\r
87 @@ -37,6 +37,13 @@ Respect charset of MIME parts when reading them\r
88  \r
89    Fix previous assumption that everyone uses UTF-8.\r
90  \r
91 +Face customization is easier\r
92 +\r
93 +  New faces `notmuch-search-flagged-face` and\r
94 +  `notmuch-search-unread-face` are used by default by\r
95 +  `notmuch-search-line-faces`. Customize `notmuch-faces` to modify\r
96 +  them.\r
97 +\r
98  Notmuch 0.22 (2016-04-26)\r
99  =========================\r
100  \r
101 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
102 index 8acdef3..43d56f7 100644\r
103 --- a/emacs/notmuch.el\r
104 +++ b/emacs/notmuch.el\r
105 @@ -311,6 +311,26 @@ there will be called at other points of notmuch execution."\r
106    :group 'notmuch-search\r
107    :group 'notmuch-faces)\r
108  \r
109 +(defface notmuch-search-flagged-face\r
110 +  '((t\r
111 +     (:weight bold)))\r
112 +  "Face used in search mode face for flagged threads.\r
113 +\r
114 +This face is the default value for the \"flagged\" tag in\r
115 +`notmuch-search-line-faces`."\r
116 +  :group 'notmuch-search\r
117 +  :group 'notmuch-faces)\r
118 +\r
119 +(defface notmuch-search-unread-face\r
120 +  '((t\r
121 +     (:foreground "blue")))\r
122 +  "Face used in search mode for unread threads.\r
123 +\r
124 +This face is the default value for the \"unread\" tag in\r
125 +`notmuch-search-line-faces`."\r
126 +  :group 'notmuch-search\r
127 +  :group 'notmuch-faces)\r
128 +\r
129  (defun notmuch-search-mode ()\r
130    "Major mode displaying results of a notmuch search.\r
131  \r
132 @@ -654,9 +674,12 @@ of the result."\r
133                   (goto-char (point-min))\r
134                   (forward-line (1- notmuch-search-target-line)))))))))\r
135  \r
136 -(defcustom notmuch-search-line-faces '(("unread" :weight bold)\r
137 -                                      ("flagged" :foreground "blue"))\r
138 -  "Tag/face mapping for line highlighting in notmuch-search.\r
139 +(defcustom notmuch-search-line-faces\r
140 +  '(("unread" 'notmuch-search-unread-face)\r
141 +    ("flagged" 'notmuch-search-flagged-face))\r
142 +  "Alist of tags to faces for line highlighting in notmuch-search.\r
143 +Each element looks like (TAG . FACE).\r
144 +A thread with TAG will have FACE applied.\r
145  \r
146  Here is an example of how to color search results based on tags.\r
147   (the following text would be placed in your ~/.emacs file):\r
148 @@ -665,10 +688,12 @@ Here is an example of how to color search results based on tags.\r
149                                     (\"deleted\" . (:foreground \"red\"\r
150                                                   :background \"blue\"))))\r
151  \r
152 -The attributes defined for matching tags are merged, with earlier\r
153 -attributes overriding later. A message having both \"deleted\"\r
154 -and \"unread\" tags with the above settings would have a green\r
155 -foreground and blue background."\r
156 +The FACE must be a face name (a symbol or string), a property\r
157 +list of face attributes, or a list of these.  The faces for\r
158 +matching tags are merged, with earlier attributes overriding\r
159 +later. A message having both \"deleted\" and \"unread\" tags with\r
160 +the above settings would have a green foreground and blue\r
161 +background."\r
162    :type '(alist :key-type (string) :value-type (custom-face-edit))\r
163    :group 'notmuch-search\r
164    :group 'notmuch-faces)\r
165 -- \r
166 2.8.0.rc3.226.g39d4020\r
167 \r