From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 33D03431FC7 for ; Thu, 30 Oct 2014 01:21:50 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.699 X-Spam-Level: X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7, UNPARSEABLE_RELAY=0.001] 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 xkej73nAsuNZ for ; Thu, 30 Oct 2014 01:21:43 -0700 (PDT) Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 28511431FB6 for ; Thu, 30 Oct 2014 01:21:43 -0700 (PDT) Received: by mail-wg0-f54.google.com with SMTP id m15so3621547wgh.13 for ; Thu, 30 Oct 2014 01:21:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:subject:in-reply-to:references:user-agent :from:date:message-id:mime-version:content-type; bh=hlRJ0RshLYb9Fu5CZsxTeWejmnAceIQqMr4/KNhGiUE=; b=SGzeh3leTlgGYaOVk1WV/OR0Id0Iu/O+2Jzxc6bwWBdgOmZWnUUrLngcWBK/gVyDpm z09J9Wz2VOhUAxWKX9/dqERNpkSsfYWM6W7aPrXAokmp7e9b4rSPJuS240sAVaTrVLMA sm4VTI9+cnWpdOHC8ICmM5WvJS3zEYUaEWuLPKbuvSJ7SnR4oI98LFQv5r4FAKx0OAF5 2X1JkgIn9TWtOm0k4MBCS5WknHaM6QAwxMXz8zRE4fPUqsE9LIorTYTUTavvBjpOpjOM if1kllpRjMwz4/7EJvcl6PhyL4SWgteqdjmBN9bYRZTH0ZzNPOsNGQwckYs5OnTUvqx+ fDWQ== X-Gm-Message-State: ALoCoQm8Xt9dWo0pIz4D7ohDXBpadO1nsGXroiCTtlrXdaRyNQjnefbukogdL8G4e/NvhciSLghL X-Received: by 10.194.173.10 with SMTP id bg10mr18559161wjc.16.1414657301763; Thu, 30 Oct 2014 01:21:41 -0700 (PDT) Received: from disaster-area.hh.sledj.net ([2a01:348:1a2:1:ea39:35ff:fe2c:a227]) by mx.google.com with ESMTPSA id fa16sm21360325wid.5.2014.10.30.01.21.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Oct 2014 01:21:41 -0700 (PDT) Received: from localhost (30000@localhost [local]); by localhost (OpenSMTPD) with ESMTPA id 538fe3a3; Thu, 30 Oct 2014 08:21:39 +0000 (UTC) To: Jani Nikula , notmuch@notmuchmail.org Subject: Re: "search --path=directory/" is lame(-ish) In-Reply-To: <874mum1x2x.fsf@nikula.org> References: <874mum1x2x.fsf@nikula.org> User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-apple-darwin14.0.0) From: David Edmondson Date: Thu, 30 Oct 2014 08:21:39 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain 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: Thu, 30 Oct 2014 08:21:50 -0000 On Wed, Oct 29 2014, Jani Nikula wrote: > On Wed, 29 Oct 2014, David Edmondson wrote: >> Adding a terminal slash to a directory name when using --path causes the >> search to fail. Removing the terminal slash produces results. > > I think you mean path:, not --path. Yes, sorry. > Anyway, the reason for this behaviour is that the path components are > indexed as boolean terms, not unlike tags, just with a different > namespace. It's all parsed in Xapian, not in Notmuch. Adding the / > variants would mean indexing twice the amount of terms. Could we always prune a trailing slash from the path: component of a query before using it? >> Given that many shells will add the terminal slash during completion, >> this is lame(-ish). > > Given that path: expects a relative path from the maildir root, not just > any path, and the notmuch bash completion script (if you happen to use > bash) does exactly this, without adding the slash, I'm not too worried. I'm almost always doing this in Emacs shell-mode, manipulating the pathnames on the fly. This means that I can adapt, of course.