Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / da / d3f35f8cc6e9a839821b7ed0917f0d432eeaf8
1 Return-Path: <jm@liotier.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id A362F431FB6\r
6         for <notmuch@notmuchmail.org>; Tue, 10 Mar 2015 05:22:14 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 2.438\r
10 X-Spam-Level: **\r
11 X-Spam-Status: No, score=2.438 tagged_above=-999 required=5\r
12         tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id bHSZ0IZR-xzJ for <notmuch@notmuchmail.org>;\r
16         Tue, 10 Mar 2015 05:22:11 -0700 (PDT)\r
17 Received: from kivu.grabeuh.com (kivu.grabeuh.com [212.85.152.17])\r
18         (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id D21E4431FAF\r
21         for <notmuch@notmuchmail.org>; Tue, 10 Mar 2015 05:22:10 -0700 (PDT)\r
22 Received: from localhost (localhost [127.0.0.1])\r
23         by kivu.grabeuh.com (Postfix) with ESMTP id 43619B3594F;\r
24         Tue, 10 Mar 2015 13:22:06 +0100 (CET)\r
25 X-Virus-Scanned: by a bunch of giggling Japanese schoolgirls at\r
26         kivu.grabeuh.com\r
27 Received: from kivu.grabeuh.com ([127.0.0.1])\r
28         by localhost (kivu.grabeuh.com [127.0.0.1]) (amavisd-new, port 10024)\r
29         with LMTP id PtNMdG-S2zdC; Tue, 10 Mar 2015 13:21:39 +0100 (CET)\r
30 Received: from [127.0.0.1] (nawak.grabeuh.com [212.85.154.15])\r
31         (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))\r
32         (No client certificate requested) (Authenticated sender: jim)\r
33         by kivu.grabeuh.com (Postfix) with ESMTPSA id 69A56B3594B;\r
34         Tue, 10 Mar 2015 13:21:39 +0100 (CET)\r
35 Message-ID: <54FEE1D2.9000108@liotier.org>\r
36 Date: Tue, 10 Mar 2015 13:21:38 +0100\r
37 From: Jean-Marc Liotier <jm@liotier.org>\r
38 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;\r
39         rv:31.0) Gecko/20100101 Thunderbird/31.3.0\r
40 MIME-Version: 1.0\r
41 To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
42 Subject: Re: Alternative to no longer supported folder:foo* wildcard matching\r
43  ?\r
44 References: <54FDFAAB.9080504@liotier.org>\r
45         <877fupzuzc.fsf@maritornes.cs.unb.ca>\r
46         <54FE37F4.7090605@liotier.org>\r
47         <87a8zlxr86.fsf@maritornes.cs.unb.ca>\r
48 In-Reply-To: <87a8zlxr86.fsf@maritornes.cs.unb.ca>\r
49 Content-Type: text/plain; charset=utf-8; format=flowed\r
50 Content-Transfer-Encoding: 7bit\r
51 X-BeenThere: notmuch@notmuchmail.org\r
52 X-Mailman-Version: 2.1.13\r
53 Precedence: list\r
54 List-Id: "Use and development of the notmuch mail system."\r
55         <notmuch.notmuchmail.org>\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
59 List-Post: <mailto:notmuch@notmuchmail.org>\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
63 X-List-Received-Date: Tue, 10 Mar 2015 12:22:14 -0000\r
64 \r
65 On 10/03/2015 08:10, David Bremner wrote:\r
66 > [..] In fact the NM_myTopLevelFolder doesn't seem useful to me,\r
67 > since you don't gain any new queries that way.\r
68 >\r
69 > So if you have .foo.*  and .bar.*, I would\r
70 >\r
71 > mkdir foo\r
72 > ln -rs .foo.* -t foo\r
73 \r
74 I had forgotten I could make a maildir without initial . just as well - \r
75 thus removing the need for my silly prefix: with dot is a normal \r
76 maildir, without is a top-level Notmuch symlink container.\r
77 \r
78 > in notmuch jargon, the number of _messages_ does not increase but \r
79 > rather the number of _files_.\r
80 \r
81 That makes sense since, from what I read in notmuch-insert.c,  the \r
82 messages are identified by message-id and therefore counted only once \r
83 however many times they are encountered during notmuch new.\r
84 \r
85 > so --remove-dups becomes\r
86 > mandatory in any search query\r
87 > Based on the name, I'd suspect "remove-dups" corresponds roughly to the\r
88 > default behaviour of notmuch in reporting results.\r
89 \r
90 Yes, though --duplicate=N is only supported with --output=files and \r
91 --output=messages, and it is not even appear the default there since { \r
92 NOTMUCH_OPT_INT, &ctx->dupe, "duplicate", 'D', 0  } in notmuch-search.c\r
93 \r
94 Otherwise it does behaves as implicitly removing duplicates, which was \r
95 somewhat confusing me until I understood notmuch's conceptual \r
96 distinction between files and messages.\r
97 \r
98 >          notmuch count not 'path:list/**'\r
99 > and\r
100 >          notmuch count not 'path:list/**' and from:bremner\r
101 >\r
102 > work as expected.\r
103 \r
104 Indeed they do - both with notmuch and notmuch-mutt... I just had to \r
105 struggle a bit until I realized that my notmuch-mutt --output-dir is \r
106 inside the maildir indexed by notmuch... So the number of result and \r
107 duplicates varied according to what state the symlink results maildir \r
108 was in when I last indexed the whole thing...\r
109 \r
110 Yes, I do need the --output-dir to be inside the maildir because the \r
111 IMAP server lets me have my search results in any MUA I happen to be \r
112 using (Thunderbird, K-9 or Outlook for example). And by the way, maybe \r
113 notmuch-mutt should be named notmuch-maildir or notmuch-symlinks : the \r
114 mutt part is just about setting the macros in ~/.muttrc - everything \r
115 else is generic to anything that can read a maildir.\r
116 \r
117 So my indexing command is now :\r
118 \r
119 notmuch tag +nmsearchresult 'path:.=Search/**' && notmuch new\r
120 \r
121 With ~/.notmuch-config now containing:\r
122 \r
123 [search]\r
124 exclude_tags=deleted;spam;nmsearchresult\r
125 \r
126 And it works.\r
127 \r
128 I would have prefered explicit folder inclusion/exclusion at query time \r
129 and path inclusion/exclusion at indexing time... But I guess I'll get \r
130 used to notmuch's logic of tagging everything and then using the tags.\r
131 \r
132 Thank you for your kind guidance !\r