From bb28f8b9d1ebb4a93c66beca466cb15563075e8c Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Thu, 12 Nov 2020 20:02:09 -0800 Subject: [PATCH] Make sure Gnus search groups search topics recursively * lisp/gnus/gnus-group.el (gnus-group-make-search-group, gnus-group-read-ephemeral-search-group): If a search is initiated from a topic line, make sure we get all the groups under that topic (and under sub-topics). --- lisp/gnus/gnus-group.el | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index c8b97c08524..73fda66fb6b 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -52,6 +52,8 @@ (autoload 'gnus-cloud-upload-all-data "gnus-cloud") (autoload 'gnus-cloud-download-all-data "gnus-cloud") +(autoload 'gnus-topic-find-groups "gnus-topic") + (defcustom gnus-no-groups-message "No news is good news" "Message displayed by Gnus when no groups are available." :group 'gnus-start @@ -3194,8 +3196,10 @@ non-nil SPECS arg must be an alist with `search-query-spec' and (or gnus-group-marked (if (gnus-group-group-name) (list (gnus-group-group-name)) - (cdr - (assoc (gnus-group-topic-name) gnus-topic-alist)))))))) + (mapcar #'caadr + (gnus-topic-find-groups + (gnus-group-topic-name) + nil 'all nil t)))))))) (query-spec (or (cdr (assq 'search-query-spec specs)) @@ -3243,8 +3247,10 @@ non-nil SPECS arg must be an alist with `search-query-spec' and (or gnus-group-marked (if (gnus-group-group-name) (list (gnus-group-group-name)) - (cdr - (assoc (gnus-group-topic-name) gnus-topic-alist)))))))) + (mapcar #'caadr + (gnus-topic-find-groups + (gnus-group-topic-name) + nil 'all nil t)))))))) (query-spec (or (cdr (assq 'search-query-spec specs)) (cdr (assq 'nnir-query-spec specs)) -- 2.39.2