From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#44509: 28.0.50; Error querying with new gnus-search and notmuch Date: Wed, 11 Nov 2020 09:56:40 -0800 Message-ID: <87361fhj53.fsf@ericabrahamsen.net> References: <87imag7kkh.fsf@gnus.jao.io> <87361kd1sg.fsf@ericabrahamsen.net> <87v9eg7ec3.fsf@gnus.jao.io> <874km0bgat.fsf@ericabrahamsen.net> <87blg8729u.fsf@gnus.jao.io> <875z6cxyue.fsf@gnus.jao.io> <877dqrhjea.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21505"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 44509@debbugs.gnu.org To: "Jose A. Ortega Ruiz" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 11 18:57:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcuMn-0005Tf-TQ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Nov 2020 18:57:09 +0100 Original-Received: from localhost ([::1]:36388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcuMm-0004F0-Ho for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Nov 2020 12:57:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34660) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcuMg-0004Eo-NX for bug-gnu-emacs@gnu.org; Wed, 11 Nov 2020 12:57:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59444) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kcuMg-0001Fu-E0 for bug-gnu-emacs@gnu.org; Wed, 11 Nov 2020 12:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kcuMg-0004fv-Ct for bug-gnu-emacs@gnu.org; Wed, 11 Nov 2020 12:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Nov 2020 17:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44509 X-GNU-PR-Package: emacs Original-Received: via spool by 44509-submit@debbugs.gnu.org id=B44509.160511741017954 (code B ref 44509); Wed, 11 Nov 2020 17:57:02 +0000 Original-Received: (at 44509) by debbugs.gnu.org; 11 Nov 2020 17:56:50 +0000 Original-Received: from localhost ([127.0.0.1]:42757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcuMU-0004fW-DG for submit@debbugs.gnu.org; Wed, 11 Nov 2020 12:56:50 -0500 Original-Received: from ericabrahamsen.net ([52.70.2.18]:48620 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcuMT-0004fI-5F for 44509@debbugs.gnu.org; Wed, 11 Nov 2020 12:56:49 -0500 Original-Received: from localhost (24-113-150-48.wavecable.com [24.113.150.48]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 07C43FA16E; Wed, 11 Nov 2020 17:56:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1605117403; bh=IZ7VK+ChBmvHpFv+uLhh7ITpCTMa4zMpYpG/it76OJQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=wJLtqT1GnxIG/nLK+iG7zfxNjhJ7chZSosQSlvlnNQdo/y2O1ZqD+4OsitxNk4hS7 tI1IY3rg2PE+2Q0/mxcxLLfm0jMsqJ79lJnzzxB7W1CKvM48XdzmjX3UvJAYzVBDei LEp9uLdLyskfPKWwmDlUslbKIGIVStr+NZfu0MOY= In-Reply-To: <877dqrhjea.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Wed, 11 Nov 2020 09:51:09 -0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:193121 Archived-At: Eric Abrahamsen writes: > "Jose A. Ortega Ruiz" writes: > >> Hi again, Eric. >> >> I was looking at the notmuch engine code and wondering why it wasn't >> working for me in a leafnode directory, which puts its messages in a >> nnmail-compatible format (as far as i can tell). And i discovered what >> looks like a possible bug in gnus-search-indexed (or a misunderstanding >> on my side). Concretely, on line 1363 of gnus-search, when implementing >> gnus-search-indexed-parsed output, we're constructing a groups regexp >> that looks like: >> >> (group-regexp (when groups >> (regexp-opt >> (mapcar >> (lambda (x) (gnus-group-real-name x)) >> groups)))) >> >> and then matching the returned list of files on that regexp (line 1377): >> >> (string-match-p group-regexp f-name))) >> >> But gnus-group-real-name is giving me back a dot-separated path for >> nested folders (e.g. gmane.bugs.gnus), while the file paths in the >> results are using slashes (gmane/bugs/gnus/234 etc.), so the match >> test always fails and no results are returned. >> >> If i simply redefine group-regexp using: >> >> (replace-regexp-in-string "\\." "/" (gnus-group-real-name x))) > > This code that comes straight from the old nnir.el, and has always > looked a bit fragile to me. The problem is that it really just expects > each message to be in a regular file, with groups as folders. > > So you're using notmuch as a search engine for a local leafnode nntp > server, and indexing its message store directly? > > Is there any leafnode setting that could influence how it stores its > messages? Can it be convinced to store them in hierarchical folders? > > I suppose I could change the group-regexp to munge periods, but that > could cause breakage in other cases, and I would be hesitant to do that. > > Otherwise, all the indexed search engines have a > `gnus-search-indexed-extract' method that's used to actually return the > file name from the results buffer. Each one's got something slightly > different. It would be very easy to create a new notmuch search engine > subclass that only overrides this method. To wit: > > (defclass gnus-search-leafnode-notmuch (gnus-search-notmuch)) Sorry, this would need to be: (defclass gnus-search-leafnode-notmuch (gnus-search-notmuch) nil)