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=0.4 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 Received: from mx2.math.uh.edu (mx2.math.uh.edu [129.7.128.33]) by inbox.vuxu.org (Postfix) with ESMTP id 84A7F25376 for ; Thu, 22 Feb 2024 18:13:43 +0100 (CET) Received: from lists1.math.uh.edu ([129.7.128.208]) by mx2.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1rdCdb-0000000FBsx-3jiL for ml@inbox.vuxu.org; Thu, 22 Feb 2024 11:13:40 -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 1rdCdW-00000000s1x-3rmY for ml@inbox.vuxu.org; Thu, 22 Feb 2024 11:13:30 -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 1rdCdV-00000000s1r-1uOj for ding@lists.math.uh.edu; Thu, 22 Feb 2024 11:13:29 -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 1rdCdT-00000000dzO-2JoN for ding@lists.math.uh.edu; Thu, 22 Feb 2024 11:13:29 -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=gDuh8SZoAkhXpfVJ/5Byaw/qxTrcgl+9pAqLem8NDvk=; b=s6WtNKsHRtRMexkq8B0IDhOVta Po+k5wDOXfZgDA7DffI/A5EpgwHZZaneF4fuIejUcym5gKTW94quzPB1Y+zQ5qE1DHS0ovXWodKwf t5K5OwybW8l4Sdz1w1XBg38x7TImd61Q+ghjyCyYFBRnZ4WiRotmQQUhaxJ9Gcfu/TLQ=; 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 1rdCdL-0001hx-L2 for ding@gnus.org; Thu, 22 Feb 2024 18:13:22 +0100 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1rdCdK-0002E7-2Y for ding@gnus.org; Thu, 22 Feb 2024 18:13:18 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: ding@gnus.org From: Eric Abrahamsen Subject: Re: gnus-group-change-level Date: Thu, 22 Feb 2024 09:13:10 -0800 Message-ID: <87y1bch17d.fsf@ericabrahamsen.net> References: <87le7ly3hn.fsf@igel.home> <87ttm5psvr.fsf@ericabrahamsen.net> <87ttm5mt8a.fsf@ericabrahamsen.net> <87il2lmbfm.fsf@ericabrahamsen.net> <875xyjlmqz.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:i3gT3Xy33OL+rzJ61J8sd3vLCWM= List-ID: Precedence: bulk James Cloos writes: >>>>>> "EA" == Eric Abrahamsen writes: > > EA> (let ((level 55)) > EA> (dolist (grp very-long-list-of-group-names) > EA> (when-let ((entry (gnus-group-entry grp))) > EA> (setcar (cdadr entry) level)))) > > Ah. Cool. As a first step I tried out: > > (cdadr (gnus-group-entry "nnimap+oxygen:ding@gnus.org")) > > since ding was at point and thus easy to copy-n-yank. > > It errored out that (listp 0) return nil. > > Some experimentation showed that: > > (cadadr (gnus-group-entry "nnimap+oxygen:ding@gnus.org")) > > returned the cons (11 . 15), where 11 is the current level. > (I'm not sure what that cons' cdr is.) Ah, that's "rank". Once upon a time I knew what rank meant, but have since forgotten. > I see aroung 7% of the groups' lines in .newsrc.eld have just an integer > at that point for level, whereas the others have such a cons. > > Eg this returns just the integer 11: > > (cadadr (gnus-group-entry "nnimap+oxygen:GitHub-Torvalds")) > > I take it setcar will not do the right thing in such cases, yes? > And something like a cl-typecase would be required? > > Is cadadr setf-able in emacs? I'd also forgotten there are tools for reliably setting the level, whether or not rank is involved. Specifically there's a `gnus-info-level' that advertises itself as setf-able, so try: (let ((level 55)) (dolist (grp very-long-list-of-group-names) (when-let ((info (gnus-get-info grp))) (setf (gnus-info-level info) level)))) Note that now we're using `gnus-get-info', not `gnus-group-entry'. Sorry I didn't (re-)discover this the first time around! > P.S. setting (nnimap-expunge never) or (nnimap-expunge 'never) > in an entry in gnus-secondary-select-methods doesn't seem > to do anything. dovecot removes the files everytime gnus > quits the *Summary* buffer. I want to set \Delete but not > to expunge... Hmm, that ought to work -- how are you marking your messages for deletion?