1 Return-Path: <amdragon@mit.edu>
\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 7A33B431FB6
\r
6 for <notmuch@notmuchmail.org>; Fri, 21 Mar 2014 19:16:21 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\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 yTYqH0riq+0I for <notmuch@notmuchmail.org>;
\r
16 Fri, 21 Mar 2014 19:16:15 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-1.mit.edu (dmz-mailsec-scanner-1.mit.edu
\r
19 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 1A0F0431FAE
\r
22 for <notmuch@notmuchmail.org>; Fri, 21 Mar 2014 19:16:14 -0700 (PDT)
\r
23 X-AuditID: 1209190c-f794a6d000000c27-03-532cf26d60c4
\r
24 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])
\r
25 (using TLS with cipher AES256-SHA (256/256 bits))
\r
26 (Client did not present a certificate)
\r
27 by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP
\r
28 id B2.D7.03111.D62FC235; Fri, 21 Mar 2014 22:16:13 -0400 (EDT)
\r
29 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])
\r
30 by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id s2M2GCNZ003617;
\r
31 Fri, 21 Mar 2014 22:16:13 -0400
\r
32 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])
\r
33 (authenticated bits=0)
\r
34 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
35 by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s2M2G9Rn019751
\r
36 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);
\r
37 Fri, 21 Mar 2014 22:16:11 -0400
\r
38 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)
\r
39 (envelope-from <amdragon@mit.edu>)
\r
40 id 1WRBTl-0004Ow-Hn; Fri, 21 Mar 2014 22:16:09 -0400
\r
41 Date: Fri, 21 Mar 2014 22:16:09 -0400
\r
42 From: Austin Clements <amdragon@MIT.EDU>
\r
43 To: Mark Walters <markwalters1009@gmail.com>
\r
44 Subject: Re: [Patch v3 4/8] emacs: tag: add customize for deleted/added tag
\r
46 Message-ID: <20140322021609.GB31187@mit.edu>
\r
47 References: <1394597397-8486-1-git-send-email-markwalters1009@gmail.com>
\r
48 <1394597397-8486-5-git-send-email-markwalters1009@gmail.com>
\r
50 Content-Type: text/plain; charset=us-ascii
\r
51 Content-Disposition: inline
\r
52 In-Reply-To: <1394597397-8486-5-git-send-email-markwalters1009@gmail.com>
\r
53 User-Agent: Mutt/1.5.21 (2010-09-15)
\r
54 X-Brightmail-Tracker:
\r
55 H4sIAAAAAAAAA+NgFmphleLIzCtJLcpLzFFi42IRYrdT0c39pBNsMOmqqMXquTwW12/OZHZg
\r
56 8tg56y67x7NVt5gDmKK4bFJSczLLUov07RK4MnqnHmEruC9RcWTWLPYGxhPCXYycHBICJhId
\r
57 J56wQthiEhfurWfrYuTiEBKYzSTxZvcNFghnI6PE4u7TTBDOaSaJ83/6mCGcJYwSE25+YAHp
\r
58 ZxFQlej+/YcZxGYT0JDYtn85I4gtIqAjcfvQAnYQm1lAWuLb72YmEFtYIFRi3cYdYPW8QDU3
\r
59 X12F2tDOKNHcexYqIShxcuYTFohmLYkb/14CFXGADVr+jwMkzCngKTF/ykk2EFtUQEViyslt
\r
60 bBMYhWYh6Z6FpHsWQvcCRuZVjLIpuVW6uYmZOcWpybrFyYl5ealFuoZ6uZkleqkppZsYQYHN
\r
61 Kcmzg/HNQaVDjAIcjEo8vBe4tYOFWBPLiitzDzFKcjApifLefaATLMSXlJ9SmZFYnBFfVJqT
\r
62 WnyIUYKDWUmEl+ktUI43JbGyKrUoHyYlzcGiJM4rzwE0SSA9sSQ1OzW1ILUIJivDwaEkwRv7
\r
63 EahRsCg1PbUiLTOnBCHNxMEJMpwHaLgdSA1vcUFibnFmOkT+FKOilDjvtA9ACQGQREZpHlwv
\r
64 LPG8YhQHekWYNwqknQeYtOC6XwENZgIazD9VC2RwSSJCSqqB0cN7Z2KBaN0dS/0ijgvrF4S4
\r
65 rCi/fm/OSy6tzlOKVV2ah1P/Jf7MTUr8tVTA9M+32uDHJUuan8Z+OM+w1ujBFq+1AfaLUv52
\r
66 Tmmvmv/VxeqyJXu4pEh/Yxhv5hwZIaUTiz6W5c3Qi34ZcPTgpJivWeq2ggrHapt8HlQffN7z
\r
67 0/Mmt5k3Y5mxEktxRqKhFnNRcSIA7bDkHRcDAAA=
\r
68 Cc: notmuch@notmuchmail.org
\r
69 X-BeenThere: notmuch@notmuchmail.org
\r
70 X-Mailman-Version: 2.1.13
\r
72 List-Id: "Use and development of the notmuch mail system."
\r
73 <notmuch.notmuchmail.org>
\r
74 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
75 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
76 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
77 List-Post: <mailto:notmuch@notmuchmail.org>
\r
78 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
79 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
80 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
81 X-List-Received-Date: Sat, 22 Mar 2014 02:16:22 -0000
\r
83 Quoth Mark Walters on Mar 12 at 4:09 am:
\r
84 > Add customize options for deleted/added tag formats. These are not
\r
85 > used yet but will be later in the series.
\r
87 > We switch to using `notmuch-apply-face' rather than `propertize' in
\r
88 > the defcustom for faces so that the faces for deleted/added tags add
\r
89 > to the default face attributes for the tag.
\r
91 > We special case deleting the unread tag as that tag is a strong visual
\r
92 > cue and we don't need that cue when we are just saying it used to be
\r
93 > unread. Thus, we revert to the normal tag face with strikethough for
\r
94 > deleted unread tags.
\r
96 > emacs/notmuch-tag.el | 37 ++++++++++++++++++++++++++++++++++++-
\r
97 > 1 files changed, 36 insertions(+), 1 deletions(-)
\r
99 > diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el
\r
100 > index a4dea39..4698856 100644
\r
101 > --- a/emacs/notmuch-tag.el
\r
102 > +++ b/emacs/notmuch-tag.el
\r
103 > @@ -39,7 +39,7 @@ (define-widget 'notmuch-tag-format-type 'lazy
\r
104 > (string :tag "Display as")
\r
105 > (list :tag "Face" :extra-offset -4
\r
106 > (const :format "" :inline t
\r
107 > - (propertize tag 'face))
\r
108 > + (notmuch-apply-face tag))
\r
109 > (list :format "%v"
\r
110 > (const :format "" quote)
\r
111 > custom-face-edit))
\r
112 > @@ -89,6 +89,41 @@ (defcustom notmuch-tag-formats
\r
113 > :group 'notmuch-show
\r
114 > :type 'notmuch-tag-format-type)
\r
116 > +(defcustom notmuch-tag-deleted-formats
\r
117 > + '(("unread" (notmuch-apply-face "unread"
\r
118 > + (if (display-supports-face-attributes-p '(:strike-through "red"))
\r
119 > + '(:strike-through "red")
\r
120 > + '(:inverse-video t))))
\r
121 > + (".*" (notmuch-apply-face tag
\r
122 > + (if (display-supports-face-attributes-p '(:strike-through "red"))
\r
123 > + '(:strike-through "red")
\r
124 > + '(:inverse-video t)))))
\r
126 Aren't the two formatters above the same thing? Is this somehow
\r
127 different from just having the .* formatter? The indentation also
\r
128 seems a little odd, though that may just be the diff.
\r
130 > + "Custom formats for tags when deleted.
\r
132 > +For deleted tags the formats in `notmuch-tag-formats` are applied
\r
133 > +first and then these formats are applied on top.
\r
135 > +By default this shows deleted tags with strike-through in red,
\r
136 > +unless strike-through is not available (e.g., emacs is running in
\r
137 > +a terminal) in which case it uses inverse video. To hide deleted
\r
138 > +tags completely set this to
\r
139 > + '((\".*\" nil))
\r
141 > +See `notmuch-tag-formats' for full documentation."
\r
142 > + :group 'notmuch-show
\r
143 > + :type 'notmuch-tag-format-type)
\r
145 > +(defcustom notmuch-tag-added-formats
\r
146 > + '((".*" (notmuch-apply-face tag '(:underline "green"))))
\r
147 > + "Custom formats for tags when added.
\r
149 > +For added tags the formats in `notmuch-tag-formats` are applied
\r
150 > +first and then these formats are applied on top.
\r
154 To disable special formatting of added tags, set this to ().
\r
156 to parallel notmuch-tag-deleted-formats?
\r
159 > +See `notmuch-tag-formats' for full documentation."
\r
160 > + :group 'notmuch-show
\r
161 > + :type 'notmuch-tag-format-type)
\r
163 > (defun notmuch-tag-format-image-data (tag data)
\r
164 > "Replace TAG with image DATA, if available.
\r