1 Return-Path: <markwalters1009@gmail.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 674BB431FDD
\r
6 for <notmuch@notmuchmail.org>; Tue, 11 Mar 2014 21:10:17 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,
\r
14 RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id wxsBg6IU2p8S for <notmuch@notmuchmail.org>;
\r
18 Tue, 11 Mar 2014 21:10:11 -0700 (PDT)
\r
19 Received: from mail-we0-f181.google.com (mail-we0-f181.google.com
\r
20 [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
21 (No client certificate requested)
\r
22 by olra.theworths.org (Postfix) with ESMTPS id F109C431FC2
\r
23 for <notmuch@notmuchmail.org>; Tue, 11 Mar 2014 21:10:08 -0700 (PDT)
\r
24 Received: by mail-we0-f181.google.com with SMTP id q58so10722655wes.40
\r
25 for <notmuch@notmuchmail.org>; Tue, 11 Mar 2014 21:10:06 -0700 (PDT)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
27 h=from:to:cc:subject:date:message-id:in-reply-to:references;
\r
28 bh=m6RdeSD0osdSBfvOTk3XCyll7O34Q+A/S4UUQKohwQU=;
\r
29 b=ld4seVrLfiAQfhtDjLMB20c6eDrWrYoTQTefCGGGekoL7375dWpeUCDbu4r55NtBnQ
\r
30 ByaCAoxjHF+1XXC0oimM2DWNEmM5jhAFhUbCsmekMVOaZTo9coyq4gtov6mb56VxhqQZ
\r
31 cwrwYekKpnHtzsoAvchhqa/Cn3OsnTM7D3KFD0u9DMJz6f/J1otMX036XFbqRZ/+upko
\r
32 ntmVfdotBWgP1d47Jqb+bCaGWjbkBckXOUOJlFzCeQ6fdbt2Q14kN1AK2PLejuQLSsXN
\r
33 02mixfS3y/TNgcLdotIfyzrwRTj97BNv1Ka2zPeV6XapHkaYxR/KbtLDkrWM9m+xNMNY
\r
35 X-Received: by 10.194.60.16 with SMTP id d16mr10346693wjr.46.1394597406456;
\r
36 Tue, 11 Mar 2014 21:10:06 -0700 (PDT)
\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])
\r
38 by mx.google.com with ESMTPSA id
\r
39 h13sm66489426wjr.22.2014.03.11.21.10.05 for <multiple recipients>
\r
40 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
41 Tue, 11 Mar 2014 21:10:05 -0700 (PDT)
\r
42 From: Mark Walters <markwalters1009@gmail.com>
\r
43 To: notmuch@notmuchmail.org,
\r
45 Subject: [Patch v3 3/8] emacs: tag split customise option for format-tags into
\r
47 Date: Wed, 12 Mar 2014 04:09:52 +0000
\r
48 Message-Id: <1394597397-8486-4-git-send-email-markwalters1009@gmail.com>
\r
49 X-Mailer: git-send-email 1.7.9.1
\r
50 In-Reply-To: <1394597397-8486-1-git-send-email-markwalters1009@gmail.com>
\r
51 References: <1394597397-8486-1-git-send-email-markwalters1009@gmail.com>
\r
52 X-BeenThere: notmuch@notmuchmail.org
\r
53 X-Mailman-Version: 2.1.13
\r
55 List-Id: "Use and development of the notmuch mail system."
\r
56 <notmuch.notmuchmail.org>
\r
57 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
58 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
59 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
60 List-Post: <mailto:notmuch@notmuchmail.org>
\r
61 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
62 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
64 X-List-Received-Date: Wed, 12 Mar 2014 04:10:17 -0000
\r
66 We will re-use the customize option for format-tags for formattting
\r
67 deleted tags to added tags in the next patch so split it into a
\r
68 widget. There should be no functional change.
\r
70 emacs/notmuch-tag.el | 55 ++++++++++++++++++++++++++-----------------------
\r
71 1 files changed, 29 insertions(+), 26 deletions(-)
\r
73 diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el
\r
74 index 42c425e..a4dea39 100644
\r
75 --- a/emacs/notmuch-tag.el
\r
76 +++ b/emacs/notmuch-tag.el
\r
79 (require 'notmuch-lib)
\r
81 +(define-widget 'notmuch-tag-format-type 'lazy
\r
82 + "Customize widget for notmuch-tag-format and friends"
\r
83 + :type '(alist :key-type (regexp :tag "Tag")
\r
86 + (radio :format "%v"
\r
87 + (const :tag "Hidden" nil)
\r
88 + (set :tag "Modified"
\r
89 + (string :tag "Display as")
\r
90 + (list :tag "Face" :extra-offset -4
\r
91 + (const :format "" :inline t
\r
92 + (propertize tag 'face))
\r
93 + (list :format "%v"
\r
94 + (const :format "" quote)
\r
95 + custom-face-edit))
\r
96 + (list :format "%v" :extra-offset -4
\r
97 + (const :format "" :inline t
\r
98 + (notmuch-tag-format-image-data tag))
\r
99 + (choice :tag "Image"
\r
100 + (const :tag "Star"
\r
101 + (notmuch-tag-star-icon))
\r
102 + (const :tag "Empty star"
\r
103 + (notmuch-tag-star-empty-icon))
\r
104 + (const :tag "Tag"
\r
105 + (notmuch-tag-tag-icon))
\r
106 + (string :tag "Custom")))
\r
107 + (sexp :tag "Custom")))))
\r
109 (defcustom notmuch-tag-formats
\r
110 '(("unread" (propertize tag 'face '(:foreground "red")))
\r
111 ("flagged" (propertize tag 'face '(:foreground "blue"))
\r
112 @@ -57,34 +85,9 @@ (defcustom notmuch-tag-formats
\r
114 See also `notmuch-tag-format-image', which can help replace tags
\r
117 :group 'notmuch-search
\r
118 :group 'notmuch-show
\r
119 - :type '(alist :key-type (regexp :tag "Tag")
\r
122 - (radio :format "%v"
\r
123 - (const :tag "Hidden" nil)
\r
124 - (set :tag "Modified"
\r
125 - (string :tag "Display as")
\r
126 - (list :tag "Face" :extra-offset -4
\r
127 - (const :format "" :inline t
\r
128 - (propertize tag 'face))
\r
129 - (list :format "%v"
\r
130 - (const :format "" quote)
\r
131 - custom-face-edit))
\r
132 - (list :format "%v" :extra-offset -4
\r
133 - (const :format "" :inline t
\r
134 - (notmuch-tag-format-image-data tag))
\r
135 - (choice :tag "Image"
\r
136 - (const :tag "Star"
\r
137 - (notmuch-tag-star-icon))
\r
138 - (const :tag "Empty star"
\r
139 - (notmuch-tag-star-empty-icon))
\r
140 - (const :tag "Tag"
\r
141 - (notmuch-tag-tag-icon))
\r
142 - (string :tag "Custom")))
\r
143 - (sexp :tag "Custom")))))
\r
144 + :type 'notmuch-tag-format-type)
\r
146 (defun notmuch-tag-format-image-data (tag data)
\r
147 "Replace TAG with image DATA, if available.
\r