1 Return-Path: <aaronecay@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 B0521414894
\r
6 for <notmuch@notmuchmail.org>; Sun, 8 Jan 2012 17:14:54 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id 38hwOktIDa0R for <notmuch@notmuchmail.org>;
\r
17 Sun, 8 Jan 2012 17:14:53 -0800 (PST)
\r
18 Received: from mail-gx0-f181.google.com (mail-gx0-f181.google.com
\r
19 [209.85.161.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 96A09414893
\r
22 for <notmuch@notmuchmail.org>; Sun, 8 Jan 2012 17:14:53 -0800 (PST)
\r
23 Received: by ggnq2 with SMTP id q2so1905896ggn.26
\r
24 for <notmuch@notmuchmail.org>; Sun, 08 Jan 2012 17:14:53 -0800 (PST)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
26 h=from:to:subject:in-reply-to:references:user-agent:date:message-id
\r
27 :mime-version:content-type:content-transfer-encoding;
\r
28 bh=HThKk9TfWtuR151CuVdOx0fMW3ZwQMfMh37wiMDhfxA=;
\r
29 b=r0Ogzz5LiPQyBbb1xr7CjhIm1xZ8eFCJJwDPW2KSJKWJ9Pjcf2bCyVZFwE9eRJWlYt
\r
30 0w6FzjeEc3bHZxXg1cpWUyi2SJKTCBKsM0GutSL34YhHLW70OLb8Nm2U5Wp1ljNO6wYz
\r
31 h8HcbelqsGjT3vnvdNPjgnqqPrCE3UICzbv3Q=
\r
32 Received: by 10.100.214.2 with SMTP id m2mr5889959ang.46.1326071693099;
\r
33 Sun, 08 Jan 2012 17:14:53 -0800 (PST)
\r
34 Received: from localhost (c-68-80-94-73.hsd1.pa.comcast.net. [68.80.94.73])
\r
35 by mx.google.com with ESMTPS id 31sm68739092ant.14.2012.01.08.17.14.51
\r
36 (version=TLSv1/SSLv3 cipher=OTHER);
\r
37 Sun, 08 Jan 2012 17:14:51 -0800 (PST)
\r
38 From: Aaron Ecay <aaronecay@gmail.com>
\r
39 To: Jameson Graef Rollins <jrollins@finestructure.net>,
\r
40 Notmuch Mail <notmuch@notmuchmail.org>
\r
41 Subject: Re: [PATCH 1/4] emacs: new customization variable to exclude
\r
42 "deleted" messages from search
\r
43 In-Reply-To: <1325975294-646-2-git-send-email-jrollins@finestructure.net>
\r
44 References: <1325975294-646-1-git-send-email-jrollins@finestructure.net>
\r
45 <1325975294-646-2-git-send-email-jrollins@finestructure.net>
\r
46 User-Agent: Notmuch/0.10.1+56~gd709fd6 (http://notmuchmail.org)
\r
47 Emacs/24.0.92.3 (i386-apple-darwin10.8.0)
\r
48 Date: Sun, 08 Jan 2012 20:14:49 -0500
\r
49 Message-ID: <m2wr91ismu.fsf@gmail.com>
\r
51 Content-Type: text/plain; charset=utf-8
\r
52 Content-Transfer-Encoding: quoted-printable
\r
53 X-BeenThere: notmuch@notmuchmail.org
\r
54 X-Mailman-Version: 2.1.13
\r
56 List-Id: "Use and development of the notmuch mail system."
\r
57 <notmuch.notmuchmail.org>
\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
61 List-Post: <mailto:notmuch@notmuchmail.org>
\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
65 X-List-Received-Date: Mon, 09 Jan 2012 01:14:55 -0000
\r
71 On Sat, 7 Jan 2012 14:28:11 -0800, Jameson Graef Rollins <jrollins@finestr=
\r
73 > The new customization variable, notmuch-search-exclude-deleted, when
\r
74 > set to t, will exclude any messages with the "deleted" tag from
\r
77 > Additionally, specifying "tag:deleted" in the search directly will
\r
78 > override the exclusion and will included deleted messages in the
\r
81 > emacs/notmuch.el | 8 ++++
\r
82 > test/emacs | 42 ++++++++++++++=
\r
84 > .../notmuch-search-tag-inbox-deleted-excluded | 24 +++++++++++
\r
85 > 3 files changed, 74 insertions(+), 0 deletions(-)
\r
86 > create mode 100644 test/emacs.expected-output/notmuch-search-tag-inbox-d=
\r
89 > diff --git a/emacs/notmuch.el b/emacs/notmuch.el
\r
90 > index fde2377..c519687 100644
\r
91 > --- a/emacs/notmuch.el
\r
92 > +++ b/emacs/notmuch.el
\r
93 > @@ -905,6 +905,11 @@ PROMPT is the string to prompt with."
\r
94 > (read-from-minibuffer prompt nil keymap nil
\r
95 > 'notmuch-query-history nil nil))))
\r
97 > +(defcustom notmuch-search-exclude-deleted nil
\r
98 > + "Exclude deleted messages (with \"deleted\" tag) from search results."
\r
100 > + :type 'boolean)
\r
103 > (defun notmuch-search (query &optional oldest-first target-thread target=
\r
104 -line continuation)
\r
105 > "Run \"notmuch search\" with the given query string and display result=
\r
107 > @@ -927,6 +932,9 @@ The optional parameters are used as follows:
\r
108 > (set 'notmuch-search-target-thread target-thread)
\r
109 > (set 'notmuch-search-target-line target-line)
\r
110 > (set 'notmuch-search-continuation continuation)
\r
111 > + (when (and notmuch-search-exclude-deleted
\r
112 > + (not (string-match "tag:deleted[ )]*" query)))
\r
114 =E2=80=9Cis:=E2=80=9D is a synonym for =E2=80=9Ctag:=E2=80=9D in searches =
\r
115 =E2=80=93 so this section of the code
\r
116 should look for it too.
\r