From 2d98495214c5219f772caac34d7053ccf7445d1b Mon Sep 17 00:00:00 2001 From: Keith Amidon Date: Sun, 21 Sep 2014 14:44:22 +1700 Subject: [PATCH] Do path: searches handle spaces correctly? --- 43/4dbbd0373562a372033d337c5d7cdc8dded4ff | 103 ++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 43/4dbbd0373562a372033d337c5d7cdc8dded4ff diff --git a/43/4dbbd0373562a372033d337c5d7cdc8dded4ff b/43/4dbbd0373562a372033d337c5d7cdc8dded4ff new file mode 100644 index 000000000..6562ea36d --- /dev/null +++ b/43/4dbbd0373562a372033d337c5d7cdc8dded4ff @@ -0,0 +1,103 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 6DE09431FAF + for ; Sat, 20 Sep 2014 14:52:35 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.8 +X-Spam-Level: +X-Spam-Status: No, score=-0.8 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id Ex6fZ0Qfir51 for ; + Sat, 20 Sep 2014 14:52:28 -0700 (PDT) +X-Greylist: delayed 481 seconds by postgrey-1.32 at olra; + Sat, 20 Sep 2014 14:52:28 PDT +Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com + [66.111.4.221]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 299D1431FAE + for ; Sat, 20 Sep 2014 14:52:28 -0700 (PDT) +Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) + by gateway2.nyi.internal (Postfix) with ESMTP id 4D5A1DAB + for ; Sat, 20 Sep 2014 17:44:25 -0400 (EDT) +Received: from frontend2 ([10.202.2.161]) + by compute4.internal (MEProxy); Sat, 20 Sep 2014 17:44:25 -0400 +DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=awakenetworks.com; + h=from:to:subject:date:message-id:mime-version:content-type; s= + mesmtp; bh=0Gz/oUyvpAQMhqVufnI2DgXEG/k=; b=sJwgsGxJllt60L2sZDfYZ + xHBwR705nrJFjD15jo2S4lIEu8OXkCzHzw0O/Urc1jvLMPlVOCvGF+eK97gnwkYv + 9zoc5LyJtpMsr94KJnq1/+iG2PZuw9zVsQAALGnpSl/UxMLrdA4D83bPAHu+pYOX + K0lhNrS5L9E+RThHc+bX60= +DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= + messagingengine.com; h=from:to:subject:date:message-id + :mime-version:content-type; s=smtpout; bh=0Gz/oUyvpAQMhqVufnI2Dg + XEG/k=; b=fB0c6kIcV69zsYVaJQrPyONTLMJvs/G0l9MYjbPp51x4wREL4bfoel + V8c+0LrTHEOuP9taEVK9deDmnb6qRkStBpK1+gmkAIPAH71Gq2pg7rWcwShp04UF + j4E3bAOf+B11sL/ofOvwOcRJnEWDpyElictBSofBRAPPWotdISuDA= +X-Sasl-enc: NZiBKaYdtFABYzjdTfBBFyWzleHA9DOdjnozBoggTk9h 1411249464 +Received: from kea-tablet.awakenetworks.com (unknown [108.225.17.54]) + by mail.messagingengine.com (Postfix) with ESMTPA id AB880680278 + for ; Sat, 20 Sep 2014 17:44:24 -0400 (EDT) +From: Keith Amidon +To: notmuch@notmuchmail.org +Subject: Do path: searches handle spaces correctly? +User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +Date: Sat, 20 Sep 2014 14:44:22 -0700 +Message-ID: <878uleklvt.fsf@awakenetworks.com> +MIME-Version: 1.0 +Content-Type: text/plain +X-Mailman-Approved-At: Mon, 22 Sep 2014 01:48:23 -0700 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 20 Sep 2014 21:52:35 -0000 + +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: + +/dir/INBOX/cur/1411244319_3.18990.kea-tablet,U=24,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,S +/dir/INBOX/cur/1411244319_2.18990.kea-tablet,U=23,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,S +/dir/INBOX/INBOX/Sent Items/cur/1411244324_2.18990.kea-tablet,U=3,FMD5=e99e6ef6cc1489bb6d8b47a4c49bb989:2,S +/dir/INBOX/cur/1411244319_1.18990.kea-tablet,U=22,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,RS +/dir/INBOX/cur/1411244319_0.18990.kea-tablet,U=21,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,S +/dir/INBOX/cur/1411244318_3.18990.kea-tablet,U=20,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,S +/dir/INBOX/cur/1411244318_2.18990.kea-tablet,U=19,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,S +/dir/INBOX/cur/1411244318_1.18990.kea-tablet,U=18,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,S +/dir/INBOX/INBOX/Sent Items/cur/1411244324_1.18990.kea-tablet,U=2,FMD5=e99e6ef6cc1489bb6d8b47a4c49bb989:2,S +/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 -- 2.26.2