From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#41842: 28.0.50; gnus-new-mail-mark is applied to too many groups Date: Wed, 22 Jul 2020 13:57:03 -0700 Message-ID: <87eep3tgio.fsf@ericabrahamsen.net> References: <87wo4a36eu.fsf@tcd.ie> <87h7u4wbif.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16020"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: "Basil L. Contovounesios" , 41842@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 22 22:58:09 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jyLoX-00042t-9a for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Jul 2020 22:58:09 +0200 Original-Received: from localhost ([::1]:49382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jyLoW-0003md-8M for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Jul 2020 16:58:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyLoQ-0003mU-EX for bug-gnu-emacs@gnu.org; Wed, 22 Jul 2020 16:58:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59885) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jyLoQ-0001sJ-5l for bug-gnu-emacs@gnu.org; Wed, 22 Jul 2020 16:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jyLoQ-0005ax-3h; Wed, 22 Jul 2020 16:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Wed, 22 Jul 2020 20:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41842 X-GNU-PR-Package: emacs,gnus Original-Received: via spool by 41842-submit@debbugs.gnu.org id=B41842.159545143421452 (code B ref 41842); Wed, 22 Jul 2020 20:58:02 +0000 Original-Received: (at 41842) by debbugs.gnu.org; 22 Jul 2020 20:57:14 +0000 Original-Received: from localhost ([127.0.0.1]:43197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyLne-0005Zw-9e for submit@debbugs.gnu.org; Wed, 22 Jul 2020 16:57:14 -0400 Original-Received: from ericabrahamsen.net ([52.70.2.18]:51230 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyLnb-0005Zi-Gr for 41842@debbugs.gnu.org; Wed, 22 Jul 2020 16:57:12 -0400 Original-Received: from localhost (75-172-112-137.tukw.qwest.net [75.172.112.137]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 52BBAFA03D; Wed, 22 Jul 2020 20:57:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1595451425; bh=4qAjjAWU9nOqswkPYMe9G62RsnLKc5VBHqmHo4FBt+0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=PYVpeZ9PSMOASIV+bj2NuZ7zEUuHo59inKfbLbcFcUfRH1hqPyFK8pFL/h5s+kmDa eEkA1pEW9/Kl5yidYnDzUr/e9OAyIqMIt8/Zcw7pe0gvALxE8HLtoRoRq6MuHP0Yu4 xiyvnE0FynbYLYNkh1N+Zxs64ccNpQdknNjK5VS0= In-Reply-To: <87h7u4wbif.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 19 Jul 2020 03:15:36 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:183391 Archived-At: Lars Ingebrigtsen writes: > "Basil L. Contovounesios" 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? Let's change all group names to be fully prefixed everywhere inside Gnus. If we must preserve the "primary-select-method-is-unprefixed" convention, just do it at two places at the edges of the system: when reading/writing .newsrc.eld, and when displaying the group name in the *Group* buffer. The first case is important for backward compatibility, but the second should be dropped as well: provide one format escape for prefixed-group-name and another for unprefixed-group-name, and let the user sort it out. Look at how much code we could remove!