Re: "search --path=directory/" is lame(-ish)
authorJani Nikula <jani@nikula.org>
Wed, 29 Oct 2014 19:43:02 +0000 (21:43 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:05:51 +0000 (10:05 -0800)
ec/07842b882ac90f9b397e87fc385a5280217926 [new file with mode: 0644]

diff --git a/ec/07842b882ac90f9b397e87fc385a5280217926 b/ec/07842b882ac90f9b397e87fc385a5280217926
new file mode 100644 (file)
index 0000000..d4ba834
--- /dev/null
@@ -0,0 +1,95 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id BA316431FC2\r
+       for <notmuch@notmuchmail.org>; Wed, 29 Oct 2014 12:43:14 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id K2Ntb-CEryp8 for <notmuch@notmuchmail.org>;\r
+       Wed, 29 Oct 2014 12:43:07 -0700 (PDT)\r
+Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com\r
+       [209.85.212.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 0D5E4431FB6\r
+       for <notmuch@notmuchmail.org>; Wed, 29 Oct 2014 12:43:06 -0700 (PDT)\r
+Received: by mail-wi0-f172.google.com with SMTP id bs8so2675721wib.17\r
+       for <notmuch@notmuchmail.org>; Wed, 29 Oct 2014 12:43:06 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=1e100.net; s=20130820;\r
+       h=x-gm-message-state:from:to:subject:in-reply-to:references\r
+       :user-agent:date:message-id:mime-version:content-type;\r
+       bh=NvXqSEXxMUeI2OtZU2oKPaAaOlrezcOplHHUWLP1lJw=;\r
+       b=QAjHUT9JuFS5/WjAXXl3EJ5rSqBiOLvAgXLqjpPRdkHM6U2CyzU92rIsmJoJTysDY2\r
+       SnIhpQOqOafcbXG/H9J++CQtxLZW41Bny96i7QbHMaBq+fUuX9KdAVI/T4QNqL4GpWFZ\r
+       PT30zfgpGmF4LO3javCkqDws9pu9W/BRVFRV9duwnsZrp8USZC72GqzZ5pOlB/uL3Po+\r
+       p8NUaqdyeM9pkfY8NjL/iXdrOFacyFaKb+7U/xtdYdd8Y9LSsNhzLl6TpxQlA6P4MC93\r
+       5uUqBLdR4lv/NxZBVSlV2cfC+o0TjOwzMgpdEFBZJRdsmQmVS9ndyd/byQteaRSrEszs\r
+       3kTg==\r
+X-Gm-Message-State:\r
+ ALoCoQnE7dBQKpUS1+KbH0HNk5o9XK5AuqI0f5skBGT5azhY1MeNz3i00mAO0WWKieb0j4v+sgEi\r
+X-Received: by 10.180.73.19 with SMTP id h19mr37776927wiv.3.1414611785960;\r
+       Wed, 29 Oct 2014 12:43:05 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw2-58c36d-48.dhcp.inet.fi.\r
+       [88.195.109.48])\r
+       by mx.google.com with ESMTPSA id f6sm6578712wix.5.2014.10.29.12.43.04\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+       Wed, 29 Oct 2014 12:43:05 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: David Edmondson <dme@dme.org>, notmuch@notmuchmail.org\r
+Subject: Re: "search --path=directory/" is lame(-ish)\r
+In-Reply-To: <cunoasuolcv.fsf@gargravarr.hh.sledj.net>\r
+References: <cunoasuolcv.fsf@gargravarr.hh.sledj.net>\r
+User-Agent: Notmuch/0.18.2+148~g4214adf (http://notmuchmail.org) Emacs/24.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Wed, 29 Oct 2014 21:43:02 +0200\r
+Message-ID: <874mum1x2x.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 29 Oct 2014 19:43:15 -0000\r
+\r
+On Wed, 29 Oct 2014, David Edmondson <dme@dme.org> wrote:\r
+> Adding a terminal slash to a directory name when using --path causes the\r
+> search to fail. Removing the terminal slash produces results.\r
+\r
+I think you mean path:, not --path. Anyway, the reason for this\r
+behaviour is that the path components are indexed as boolean terms, not\r
+unlike tags, just with a different namespace. It's all parsed in Xapian,\r
+not in Notmuch. Adding the / variants would mean indexing twice the\r
+amount of terms.\r
+\r
+This could be fixed with our own query parser (somewhere at the other\r
+end of the rainbow), but for the time being I don't see a reasonable\r
+fix.\r
+\r
+> Given that many shells will add the terminal slash during completion,\r
+> this is lame(-ish).\r
+\r
+Given that path: expects a relative path from the maildir root, not just\r
+any path, and the notmuch bash completion script (if you happen to use\r
+bash) does exactly this, without adding the slash, I'm not too worried.\r
+\r
+None of this should be taken as disagreeing with you, though! ;)\r
+\r
+\r
+BR,\r
+Jani.\r