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=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13328 invoked from network); 4 May 2022 18:17:21 -0000 Received: from lists.gnu.org (209.51.188.17) by inbox.vuxu.org with ESMTPUTF8; 4 May 2022 18:17:21 -0000 Received: from localhost ([::1]:37208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmJYt-0005KL-Tq for ml@inbox.vuxu.org; Wed, 04 May 2022 14:17:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmJYr-0005K5-2o for info-gnus-english@gnu.org; Wed, 04 May 2022 14:17:17 -0400 Received: from ciao.gmane.io ([116.202.254.214]:43968) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmJYm-0000Cs-VM for info-gnus-english@gnu.org; Wed, 04 May 2022 14:17:16 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nmJYj-0007Jr-Is for info-gnus-english@gnu.org; Wed, 04 May 2022 20:17:09 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: info-gnus-english@gnu.org From: =?utf-8?Q?Adam_Sj=C3=B8gren?= Subject: Re: Update topic unread counts on group exit? Date: Wed, 04 May 2022 20:17:02 +0200 Organization: koldfront - analysis & revolution, Copenhagen, Denmark Message-ID: <87h7655fj5.fsf@tullinup.koldfront.dk> References: <87mtfxi4k3.fsf@tullinup.koldfront.dk> <874k25qiwi.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cancel-Lock: sha1:v+iUM3/c6lyGI6SxxvWOg7pkGWk= OpenPGP: id=476630590A231909B0A0961A49D0746121BDE416; url=https://asjo.koldfront.dk/gpg.asc X-Face: )qY&CseJ?.:=8F#^~GcSA?F=9eu'{KAFfL1C3/A&:nE?PW\i65"ba0NS)97, Q(^@xk}n4Ou rPuR#V8I(J_@~H($[ym:`K_+]*kjvW>xH5jbgLBVFGXY:(#4P>zVBklLbdL&XxL\M)%T}3S/IS9lMJ ^St'=VZBR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+ml=inbox.vuxu.org@gnu.org Sender: "info-gnus-english" Eric writes: >> Is there a way to get Gnus to update the counts automatically on group >> exit as well? > It looks to me like you could add a function to > `gnus-summary-exit-hook', which calls > `gnus-topic-update-topics-containing-group' on the value of > `gnus-newsgroup-name'. At that stage in summary exit, > `gnus-newsgroup-name' won't have been cleared yet, so it should still > hold the name of the group you're coming out of. Any reason for Gnus not to do that by default? I hacked this together before reading your suggestion: (defun asjo-update-topics () (let ((pos (point))) (beginning-of-buffer) (gnus-topic-read-group) (gnus-topic-read-group) (goto-char pos))) (add-hook 'gnus-summary-exit-hook 'asjo-update-topics) Which just toggles the top-level topic, which has the side effect of updating the counts. I couldn't make save-mark-and-excursion work, so I did the point + goto-char dance, which is a little icky. I will see if I can get your suggestion going after dinner :-) Thanks! Best regards, Adam -- "Our voodoo-dolls are full of hopes" Adam Sjøgren asjo@koldfront.dk