Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 4f / f36c324ab429d64071dcc417d3c3a284783600
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 A6152431FC9\r
6         for <notmuch@notmuchmail.org>; Fri, 14 Feb 2014 01:15:39 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \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 KR0YeB5pFU4m for <notmuch@notmuchmail.org>;\r
18         Fri, 14 Feb 2014 01:15:34 -0800 (PST)\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 7AC89431FBD\r
23         for <notmuch@notmuchmail.org>; Fri, 14 Feb 2014 01:15:31 -0800 (PST)\r
24 Received: by mail-we0-f181.google.com with SMTP id w61so8247655wes.26\r
25         for <notmuch@notmuchmail.org>; Fri, 14 Feb 2014 01:15:30 -0800 (PST)\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=rultwBrs7Y3s+niuk9gecquq6NlqzBQEbD5xgohpGMc=;\r
29         b=s+8YnC40C1vgSh3tKaKq3bj0nGUqsLqJmD60SMQSfmszjLu2ZfuvwINv+4qKDBZO2k\r
30         HxiG/LxgpONGT2XWhwitQzdIQBF+3MXalSUXS0q1/+gndwLfqR5hHuVuz0qPWnixwInq\r
31         tt6bA7LjM61iR0dP/mMm9YSr21yOG+JYzz7l78pMV07jlsCtIrR5UyYLlRRjIV4Olkkq\r
32         xx6y+BtpqxYjA59hA/eDXcM0ds40uysQ0yxx/nEOW4fd6Chidzb9cyxahKqOEqoCwTLP\r
33         yYM/i99w3iWvC94fSR5M3snD3JD8F3h63WC1bQh3CoSxRkmRVDc3ElagZOlM6df5Xyuk\r
34         jLUA==\r
35 X-Received: by 10.181.13.11 with SMTP id eu11mr1253954wid.30.1392369329062;\r
36         Fri, 14 Feb 2014 01:15:29 -0800 (PST)\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 uq2sm11141686wjc.5.2014.02.14.01.15.28\r
39         for <multiple recipients>\r
40         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
41         Fri, 14 Feb 2014 01:15:28 -0800 (PST)\r
42 From: Mark Walters <markwalters1009@gmail.com>\r
43 To: notmuch@notmuchmail.org,\r
44         Austin Clements <amdragon@MIT.EDU>\r
45 Subject: [WIP Patch 2/7] emacs: tag split customise option for format-tags\r
46         into a widget\r
47 Date: Fri, 14 Feb 2014 09:15:14 +0000\r
48 Message-Id: <1392369319-24508-3-git-send-email-markwalters1009@gmail.com>\r
49 X-Mailer: git-send-email 1.7.9.1\r
50 In-Reply-To: <1392369319-24508-1-git-send-email-markwalters1009@gmail.com>\r
51 References: <1392369319-24508-1-git-send-email-markwalters1009@gmail.com>\r
52 X-BeenThere: notmuch@notmuchmail.org\r
53 X-Mailman-Version: 2.1.13\r
54 Precedence: list\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: Fri, 14 Feb 2014 09:15:39 -0000\r
65 \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
69 ---\r
70  emacs/notmuch-tag.el |   55 ++++++++++++++++++++++++++-----------------------\r
71  1 files changed, 29 insertions(+), 26 deletions(-)\r
72 \r
73 diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el\r
74 index cb88fd5..f987291 100644\r
75 --- a/emacs/notmuch-tag.el\r
76 +++ b/emacs/notmuch-tag.el\r
77 @@ -40,6 +40,34 @@\r
78  This must be called after changes to `notmuch-tag-formats'."\r
79    (clrhash notmuch-tag--format-cache))\r
80  \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
84 +               :extra-offset -3\r
85 +               :value-type\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
108 +\r
109  (defcustom notmuch-tag-formats\r
110    '(("unread" (propertize tag 'face '(:foreground "red")))\r
111      ("flagged" (propertize tag 'face '(:foreground "blue"))\r
112 @@ -73,35 +101,10 @@ this automatically.\r
113  \r
114  See also `notmuch-tag-format-image', which can help replace tags\r
115  with images."\r
116 -\r
117    :group 'notmuch-search\r
118    :group 'notmuch-show\r
119    :set (lambda (var val) (set-default var val) (notmuch-tag-clear-cache))\r
120 -  :type '(alist :key-type (regexp :tag "Tag")\r
121 -               :extra-offset -3\r
122 -               :value-type\r
123 -               (radio :format "%v"\r
124 -                      (const :tag "Hidden" nil)\r
125 -                      (set :tag "Modified"\r
126 -                           (string :tag "Display as")\r
127 -                           (list :tag "Face" :extra-offset -4\r
128 -                                 (const :format "" :inline t\r
129 -                                        (propertize tag 'face))\r
130 -                                 (list :format "%v"\r
131 -                                       (const :format "" quote)\r
132 -                                       custom-face-edit))\r
133 -                           (list :format "%v" :extra-offset -4\r
134 -                                 (const :format "" :inline t\r
135 -                                        (notmuch-tag-format-image-data tag))\r
136 -                                 (choice :tag "Image"\r
137 -                                         (const :tag "Star"\r
138 -                                                (notmuch-tag-star-icon))\r
139 -                                         (const :tag "Empty star"\r
140 -                                                (notmuch-tag-star-empty-icon))\r
141 -                                         (const :tag "Tag"\r
142 -                                                (notmuch-tag-tag-icon))\r
143 -                                         (string :tag "Custom")))\r
144 -                           (sexp :tag "Custom")))))\r
145 +  :type 'notmuch-tag-format-type)\r
146  \r
147  (defun notmuch-tag-format-image-data (tag data)\r
148    "Replace TAG with image DATA, if available.\r
149 -- \r
150 1.7.9.1\r
151 \r