Subject: Re: bug#45330: 28.0.50; debbugs-gnu: Can't select reports before having started Gnus

From: Eric Abrahamsen <[email-masked]>
Date: Wed, 23 Dec 2020 10:08:47 -0800

On 12/23/20 06:23 AM, Michael Heerdegen wrote:
> Eric Abrahamsen <[email-masked]> writes:
>
>> Oh hang on, it looks like that took me several tries to get right,
>> in a81223aeaa, 87b7c06958, a34216351f, and then finally ae76ce57cf,
>
> Wow...

It was embarrassing.

>> in which it looks like I was confident that checking
>> `gnus-registry-enabled' was sufficient to ensure that the registry was
>> actually an object. Give me a second to figure out why that's not
>> true.
>
> Ok, please keep me informed :-)

So it's pretty clear: `gnus-registry-initialize' in effect looks like
this:

(defun gnus-registry-initialize ()
  (gnus-registry-install-hooks) -> (setq gnus-registry-enabled t)
  (if (gnus-alive-p)
      (gnus-registry-load)
    (add-hook 'gnus-read-newsrc-el-hook #'gnus-registry-load)))

So in your case `gnus-registry-enabled' is set to t, but then
`gnus-registry-load' is never called (because Gnus is neither alive, nor
loaded later).

I suppose it's still reasonable to set `gnus-registry-enabled' in this
way -- the registry is, in fact, "enabled", it simply hasn't gotten
loaded (the naming problem again!). Perhaps the formatting functions
should go back to the earlier, more explicit check of `eieio-object-p'.

Bleagh.

Eric