[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Update topic unread counts on group exit?
From: |
Adam Sjøgren |
Subject: |
Re: Update topic unread counts on group exit? |
Date: |
Wed, 04 May 2022 20:17:02 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
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
- Update topic unread counts on group exit?, Adam Sjøgren, 2022/05/04
- Re: Update topic unread counts on group exit?, Eric Abrahamsen, 2022/05/04
- Re: Update topic unread counts on group exit?,
Adam Sjøgren <=
- Re: Update topic unread counts on group exit?, Adam Sjøgren, 2022/05/04
- Re: Update topic unread counts on group exit?, Eric Abrahamsen, 2022/05/04
- Re: Update topic unread counts on group exit?, Adam Sjøgren, 2022/05/04
- Re: Update topic unread counts on group exit?, Adam Sjøgren, 2022/05/04
- Re: Update topic unread counts on group exit?, Eric Abrahamsen, 2022/05/04
- Re: Update topic unread counts on group exit?, Adam Sjøgren, 2022/05/05
- Re: Update topic unread counts on group exit?, Eric Abrahamsen, 2022/05/04