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