Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: gnus-group-change-level
Date: Mon, 19 Feb 2024 21:37:24 -0800	[thread overview]
Message-ID: <875xyjlmqz.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <m3jzn1w46s.fsf@nitrogen.jhcloos.org>

James Cloos <cloos@jhcloos.com> writes:

>>>>>> "EA" == Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
> EA> Oh wow, I've never seen anyone do this before. How long has this setup
> EA> been functioning?
>
> A couple of decades.

Well that's good news in general!

> EA> Is your current issue with changing the level of this
> EA> group something that's come up recently, and only for this group?
>
> I never tried to call gnus-group-change-level directly before, only S L
> in the *Groups* buffer, and that as I wrote works fine.
>
> I'm only attempting this because after my previous workstation's
> mainboard failed, I ended up using a different imapd on an existing
> headless node here.  And so the group names have a different hostname.
>
> I want to get the levels back to how I had them on the previous setup,
> but w/o manually calling SL thousands of times.  Or even just hundreds.
> (I used to split some large lists very narrowly; that led to *lots* of
> groups.  I've chosen not to split them that narrowly this time.)

Sorry, you did mention originally that you were doing this
programmatically.

[...]

> EA> In current Emacs master, the level should be changed on line 1327:
>
> EA> (setcar (cdadr entry) level)
>
> EA> Do you not reach that line?
>
> I saw that line, but do not recall what edebug showed in the non-working
> attempts.
>
> I'll have to re-test.  I had to restart gnus in the interim.  I'll do
> that later tonight.

Another thing to try is edebugging `gnus-group-change-level', then using
"S L", and when edebug starts up make note of all the values of the
arguments. Then you can call the function yourself with those values.

Provided you give it a value for "oldlevel", and provided that level is
less than `gnus-level-zombie', the setting of the level should be
relatively straightforward, since you're not "bringing the group back
from the dead", as far as Gnus is concerned.

Last but not least, if you're doing this programmatically, you might as
well just get straight to the meat of it. Like I said, if you're not
resurrecting dead groups, all the auxiliary structures will already
contain your group and all should be well. It should be enough to do:

(let ((level 55))
  (dolist (grp very-long-list-of-group-names)
    (when-let ((entry (gnus-group-entry grp)))
      (setcar (cdadr entry) level))))

Then refresh Gnus with "g".

Back up your .newsrc.eld first!



  reply	other threads:[~2024-02-20  5:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-15  3:20 gnus-group-change-level James Cloos
2024-02-15 18:41 ` gnus-group-change-level Andreas Schwab
2024-02-15 18:51   ` gnus-group-change-level James Cloos
2024-02-18 17:46     ` gnus-group-change-level Eric Abrahamsen
2024-02-18 19:47       ` gnus-group-change-level James Cloos
2024-02-18 20:02       ` gnus-group-change-level James Cloos
2024-02-18 20:07         ` gnus-group-change-level Eric Abrahamsen
2024-02-19  1:26           ` gnus-group-change-level James Cloos
2024-02-19  2:31             ` gnus-group-change-level Eric Abrahamsen
2024-02-19  2:58               ` gnus-group-change-level James Cloos
2024-02-20  5:37                 ` Eric Abrahamsen [this message]
2024-02-20 16:18                   ` gnus-group-change-level James Cloos
2024-02-22 17:13                     ` gnus-group-change-level Eric Abrahamsen
2024-02-22 18:39                       ` gnus-group-change-level Andreas Schwab
2024-02-22 22:00                         ` gnus-group-change-level Eric Abrahamsen
2024-02-22 22:36                       ` gnus-group-change-level James Cloos
2024-02-19 10:57             ` gnus-group-change-level Eric S Fraga
2024-02-23  2:08               ` gnus-group-change-level Eric Abrahamsen

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=875xyjlmqz.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).