Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 2ECAD431FC0; Wed, 18 Nov 2009 15:38:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DuCMP4s-wqtd; Wed, 18 Nov 2009 15:38:16 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 2CA94431FBC; Wed, 18 Nov 2009 15:38:15 -0800 (PST) From: Carl Worth To: "Aneesh Kumar K.V" , notmuch In-Reply-To: <87pr7f6fgp.fsf@linux.vnet.ibm.com> References: <87pr7f6fgp.fsf@linux.vnet.ibm.com> Date: Thu, 19 Nov 2009 00:38:01 +0100 Message-ID: <878we376au.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] How to list archived mails X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Nov 2009 23:38:17 -0000 On Wed, 18 Nov 2009 20:35:26 +0530, aneesh.kumar@linux.vnet.ibm.com (Aneesh Kumar K.V) wrote: > Once i mark the mail as archived how do i search for them ? > Right now with notmuch.el i am adding a tag "archive" when > i am archiving the mail. I am just wondering is this the right > way ? You might expect to be able to find all archived messages with: notmuch search not tag:inbox (And if I had written the query parser that would work fine.) But oddly, that fails because in Xapian's query parser the NOT operator is not a unary operator but is instead a binary operator of AND_NOT. I think the lack of a unary not is a bug in Xapian. In the meantime, what we could use here is some syntax for a query that is guaranteed to match all messages. Anyone have any ideas? Meanwhile, if it's not that you're trying to list all archived messages, (which I think would be a rare thing to want), but instead you want all archived messages matching then you can simply do: notmuch search and not tag:inbox I hope that helps. Happy hacking, -Carl