Re: [PATCH] cli: consider files vanishing during notmuch new non-fatal

2016-11-16 Thread David Bremner
Jani Nikula writes: > +/* Exit status code indicating that file(s) in the mail store were > + * removed or renamed after notmuch new scanned the directories but > + * before indexing the file(s). If the file was renamed, the indexing > + * might not be complete, and the user is

Re: [PATCH] cli: consider files vanishing during notmuch new non-fatal

2016-11-12 Thread David Bremner
Brian Sniffen writes: > That's hard, given dovecot pointed at the same maildir: it quickly > moves files from new to cur. That makes notmuch insert pretty useless, > and I rely on notmuch new to approach correctness. I don't think this discussion is related to notmuch insert

Re: [PATCH] cli: consider files vanishing during notmuch new non-fatal

2016-11-12 Thread Brian Sniffen
> On Nov 12, 2016, at 11:10 AM, David Bremner wrote: > > Brian Sniffen writes: > >>> >>> OK, but the patch proposed works both for people who want to be notified >>> of this problem, and those that don't (with appropriate shell wrapping >>> checking the

Re: [PATCH] cli: consider files vanishing during notmuch new non-fatal

2016-11-12 Thread Jani Nikula
On Sat, 12 Nov 2016, Brian Sniffen wrote: >> >> OK, but the patch proposed works both for people who want to be notified >> of this problem, and those that don't (with appropriate shell wrapping >> checking the return code). > > I think it will loop; how do I guarantee

Re: [PATCH] cli: consider files vanishing during notmuch new non-fatal

2016-11-12 Thread David Bremner
David Bremner writes: > Brian Sniffen writes: > >>> >>> OK, but the patch proposed works both for people who want to be notified >>> of this problem, and those that don't (with appropriate shell wrapping >>> checking the return code). >> >> I think it

Re: [PATCH] cli: consider files vanishing during notmuch new non-fatal

2016-11-12 Thread Brian Sniffen
> > OK, but the patch proposed works both for people who want to be notified > of this problem, and those that don't (with appropriate shell wrapping > checking the return code). I think it will loop; how do I guarantee termination and indexing of all present messages if deletions cause

Re: [PATCH] cli: consider files vanishing during notmuch new non-fatal

2016-11-12 Thread David Bremner
Brian Sniffen writes: >> >> OK, but the patch proposed works both for people who want to be notified >> of this problem, and those that don't (with appropriate shell wrapping >> checking the return code). > > I think it will loop; how do I guarantee termination and indexing

Re: [PATCH] cli: consider files vanishing during notmuch new non-fatal

2016-11-12 Thread David Bremner
Paul Wise writes: > On Sat, 2016-11-05 at 14:57 +0200, Jani Nikula wrote: > >> Add a new exit code for when files vanished, so the caller has a >> chance to detect the race and re-run notmuch new to recover. > > I don't think this is the right approach for two reasons: > > The

Re: [PATCH] cli: consider files vanishing during notmuch new non-fatal

2016-11-05 Thread Paul Wise
On Sat, 2016-11-05 at 14:57 +0200, Jani Nikula wrote: > Add a new exit code for when files vanished, so the caller has a > chance to detect the race and re-run notmuch new to recover. I don't think this is the right approach for two reasons: The exit code you have chosen is still a failure so I