From: David Bremner Date: Tue, 10 Mar 2015 07:10:33 +0000 (+0100) Subject: Re: Alternative to no longer supported folder:foo* wildcard matching ? X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=350de3563b8b9fd8a5c939904bae95d42c4d795a;p=notmuch-archives.git Re: Alternative to no longer supported folder:foo* wildcard matching ? --- diff --git a/2b/0af1666d9250522d29cb9cab4d2160d20ac5ed b/2b/0af1666d9250522d29cb9cab4d2160d20ac5ed new file mode 100644 index 000000000..34eb8fe21 --- /dev/null +++ b/2b/0af1666d9250522d29cb9cab4d2160d20ac5ed @@ -0,0 +1,116 @@ +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 8C466431FAF + for ; Tue, 10 Mar 2015 00:11:43 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 2.438 +X-Spam-Level: ** +X-Spam-Status: No, score=2.438 tagged_above=-999 required=5 + tests=[DNS_FROM_AHBL_RHSBL=2.438] 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 Rc8g8N-UQnHV for ; + Tue, 10 Mar 2015 00:11:40 -0700 (PDT) +Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net + [87.98.215.224]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 0C2F4431FAE + for ; Tue, 10 Mar 2015 00:11:40 -0700 (PDT) +Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim + 4.80) (envelope-from ) + id 1YVEJT-0000nJ-86; Tue, 10 Mar 2015 07:10:47 +0000 +Received: (nullmailer pid 7677 invoked by uid 1000); Tue, 10 Mar 2015 + 07:10:33 -0000 +From: David Bremner +To: Jean-Marc Liotier , notmuch@notmuchmail.org +Subject: Re: Alternative to no longer supported folder:foo* wildcard matching + ? +In-Reply-To: <54FE37F4.7090605@liotier.org> +References: <54FDFAAB.9080504@liotier.org> + <877fupzuzc.fsf@maritornes.cs.unb.ca> <54FE37F4.7090605@liotier.org> +User-Agent: Notmuch/0.19+67~gdbe9924 (http://notmuchmail.org) Emacs/24.4.1 + (x86_64-pc-linux-gnu) +Date: Tue, 10 Mar 2015 08:10:33 +0100 +Message-ID: <87a8zlxr86.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +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: Tue, 10 Mar 2015 07:11:43 -0000 + +Jean-Marc Liotier writes: + +> +> % cd ~/Maildir +> % mkdir .NM_myTopLevelFolder +> % ln -rs .myTopLevelFolder* -t .NM_myTopLevelFolder + +This is doing one level of links. If you want more hierarchy +you'll have to create subdirectories with links to only some of your +folders. In fact the NM_myTopLevelFolder doesn't seem useful to me, +since you don't gain any new queries that way. + +So if you have .foo.* and .bar.*, I would + +mkdir foo +ln -rs .foo.* -t foo +mkdir bar +ln -rs .bar.* -t bar + +> On the downside: +> - It doubles the number of messages to index (though then even=20 +> multiplied by two, my 300k messages are Not Much Mail=E2=84=A2 - but stil= +l...) + +Conceivably this has to do with duplicating the top level folder, not +sure; I don't see an increase. In particular I don't see in increase in +the output of "notmuch count", so in notmuch jargon, the number of +_messages_ does not increase but rather the number of _files_. There +will obviously be some growth in the database size, but there was +nothing too shocking in my experiments (I didn't measure carefully, but +my database is still at around 30% of the raw mail size) + +> - myTopLevelFolder gets a NM_myTopLevelFolder twin and restricting the=20 +> search scope to it requires using its twin's name + +yes, I suppose that's true. But for "nice" symlink names this doesn't +seem so terrible. But *shrug* it's a matter of taste. + +> - The additional messages are duplicates, so --remove-dups becomes=20 +> mandatory in any search query + +Based on the name, I'd suspect "remove-dups" corresponds roughly to the +default behaviour of notmuch in reporting results. + +> - This method is good for restricting the search scope to a directory, +> but not for excluding a directory from the search scope... Which alas +> is what I desire most... + +Either I don't understand what you want, or this might again be +something to do with notmuch-mutt. For me, queries like + + notmuch count not 'path:list/**'=20 + +and + notmuch count not 'path:list/**' and from:bremner + +work as expected. + +Hope this helps, + +d