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 5DB456DE1684 for ; Thu, 15 Feb 2018 16:14:33 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -1.079 X-Spam-Level: X-Spam-Status: No, score=-1.079 tagged_above=-999 required=5 tests=[AWL=-1.077, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] 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 28ZGhbB14xus for ; Thu, 15 Feb 2018 16:14:32 -0800 (PST) X-Greylist: delayed 1207 seconds by postgrey-1.36 at arlo; Thu, 15 Feb 2018 16:14:32 PST Received: from thyestes.tartarus.org (thyestes.tartarus.org [5.196.91.86]) by arlo.cworth.org (Postfix) with ESMTPS id 6B55A6DE1682 for ; Thu, 15 Feb 2018 16:14:32 -0800 (PST) Received: from localhost ([127.0.0.1] helo=gemse ident=olly) by thyestes.tartarus.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1emTM4-0005tr-W6 for notmuch@notmuchmail.org; Thu, 15 Feb 2018 23:54:21 +0000 Received: from olly by gemse with local (Exim 4.90_1) (envelope-from ) id 1emTM2-0002oj-Vc for notmuch@notmuchmail.org; Fri, 16 Feb 2018 12:54:18 +1300 Date: Fri, 16 Feb 2018 12:54:18 +1300 From: Olly Betts To: notmuch@notmuchmail.org Subject: Re: emacs-notmuch: A Xapian exception occurred parsing query Message-ID: <20180215235418.GA10778@survex.com> References: <87a7wlxe01.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87a7wlxe01.fsf@tethera.net> User-Agent: Mutt/1.9.3 (2018-01-21) 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: Fri, 16 Feb 2018 00:14:33 -0000 On 2018-02-07, David Bremner wrote: > 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:*". If you're generating the query string, you could presumably just generate « tag:flagged » for this case. Though it's generally better not to try to generate a string to parse, but instead to parse any part(s) the user actually wrote and combine the resulting Xapian::Query objects with directly constructed objects for other filters, etc. > 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. (That should be >= 1.3.5 I think - certainly 3.5 is wrong). For Debian oldstable users, there's a backport of 1.4.3: https://packages.debian.org/source/oldstable-backports/xapian-core Cheers, Olly