Re: [PATCH 1/2] Add Google Inc. to AUTHORS as a contributor.
[notmuch-archives.git] / 15 / 90a2e7c68d730e2d3348b8b180e2e3753ac766
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 BC75D42119B\r
6         for <notmuch@notmuchmail.org>; Fri, 13 Jul 2012 20:43:41 -0700 (PDT)\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 JIHSj1kdfDxr for <notmuch@notmuchmail.org>;\r
16         Fri, 13 Jul 2012 20:43:39 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU\r
18         [18.9.25.14])\r
19         by olra.theworths.org (Postfix) with ESMTP id 9CD66431FAE\r
20         for <notmuch@notmuchmail.org>; Fri, 13 Jul 2012 20:43:39 -0700 (PDT)\r
21 X-AuditID: 1209190e-b7fb56d0000008b2-58-5000eaeb61d5\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
23         by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 6B.44.02226.BEAE0005; Fri, 13 Jul 2012 23:43:39 -0400 (EDT)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q6E3hcYB026807; \r
27         Fri, 13 Jul 2012 23:43:38 -0400\r
28 Received: from drake.dyndns.org\r
29         (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
30         [209.6.116.242]) (authenticated bits=0)\r
31         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
32         by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q6E3hbPi021333\r
33         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
34         Fri, 13 Jul 2012 23:43:38 -0400 (EDT)\r
35 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
36         (envelope-from <amdragon@mit.edu>)\r
37         id 1SptGa-0000a8-V6; Fri, 13 Jul 2012 23:43:36 -0400\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: notmuch@notmuchmail.org\r
40 Subject: [PATCH v2 6/7] emacs: Allow custom tags formatting\r
41 Date: Fri, 13 Jul 2012 23:43:25 -0400\r
42 Message-Id: <1342237406-32507-7-git-send-email-amdragon@mit.edu>\r
43 X-Mailer: git-send-email 1.7.10\r
44 In-Reply-To: <1342237406-32507-1-git-send-email-amdragon@mit.edu>\r
45 References: <1342140319-19859-1-git-send-email-amdragon@mit.edu>\r
46         <1342237406-32507-1-git-send-email-amdragon@mit.edu>\r
47 X-Brightmail-Tracker:\r
48  H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsUixG6nrvv6FUOAwdef7Bar5/JYXL85k9mB\r
49         yWPnrLvsHs9W3WIOYIrisklJzcksSy3St0vgymibspu14DV3xeqeXrYGxhOcXYycHBICJhJX\r
50         195kg7DFJC7cWw9kc3EICexjlFiz8CczhLOBUeLY5eVMEM4jJon7655DOXMZJX7f38QO0s8m\r
51         oCGxbf9yRhBbREBaYufd2awgNrOAo8Tn/YvAdggLWEscaN4OVs8ioCqx5PBRFhCbV8BBYuLb\r
52         LVB3yEs8vd8HZnMC9bb13gabKSRQLnH92xqmCYz8CxgZVjHKpuRW6eYmZuYUpybrFicn5uWl\r
53         Fuka6+VmluilppRuYgSFEqck3w7GrweVDjEKcDAq8fBm+jMECLEmlhVX5h5ilORgUhLl5QUG\r
54         ohBfUn5KZUZicUZ8UWlOavEhRgkOZiURXvM2oBxvSmJlVWpRPkxKmoNFSZz3SspNfyGB9MSS\r
55         1OzU1ILUIpisDAeHkgRvD8hQwaLU9NSKtMycEoQ0EwcnyHAeoOGTQWp4iwsSc4sz0yHypxgV\r
56         pcR5C0ASAiCJjNI8uF5YrL9iFAd6RZi3EqSKB5gm4LpfAQ1mAho86+c/f6DBJYkIKakGxrWV\r
57         We6PCiYn+1lvmBLyMDZd9oXdbxn2J8Kl0RGT5rhfs195fWbIhp7jbOVT+qJ2M/Y5ik1Ymxcj\r
58         3Nb2zH3uy/NfE+YZd6tcZRNxeXpENtv9w54fvEXpN7ZP8dmx7l3RnxcxZ3VPms3W49Wz0b18\r
59         O94vgyP4fVzAt3cvavPvL968eBHjBZENVUosxRmJhlrMRcWJAIoqkL/QAgAA\r
60 X-BeenThere: notmuch@notmuchmail.org\r
61 X-Mailman-Version: 2.1.13\r
62 Precedence: list\r
63 List-Id: "Use and development of the notmuch mail system."\r
64         <notmuch.notmuchmail.org>\r
65 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
66         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
67 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
68 List-Post: <mailto:notmuch@notmuchmail.org>\r
69 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
70 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
71         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
72 X-List-Received-Date: Sat, 14 Jul 2012 03:43:42 -0000\r
73 \r
74 Previously we ignored any notmuch-search-result-format customizations\r
75 for tag formatting because we needed to be able to parse back in the\r
76 result line and update the tags in place.  We no longer do either of\r
77 these things, so we can allow customization of this format.\r
78 \r
79 (Coincidentally, previously we still allowed too much customization of\r
80 the tags format, since moving it earlier on the line or removing it\r
81 from the line would interfere with the tagging mechanism.  There is\r
82 now no problem with doing such things.)\r
83 ---\r
84  emacs/notmuch.el |    8 +++-----\r
85  1 file changed, 3 insertions(+), 5 deletions(-)\r
86 \r
87 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
88 index 9e061b6..d0a8021 100644\r
89 --- a/emacs/notmuch.el\r
90 +++ b/emacs/notmuch.el\r
91 @@ -759,11 +759,9 @@ non-authors is found, assume that all of the authors match."\r
92      (notmuch-search-insert-authors format-string (plist-get result :authors)))\r
93  \r
94     ((string-equal field "tags")\r
95 -    ;; Ignore format-string here because notmuch-search-set-tags\r
96 -    ;; depends on the format of this\r
97 -    (insert (concat "(" (propertize\r
98 -                        (mapconcat 'identity (plist-get result :tags) " ")\r
99 -                        'font-lock-face 'notmuch-tag-face) ")")))))\r
100 +    (let ((tags-str (mapconcat 'identity (plist-get result :tags) " ")))\r
101 +      (insert (propertize (format format-string tags-str)\r
102 +                         'face 'notmuch-tag-face))))))\r
103  \r
104  (defun notmuch-search-show-result (result &optional pos)\r
105    "Insert RESULT at POS or the end of the buffer if POS is null."\r
106 -- \r
107 1.7.10\r
108 \r