GNU bug report logs - #44509
28.0.50; Error querying with new gnus-search and notmuch

Previous Next

Package: emacs;

Reported by: "Jose A. Ortega Ruiz" <mail <at> jao.io>

Date: Sun, 8 Nov 2020 01:46:02 UTC

Severity: normal

Found in version 28.0.50

Full log


Message #26 received at 44509 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: "Jose A. Ortega Ruiz" <jao <at> gnu.org>
Cc: 44509 <at> debbugs.gnu.org
Subject: Re: bug#44509: 28.0.50; Error querying with new gnus-search and
 notmuch
Date: Wed, 11 Nov 2020 09:56:40 -0800
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

> "Jose A. Ortega Ruiz" <jao <at> gnu.org> 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)




This bug report was last modified 4 years and 223 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.