Subject: bug#46047: 28.0.50; Namazu-based mail searching not working anymore

From: Eric Abrahamsen <[email-masked]>
Date: Sun, 16 May 2021 15:11:30 -0700

Torsten Bronger <[email-masked]> writes:

> Hallöchen!
>
> Eric Abrahamsen writes:
>
>> [...]  Can you show me your exact configuration for this server?
>
> The relevant part is, I think:
>
> (setq gnus-secondary-select-methods
>       '((nnml "" (gnus-search-engine
> 		  gnus-search-namazu
> 		  remove-prefix "/home/bronger/Mail"
> 		  index-directory "/var/lib/namazu/"))))
>
> I’m happy to post the rest of my .gnus and .emacs somewhere if
> helpful.

I'm assuming you've also got `gnus-search-namazu-raw-queries-p' set to
t, otherwise you would have hit an error earlier than this.

>> And the "nnselect-run" error message from *Messages*, which should
>> be formed as "nnselect-run: %s on %s gave error %s"?
>
> In *Messages*, it says:
>
> nnselect-run: gnus-search-run-query on ((search-query-spec (query .
> +from:[email-masked]) (raw)) (search-group-spec (nnml:
> nnml:KFA-FBL))) gave error (wrong-type-argument stringp nil)

Bah, this is difficult to debug -- it's hard to guess what string is
nil.

Earlier in the day I pushed a change to Emacs master to use
`condition-case-unless-debug' in `nnselect-run'. If you're in the habit
of running a recent Emacs, would you pull from source and rebuild, then
`toggle-debug-on-error' and run this search again, posting the
backtrace?

If you're not, you could just eval the following, then do the same
(toggle-debug-on-error, etc)

(defun nnselect-run (specs)
  "Apply nnselect-function to nnselect-args from SPECS.
Return an article list."
  (let ((func (alist-get 'nnselect-function specs))
	(args (alist-get 'nnselect-args specs)))
    (condition-case-unless-debug err
	(funcall func args)
      (error (gnus-error 3 "nnselect-run: %s on %s gave error %s" func args err)
	     []))))

Thanks for your help, and patience.

Eric