]> git.eshelyaron.com Git - emacs.git/commitdiff
Make sure Gnus search groups search topics recursively
authorEric Abrahamsen <eric@ericabrahamsen.net>
Fri, 13 Nov 2020 04:02:09 +0000 (20:02 -0800)
committerEric Abrahamsen <eric@ericabrahamsen.net>
Sat, 14 Nov 2020 01:25:46 +0000 (17:25 -0800)
* 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

index c8b97c08524c0486103519ecdb2b0f8218c7695a..73fda66fb6be210e224eeca992eaf4895dc1b607 100644 (file)
@@ -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))