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 32DDD41EC14 for ; Sat, 14 Jul 2012 16:02:31 -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 1UoXcXlS8EFS for ; Sat, 14 Jul 2012 16:02:29 -0700 (PDT) Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU [18.7.68.34]) by olra.theworths.org (Postfix) with ESMTP id D66EA429E27 for ; Sat, 14 Jul 2012 16:02:26 -0700 (PDT) X-AuditID: 12074422-b7f1f6d00000090b-04-5001fa82db06 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP id 3F.E8.02315.28AF1005; Sat, 14 Jul 2012 19:02:26 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q6EN2Pmm015443; Sat, 14 Jul 2012 19:02:25 -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 q6EN2OBm008498 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Sat, 14 Jul 2012 19:02:25 -0400 (EDT) Received: from amthrax by drake.dyndns.org with local (Exim 4.77) (envelope-from ) id 1SqBM0-0002GG-0l; Sat, 14 Jul 2012 19:02:24 -0400 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH v3 6/8] emacs: Allow custom tags formatting Date: Sat, 14 Jul 2012 19:02:18 -0400 Message-Id: <1342306940-7499-7-git-send-email-amdragon@mit.edu> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1342306940-7499-1-git-send-email-amdragon@mit.edu> References: <1342140319-19859-1-git-send-email-amdragon@mit.edu> <1342306940-7499-1-git-send-email-amdragon@mit.edu> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrIIsWRmVeSWpSXmKPExsUixCmqrNv0izHAoOcmm8WefV4Wq+fyWFy/ OZPZgdnj7mkuj52z7rJ7PFt1izmAOYrLJiU1J7MstUjfLoEr4++xx6wFr7krPlz8z97AeIKz i5GTQ0LARGL51BMsELaYxIV769lAbCGBfYwSt2ZoQNgbGCVmneSHsB8xSezekQ1hz2WU+N0h DGKzCWhIbNu/nBHEFhGQlth5dzYriM0skCbxvf0tWFxYwFpi89cDYPNZBFQlmpb9YwexeQXs JS7sOcIMcYO8xNP7fWA1nAIOEocvnGCF2FUmcePJd9YJjPwLGBlWMcqm5Fbp5iZm5hSnJusW Jyfm5aUW6Zrq5WaW6KWmlG5iBIUUu4vSDsafB5UOMQpwMCrx8Cb7MwQIsSaWFVfmHmKU5GBS EuXd/JUxQIgvKT+lMiOxOCO+qDQntfgQowQHs5IIrwRIjjclsbIqtSgfJiXNwaIkznst5aa/ kEB6YklqdmpqQWoRTFaGg0NJgrfwJ1CjYFFqempFWmZOCUKaiYMTZDgP0PBukBre4oLE3OLM dIj8KUZFKXHeXpCEAEgiozQPrhcW868YxYFeEeZdClLFA0wXcN2vgAYzAQ2e9fOfP9DgkkSE lFQD46IKzgmHMy7UtLmmsDTV/az/pWy4MGPuyhDmkg7LaIWd0Vu+qXQq7f21WZ9nstXrNzos jWcv2AdkWKls0lieaPV40XPhP73HeIwkn4eXRR5g0+06UJbCHPVx04nPZ4qOSl3f2pqQ1nxA v2kna94vz6JHdgfrNmy2UO/97LB7ddXU99GJG2uPKbEUZyQaajEXFScCAPKym7HUAgAA 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: Sat, 14 Jul 2012 23:02:31 -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 8590529..86f59e0 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -774,11 +774,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) "Insert RESULT at POS or the end of the buffer if POS is null." -- 1.7.10