[PATCH 2/9] lib: private string map (associative array) API
[notmuch-archives.git] / f6 / ef6a62250585465f3fa7280a96deb75cc655c9
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 D444E431FAF\r
6         for <notmuch@notmuchmail.org>; Thu,  1 Mar 2012 14:29:53 -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 Pi5y6nNkPF6Q for <notmuch@notmuchmail.org>;\r
18         Thu,  1 Mar 2012 14:29:52 -0800 (PST)\r
19 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com\r
20         [209.85.212.181]) (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 F2193431FDC\r
23         for <notmuch@notmuchmail.org>; Thu,  1 Mar 2012 14:29:51 -0800 (PST)\r
24 Received: by mail-wi0-f181.google.com with SMTP id o1so305757wic.26\r
25         for <notmuch@notmuchmail.org>; Thu, 01 Mar 2012 14:29:51 -0800 (PST)\r
26 Received-SPF: pass (google.com: domain of markwalters1009@gmail.com designates\r
27         10.180.99.65 as permitted sender) client-ip=10.180.99.65; \r
28 Authentication-Results: mr.google.com; spf=pass (google.com: domain of\r
29         markwalters1009@gmail.com designates 10.180.99.65 as permitted\r
30         sender) smtp.mail=markwalters1009@gmail.com;\r
31         dkim=pass header.i=markwalters1009@gmail.com\r
32 Received: from mr.google.com ([10.180.99.65])\r
33         by 10.180.99.65 with SMTP id eo1mr6536534wib.13.1330640991835 (num_hops\r
34         = 1); Thu, 01 Mar 2012 14:29:51 -0800 (PST)\r
35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
36         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
37         bh=XGzouvhcaMkSYxvTwZnHC4C8s/Kptw6Y12r/uGuEPH4=;\r
38         b=BeuzEAGHOFNtyorSYajSpKzq49bNeXR//FoX/FKIFQQqkC53/e3j/TAvBzeIj+Q4B2\r
39         tHGitFLEdHkH2WSt7Rq0DW5p25ErZHH6qUSMPgUeZ9uVh2tEFpEYyPrzTp1dxF+NjING\r
40         uHbzmZEiScgGPFfr0MmUXthD4AoO32uZjsJqIEgaFL7n7g0VS73J4zfL/NosWeaLyrTK\r
41         FOOJWUqC4vP+Uc/+p+RgRm0JSBj+xGYPC9i5wxStS2MEidcjzI8eIW7KmmYvfhSZDpjV\r
42         Jh5wtj4MW/tCREJVFb/MIMGmdrFq4flChzX0XUCRbKteAexgJCkBV/E4T62Bu662GcrK\r
43         93Uw==\r
44 Received: by 10.180.99.65 with SMTP id eo1mr5281382wib.13.1330640991774;\r
45         Thu, 01 Mar 2012 14:29:51 -0800 (PST)\r
46 Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
47  [94.192.233.223])      by mx.google.com with ESMTPS id\r
48  fw5sm44681145wib.0.2012.03.01.14.29.49 (version=TLSv1/SSLv3 cipher=OTHER);\r
49         Thu, 01 Mar 2012 14:29:50 -0800 (PST)\r
50 From: Mark Walters <markwalters1009@gmail.com>\r
51 To: notmuch@notmuchmail.org\r
52 Subject: [Patch v7 13/13] emacs: notmuch.el ignore excluded matches\r
53 Date: Thu,  1 Mar 2012 22:30:45 +0000\r
54 Message-Id: <1330641045-27416-14-git-send-email-markwalters1009@gmail.com>\r
55 X-Mailer: git-send-email 1.7.2.3\r
56 In-Reply-To: <1330641045-27416-1-git-send-email-markwalters1009@gmail.com>\r
57 References: <1330641045-27416-1-git-send-email-markwalters1009@gmail.com>\r
58 X-BeenThere: notmuch@notmuchmail.org\r
59 X-Mailman-Version: 2.1.13\r
60 Precedence: list\r
61 List-Id: "Use and development of the notmuch mail system."\r
62         <notmuch.notmuchmail.org>\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
66 List-Post: <mailto:notmuch@notmuchmail.org>\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
70 X-List-Received-Date: Thu, 01 Mar 2012 22:29:54 -0000\r
71 \r
72 This is a small change to make notmuch.el ignore excluded matches.  In\r
73 the future it could do something better like add a button for\r
74 rerunning the search with the excludes (particularly if nothing\r
75 matches with the excludes) or having them invisible and allowing the\r
76 visibility to be toggled.\r
77 ---\r
78  emacs/notmuch.el |   22 ++++++++++++----------\r
79  1 files changed, 12 insertions(+), 10 deletions(-)\r
80 \r
81 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
82 index f851c6f..99e0c93 100644\r
83 --- a/emacs/notmuch.el\r
84 +++ b/emacs/notmuch.el\r
85 @@ -872,16 +872,18 @@ non-authors is found, assume that all of the authors match."\r
86                       (goto-char (point-max))\r
87                       (if (/= (match-beginning 1) line)\r
88                           (insert (concat "Error: Unexpected output from notmuch search:\n" (substring string line (match-beginning 1)) "\n")))\r
89 -                     (let ((beg (point)))\r
90 -                       (notmuch-search-show-result date count authors\r
91 -                                                   (notmuch-prettify-subject subject) tags)\r
92 -                       (notmuch-search-color-line beg (point) tag-list)\r
93 -                       (put-text-property beg (point) 'notmuch-search-thread-id thread-id)\r
94 -                       (put-text-property beg (point) 'notmuch-search-authors authors)\r
95 -                       (put-text-property beg (point) 'notmuch-search-subject subject)\r
96 -                       (when (string= thread-id notmuch-search-target-thread)\r
97 -                         (set 'found-target beg)\r
98 -                         (set 'notmuch-search-target-thread "found")))\r
99 +                     ;; We currently just throw away excluded matches.\r
100 +                     (unless (eq (aref count 1) ?0)\r
101 +                       (let ((beg (point)))\r
102 +                         (notmuch-search-show-result date count authors\r
103 +                                                     (notmuch-prettify-subject subject) tags)\r
104 +                         (notmuch-search-color-line beg (point) tag-list)\r
105 +                         (put-text-property beg (point) 'notmuch-search-thread-id thread-id)\r
106 +                         (put-text-property beg (point) 'notmuch-search-authors authors)\r
107 +                         (put-text-property beg (point) 'notmuch-search-subject subject)\r
108 +                         (when (string= thread-id notmuch-search-target-thread)\r
109 +                           (set 'found-target beg)\r
110 +                           (set 'notmuch-search-target-thread "found"))))\r
111                       (set 'line (match-end 0)))\r
112                   (set 'more nil)\r
113                   (while (and (< line (length string)) (= (elt string line) ?\n))\r
114 -- \r
115 1.7.2.3\r
116 \r