Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: Missing first group in group list
Date: Thu, 21 Jan 2021 09:12:34 -0800	[thread overview]
Message-ID: <87zh122ozh.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <86v9bqw7dl.fsf@csic.es>

Juan José García-Ripoll <juanjose.garciaripoll@gmail.com> writes:

> Andreas Schwab <schwab@linux-m68k.org> writes:
>> On Jan 21 2021, Juan José García-Ripoll wrote:
>>
>>> Essentially the problem is in this function
>>>
>>> (defun gnus-group-prepare-flat (level &optional predicate lowest regexp)
>>>  ...
>>>       ;; List living groups, according to order in `gnus-group-list'.
>>>       (dolist (g (cdr gnus-group-list))
>>>         (setq info (gnus-get-info g)
>>> 	      group (gnus-info-group info)
>>>
>>> This function drops the first group in the list, probably because it
>>> assumes it is the dummy.group, but in my system it is never so.
>>
>> It looks like Gnus always tries to keep dummy.group at the head of the
>> group list, see the various references in gnus-start.el or
>> gnus-group.el.
>
> Hmmm, not really. I've debugged the gnus-group-list variable and it is
> changed twice: once to add dummy.group, and another one to add the
> subsequent group, in a chain of calls that starts in
> gnus-subscribe-group.
>
> The problem is this code:
>
> (defun gnus-subscribe-newsgroup (newsgroup &optional next)
>   "Subscribe new NEWSGROUP.
> If NEXT is non-nil, it is inserted before NEXT.  Otherwise it is made
> the first newsgroup."
>   (save-excursion
>     (goto-char (point-min))
>     ;; We subscribe the group by changing its level to `subscribed'.
>     (gnus-group-change-level
>      newsgroup gnus-level-default-subscribed
>      gnus-level-killed (or next "dummy.group"))
>
> It is called like (gnus-subscribe-newsgroup "The-new-group"
> "dummy.group") Note that by default NEXT is nil. This means that the
> next group that is inserted will be injected _before_ dummy.group and
> the order is destroyed.

Thanks for debugging! This is probably an error I introduced, and I'll
try to fix it this weekend. I appreciate this leg up.

Eric



      reply	other threads:[~2021-01-21 17:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21 11:13 Juan José García-Ripoll
2021-01-21 11:58 ` Andreas Schwab
2021-01-21 13:23   ` Juan José García-Ripoll
2021-01-21 17:02   ` Juan José García-Ripoll
2021-01-21 17:12     ` Eric Abrahamsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zh122ozh.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).