Adam Sjøgren <[email protected]> writes: > Adam writes: > >> Eric writes: >> >>> 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. > > [...] > >> I will see if I can get your suggestion going after dinner :-) > > This is what I did: > > (defun asjo-update-topics () > (gnus-topic-update-topics-containing-group gnus-newsgroup-name)) > > (add-hook 'gnus-summary-exit-hook 'asjo-update-topics) > > But simpler than my hack - but nothing is updated. > > When I edebug-defun it, I can see that gnus-newsgroup-name is indeed the > full newsgroup name, e.g. "nntp+gm:gmane.emacs.gnus.user", but the topic > counts aren't updated.
And if I'd looked at that function before recommending it, I would have immediately seen that it's buggy! That and `gnus-topic-update-topic' check to see if the major-mode is 'gnus-topic-mode, which of course it never is, because gnus-topic-mode is a minor mode. In fact, gnus-topic.el already thinks it's doing what you want -- updating topic lines on group exit -- but because of the bug in `gnus-topic-update-topic', the update never happens. Lars added that major-mode check as part of a larger commit last year, I have to assume it was a mistake. I'll remove the checks now. Eric
