1 Return-Path: <james@hackervisions.org>
\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 92C5B431FAF
\r
6 for <notmuch@notmuchmail.org>; Mon, 29 Oct 2012 14:19:46 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0.01 tagged_above=-999 required=5
\r
12 tests=[T_MIME_NO_TEXT=0.01] 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 mLplxX8ylsxa for <notmuch@notmuchmail.org>;
\r
16 Mon, 29 Oct 2012 14:19:46 -0700 (PDT)
\r
17 Received: from mail.sflc.info (mail.sflc.info [207.86.247.70])
\r
18 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 124C4431FBC
\r
21 for <notmuch@notmuchmail.org>; Mon, 29 Oct 2012 14:19:46 -0700 (PDT)
\r
22 Received: from localhost (ool-457af02d.dyn.optonline.net [69.122.240.45])
\r
23 by mail.sflc.info (Postfix) with ESMTPSA id 07F35B4C018;
\r
24 Mon, 29 Oct 2012 21:19:44 +0000 (UTC)
\r
25 From: James Vasile <james@hackervisions.org>
\r
26 To: David Bremner <david@tethera.net>,
\r
27 notmuch mailing list <notmuch@notmuchmail.org>
\r
28 Subject: Re: [PATCH] don't show x-foo tags in search view
\r
29 In-Reply-To: <87liepw0b4.fsf@convex-new.cs.unb.ca>
\r
30 References: <87fw4x3y3e.fsf@hackervisions.org>
\r
31 <87liepw0b4.fsf@convex-new.cs.unb.ca>
\r
32 User-Agent: Notmuch/0.12+139~g3c998ca (http://notmuchmail.org) Emacs/23.4.1
\r
34 Date: Mon, 29 Oct 2012 17:19:42 -0400
\r
35 Message-ID: <87625tc6xd.fsf@hackervisions.org>
\r
37 Content-Type: multipart/signed; boundary="=-=-=";
\r
38 micalg=pgp-sha1; protocol="application/pgp-signature"
\r
39 X-BeenThere: notmuch@notmuchmail.org
\r
40 X-Mailman-Version: 2.1.13
\r
42 List-Id: "Use and development of the notmuch mail system."
\r
43 <notmuch.notmuchmail.org>
\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
45 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
47 List-Post: <mailto:notmuch@notmuchmail.org>
\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
50 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
51 X-List-Received-Date: Mon, 29 Oct 2012 21:19:46 -0000
\r
54 Content-Transfer-Encoding: quoted-printable
\r
56 This patch hides any tags in search view that match the regex specified
\r
57 in `notmuch-search-hide-tag-regex`. That variable can be set via setq
\r
58 or the customize interface. To hide all tags that begin with "x-" or
\r
59 "X-", set `notmuch-search-hide-tag-regex` to "^X-".
\r
62 emacs/notmuch.el | 16 +++++++++++++++-
\r
63 1 file changed, 15 insertions(+), 1 deletion(-)
\r
65 diff --git a/emacs/notmuch.el b/emacs/notmuch.el
\r
66 index f9454d8..4bff538 100644
\r
67 =2D-- a/emacs/notmuch.el
\r
68 +++ b/emacs/notmuch.el
\r
69 @@ -775,6 +775,14 @@ non-authors is found, assume that all of the authors m=
\r
71 (overlay-put overlay 'isearch-open-invisible #'delete-overlay)))
\r
74 +(defcustom notmuch-search-hide-tag-regex ""
\r
75 + "Regex specifying tags to hide in search view.
\r
77 +Leave blank to disable hiding of tags in search view.
\r
78 +Note: elisp regexes are case-insensitive"
\r
80 + :group 'notmuch-search)
\r
82 (defun notmuch-search-insert-field (field format-string result)
\r
84 ((string-equal field "date")
\r
85 @@ -793,7 +801,13 @@ non-authors is found, assume that all of the authors m=
\r
87 (notmuch-search-insert-authors format-string (plist-get result :author=
\r
90 ((string-equal field "tags")
\r
91 =2D (let ((tags-str (mapconcat 'identity (plist-get result :tags) " ")))
\r
92 + (let ((tags-str (mapconcat 'identity
\r
94 + (mapcar (lambda (x) (if (and (not (equ=
\r
95 al notmuch-search-hide-tag-regex ""))
\r
97 atch notmuch-search-hide-tag-regex x))
\r
102 (insert (propertize (format format-string tags-str)
\r
103 'face 'notmuch-tag-face))))))
\r
110 Content-Type: application/pgp-signature
\r
112 -----BEGIN PGP SIGNATURE-----
\r
113 Version: GnuPG v1.4.12 (GNU/Linux)
\r
115 iQEcBAEBAgAGBQJQjvLuAAoJECaDklOuuidYj5QH/0WgJ07LYYJIxQDpD+hATRSs
\r
116 ls20AgzzvZvDK0EWWb9I+3YR+PgxirDvmmGtMFqWNKUCOk/s7LZmRffMVHUdR1i1
\r
117 3QLj8R9XqOn6UPNCGC5Bd5bYc01svIcwvgR2lPWkT+lv91I6IH0sr624RcriVDYT
\r
118 y8CB26gPfK+5oMbiDQ2kWGSnCF6gNxYol6VWgGEwmCtkTkwkEQqfuTspBfqQtj0V
\r
119 EvhRHiKF0KlgB4x+Ro/vVL5xK2LVPPdccRiirzv61cdpev+mV+0V+dw0n+vn+ei7
\r
120 AR7r34B0Z8XmVc8pyUcb7lbt8Y0954g9an9jlX+DFflNDzOOpWMkvk5DE6UDBkM=
\r
122 -----END PGP SIGNATURE-----
\r