From: Eric Abrahamsen Date: Fri, 13 Nov 2020 04:02:09 +0000 (-0800) Subject: Make sure Gnus search groups search topics recursively X-Git-Tag: emacs-28.0.90~5161 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bb28f8b9d1ebb4a93c66beca466cb15563075e8c;p=emacs.git 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). --- 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))