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 67FFA431FBC for ; Tue, 9 Feb 2010 16:34:30 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.997 X-Spam-Level: X-Spam-Status: No, score=-1.997 tagged_above=-999 required=5 tests=[ALL_TRUSTED=-1.8, AWL=-0.012, BAYES_40=-0.185] autolearn=ham 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 rT3q6Ht3fgMP; Tue, 9 Feb 2010 16:34:29 -0800 (PST) Received: from yoom.home.cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id CA3C9431FAE; Tue, 9 Feb 2010 16:34:28 -0800 (PST) Received: by yoom.home.cworth.org (Postfix, from userid 1000) id 4E1C925416F; Tue, 9 Feb 2010 16:34:27 -0800 (PST) From: Carl Worth To: Brett Viren , notmuch@notmuchmail.org In-Reply-To: <46263c601002090738k6a8f0e92v807b535918cbc7a5@mail.gmail.com> References: <46263c601002090738k6a8f0e92v807b535918cbc7a5@mail.gmail.com> Date: Tue, 09 Feb 2010 16:34:26 -0800 Message-ID: <87hbpqlyi5.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: Problems with Maildir and files moving from new/ to cur/ 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, 10 Feb 2010 00:34:30 -0000 --=-=-= On Tue, 9 Feb 2010 10:38:04 -0500, Brett Viren wrote: > The problem I have is that this race condition means that sometimes > notmuch will index a message as being under the Maildir/./new/ > subdirectory, I then read it and it is moved to Maildir/./cur/ > (I think that is what is happening). Then when I do a search, notmuch > returns a file that is no longer around. The problem here is due to some drifting assumptions. When I made the "notmuch new" command, I was assuming a mailstore that wouldn't change except for new messages being added, (such that it likely wouldn't be inconvenient to run "notmuch new" when that mail was added). But now that we have support within notmuch for a mailstore that does change, (with messages being deleted and renamed), then "notmuch new" is too blunt a tool for what you want here. One option would be to implement some new interface in notmuch for indexing specific file paths. Then you could arrange for that to be called when your mail client does the renaming, (either by modifying the mail client itself or by hooking into something like inotify). > This may not be an issue with notmuch, per se, but does anyone have > any suggestions to make this work more smoothly? Otherwise, the only way I see for you to get the behavior you want without having to write any new code is to just run "notmuch new; notmuch search " whenever you want to search. That's not ideal, but might be a usable workaround for now as it would hopefully add just a second or two to your search times. -Carl --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLcf8T6JDdNq8qSWgRAoB+AJ4lMEcRSo/hsFrX6uVPHrJvIP2rYwCdHpq+ 7udECX9PXOdTgyoCC/9rbj4= =ZEaQ -----END PGP SIGNATURE----- --=-=-=--