Re: [PATCH 1/2] python: add classes to wrap all notmuch_*_t types
[notmuch-archives.git] / d8 / 22243946092bb52ad9a18340237151eefbbaf8
1 Return-Path: <cworth@cworth.org>\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 2ECAD431FC0;\r
6         Wed, 18 Nov 2009 15:38:17 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 Received: from olra.theworths.org ([127.0.0.1])\r
9         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
10         with ESMTP id DuCMP4s-wqtd; Wed, 18 Nov 2009 15:38:16 -0800 (PST)\r
11 Received: from cworth.org (localhost [127.0.0.1])\r
12         by olra.theworths.org (Postfix) with ESMTP id 2CA94431FBC;\r
13         Wed, 18 Nov 2009 15:38:15 -0800 (PST)\r
14 From: Carl Worth <cworth@cworth.org>\r
15 To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>, notmuch\r
16         <notmuch@notmuchmail.org>\r
17 In-Reply-To: <87pr7f6fgp.fsf@linux.vnet.ibm.com>\r
18 References: <87pr7f6fgp.fsf@linux.vnet.ibm.com>\r
19 Date: Thu, 19 Nov 2009 00:38:01 +0100\r
20 Message-ID: <878we376au.fsf@yoom.home.cworth.org>\r
21 MIME-Version: 1.0\r
22 Content-Type: text/plain; charset=us-ascii\r
23 Subject: Re: [notmuch] How to list archived mails\r
24 X-BeenThere: notmuch@notmuchmail.org\r
25 X-Mailman-Version: 2.1.12\r
26 Precedence: list\r
27 List-Id: "Use and development of the notmuch mail system."\r
28         <notmuch.notmuchmail.org>\r
29 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
30         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
31 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
32 List-Post: <mailto:notmuch@notmuchmail.org>\r
33 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
34 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
35         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
36 X-List-Received-Date: Wed, 18 Nov 2009 23:38:17 -0000\r
37 \r
38 On Wed, 18 Nov 2009 20:35:26 +0530, aneesh.kumar@linux.vnet.ibm.com (Aneesh Kumar K.V) wrote:\r
39 > Once i mark the mail as archived how do i search for them ?\r
40 > Right now with notmuch.el i am adding a tag "archive" when\r
41 > i am archiving the mail. I am just wondering is this the right\r
42 > way ?\r
43 \r
44 You might expect to be able to find all archived messages with:\r
45 \r
46         notmuch search not tag:inbox\r
47 \r
48 (And if I had written the query parser that would work fine.)\r
49 \r
50 But oddly, that fails because in Xapian's query parser the NOT operator\r
51 is not a unary operator but is instead a binary operator of AND_NOT.\r
52 \r
53 I think the lack of a unary not is a bug in Xapian. In the meantime,\r
54 what we could use here is some syntax for a query that is guaranteed to\r
55 match all messages. Anyone have any ideas?\r
56 \r
57 Meanwhile, if it's not that you're trying to list all archived messages,\r
58 (which I think would be a rare thing to want), but instead you want all\r
59 archived messages matching <some-term> then you can simply do:\r
60 \r
61         notmuch search <some-term> and not tag:inbox\r
62 \r
63 I hope that helps.\r
64 \r
65 Happy hacking,\r
66 \r
67 -Carl\r
68 \r
69 \r