Re: "search --path=directory/" is lame(-ish)
authorDavid Edmondson <dme@dme.org>
Thu, 30 Oct 2014 08:21:39 +0000 (08:21 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:05:53 +0000 (10:05 -0800)
33/eb4b606394facb614e847a0c2c036be5e48813 [new file with mode: 0644]

diff --git a/33/eb4b606394facb614e847a0c2c036be5e48813 b/33/eb4b606394facb614e847a0c2c036be5e48813
new file mode 100644 (file)
index 0000000..4a38497
--- /dev/null
@@ -0,0 +1,100 @@
+Return-Path: <dme@dme.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 33D03431FC7\r
+       for <notmuch@notmuchmail.org>; Thu, 30 Oct 2014 01:21:50 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.699\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7, UNPARSEABLE_RELAY=0.001]\r
+       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 xkej73nAsuNZ for <notmuch@notmuchmail.org>;\r
+       Thu, 30 Oct 2014 01:21:43 -0700 (PDT)\r
+Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com\r
+ [74.125.82.54])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ 28511431FB6   for <notmuch@notmuchmail.org>; Thu, 30 Oct 2014 01:21:43 -0700\r
+ (PDT)\r
+Received: by mail-wg0-f54.google.com with SMTP id m15so3621547wgh.13\r
+       for <notmuch@notmuchmail.org>; Thu, 30 Oct 2014 01:21:41 -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:to:subject:in-reply-to:references:user-agent\r
+       :from:date:message-id:mime-version:content-type;\r
+       bh=hlRJ0RshLYb9Fu5CZsxTeWejmnAceIQqMr4/KNhGiUE=;\r
+       b=SGzeh3leTlgGYaOVk1WV/OR0Id0Iu/O+2Jzxc6bwWBdgOmZWnUUrLngcWBK/gVyDpm\r
+       z09J9Wz2VOhUAxWKX9/dqERNpkSsfYWM6W7aPrXAokmp7e9b4rSPJuS240sAVaTrVLMA\r
+       sm4VTI9+cnWpdOHC8ICmM5WvJS3zEYUaEWuLPKbuvSJ7SnR4oI98LFQv5r4FAKx0OAF5\r
+       2X1JkgIn9TWtOm0k4MBCS5WknHaM6QAwxMXz8zRE4fPUqsE9LIorTYTUTavvBjpOpjOM\r
+       if1kllpRjMwz4/7EJvcl6PhyL4SWgteqdjmBN9bYRZTH0ZzNPOsNGQwckYs5OnTUvqx+\r
+       fDWQ==\r
+X-Gm-Message-State:\r
+ ALoCoQm8Xt9dWo0pIz4D7ohDXBpadO1nsGXroiCTtlrXdaRyNQjnefbukogdL8G4e/NvhciSLghL\r
+X-Received: by 10.194.173.10 with SMTP id bg10mr18559161wjc.16.1414657301763; \r
+       Thu, 30 Oct 2014 01:21:41 -0700 (PDT)\r
+Received: from disaster-area.hh.sledj.net\r
+       ([2a01:348:1a2:1:ea39:35ff:fe2c:a227])\r
+       by mx.google.com with ESMTPSA id\r
+       fa16sm21360325wid.5.2014.10.30.01.21.40 for <multiple recipients>\r
+       (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+       Thu, 30 Oct 2014 01:21:41 -0700 (PDT)\r
+Received: from localhost (30000@localhost [local]);\r
+       by localhost (OpenSMTPD) with ESMTPA id 538fe3a3;\r
+       Thu, 30 Oct 2014 08:21:39 +0000 (UTC)\r
+To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
+Subject: Re: "search --path=directory/" is lame(-ish)\r
+In-Reply-To: <874mum1x2x.fsf@nikula.org>\r
+References: <cunoasuolcv.fsf@gargravarr.hh.sledj.net>\r
+       <874mum1x2x.fsf@nikula.org>\r
+User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.3.1\r
+       (x86_64-apple-darwin14.0.0)\r
+From: David Edmondson <dme@dme.org>\r
+Date: Thu, 30 Oct 2014 08:21:39 +0000\r
+Message-ID: <m261f26k8c.fsf@dme.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: Thu, 30 Oct 2014 08:21:50 -0000\r
+\r
+On Wed, Oct 29 2014, Jani Nikula wrote:\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.\r
+\r
+Yes, sorry.\r
+\r
+> Anyway, the reason for this behaviour is that the path components are\r
+> indexed as boolean terms, not unlike tags, just with a different\r
+> namespace. It's all parsed in Xapian, not in Notmuch. Adding the /\r
+> variants would mean indexing twice the amount of terms.\r
+\r
+Could we always prune a trailing slash from the path: component of a\r
+query before using it?\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
+I'm almost always doing this in Emacs shell-mode, manipulating the\r
+pathnames on the fly. This means that I can adapt, of course.\r