From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 27222 invoked from network); 20 Oct 2023 14:57:32 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 20 Oct 2023 14:57:32 -0000 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.96.1) (envelope-from ) id 1qtqwM-001iwV-1f for ml@inbox.vuxu.org; Fri, 20 Oct 2023 09:57:30 -0500 Received: from lists1.math.uh.edu ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.96.1) (envelope-from ) id 1qtqwL-000AeL-2K for ml@inbox.vuxu.org; Fri, 20 Oct 2023 09:57:29 -0500 Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtp (Exim 4.96.1) (envelope-from ) id 1qtqwJ-000AeC-03 for ding@lists.math.uh.edu; Fri, 20 Oct 2023 09:57:27 -0500 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.96.1) (envelope-from ) id 1qtqwH-001ivt-1W for ding@lists.math.uh.edu; Fri, 20 Oct 2023 09:57:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References :Message-ID:Date:Subject:From:To:Sender:Reply-To:Cc: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=zSk92Hc5F5e87+uhIUxm9d6Q+Il95Kz3rWOwDj7Xw9Y=; b=bJJAk9QRF7YgePmPodBu7ec8+s cVh0O3RSgJMneaSiaEYPxtloAE59ip7+HauNo/5QKrXo1uMdFf4rw5PexhoowPWhVTs7RmQ4aebcE cSp6LpJmtNYryuB8ITcHzhC0GMUpdc5ADClY5ieDY25MTyEIMYnt/l9JUnPvNNweBwo4=; 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 1qtqw4-0000pW-7T for ding@gnus.org; Fri, 20 Oct 2023 16:57:14 +0200 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1qtqw2-0006PS-BS for ding@gnus.org; Fri, 20 Oct 2023 16:57:10 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: ding@gnus.org From: Eric Abrahamsen Subject: Re: remove duplicates from a group Date: Fri, 20 Oct 2023 07:57:03 -0700 Message-ID: <871qdp8hq8.fsf@ericabrahamsen.net> References: <87mswgctna.fsf@free.fr> <87zg0g9bzp.fsf@ericabrahamsen.net> <87mswdn5cv.fsf@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:iYQQSmiqaocZ8ZseprAd12FSeFg= List-ID: Precedence: bulk Julien Cubizolles writes: > Eric Abrahamsen writes: > >> Julien Cubizolles writes: >> >>> I've got several nnmaildir groups with many duplicate messages sharing the >>> same Message-ID. I know Gnus can act on duplicate messages it receives >>> according to nnmail-treat-duplicates, but how to deal with duplicate >>> messages already in a nnmaildir group ? >>> >>> Ideally, I would like to mark all the duplicate messages in a group. >> >> No, there's nothing like that available right now. Probably we'd want it >> to be a search function, rather than marking or limiting, since the >> latter would require you to first open a summary buffer containing all >> the articles in the group. Search would ensure that you're checking the >> whole group for duplicates, and then maybe there could be a dedicated >> marking function after that, for marking all but one of duplicate >> messages. >> >> But none of that exists right now! > > Thanks, now I can stop searching for this function and maybe start > coding… It's probably easiest to start with the limiting function: once a newsgroup is open you have access to `gnus-newsgroup-headers`, and it should be fairly straightforward to sort them by message-id, then pick out the article numbers of all consecutive duplicates, and pass that to marking. Then you're halfway there!