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 9C80D41ED72 for ; Thu, 12 Jul 2012 17:45:37 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 uMI7CvK4qCiA for ; Thu, 12 Jul 2012 17:45:36 -0700 (PDT) Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU [18.7.68.36]) by olra.theworths.org (Postfix) with ESMTP id E4ED541ED74 for ; Thu, 12 Jul 2012 17:45:30 -0700 (PDT) X-AuditID: 12074424-b7f2a6d0000008bf-c5-4fff6faa8835 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP id FD.38.02239.AAF6FFF4; Thu, 12 Jul 2012 20:45:30 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q6D0jUsc021129; Thu, 12 Jul 2012 20:45:30 -0400 Received: from drake.dyndns.org (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com [209.6.116.242]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q6D0jST0010705 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Thu, 12 Jul 2012 20:45:29 -0400 (EDT) Received: from amthrax by drake.dyndns.org with local (Exim 4.77) (envelope-from ) id 1SpU0e-0005SC-Mf; Thu, 12 Jul 2012 20:45:28 -0400 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH 6/7] emacs: Allow custom tags formatting Date: Thu, 12 Jul 2012 20:45:18 -0400 Message-Id: <1342140319-19859-7-git-send-email-amdragon@mit.edu> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1342140319-19859-1-git-send-email-amdragon@mit.edu> References: <1342140319-19859-1-git-send-email-amdragon@mit.edu> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrIIsWRmVeSWpSXmKPExsUixG6nrrsq/7+/wbIVQhbXb85kdmD0eLbq FnMAYxSXTUpqTmZZapG+XQJXRvPeLtaCY9wVWzfNZ2tgXMvZxcjBISFgIvF1vWIXIyeQKSZx 4d56NhBbSGAfo8SJaeVdjFxA9gZGiXtXv7BDOI+YJFZN6YZy5jJKfGr6xArSwiagIbFt/3JG EFtEQFpi593ZrCAbmAXUJP50qYCEhQUsJKY272cCsVkEVCWONV1jAbF5BRwkpqx9ywpxhbzE 0/t9YFdwCjhKbPhygRXiIgeJxmMzmScw8i9gZFjFKJuSW6Wbm5iZU5yarFucnJiXl1qka66X m1mil5pSuokRHDIuKjsYmw8pHWIU4GBU4uH9FfvfX4g1say4MvcQoyQHk5Ior0s2UIgvKT+l MiOxOCO+qDQntfgQowQHs5II7zp7oBxvSmJlVWpRPkxKmoNFSZz3espNfyGB9MSS1OzU1ILU IpisDAeHkgTvuTygRsGi1PTUirTMnBKENBMHJ8hwHqDh20BqeIsLEnOLM9Mh8qcYFaXEeVtA EgIgiYzSPLheWEy/YhQHekWYdydIFQ8wHcB1vwIazAQ0eNbPfyCDSxIRUlINjEY1Pz4vWX/r +0rT3ivBjoYC17nPpAqeqvh9yWZpf/vExfteyUZelGOaGCiqEBK397p6zvrDB9x2bPb4pPSi tlPX8iPHiejv7z9aRSksvKb0Ns+xwkaH5VScpGJrnFXctmmTE47v1M7/17lRaf0mbak3zl8+ uG7U2s5pqsB+7kW6L/f5jTEVSUosxRmJhlrMRcWJAMuajcDEAgAA 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: Fri, 13 Jul 2012 00:45:37 -0000 Previously we ignored any notmuch-search-result-format customizations for tag formatting because we needed to be able to parse back in the result line and update the tags in place. We no longer do either of these things, so we can allow customization of this format. (Coincidentally, previously we still allowed too much customization of the tags format, since moving it earlier on the line or removing it from the line would interfere with the tagging mechanism. There is now no problem with doing such things.) --- emacs/notmuch.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index a5cf0dc..f32cfb0 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -755,11 +755,9 @@ non-authors is found, assume that all of the authors match." (notmuch-search-insert-authors format-string (plist-get result :authors))) ((string-equal field "tags") - ;; Ignore format-string here because notmuch-search-set-tags - ;; depends on the format of this - (insert (concat "(" (propertize - (mapconcat 'identity (plist-get result :tags) " ") - 'font-lock-face 'notmuch-tag-face) ")"))))) + (let ((tags-str (mapconcat 'identity (plist-get result :tags) " "))) + (insert (propertize (format format-string tags-str) + 'face 'notmuch-tag-face)))))) (defun notmuch-search-show-result (result &optional pos) ;; Ignore excluded matches -- 1.7.10