GNU bug report logs - #36765
27.0.50; gnus-group-split-setup should delay until Gnus has finished starting up

Previous Next

Packages: gnus, emacs;

Reported by: Eric Abrahamsen <eric <at> ericabrahamsen.net>

Date: Mon, 22 Jul 2019 18:23:01 UTC

Severity: normal

Found in version 27.0.50

Done: Eric Abrahamsen <eric <at> ericabrahamsen.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#36765: closed (27.0.50; gnus-group-split-setup should delay
 until Gnus has finished starting up)
Date: Sat, 27 Jul 2019 16:20:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 27 Jul 2019 09:19:40 -0700
with message-id <87wog3laar.fsf <at> ericabrahamsen.net>
and subject line Re: bug#36765: 27.0.50; gnus-group-split-setup should delay until Gnus has finished starting up
has caused the debbugs.gnu.org bug report #36765,
regarding 27.0.50; gnus-group-split-setup should delay until Gnus has finished starting up
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
36765: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=36765
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; gnus-group-split-setup should delay until Gnus has
 finished starting up
Date: Mon, 22 Jul 2019 11:22:53 -0700
The Gnus manual instructs users to put a call to
`gnus-group-split-setup' in their gnus.el file if they want to skip over
some tedious manual configuration.

The problem with this is that the function has:

  (gnus-group-split-update)
  (when auto-update
    (add-hook 'nnmail-pre-get-new-mail-hook 'gnus-group-split-update))

Meaning that `gnus-group-split-update' is called immediately when this
function is run, which happens before Gnus is done starting up.
split-update calls `gnus-group-split-fancy' which ends up accessing
group parameters on all Gnus groups. Parameter access only works when
gnus-newsrc-hashtb is already initialized. When the hashtb was an
obarray, this process was a silent no-op. Now that they're hashtables,
it signals a type error.

I think a simple solution would be to change the above to:

(add-hook (if auto-update
	      'nnmail-pre-get-new-mail-hook
	    'gnus-started-hook)
	  'gnus-group-split-update)

Ie, if auto-update isn't passed, only run the update once, at start time.


[Message part 3 (message/rfc822, inline)]
From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 36765 <at> debbugs.gnu.org, 36765-done <at> debbugs.gnu.org
Subject: Re: bug#36765: 27.0.50; gnus-group-split-setup should delay until
 Gnus has finished starting up
Date: Sat, 27 Jul 2019 09:19:40 -0700
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>> Okay, I've heard back from the user. I think the proper solution is:
>>
>> (add-hook (if auto-update
>> 	      'gnus-get-top-new-news-hook
>> 	    'gnus-read-newsrc-el-hook)
>> 	  #'gnus-group-split-update)
>>
>> The reasoning being:
>
> [...]
>
>> WDYT?
>
> Sounds good.

Thanks -- pushed.


This bug report was last modified 5 years and 297 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.