Re: [notmuch] How to list archived mails
authorCarl Worth <cworth@cworth.org>
Wed, 18 Nov 2009 23:38:01 +0000 (00:38 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:35:36 +0000 (09:35 -0800)
d8/22243946092bb52ad9a18340237151eefbbaf8 [new file with mode: 0644]

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