Do path: searches handle spaces correctly?

Keith Amidon keith at awakenetworks.com
Sat Sep 20 14:44:22 PDT 2014


I'm trying to update an archiving tool that used the old folder: search
terms to use the newer folder: or path: terms.  From playing around with
it, I think that the path: term is what I want to use.  However, I am
getting some behavior I don't understand unless path: searches don't
properly handle spaces or I don't know how to quote them properly.

If I do:

notmuch search --output=files path:'dir/INBOX/**'

I get:

<base>/dir/INBOX/cur/1411244319_3.18990.kea-tablet,U=24,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,S
<base>/dir/INBOX/cur/1411244319_2.18990.kea-tablet,U=23,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,S
<base>/dir/INBOX/INBOX/Sent Items/cur/1411244324_2.18990.kea-tablet,U=3,FMD5=e99e6ef6cc1489bb6d8b47a4c49bb989:2,S
<base>/dir/INBOX/cur/1411244319_1.18990.kea-tablet,U=22,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,RS
<base>/dir/INBOX/cur/1411244319_0.18990.kea-tablet,U=21,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,S
<base>/dir/INBOX/cur/1411244318_3.18990.kea-tablet,U=20,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,S
<base>/dir/INBOX/cur/1411244318_2.18990.kea-tablet,U=19,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,S
<base>/dir/INBOX/cur/1411244318_1.18990.kea-tablet,U=18,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,S
<base>/dir/INBOX/INBOX/Sent Items/cur/1411244324_1.18990.kea-tablet,U=2,FMD5=e99e6ef6cc1489bb6d8b47a4c49bb989:2,S
<base>/dir/INBOX/cur/1411244318_0.18990.kea-tablet,U=17,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,S

Notice that this contains results for "dir/INBOX/INBOX/Sent Items",
which has a space in it.  If I do:

notmuch search --output=files path:'dir/INBOX/INBOX/Sent Items'

I don't get any results, but it seems like the two results above should
be shown, right?  Am I doing something wrong here?  If it looks like I'm
doing it correctly, what can I do to help troubleshoot the issue?

         Thanks, Keith


More information about the notmuch mailing list