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

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

Date: Sat, 12 Nov 2016 11:39:34 -0400

To: Paul Wise, Jani Nikula, notmuch@notmuchmail.org

Cc:

From: David Bremner


Paul Wise <pabs@debian.org> 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 exit code you have chosen is still a failure so I will still get
> notified for a minor issue. I use chronic to detect fail scenarios.
>
> This is a pretty normal scenario when you have a mail program open and
> are auto-running `notmuch new` on a scheduled basis or when new mail
> arrives. notmuch should just ignore the error and continue as normal.
>

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).  That seems better than hiding it for
everyone. And certainly an improvement on the status quo. A possible
future enhancement would be a flag like notmuch insert has to control
the treatment of these errors.

d

Thread: