Subject: bug#34981: 27.0.50; gnus-group-select-group errors with wrong type argument

From: Eric Abrahamsen <[email-masked]>
Date: Sun, 24 Mar 2019 17:20:21 -0700

Eric Abrahamsen <[email-masked]> writes:

> Alex Branham <[email-masked]> writes:
>
>> I'm trying to start using gnus and perhaps ran into a bug. I'm trying to
>> view the emacs-devel mailing list through gnus, for starters.
>>
>> From emacs -q, built from the latest git master (commit
>> 03e916beb0186f3707cd238650298870bf471575):
>>
>> (setq gnus-select-method
>>       '(nntp "gnus.user" (nntp-address "news.gmane.org")))
>>
>> M-x gnus
>>
>> A A (gnus-group-list-active)
>
> Thanks for this report, I messed with Gnus recently and am now putting
> out fires. This is a new error for me, and I'll try to fix it tonight.

Actually, here's a patch -- will you please try this out?

diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index f1202e176e..8c2411f4d9 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -4029,7 +4029,7 @@ gnus-group-list-active
 		 (insert "       *: "
 			 (gnus-group-decoded-name group)
 			 "\n"))
-       (list 'gnus-group (gethash group gnus-active-hashtb)
+       (list 'gnus-group group
 	     'gnus-unread t
 	     'gnus-level (inline (gnus-group-level group)))))
     (goto-char (point-min))))
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index 82141e0221..5a78df9fe4 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -2145,9 +2145,12 @@ gnus-active-to-gnus-format
 	(condition-case ()
 	    (if (and (stringp (progn
 				(setq group (read cur)
-				      group (if (numberp group)
-						(number-to-string group)
-					      (symbol-name group)))))
+				      group (cond ((numberp group)
+						   (number-to-string group))
+						  ((symbolp group)
+						   (symbol-name group))
+						  ((stringp group)
+						   group)))))
 		     (numberp (setq max (read cur)))
 		     (numberp (setq min (read cur)))
 		     (null (progn