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 9A7CD431FBF; Wed, 18 Nov 2009 03:31:38 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 lIkozQzDmLNW; Wed, 18 Nov 2009 03:31:37 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 51CE8431FAE; Wed, 18 Nov 2009 03:31:37 -0800 (PST) From: Carl Worth To: Alex Botero-Lowry , notmuch@notmuchmail.org In-Reply-To: References: Date: Wed, 18 Nov 2009 03:31:23 -0800 Message-ID: <877htoqdbo.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Error out if no query is supplied to search instead of going into an infinite loop X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 18 Nov 2009 11:31:38 -0000 On Tue, 17 Nov 2009 16:23:53 -0800, Alex Botero-Lowry wrote: > In this case error out when no query is supplied. There seems to be an > infinite-loop casued by i think notmuch_query_search_threads having > an exception: > A Xapian exception occurred: Syntax: AND > A Xapian exception occurred: Syntax: AND > A Xapian exception occurred: Syntax: AND > > I'll look into that bug specifically a bit later. > > It might be better to do a usage instead of just throwing an error here? Definitely. Priit Laes reported the same thing in IRC and I've just committed a patch to give a nice error message: $ ./notmuch search Error: notmuch search requires at least one search term. Thanks for the report! -Carl