Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / 90 / 01bfa2260d8df449c7b32980ad42b20630ab84
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 165D8431FB6\r
6         for <notmuch@notmuchmail.org>; Wed,  7 Nov 2012 06:37:43 -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.7\r
10 X-Spam-Level: \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 UvgE3k-7oiHA for <notmuch@notmuchmail.org>;\r
16         Wed,  7 Nov 2012 06:37:42 -0800 (PST)\r
17 Received: from dmz-mailsec-scanner-6.mit.edu (DMZ-MAILSEC-SCANNER-6.MIT.EDU\r
18         [18.7.68.35])\r
19         by olra.theworths.org (Postfix) with ESMTP id 80191431FAE\r
20         for <notmuch@notmuchmail.org>; Wed,  7 Nov 2012 06:37:42 -0800 (PST)\r
21 X-AuditID: 12074423-b7fab6d0000008f9-28-509a7236c5af\r
22 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
23         by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 31.63.02297.6327A905; Wed,  7 Nov 2012 09:37:42 -0500 (EST)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id qA7Ebf8Q007314; \r
27         Wed, 7 Nov 2012 09:37:41 -0500\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
29         (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qA7Ebctl016224\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Wed, 7 Nov 2012 09:37:39 -0500 (EST)\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1TW6l8-0006sj-3T; Wed, 07 Nov 2012 09:37:38 -0500\r
37 Date: Wed, 7 Nov 2012 09:37:37 -0500\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: James Vasile <james@hackervisions.org>\r
40 Subject: Re: [PATCH] don't show x-foo tags in search view\r
41 Message-ID: <20121107143737.GC22284@mit.edu>\r
42 References: <87fw4x3y3e.fsf@hackervisions.org>\r
43         <87liepw0b4.fsf@convex-new.cs.unb.ca>\r
44         <87625tc6xd.fsf@hackervisions.org> <20121030005700.GE15377@mit.edu>\r
45         <87390w57oo.fsf@hackervisions.org>\r
46 MIME-Version: 1.0\r
47 Content-Type: text/plain; charset=us-ascii\r
48 Content-Disposition: inline\r
49 In-Reply-To: <87390w57oo.fsf@hackervisions.org>\r
50 User-Agent: Mutt/1.5.21 (2010-09-15)\r
51 X-Brightmail-Tracker:\r
52  H4sIAAAAAAAAA+NgFuphleLIzCtJLcpLzFFi42IR4hTV1jUrmhVgsOYgu8WN1m5Gi//N1RbX\r
53         b85kdmD2mNT1jMnj2apbzB5bDr1nDmCO4rJJSc3JLEst0rdL4MpoW7WRuWCxcMWuX7vYGhj/\r
54         83UxcnBICJhIvHle0sXICWSKSVy4t56ti5GLQ0hgH6PEsznToZz1jBKvd11ggnBOMEl8Pn+a\r
55         HcJZwijx499LJpB+FgEViVdNl9lAbDYBDYlt+5czgtgiAloSK8/PA7OZBeIk2jpvs4CsFhaw\r
56         lOj5FA8S5hXQkTg5HWbBYUaJDzdvsEEkBCVOznzCAtGrJXEDbBcHkC0tsfwfB0iYU0Bf4tHC\r
57         hWAniAKdMOXkNrYJjEKzkHTPQtI9C6F7ASPzKkbZlNwq3dzEzJzi1GTd4uTEvLzUIl0zvdzM\r
58         Er3UlNJNjKBAZ3dR3sH456DSIUYBDkYlHt6GyJkBQqyJZcWVuYcYJTmYlER59+bMChDiS8pP\r
59         qcxILM6ILyrNSS0+xCjBwawkwstSCJTjTUmsrEotyodJSXOwKInzXku56S8kkJ5YkpqdmlqQ\r
60         WgSTleHgUJLgZQZpFCxKTU+tSMvMKUFIM3FwggznARoeATa8uCAxtzgzHSJ/ilFRSpz3YwFQ\r
61         QgAkkVGaB9cLS0SvGMWBXhHmdQVp5wEmMbjuV0CDmYAGF1+bATK4JBEhJdXAWLd//9ldzPeX\r
62         njn8St5tm8SELt+Z509INNVzHq8M8HSIsPL4kZ30573uj9S7Pbu+PxLabPXlxZQ1O+svpb+N\r
63         3zTnk8tZziVh+da+51+d3xd/ocj73ZKt5bs9/sxzuHtqzbI5bnd/rr1zVCj7XVLajXLpjrzC\r
64         8+w/nS496vhow7dX0E/aw96xpFyJpTgj0VCLuag4EQAQq3voHwMAAA==\r
65 Cc: notmuch mailing list <notmuch@notmuchmail.org>\r
66 X-BeenThere: notmuch@notmuchmail.org\r
67 X-Mailman-Version: 2.1.13\r
68 Precedence: list\r
69 List-Id: "Use and development of the notmuch mail system."\r
70         <notmuch.notmuchmail.org>\r
71 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
72         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
73 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
74 List-Post: <mailto:notmuch@notmuchmail.org>\r
75 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
76 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
77         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
78 X-List-Received-Date: Wed, 07 Nov 2012 14:37:43 -0000\r
79 \r
80 The code looks good to me (two minor comments below), but, as David\r
81 pointed out, this needs a commit message.\r
82 \r
83 Quoth James Vasile on Oct 30 at 10:57 am:\r
84 > Austin,\r
85\r
86 > Thanks for the helpful comments.  I redid the patch to take a list of\r
87 > regexps.  That way users can banish different kinds of tags or simply\r
88 > list the tags themselves.  I've responded to your comments in text below\r
89 > the patch.\r
90\r
91 > ---\r
92 >  emacs/notmuch.el |   26 +++++++++++++++++++++++++-\r
93 >  1 file changed, 25 insertions(+), 1 deletion(-)\r
94\r
95 > diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
96 > index f9454d8..05aa114 100644\r
97 > --- a/emacs/notmuch.el\r
98 > +++ b/emacs/notmuch.el\r
99 > @@ -775,6 +775,21 @@ non-authors is found, assume that all of the authors match."\r
100 >         (overlay-put overlay 'isearch-open-invisible #'delete-overlay)))\r
101 >        (insert padding))))\r
102 >  \r
103 > +  \r
104 \r
105 Extra blank link inserted.\r
106 \r
107 > +(defcustom notmuch-search-hide-tag-regexps '()\r
108 > +  "List of regular expressionss specifying tags to hide in search view.\r
109 > +\r
110 > +Notmuch will hide any tags in search view that match the regexps\r
111 > +specified in the list `notmuch-search-hide-tag-regexp`.  The\r
112 > +match is case-insensitive.\r
113 > +\r
114 > +If you are not comfortable with regular expressions, a list of\r
115 > +tag words will work, assuming those tags use only alphanumeric\r
116 > +characters.  An empty list will disable hiding of tags in search\r
117 > +view.  The list can be set via setq or the customize interface."\r
118 \r
119 The last sentence isn't necessary.  This is true of virtually every\r
120 customize variable by design.\r
121 \r
122 > +  :type '(repeat  regexp)\r
123 > +  :group 'notmuch-search)\r
124 > +\r
125 >  (defun notmuch-search-insert-field (field format-string result)\r
126 >    (cond\r
127 >     ((string-equal field "date")\r
128 > @@ -793,7 +808,16 @@ non-authors is found, assume that all of the authors match."\r
129 >      (notmuch-search-insert-authors format-string (plist-get result :authors)))\r
130 >  \r
131 >     ((string-equal field "tags")\r
132 > -    (let ((tags-str (mapconcat 'identity (plist-get result :tags) " ")))\r
133 > +    (let ((tags-str\r
134 > +        (mapconcat 'identity\r
135 > +                   (let ((case-fold-search t))\r
136 > +                     (remove-if\r
137 > +                      (lambda (tag)\r
138 > +                        (find tag notmuch-search-hide-tag-regexps\r
139 > +                              :test (lambda (tag regexp)\r
140 > +                                      (string-match regexp tag))))\r
141 > +                      (plist-get result :tags)))\r
142 > +                   " ")))\r
143 >        (insert (propertize (format format-string tags-str)\r
144 >                         'face 'notmuch-tag-face))))))\r
145 >  \r
146 \r
147 \r