Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 23DB7431FB6 for ; Wed, 7 Mar 2012 12:18:14 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled 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 73CtQ2ieBxKe for ; Wed, 7 Mar 2012 12:18:13 -0800 (PST) Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66]) by olra.theworths.org (Postfix) with ESMTP id 1F821431FAE for ; Wed, 7 Mar 2012 12:18:13 -0800 (PST) Received: by guru.guru-group.fi (Postfix, from userid 501) id 4605D68055; Wed, 7 Mar 2012 22:18:11 +0200 (EET) From: Tomi Ollila To: Mark Walters , Austin Clements , notmuch@notmuchmail.org Subject: Re: [PATCH v2 3/8] show: Allow formatters to return errors In-Reply-To: <87ipihbf0w.fsf@qmul.ac.uk> References: <1330752025-2542-1-git-send-email-amdragon@mit.edu> <1331059724-14653-1-git-send-email-amdragon@mit.edu> <1331059724-14653-4-git-send-email-amdragon@mit.edu> <87ipihbf0w.fsf@qmul.ac.uk> User-Agent: Notmuch/0.11.1+288~g4b3af0e (http://notmuchmail.org) Emacs/23.3.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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, 07 Mar 2012 20:18:14 -0000 On Tue, 06 Mar 2012 21:22:55 +0000, Mark Walters wrote: > On Tue, 6 Mar 2012 18:48:39 +0000, Austin Clements wrote: > > Formatter errors are propagated to the exit status of notmuch show. > > > > This isn't used by the JSON or text formatters, but it will be useful > > for the raw format, which is pickier. > > I am not very familiar with this part of the code but the whole series > looks fine to me. Looks good to me too. > > My only minor comment is that I like Tom's suggestion (in > id:"m2399qrtat.fsf@guru.guru-group.fi") of having NOTMUCH_STATUS_FAILURE > (= 1) to make the error handling look cleaner. Alternatively (or > possibly as well) the functions do_show and do_show_messages could pass > the actual error back up to notmuch_show_command and then that function > could convert return 0/1 as appropriate. > > As usual I am quite happy to be overruled! As usual I no longer know why I suggested that in the first place (at least in the context of these patches ;D) > Best wishes > > Mark Tomi