Re: Hi all
[notmuch-archives.git] / 0f / 5e8fea853b2a235dbb2731ae6073bc6c039a0d
1 Return-Path: <cworth@cworth.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 67FFA431FBC\r
6         for <notmuch@notmuchmail.org>; Tue,  9 Feb 2010 16:34:30 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.997\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.997 tagged_above=-999 required=5\r
12         tests=[ALL_TRUSTED=-1.8, AWL=-0.012, BAYES_40=-0.185] autolearn=ham\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 rT3q6Ht3fgMP; Tue,  9 Feb 2010 16:34:29 -0800 (PST)\r
16 Received: from yoom.home.cworth.org (localhost [127.0.0.1])\r
17         by olra.theworths.org (Postfix) with ESMTP id CA3C9431FAE;\r
18         Tue,  9 Feb 2010 16:34:28 -0800 (PST)\r
19 Received: by yoom.home.cworth.org (Postfix, from userid 1000)\r
20         id 4E1C925416F; Tue,  9 Feb 2010 16:34:27 -0800 (PST)\r
21 From: Carl Worth <cworth@cworth.org>\r
22 To: Brett Viren <brett.viren@gmail.com>, notmuch@notmuchmail.org\r
23 In-Reply-To: <46263c601002090738k6a8f0e92v807b535918cbc7a5@mail.gmail.com>\r
24 References: <46263c601002090738k6a8f0e92v807b535918cbc7a5@mail.gmail.com>\r
25 Date: Tue, 09 Feb 2010 16:34:26 -0800\r
26 Message-ID: <87hbpqlyi5.fsf@yoom.home.cworth.org>\r
27 MIME-Version: 1.0\r
28 Content-Type: multipart/signed; boundary="=-=-=";\r
29         micalg=pgp-sha1; protocol="application/pgp-signature"\r
30 Subject: Re: [notmuch] Problems with Maildir and files moving from new/ to\r
31  cur/\r
32 X-BeenThere: notmuch@notmuchmail.org\r
33 X-Mailman-Version: 2.1.13\r
34 Precedence: list\r
35 List-Id: "Use and development of the notmuch mail system."\r
36         <notmuch.notmuchmail.org>\r
37 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
38         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
39 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
40 List-Post: <mailto:notmuch@notmuchmail.org>\r
41 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
42 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
44 X-List-Received-Date: Wed, 10 Feb 2010 00:34:30 -0000\r
45 \r
46 --=-=-=\r
47 \r
48 On Tue, 9 Feb 2010 10:38:04 -0500, Brett Viren <brett.viren@gmail.com> wrote:\r
49 > The problem I have is that this race condition means that sometimes\r
50 > notmuch will index a message as being under the Maildir/.<topic>/new/\r
51 > subdirectory, I then read it and it is moved to Maildir/.<topic>/cur/\r
52 > (I think that is what is happening).  Then when I do a search, notmuch\r
53 > returns a file that is no longer around.\r
54 \r
55 The problem here is due to some drifting assumptions.\r
56 \r
57 When I made the "notmuch new" command, I was assuming a mailstore that\r
58 wouldn't change except for new messages being added, (such that it\r
59 likely wouldn't be inconvenient to run "notmuch new" when that mail was\r
60 added).\r
61 \r
62 But now that we have support within notmuch for a mailstore that does\r
63 change, (with messages being deleted and renamed), then "notmuch new" is\r
64 too blunt a tool for what you want here.\r
65 \r
66 One option would be to implement some new interface in notmuch for\r
67 indexing specific file paths. Then you could arrange for that to be\r
68 called when your mail client does the renaming, (either by modifying the\r
69 mail client itself or by hooking into something like inotify).\r
70 \r
71 > This may not be an issue with notmuch, per se, but does anyone have\r
72 > any suggestions to make this work more smoothly?\r
73 \r
74 Otherwise, the only way I see for you to get the behavior you want\r
75 without having to write any new code is to just run "notmuch new;\r
76 notmuch search <foo>" whenever you want to search. That's not ideal, but\r
77 might be a usable workaround for now as it would hopefully add just a\r
78 second or two to your search times.\r
79 \r
80 -Carl\r
81 \r
82 --=-=-=\r
83 Content-Type: application/pgp-signature\r
84 \r
85 -----BEGIN PGP SIGNATURE-----\r
86 Version: GnuPG v1.4.10 (GNU/Linux)\r
87 \r
88 iD8DBQFLcf8T6JDdNq8qSWgRAoB+AJ4lMEcRSo/hsFrX6uVPHrJvIP2rYwCdHpq+\r
89 7udECX9PXOdTgyoCC/9rbj4=\r
90 =ZEaQ\r
91 -----END PGP SIGNATURE-----\r
92 --=-=-=--\r