unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* How to list archived mails
@ 2009-11-18 15:05 Aneesh Kumar K.V
  2009-11-18 23:38 ` Carl Worth
  0 siblings, 1 reply; 3+ messages in thread
From: Aneesh Kumar K.V @ 2009-11-18 15:05 UTC (permalink / raw)
  To: notmuch

Hi,

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 ?

-aneesh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to list archived mails
  2009-11-18 15:05 How to list archived mails Aneesh Kumar K.V
@ 2009-11-18 23:38 ` Carl Worth
  2009-11-19  0:50   ` Carl Worth
  0 siblings, 1 reply; 3+ messages in thread
From: Carl Worth @ 2009-11-18 23:38 UTC (permalink / raw)
  To: Aneesh Kumar K.V, notmuch

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 <some-term> then you can simply do:

	notmuch search <some-term> and not tag:inbox

I hope that helps.

Happy hacking,

-Carl

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to list archived mails
  2009-11-18 23:38 ` Carl Worth
@ 2009-11-19  0:50   ` Carl Worth
  0 siblings, 0 replies; 3+ messages in thread
From: Carl Worth @ 2009-11-19  0:50 UTC (permalink / raw)
  To: Aneesh Kumar K.V, notmuch

On Thu, 19 Nov 2009 00:38:01 +0100, Carl Worth <cworth@cworth.org> wrote:
> 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 now you can ignore everything else I said after this.

Adrian Perez just discovered that we just weren't enabling an option in
Xapian to allow this syntax to work. His commit is pushed, so now if you
update your source *can* you use the above syntax and it should work
just fine.

Happy hacking,

-Carl

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-11-19  0:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-18 15:05 How to list archived mails Aneesh Kumar K.V
2009-11-18 23:38 ` Carl Worth
2009-11-19  0:50   ` Carl Worth

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).