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 BA316431FC2 for ; Wed, 29 Oct 2014 12:43:14 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[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 K2Ntb-CEryp8 for ; Wed, 29 Oct 2014 12:43:07 -0700 (PDT) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 0D5E4431FB6 for ; Wed, 29 Oct 2014 12:43:06 -0700 (PDT) Received: by mail-wi0-f172.google.com with SMTP id bs8so2675721wib.17 for ; Wed, 29 Oct 2014 12:43:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-type; bh=NvXqSEXxMUeI2OtZU2oKPaAaOlrezcOplHHUWLP1lJw=; b=QAjHUT9JuFS5/WjAXXl3EJ5rSqBiOLvAgXLqjpPRdkHM6U2CyzU92rIsmJoJTysDY2 SnIhpQOqOafcbXG/H9J++CQtxLZW41Bny96i7QbHMaBq+fUuX9KdAVI/T4QNqL4GpWFZ PT30zfgpGmF4LO3javCkqDws9pu9W/BRVFRV9duwnsZrp8USZC72GqzZ5pOlB/uL3Po+ p8NUaqdyeM9pkfY8NjL/iXdrOFacyFaKb+7U/xtdYdd8Y9LSsNhzLl6TpxQlA6P4MC93 5uUqBLdR4lv/NxZBVSlV2cfC+o0TjOwzMgpdEFBZJRdsmQmVS9ndyd/byQteaRSrEszs 3kTg== X-Gm-Message-State: ALoCoQnE7dBQKpUS1+KbH0HNk5o9XK5AuqI0f5skBGT5azhY1MeNz3i00mAO0WWKieb0j4v+sgEi X-Received: by 10.180.73.19 with SMTP id h19mr37776927wiv.3.1414611785960; Wed, 29 Oct 2014 12:43:05 -0700 (PDT) Received: from localhost (dsl-hkibrasgw2-58c36d-48.dhcp.inet.fi. [88.195.109.48]) by mx.google.com with ESMTPSA id f6sm6578712wix.5.2014.10.29.12.43.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Oct 2014 12:43:05 -0700 (PDT) From: Jani Nikula To: David Edmondson , notmuch@notmuchmail.org Subject: Re: "search --path=directory/" is lame(-ish) In-Reply-To: References: User-Agent: Notmuch/0.18.2+148~g4214adf (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Wed, 29 Oct 2014 21:43:02 +0200 Message-ID: <874mum1x2x.fsf@nikula.org> 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: Wed, 29 Oct 2014 19:43:15 -0000 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. 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. This could be fixed with our own query parser (somewhere at the other end of the rainbow), but for the time being I don't see a reasonable fix. > 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. None of this should be taken as disagreeing with you, though! ;) BR, Jani.