unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Carl Worth <cworth@cworth.org>
To: Jeffrey Ollie <jeff@ocjtech.us>, Not Much Mail <notmuch@notmuchmail.org>
Subject: Re: [PATCH] notmuch: Add tag archive when archiving the mails
Date: Thu, 19 Nov 2009 00:51:20 +0100	[thread overview]
Message-ID: <87639775on.fsf@yoom.home.cworth.org> (raw)
In-Reply-To: <935ead450911181150i4bda379bhcebc3ef52844a0a@mail.gmail.com>

On Wed, 18 Nov 2009 13:50:58 -0600, Jeffrey Ollie <jeff@ocjtech.us> wrote:
> On Wed, Nov 18, 2009 at 1:07 PM, Keith Packard <keithp@keithp.com> wrote:
> > I think you can just use 'not tag:inbox' as 'archived' really just means
> > 'doesn't have the inbox tag'.
> 
> That resulted in an error for me:
> 
> $ notmuch search not tag:inbox
> A Xapian exception occurred: Syntax: <expression> NOT <expression>
> A Xapian exception occurred: Syntax: <expression> NOT <expression>

Like I said earlier. I think that's a bug we should report to the Xapian
folks.

Meanwhile, it just occurred to me that we can make "notmuch search not
tag:inbox" work without any change to Xapian.

For every document we store in the database we put a special term on it
to indicate its type. (We mostly just have documents of type "mail" but
we also have documents of type "timestamp"---see the comment at the top
of lib/database.cc for details.)

So if we take the string "not tag:inbox" and turn it into "type:mail and
not tag:inbox" then that will work just fine. (That's close to what
we're doing currently, but different. Right now we try to parse the
query "not tag:inbox" on its own and then combine the result with
another query generated from a term representing the "mail" type.)

-Carl

      parent reply	other threads:[~2009-11-18 23:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-18 15:17 [PATCH] notmuch: Add tag archive when archiving the mails Aneesh Kumar K.V
2009-11-18 19:07 ` Keith Packard
2009-11-18 19:50   ` Jeffrey Ollie
2009-11-18 20:17     ` Keith Packard
2009-11-18 23:51     ` Carl Worth [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87639775on.fsf@yoom.home.cworth.org \
    --to=cworth@cworth.org \
    --cc=jeff@ocjtech.us \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).