Subject: Re: bug#33653: 27.0.50; Change Gnus obarrays-as-hash-tables into real hash tables

From: Eric Abrahamsen <[email-masked]>
Date: Fri, 05 Apr 2019 13:18:47 -0700

On 04/05/19 15:44 PM, Katsumi Yamaoka wrote:
> One more regression. :)
>
> In the group buffer the `j' command (`gnus-group-jump-to-group')
> does not work for a group that is not activated yet.  The point
> goes to the top.  Such a group will appear with the `*' mark by
> the `l' or the `L' command like the followig:
>
>        *: nntp+gmane:gmane.emacs.devel
>
> Similarly the "#" mark put in front of a marked such group will
> not disappear after processing a certain job (normally
> `gnus-group-get-new-news-this-group' on me) as follows:
>
>   #    *: nntp+gmane:gmane.emacs.devel
>   ↓↓↓
>   #  168: nntp+gmane:gmane.emacs.devel
>
> The cause is the same; such non-activated groups are not listed
> in `gnus-active-hashtb':
>
> (gethash "nntp+gmane:gmane.emacs.devel" gnus-active-hashtb)
>  => nil
>
> But in Gnus bundled with Emacs 26.1.92 it returns a group name
> symbol, though its value (i.e., active) is nil:
>
> (gnus-intern-safe "nntp+gmane:gmane.emacs.devel" gnus-active-hashtb)
>  => nntp+gmane:gmane\.emacs\.devel
> (symbol-value
>  (gnus-intern-safe "nntp+gmane:gmane.emacs.devel" gnus-active-hashtb))
>  => nil
>
> In my Gnus, there are many non-activated groups at just after
> lauching Gnus with the prefix arg `1', because I set the group
> level `1' to the groups normally used and larger level to the
> others.  In the starting time of work, my habit is to check
> mails in the active groups for a while and then activate and
> check groups of larger level.
>
> Running `gnus-group-get-new-news-this-group' again on a group in
> question helps (the "#" mark disappears) but I wish it could work
> as before.  How about making the value for an inactive group in
> hashtb to `t' or something, that means the group exists but not
> activated?

I think the right solution might be to check

(member group-name (hash-table-keys gnus-active-hashtb))

Or else use the DFLT argument to `gethash' together with a
`make-symbol', to see if "nil" means "no such key", or if it means "key
with nil value".

Eric