[PATCH] don't show x-foo tags in search view
authorJames Vasile <james@hackervisions.org>
Mon, 29 Oct 2012 18:57:41 +0000 (14:57 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:50:10 +0000 (09:50 -0800)
f8/bc5953d1f2f915c0044f9d0c123b9839de083e [new file with mode: 0644]

diff --git a/f8/bc5953d1f2f915c0044f9d0c123b9839de083e b/f8/bc5953d1f2f915c0044f9d0c123b9839de083e
new file mode 100644 (file)
index 0000000..5e0cbfc
--- /dev/null
@@ -0,0 +1,100 @@
+Return-Path: <james@hackervisions.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 45F2A431FC7\r
+       for <notmuch@notmuchmail.org>; Mon, 29 Oct 2012 11:57:50 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.01\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.01 tagged_above=-999 required=5\r
+       tests=[T_MIME_NO_TEXT=0.01] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id RUBdGlkCwGJJ for <notmuch@notmuchmail.org>;\r
+       Mon, 29 Oct 2012 11:57:48 -0700 (PDT)\r
+Received: from mail.sflc.info (mail.sflc.info [207.86.247.70])\r
+       (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 35DA4431FAF\r
+       for <notmuch@notmuchmail.org>; Mon, 29 Oct 2012 11:57:48 -0700 (PDT)\r
+Received: from localhost (ool-457af02d.dyn.optonline.net [69.122.240.45])\r
+       by mail.sflc.info (Postfix) with ESMTPSA id 245B9B4C018\r
+       for <notmuch@notmuchmail.org>; Mon, 29 Oct 2012 18:57:47 +0000 (UTC)\r
+From: James Vasile <james@hackervisions.org>\r
+To: notmuch mailing list <notmuch@notmuchmail.org>\r
+Subject: [PATCH] don't show x-foo tags in search view\r
+User-Agent: Notmuch/0.12+139~g3c998ca (http://notmuchmail.org) Emacs/23.4.1\r
+       (i486-pc-linux-gnu)\r
+Date: Mon, 29 Oct 2012 14:57:41 -0400\r
+Message-ID: <87fw4x3y3e.fsf@hackervisions.org>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha1; protocol="application/pgp-signature"\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 29 Oct 2012 18:57:50 -0000\r
+\r
+--=-=-=\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+My filters create tags like x-bogotrained-spam that are for internal\r
+bookkeeping.  I don't mind seeing them in the 'show' view, but I didn't\r
+want them cluttering my 'search' view.  This patch omits x-foo and X-foo\r
+tags from the 'search' view.\r
+\r
+=2D--\r
+ emacs/notmuch.el |    7 ++++++-\r
+ 1 file changed, 6 insertions(+), 1 deletion(-)\r
+\r
+diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+index f9454d8..90fafbf 100644\r
+=2D-- a/emacs/notmuch.el\r
++++ b/emacs/notmuch.el\r
+@@ -793,7 +793,12 @@ non-authors is found, assume that all of the authors m=\r
+atch."\r
+     (notmuch-search-insert-authors format-string (plist-get result :author=\r
+s)))\r
+=20\r
+    ((string-equal field "tags")\r
+=2D    (let ((tags-str (mapconcat 'identity (plist-get result :tags) " ")))\r
++    (let ((tags-str (mapconcat 'identity\r
++                              (delq nil\r
++                                    (mapcar (lambda (x) (if (equal (upcase=\r
+ (truncate-string-to-width  x 2)) "X-")\r
++                                                            nil\r
++                                                            (identity x)))=\r
+ (plist-get result :tags)))\r
++                              " ")))\r
+       (insert (propertize (format format-string tags-str)\r
+                          'face 'notmuch-tag-face))))))\r
+=20\r
+=2D-=20\r
+1.7.10.4\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.12 (GNU/Linux)\r
+\r
+iQEcBAEBAgAGBQJQjtGlAAoJECaDklOuuidYw3oH/jLoHo6aUqu4fgWbmCxteCEV\r
+jOUevpnaKIbNqvQIJkWSj9QBarazsY4/EWFP8c5+bTEhtH6PnrSyZnnlz0PPvrf1\r
+P24imxj7A2dcsw9oRtqZj0fF5vblFm1sNXXpcPkBdAqNl7A5etoe/mGOPWVvMFV6\r
+dbUxbY8erWeF2DzxXJGeZzqWV4tgERkwTtIdYuMf9ZPyiYuUJUMpxO8VCv4qS+gB\r
+7q3JW3aYkb/1Yc0z3uRA76aP9orCIJfYdfzms2RxK4A/L3pRE3Vi25dajhXtl6iK\r
+4IbjfTHexiMN2/Pp2zOJdCcAnWkhOyWI+ZeNV2hVYK5bC2GFx2cuTPOHVFqGqZU=\r
+=1g0b\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r