Inconsistent query results

classic Classic list List threaded Threaded
3 messages Options
Nicolas Bock Nicolas Bock
Reply | Threaded
Open this post in threaded view
|

Inconsistent query results

Hi,

When I run the following query I get no results:

    $ notmuch search --output=files folder:"mail_account/Deleted
Items" and not tag:deleted

When I run that same query in emacs/notmuch I find one file:

    query: folder:"mail_account/Deleted Items" and not tag:deleted
    file: /home/nbock/Mail/mail_account/Deleted
Items/cur/5d5aca30-2ef6-11ea-9e47-28f10e4fd9ec,U=984:2,S

Am I missing something?

Best,

Nick
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Jani Nikula Jani Nikula
Reply | Threaded
Open this post in threaded view
|

Re: Inconsistent query results

On Sun, 05 Jan 2020, Nicolas Bock <[hidden email]> wrote:

> When I run the following query I get no results:
>
>     $ notmuch search --output=files folder:"mail_account/Deleted
> Items" and not tag:deleted
>
> When I run that same query in emacs/notmuch I find one file:
>
>     query: folder:"mail_account/Deleted Items" and not tag:deleted
>     file: /home/nbock/Mail/mail_account/Deleted
> Items/cur/5d5aca30-2ef6-11ea-9e47-28f10e4fd9ec,U=984:2,S
>
> Am I missing something?

Yes, quotes. ;)

Emacs does the quoting for you, but in shell you need to ensure the
double quotes go all the way to Xapian. Try wrapping the folder search
in single quotes: 'folder:"mail_account/Deleted Items"'.

You can use the NOTMUCH_DEBUG_QUERY=1 environment variable to debug
queries. You can see the difference.

BR,
Jani.
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Nicolas Bock Nicolas Bock
Reply | Threaded
Open this post in threaded view
|

Re: Inconsistent query results

On Sun, Jan 5, 2020 at 8:41 AM Jani Nikula <[hidden email]> wrote:

>
> On Sun, 05 Jan 2020, Nicolas Bock <[hidden email]> wrote:
> > When I run the following query I get no results:
> >
> >     $ notmuch search --output=files folder:"mail_account/Deleted
> > Items" and not tag:deleted
> >
> > When I run that same query in emacs/notmuch I find one file:
> >
> >     query: folder:"mail_account/Deleted Items" and not tag:deleted
> >     file: /home/nbock/Mail/mail_account/Deleted
> > Items/cur/5d5aca30-2ef6-11ea-9e47-28f10e4fd9ec,U=984:2,S
> >
> > Am I missing something?
>
> Yes, quotes. ;)

Ah, thanks :)

> Emacs does the quoting for you, but in shell you need to ensure the
> double quotes go all the way to Xapian. Try wrapping the folder search
> in single quotes: 'folder:"mail_account/Deleted Items"'.

That seems to work better, however, now I get

    $ notmuch search --output=files 'folder:"mail_account/Deleted
Items"' and not tag:deleted
    /home/nbock/Mail/mail_account/Deleted
Items/cur/5d5aca30-2ef6-11ea-9e47-28f10e4fd9ec,U=984:2,S
    /home/nbock/Mail/mail_account/Archives/2020/cur/5d5b7b2e-2ef6-11ea-9e47-28f10e4fd9ec,U=620:2,S

How come there are two files with identical names in two separate
folders? What am I missing now? :)

> You can use the NOTMUCH_DEBUG_QUERY=1 environment variable to debug
> queries. You can see the difference.
>
> BR,
> Jani.
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch