--- /dev/null
+Return-Path: <jm@liotier.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 A362F431FB6\r
+ for <notmuch@notmuchmail.org>; Tue, 10 Mar 2015 05:22:14 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 2.438\r
+X-Spam-Level: **\r
+X-Spam-Status: No, score=2.438 tagged_above=-999 required=5\r
+ tests=[DNS_FROM_AHBL_RHSBL=2.438] 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 bHSZ0IZR-xzJ for <notmuch@notmuchmail.org>;\r
+ Tue, 10 Mar 2015 05:22:11 -0700 (PDT)\r
+Received: from kivu.grabeuh.com (kivu.grabeuh.com [212.85.152.17])\r
+ (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id D21E4431FAF\r
+ for <notmuch@notmuchmail.org>; Tue, 10 Mar 2015 05:22:10 -0700 (PDT)\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by kivu.grabeuh.com (Postfix) with ESMTP id 43619B3594F;\r
+ Tue, 10 Mar 2015 13:22:06 +0100 (CET)\r
+X-Virus-Scanned: by a bunch of giggling Japanese schoolgirls at\r
+ kivu.grabeuh.com\r
+Received: from kivu.grabeuh.com ([127.0.0.1])\r
+ by localhost (kivu.grabeuh.com [127.0.0.1]) (amavisd-new, port 10024)\r
+ with LMTP id PtNMdG-S2zdC; Tue, 10 Mar 2015 13:21:39 +0100 (CET)\r
+Received: from [127.0.0.1] (nawak.grabeuh.com [212.85.154.15])\r
+ (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))\r
+ (No client certificate requested) (Authenticated sender: jim)\r
+ by kivu.grabeuh.com (Postfix) with ESMTPSA id 69A56B3594B;\r
+ Tue, 10 Mar 2015 13:21:39 +0100 (CET)\r
+Message-ID: <54FEE1D2.9000108@liotier.org>\r
+Date: Tue, 10 Mar 2015 13:21:38 +0100\r
+From: Jean-Marc Liotier <jm@liotier.org>\r
+User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;\r
+ rv:31.0) Gecko/20100101 Thunderbird/31.3.0\r
+MIME-Version: 1.0\r
+To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
+Subject: Re: Alternative to no longer supported folder:foo* wildcard matching\r
+ ?\r
+References: <54FDFAAB.9080504@liotier.org>\r
+ <877fupzuzc.fsf@maritornes.cs.unb.ca>\r
+ <54FE37F4.7090605@liotier.org>\r
+ <87a8zlxr86.fsf@maritornes.cs.unb.ca>\r
+In-Reply-To: <87a8zlxr86.fsf@maritornes.cs.unb.ca>\r
+Content-Type: text/plain; charset=utf-8; format=flowed\r
+Content-Transfer-Encoding: 7bit\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: Tue, 10 Mar 2015 12:22:14 -0000\r
+\r
+On 10/03/2015 08:10, David Bremner wrote:\r
+> [..] In fact the NM_myTopLevelFolder doesn't seem useful to me,\r
+> since you don't gain any new queries that way.\r
+>\r
+> So if you have .foo.* and .bar.*, I would\r
+>\r
+> mkdir foo\r
+> ln -rs .foo.* -t foo\r
+\r
+I had forgotten I could make a maildir without initial . just as well - \r
+thus removing the need for my silly prefix: with dot is a normal \r
+maildir, without is a top-level Notmuch symlink container.\r
+\r
+> in notmuch jargon, the number of _messages_ does not increase but \r
+> rather the number of _files_.\r
+\r
+That makes sense since, from what I read in notmuch-insert.c, the \r
+messages are identified by message-id and therefore counted only once \r
+however many times they are encountered during notmuch new.\r
+\r
+> so --remove-dups becomes\r
+> mandatory in any search query\r
+> Based on the name, I'd suspect "remove-dups" corresponds roughly to the\r
+> default behaviour of notmuch in reporting results.\r
+\r
+Yes, though --duplicate=N is only supported with --output=files and \r
+--output=messages, and it is not even appear the default there since { \r
+NOTMUCH_OPT_INT, &ctx->dupe, "duplicate", 'D', 0 } in notmuch-search.c\r
+\r
+Otherwise it does behaves as implicitly removing duplicates, which was \r
+somewhat confusing me until I understood notmuch's conceptual \r
+distinction between files and messages.\r
+\r
+> notmuch count not 'path:list/**'\r
+> and\r
+> notmuch count not 'path:list/**' and from:bremner\r
+>\r
+> work as expected.\r
+\r
+Indeed they do - both with notmuch and notmuch-mutt... I just had to \r
+struggle a bit until I realized that my notmuch-mutt --output-dir is \r
+inside the maildir indexed by notmuch... So the number of result and \r
+duplicates varied according to what state the symlink results maildir \r
+was in when I last indexed the whole thing...\r
+\r
+Yes, I do need the --output-dir to be inside the maildir because the \r
+IMAP server lets me have my search results in any MUA I happen to be \r
+using (Thunderbird, K-9 or Outlook for example). And by the way, maybe \r
+notmuch-mutt should be named notmuch-maildir or notmuch-symlinks : the \r
+mutt part is just about setting the macros in ~/.muttrc - everything \r
+else is generic to anything that can read a maildir.\r
+\r
+So my indexing command is now :\r
+\r
+notmuch tag +nmsearchresult 'path:.=Search/**' && notmuch new\r
+\r
+With ~/.notmuch-config now containing:\r
+\r
+[search]\r
+exclude_tags=deleted;spam;nmsearchresult\r
+\r
+And it works.\r
+\r
+I would have prefered explicit folder inclusion/exclusion at query time \r
+and path inclusion/exclusion at indexing time... But I guess I'll get \r
+used to notmuch's logic of tagging everything and then using the tags.\r
+\r
+Thank you for your kind guidance !\r