* Tags with spaces
@ 2012-12-08 3:44 Jason A. Donenfeld
2012-12-08 6:21 ` Tomi Ollila
2012-12-08 6:24 ` Austin Clements
0 siblings, 2 replies; 6+ messages in thread
From: Jason A. Donenfeld @ 2012-12-08 3:44 UTC (permalink / raw)
To: notmuch
Do we support them? Are we going to?
This doesn't work:
notmuch search -tag:"This has spaces"
Nor does:
notmuch search "-tag:This has spaces"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Tags with spaces
2012-12-08 3:44 Tags with spaces Jason A. Donenfeld
@ 2012-12-08 6:21 ` Tomi Ollila
2012-12-08 6:27 ` Austin Clements
2012-12-08 6:24 ` Austin Clements
1 sibling, 1 reply; 6+ messages in thread
From: Tomi Ollila @ 2012-12-08 6:21 UTC (permalink / raw)
To: Jason A. Donenfeld, notmuch
On Sat, Dec 08 2012, "Jason A. Donenfeld" <Jason@zx2c4.com> wrote:
> Do we support them? Are we going to?
>
> This doesn't work:
> notmuch search -tag:"This has spaces"
>
> Nor does:
> notmuch search "-tag:This has spaces"
This might work:
notmuch search "-tag:'This has spaces'"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Tags with spaces
2012-12-08 3:44 Tags with spaces Jason A. Donenfeld
2012-12-08 6:21 ` Tomi Ollila
@ 2012-12-08 6:24 ` Austin Clements
2012-12-08 15:21 ` David Bremner
1 sibling, 1 reply; 6+ messages in thread
From: Austin Clements @ 2012-12-08 6:24 UTC (permalink / raw)
To: Jason A. Donenfeld; +Cc: notmuch
Quoth Jason A. Donenfeld on Dec 08 at 4:44 am:
> Do we support them? Are we going to?
>
> This doesn't work:
> notmuch search -tag:"This has spaces"
>
> Nor does:
> notmuch search "-tag:This has spaces"
Tags with spaces are supported, but your shell will strip away the
quotes you've used in both examples before notmuch ever sees them.
You'll need both shell quoting and Xapian quoting in this case. Try
notmuch search -- '-tag:"This has spaces"'
This should be easier from a front-end, since it will take care of any
necessary shell quoting.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Tags with spaces
2012-12-08 6:21 ` Tomi Ollila
@ 2012-12-08 6:27 ` Austin Clements
2012-12-08 13:22 ` Jason A. Donenfeld
0 siblings, 1 reply; 6+ messages in thread
From: Austin Clements @ 2012-12-08 6:27 UTC (permalink / raw)
To: Tomi Ollila; +Cc: notmuch
Quoth Tomi Ollila on Dec 08 at 8:21 am:
> On Sat, Dec 08 2012, "Jason A. Donenfeld" <Jason@zx2c4.com> wrote:
>
> > Do we support them? Are we going to?
> >
> > This doesn't work:
> > notmuch search -tag:"This has spaces"
> >
> > Nor does:
> > notmuch search "-tag:This has spaces"
>
> This might work:
>
> notmuch search "-tag:'This has spaces'"
Xapian's query parser doesn't recognize single quotes, unfortunately.
When in doubt,
$ NOTMUCH_DEBUG_QUERY=1 notmuch search '-tag:"This tag has spaces"'
Final query is:
Xapian::Query((Tmail AND 0 * KThis tag has spaces))
$ NOTMUCH_DEBUG_QUERY=1 notmuch search "-tag:'This tag has spaces'"
Final query is:
Xapian::Query((Tmail AND ((Ztag:(pos=1) AND Zhas:(pos=2) AND Zspace:(pos=3)) AND_NOT K'This)))
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Tags with spaces
2012-12-08 6:27 ` Austin Clements
@ 2012-12-08 13:22 ` Jason A. Donenfeld
0 siblings, 0 replies; 6+ messages in thread
From: Jason A. Donenfeld @ 2012-12-08 13:22 UTC (permalink / raw)
To: Austin Clements, Tomi Ollila, notmuch
Very helpful! Thanks folks for the explanations.
Another thing to note is that the dump format doesn't add any quotes
to the tags, so this is something of an issue I suppose.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Tags with spaces
2012-12-08 6:24 ` Austin Clements
@ 2012-12-08 15:21 ` David Bremner
0 siblings, 0 replies; 6+ messages in thread
From: David Bremner @ 2012-12-08 15:21 UTC (permalink / raw)
To: Austin Clements, Jason A. Donenfeld; +Cc: notmuch
Austin Clements <amdragon@MIT.EDU> writes:
> Tags with spaces are supported, but your shell will strip away the
> quotes you've used in both examples before notmuch ever sees them.
> You'll need both shell quoting and Xapian quoting in this case. Try
> notmuch search -- '-tag:"This has spaces"'
> This should be easier from a front-end, since it will take care of any
> necessary shell quoting.
Note that there are also patches in the works that add a hex encoded
format for notmuch-tag on standard input; so far we have tried to do
that for regular command line arguments, but it's a possibility.
d
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-12-08 15:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-08 3:44 Tags with spaces Jason A. Donenfeld
2012-12-08 6:21 ` Tomi Ollila
2012-12-08 6:27 ` Austin Clements
2012-12-08 13:22 ` Jason A. Donenfeld
2012-12-08 6:24 ` Austin Clements
2012-12-08 15:21 ` David Bremner
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).