[PATCH] WIP: remove all non-prefixed-terms (and stemmed versions)
[notmuch-archives.git] / 97 / 372af1ef3bcf3c5e5f7448f7bcdca04c509fa3
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 7105F429E31\r
6         for <notmuch@notmuchmail.org>; Tue, 11 Mar 2014 21:10:21 -0700 (PDT)\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 ip9Wt6qLqMnH for <notmuch@notmuchmail.org>;\r
18         Tue, 11 Mar 2014 21:10:17 -0700 (PDT)\r
19 Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com\r
20         [209.85.212.180]) (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 3E3D4431FC3\r
23         for <notmuch@notmuchmail.org>; Tue, 11 Mar 2014 21:10:09 -0700 (PDT)\r
24 Received: by mail-wi0-f180.google.com with SMTP id hm4so1804048wib.13\r
25         for <notmuch@notmuchmail.org>; Tue, 11 Mar 2014 21:10:08 -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=q90YJ2N4M9H+SP7Z0Qm2ZJwSyfQEVI+JjvJY+qwEGks=;\r
29         b=Va2U6Tqc/jymVfl4dLPpY0GrUVyQrb15oZQefJE4EJ+SeG4il9kUTDpSFJPH38vCiB\r
30         0QF4DQ2CAVThaKS4yST2iFsOSLRFe+1GojvcdyyBka3VeuzWuE4rRRKeXsfkjwhQoaFX\r
31         ecrP30yOrsihLT5wyDMQlggOSmTR0bb4n23tENpchwnNqvtuoHbqG959Q8PmoRgEfMxB\r
32         owD+nCjTtGZfqE34UQ3gVOgNWkKFA1I4hObUceHebfrodIqOr651j+BWJyj2uMKYp6VC\r
33         S5NqltgBqGXZMtUtaF6aV2CuF5/NNfcuTG3i0sx3jNtWek4YvdmkUqoV+zcBegUQMOxz\r
34         L1hw==\r
35 X-Received: by 10.180.13.197 with SMTP id j5mr5738697wic.14.1394597408115;\r
36         Tue, 11 Mar 2014 21:10:08 -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         qg3sm12258254wic.10.2014.03.11.21.10.07 for <multiple recipients>\r
40         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
41         Tue, 11 Mar 2014 21:10:07 -0700 (PDT)\r
42 From: Mark Walters <markwalters1009@gmail.com>\r
43 To: notmuch@notmuchmail.org,\r
44         amdragon@mit.edu\r
45 Subject: [Patch v3 4/8] emacs: tag: add customize for deleted/added tag\r
46  formats\r
47 Date: Wed, 12 Mar 2014 04:09:53 +0000\r
48 Message-Id: <1394597397-8486-5-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
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: Wed, 12 Mar 2014 04:10:21 -0000\r
65 \r
66 Add customize options for deleted/added tag formats.  These are not\r
67 used yet but will be later in the series.\r
68 \r
69 We switch to using `notmuch-apply-face' rather than `propertize' in\r
70 the defcustom for faces so that the faces for deleted/added tags add\r
71 to the default face attributes for the tag.\r
72 \r
73 We special case deleting the unread tag as that tag is a strong visual\r
74 cue and we don't need that cue when we are just saying it used to be\r
75 unread. Thus, we revert to the normal tag face with strikethough for\r
76 deleted unread tags.\r
77 ---\r
78  emacs/notmuch-tag.el |   37 ++++++++++++++++++++++++++++++++++++-\r
79  1 files changed, 36 insertions(+), 1 deletions(-)\r
80 \r
81 diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el\r
82 index a4dea39..4698856 100644\r
83 --- a/emacs/notmuch-tag.el\r
84 +++ b/emacs/notmuch-tag.el\r
85 @@ -39,7 +39,7 @@ (define-widget 'notmuch-tag-format-type 'lazy\r
86                             (string :tag "Display as")\r
87                             (list :tag "Face" :extra-offset -4\r
88                                   (const :format "" :inline t\r
89 -                                        (propertize tag 'face))\r
90 +                                        (notmuch-apply-face tag))\r
91                                   (list :format "%v"\r
92                                         (const :format "" quote)\r
93                                         custom-face-edit))\r
94 @@ -89,6 +89,41 @@ (defcustom notmuch-tag-formats\r
95    :group 'notmuch-show\r
96    :type 'notmuch-tag-format-type)\r
97  \r
98 +(defcustom notmuch-tag-deleted-formats\r
99 +  '(("unread" (notmuch-apply-face "unread"\r
100 +                     (if (display-supports-face-attributes-p '(:strike-through "red"))\r
101 +                         '(:strike-through "red")\r
102 +                       '(:inverse-video t))))\r
103 +    (".*" (notmuch-apply-face tag\r
104 +                     (if (display-supports-face-attributes-p '(:strike-through "red"))\r
105 +                         '(:strike-through "red")\r
106 +                       '(:inverse-video t)))))\r
107 +  "Custom formats for tags when deleted.\r
108 +\r
109 +For deleted tags the formats in `notmuch-tag-formats` are applied\r
110 +first and then these formats are applied on top.\r
111 +\r
112 +By default this shows deleted tags with strike-through in red,\r
113 +unless strike-through is not available (e.g., emacs is running in\r
114 +a terminal) in which case it uses inverse video. To hide deleted\r
115 +tags completely set this to\r
116 +  '((\".*\" nil))\r
117 +\r
118 +See `notmuch-tag-formats' for full documentation."\r
119 +  :group 'notmuch-show\r
120 +  :type 'notmuch-tag-format-type)\r
121 +\r
122 +(defcustom notmuch-tag-added-formats\r
123 +  '((".*" (notmuch-apply-face tag '(:underline "green"))))\r
124 +  "Custom formats for tags when added.\r
125 +\r
126 +For added tags the formats in `notmuch-tag-formats` are applied\r
127 +first and then these formats are applied on top.\r
128 +\r
129 +See `notmuch-tag-formats' for full documentation."\r
130 +  :group 'notmuch-show\r
131 +  :type 'notmuch-tag-format-type)\r
132 +\r
133  (defun notmuch-tag-format-image-data (tag data)\r
134    "Replace TAG with image DATA, if available.\r
135  \r
136 -- \r
137 1.7.9.1\r
138 \r