Subject: Re: bug#41842: 28.0.50; gnus-new-mail-mark is applied to too many groups

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 19 Jul 2020 03:15:36 +0200

"Basil L. Contovounesios" <[email-masked]> writes:

> This happens because of the way gnus-group-new-mail in gnus-group.el
> checks whether a given group, such as "nnimap+tcd:INBOX", contains new
> mail.  It first passes the group name to gnus-group-real-name, which
> returns "INBOX", and then passes this result to nnmail-new-mail-p, which
> checks for its presence in nnmail-split-history, whose value is
> something like:
>
>   ((("INBOX" . 0))
>    (("[Gmail].Sent Mail" . 0))
>    ...)

Hm, that's a kinda badly misdesigned interface...

> Would it be possible for the variable nnmail-split-history, or the
> function gnus-group-new-mail, or both, to be changed so they
> store/manipulate only the full group name "nnimap+tcd:INBOX"?

I think that would be easy to implement for nnimap (it peeks into the
Gnus structures, so it knows the full Gnus name of the group)...

But looking at the code used in nnmail.el (i.e.,
nnmail-check-duplication), it doesn't (at that point) know what the Gnus
group names are; it just gets data from the backends.  (This is when
nnml splits from, say, pop3 fetching.)

So I don't know how to fix this generally.

Any ideas?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no