From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 3A65A6DE0207 for ; Wed, 7 Feb 2018 02:58:42 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[AWL=0.011, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JsjkwUsgBPwD for ; Wed, 7 Feb 2018 02:58:41 -0800 (PST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 3F2766DE0205 for ; Wed, 7 Feb 2018 02:58:41 -0800 (PST) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1ejNR1-00029u-LR; Wed, 07 Feb 2018 05:58:39 -0500 Received: (nullmailer pid 365 invoked by uid 1000); Wed, 07 Feb 2018 10:58:38 -0000 From: David Bremner To: Kai Wang , notmuch@notmuchmail.org Subject: Re: emacs-notmuch: A Xapian exception occurred parsing query In-Reply-To: References: Date: Wed, 07 Feb 2018 06:58:38 -0400 Message-ID: <87a7wlxe01.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 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 Feb 2018 10:58:42 -0000 Kai Wang writes: > When I use emacs-notmuch, in the notmuch-search mode, I press 't' and > select a tag, it gives a parsing query error: > > ====================================================================== > > [Tue Feb 6 10:41:04 2018] > notmuch search: A Xapian exception occurred > A Xapian exception occurred parsing query: Syntax: AND > Query string was: * and tag:flagged > command: /usr/local/bin/notmuch search --format\=sexp --format-version\=4 --sort\=newest-first \*\ and\ tag\:flagged > exit status: 1 > stderr: > notmuch search: A Xapian exception occurred > A Xapian exception occurred parsing query: Syntax: AND > Query string was: * and tag:flagged > Hi Kai; Thanks for the report. This is a more or less known problem with "*"; if you try 't' in any other search it should work. The underlying issue is that * is parsed (simplistically) by notmuch before passing to Xapian, so only works if it is the entire query. For cases like you report, where the user has not entered '*', but rather it is contained in some generated query string, we could fix the problem by adding a prefix like "special:*". This would allow Xapian to parse it, but only for Xapian versions >= 3.5. How many users of older systems do we think this would affect? E.g. users of Debian oldstable (jessie) would have to compile Xapian in order to use the newest notmuch. d