From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from mx1.math.uh.edu (mx1.math.uh.edu [129.7.128.32]) by inbox.vuxu.org (Postfix) with ESMTP id 9CE3D28D8B for ; Tue, 20 Feb 2024 06:37:47 +0100 (CET) Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1rcIp7-0000000GQKU-3O4g for ml@inbox.vuxu.org; Mon, 19 Feb 2024 23:37:45 -0600 Received: from lists1.math.uh.edu ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.97.1) (envelope-from ) id 1rcIp7-00000000iSX-1vGn for ml@inbox.vuxu.org; Mon, 19 Feb 2024 23:37:45 -0600 Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtp (Exim 4.97.1) (envelope-from ) id 1rcIp4-00000000iSO-2e2p for ding@lists.math.uh.edu; Mon, 19 Feb 2024 23:37:42 -0600 Received: from quimby.gnus.org ([95.216.78.240]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1rcIp3-0000000GQJw-1aQn for ding@lists.math.uh.edu; Mon, 19 Feb 2024 23:37:42 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:Mime-Version:References:Message-ID:Date:Subject: From:To:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=v0XKH3O4mcWEBzxl2T0zS0GPDV2bbRo5MZp7D0IRrWQ=; b=frSZBqLyVtv9jvDYVuNV4Ft8y4 VEORjGXbTGeAwsJUFYBWiyMCWuYQ3mD9o3+u1LQsM2OB/l8NRpZ6IhHfwOmWhQuOnTASfseyHxSdC kyTF46eZ9oyvG8qDE6bFc10mUikLVhlA1BdTEsgSGLzmtRqJgSFxU2FRxgRt1aJip0ao=; Received: from ciao.gmane.io ([116.202.254.214]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rcIow-0007mw-5J for ding@gnus.org; Tue, 20 Feb 2024 06:37:36 +0100 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1rcIou-00052g-TN for ding@gnus.org; Tue, 20 Feb 2024 06:37:32 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: ding@gnus.org From: Eric Abrahamsen Subject: Re: gnus-group-change-level Date: Mon, 19 Feb 2024 21:37:24 -0800 Message-ID: <875xyjlmqz.fsf@ericabrahamsen.net> References: <87le7ly3hn.fsf@igel.home> <87ttm5psvr.fsf@ericabrahamsen.net> <87ttm5mt8a.fsf@ericabrahamsen.net> <87il2lmbfm.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:QR03Ppa2qsyxfOvr17i42ebRYkE= List-ID: Precedence: bulk James Cloos writes: >>>>>> "EA" == Eric Abrahamsen 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!