Applying patches directly from emails?
[notmuch-archives.git] / e7 / 2249de330f585537db319e38ace295c38cebd8
1 Return-Path: <markwalters1009@gmail.com>\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 11EB5431FBD\r
6         for <notmuch@notmuchmail.org>; Sat, 18 Jan 2014 15:31:16 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id k-eetTZq5n3O for <notmuch@notmuchmail.org>;\r
18         Sat, 18 Jan 2014 15:31:11 -0800 (PST)\r
19 Received: from mail-we0-f171.google.com (mail-we0-f171.google.com\r
20         [74.125.82.171]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id 675DB431FC0\r
23         for <notmuch@notmuchmail.org>; Sat, 18 Jan 2014 15:31:06 -0800 (PST)\r
24 Received: by mail-we0-f171.google.com with SMTP id w61so5849187wes.16\r
25         for <notmuch@notmuchmail.org>; Sat, 18 Jan 2014 15:31:05 -0800 (PST)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
28         bh=Ea6a6cfdaLH6c+PcZc+IFhMcn9SQ93d9EWbC0UUOgGg=;\r
29         b=Nj/Z4ItiLDdjXB5FqQyfzjhXUJZXu7QAOtkdgaz0U0JH1mwGkcYZYl/+8b+aerS58y\r
30         +hbHd/MeZlyLT3t8l7yux3eD+JYoHC3tmxcvK6+DBSUBnkHQSswKtM98kq069AX7dEbC\r
31         sRdOYIJ5x8YrXhF+N4eh8U/2D24Rd/nHHNU6hC6SLS8erxhI3sCoRTUeG1bwYqXKZkuX\r
32         utcMILOO5EIsGZMbB6i3/UGzSyvifelxvuWT4mVAyoKNbyKgTK+VrpRfk8ZMxHfB+lQW\r
33         I8MX06nE1K+OwakfK1SDKrFyHdBd0Qn9QBDHaCUu4jyq1yRG80blHW95C+UJbHYUlwxG\r
34         z7NA==\r
35 X-Received: by 10.194.62.70 with SMTP id w6mr39008wjr.55.1390087865300;\r
36         Sat, 18 Jan 2014 15:31:05 -0800 (PST)\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
38         by mx.google.com with ESMTPSA id\r
39         ci4sm13898024wjc.21.2014.01.18.15.31.04 for <multiple recipients>\r
40         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
41         Sat, 18 Jan 2014 15:31:04 -0800 (PST)\r
42 From: Mark Walters <markwalters1009@gmail.com>\r
43 To: notmuch@notmuchmail.org\r
44 Subject: [PATCH 2/7] emacs: tag: allow default case in notmuch-tag-formats\r
45 Date: Sat, 18 Jan 2014 23:30:50 +0000\r
46 Message-Id: <1390087855-26194-3-git-send-email-markwalters1009@gmail.com>\r
47 X-Mailer: git-send-email 1.7.9.1\r
48 In-Reply-To: <1390087855-26194-1-git-send-email-markwalters1009@gmail.com>\r
49 References: <1390087855-26194-1-git-send-email-markwalters1009@gmail.com>\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Sat, 18 Jan 2014 23:31:16 -0000\r
63 \r
64 Allow an empty string in notmuch-tag-formats which matches all tags\r
65 except those matched explicitly matched. This allows the user to tell\r
66 notmuch to hide all tags except those specified.\r
67 \r
68 This will be useful once formatting for deleted/added tags is added\r
69 later in the series: a user might want to hide all deleted tags for\r
70 example.\r
71 ---\r
72  emacs/notmuch-tag.el |   20 +++++++++++---------\r
73  1 files changed, 11 insertions(+), 9 deletions(-)\r
74 \r
75 diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el\r
76 index 2153068..92c1249 100644\r
77 --- a/emacs/notmuch-tag.el\r
78 +++ b/emacs/notmuch-tag.el\r
79 @@ -65,14 +65,15 @@\r
80  This gives a list that maps from tag names to lists of formatting\r
81  expressions.  The car of each element gives a tag name and the\r
82  cdr gives a list of Elisp expressions that modify the tag.  If\r
83 -the list is empty, the tag will simply be hidden.  Otherwise,\r
84 -each expression will be evaluated in order: for the first\r
85 -expression, the variable `tag' will be bound to the tag name; for\r
86 -each later expression, the variable `tag' will be bound to the\r
87 -result of the previous expression.  In this way, each expression\r
88 -can build on the formatting performed by the previous expression.\r
89 -The result of the last expression will displayed in place of the\r
90 -tag.\r
91 +the car is an empty string it matches all tags that do not have\r
92 +an explicit match.  If the list is empty, the tag will simply be\r
93 +hidden.  Otherwise, each expression will be evaluated in order:\r
94 +for the first expression, the variable `tag' will be bound to the\r
95 +tag name; for each later expression, the variable `tag' will be\r
96 +bound to the result of the previous expression.  In this way,\r
97 +each expression can build on the formatting performed by the\r
98 +previous expression.  The result of the last expression will\r
99 +displayed in place of the tag.\r
100  \r
101  For example, to replace a tag with another string, simply use\r
102  that string as a formatting expression.  To change the foreground\r
103 @@ -140,7 +141,8 @@ This can be used with `notmuch-tag-format-image-data'."\r
104  \r
105  (defun notmuch-tag-format-tag (tag)\r
106    "Format TAG by looking into `notmuch-tag-formats'."\r
107 -  (let ((formats (assoc tag notmuch-tag-formats)))\r
108 +  (let ((formats (or (assoc tag notmuch-tag-formats)\r
109 +                    (assoc "" notmuch-tag-formats))))\r
110      (cond\r
111       ((null formats)           ;; - Tag not in `notmuch-tag-formats',\r
112        tag)                     ;;   the format is the tag itself.\r
113 -- \r
114 1.7.9.1\r
115 \r