Re: [PATCH v4 13/16] add indexopts to notmuch python bindings.
[notmuch-archives.git] / c8 / 894103c749a224de538b35e0d999a56d896d37
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 BC90E431FBD\r
6         for <notmuch@notmuchmail.org>; Sat, 25 Feb 2012 21:08: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 YcQywd4EptEl for <notmuch@notmuchmail.org>;\r
18         Sat, 25 Feb 2012 21:08:53 -0800 (PST)\r
19 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
20  [74.125.82.45])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
21  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
22  25C87431FAE    for <notmuch@notmuchmail.org>; Sat, 25 Feb 2012 21:08:53 -0800\r
23  (PST)\r
24 Received: by wgbdt12 with SMTP id dt12so2813759wgb.2\r
25         for <notmuch@notmuchmail.org>; Sat, 25 Feb 2012 21:08:52 -0800 (PST)\r
26 Received-SPF: pass (google.com: domain of markwalters1009@gmail.com designates\r
27         10.180.78.6 as permitted sender) client-ip=10.180.78.6; \r
28 Authentication-Results: mr.google.com; spf=pass (google.com: domain of\r
29         markwalters1009@gmail.com designates 10.180.78.6 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.78.6])\r
33         by 10.180.78.6 with SMTP id x6mr8104461wiw.18.1330232932081 (num_hops =\r
34         1); Sat, 25 Feb 2012 21:08:52 -0800 (PST)\r
35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
36         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
37         bh=kTsI2ZMo+rBmhGz/LXusdK9NBBiE4ufayWBC1cKc9CY=;\r
38         b=YOJIfwEenysdCbHSAhuJ8b2TLQrFgsD/tUccJmlMwGyICmd5VMeESTXTOWw5pOXA1V\r
39         Rne+/QoslZ5cVPUPCerzMqfanqHQkhTxskrB00UjNblbHJJJ4rQOxPmLucbxUNmHj6dL\r
40         m1lDPqqv+t0VGrWrLjIEP+3mIRsDefm/qsubM=\r
41 Received: by 10.180.78.6 with SMTP id x6mr1725934wiw.18.1330157156328;\r
42         Sat, 25 Feb 2012 00:05:56 -0800 (PST)\r
43 Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
44  [94.192.233.223])      by mx.google.com with ESMTPS id\r
45         hb10sm20589357wib.10.2012.02.25.00.05.55        (version=TLSv1/SSLv3 cipher=OTHER);\r
46         Sat, 25 Feb 2012 00:05:55 -0800 (PST)\r
47 From: Mark Walters <markwalters1009@gmail.com>\r
48 To: notmuch@notmuchmail.org,\r
49         Austin Clements <amdragon@MIT.EDU>\r
50 Subject: [Patch v6 13/13] emacs: notmuch.el ignore excluded matches\r
51 Date: Sat, 25 Feb 2012 08:06:44 +0000\r
52 Message-Id: <1330157204-26094-14-git-send-email-markwalters1009@gmail.com>\r
53 X-Mailer: git-send-email 1.7.2.3\r
54 In-Reply-To: <1330157204-26094-1-git-send-email-markwalters1009@gmail.com>\r
55 References: <1330157204-26094-1-git-send-email-markwalters1009@gmail.com>\r
56 X-BeenThere: notmuch@notmuchmail.org\r
57 X-Mailman-Version: 2.1.13\r
58 Precedence: list\r
59 List-Id: "Use and development of the notmuch mail system."\r
60         <notmuch.notmuchmail.org>\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
64 List-Post: <mailto:notmuch@notmuchmail.org>\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
67         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
68 X-List-Received-Date: Sun, 26 Feb 2012 05:08:53 -0000\r
69 \r
70 This is a small change to make notmuch.el ignore excluded matches.  In\r
71 the future it could do something better like add a button for\r
72 rerunning the search with the excludes (particularly if nothing\r
73 matches with the excludes) or having them invisible and allowing the\r
74 visibility to be toggled.\r
75 \r
76 It is a 1 or 2 line change except for indentation.\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 5b4f1c5..8b209cd 100644\r
83 --- a/emacs/notmuch.el\r
84 +++ b/emacs/notmuch.el\r
85 @@ -865,16 +865,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