Subject: bug#36903: 27.0.50; gnus registry vs. debbugs

From: Eric Abrahamsen <[email-masked]>
Date: Sat, 03 Aug 2019 19:35:53 -0700

Eric Abrahamsen <[email-masked]> writes:

> Michael Heerdegen <[email-masked]> writes:
>
>> Eric Abrahamsen <[email-masked]> writes:
>>
>>> Okay, so `gnus-registry-clear' should probably also run
>>> `gnus-registry-unload-hook'. You're not expecting the registry to be
>>> doing it's thing when you've shut down Gnus, but are using debbugs,
>>> right?
>>
>> Yes.
>>
>> But I didn't say that I would not expect the registry to work with
>> debbugs.  It would be good if it did - but I don't know if it's
>> technically possible.
>
> Sounds like debbugs is either too Gnus, or not Gnus enough...
>
>>> Would you try this definition:
>>>
>>> (defun gnus-registry-clear ()
>>>   "Clear the registry."
>>>   (setq gnus-registry-db nil)
>>>   (gnus-registry-unload-hook))
>>
>> Well, that fixes - only one error.  I still get an error from
>>
>>   (defalias 'gnus-user-format-function-M
>>   'gnus-registry-article-marks-to-chars)
>
> But this should have raised an error even if you hadn't started Gnus
> prior to using debbugs, right?

Oh I see, I set both pieces of the puzzle next to each other, but didn't
connect them. If you didn't start Gnus first, your format specs were
still the default and didn't contain any registry-specific stuff.

Lars, `gnus-clear-system' explicitly refrains from unsetting
`gnus-format-specs'. So if you start and stop Gnus, then start
debbugs-gnu, the user's customized format specs are still in place, and
may end up calling functions that depend on ~/.gnus.el setup stuff, and
raising errors.

Could `gnus-clear-system' also clear format specs? Obviously that
omission went in there for a reason, but I don't know what. Alternately,
could debbugs reset the specs when it starts?