From 9507c88f98cdb27425e8a08598acf45e79ccd729 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Tue, 22 Aug 2023 09:27:33 -0700 Subject: [PATCH] Add a bit of logging for gnus-search search engine results Help users figure out the cause of unexpected "no search results" situations. --- lisp/gnus/gnus-search.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el index 98a7e23428b..839e5d203ff 100644 --- a/lisp/gnus/gnus-search.el +++ b/lisp/gnus/gnus-search.el @@ -1434,6 +1434,9 @@ Returns a list of [group article score] vectors." "")) (groups (mapcar #'gnus-group-short-name groups)) artlist article group) + (when (>= gnus-verbose 7) + (gnus-message 7 "Search engine returned %d results" + (car (buffer-line-statistics)))) (goto-char (point-min)) ;; Prep prefix, we want to at least be removing the root ;; filesystem separator. @@ -1485,6 +1488,10 @@ Returns a list of [group article score] vectors." ;; Are we running an additional grep query? (when-let ((grep-reg (alist-get 'grep query))) (setq artlist (gnus-search-grep-search engine artlist grep-reg))) + + (when (>= gnus-verbose 7) + (gnus-message 7 "Gnus search returning %d results" + (length artlist))) ;; Munge into the list of vectors expected by nnselect. (mapcar (pcase-lambda (`(,_ ,article ,group ,score)) (vector -- 2.39.2