unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: "Basil L. Contovounesios" <contovob@tcd.ie>, 41842@debbugs.gnu.org
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	[thread overview]
Message-ID: <87eep3tgio.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87h7u4wbif.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 19 Jul 2020 03:15:36 +0200")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> "Basil L. Contovounesios" <contovob@tcd.ie> 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!





  reply	other threads:[~2020-07-22 20:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-13 23:14 bug#41842: 28.0.50; gnus-new-mail-mark is applied to too many groups Basil L. Contovounesios
2020-07-19  1:15 ` Lars Ingebrigtsen
2020-07-22 20:57   ` Eric Abrahamsen [this message]
2020-07-23 13:51     ` Lars Ingebrigtsen
2020-07-23 17:00       ` Eric Abrahamsen
2020-07-27 22:35   ` Lars Ingebrigtsen
2020-07-27 22:47     ` Lars Ingebrigtsen
2020-07-28 10:32       ` Basil L. Contovounesios

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eep3tgio.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=41842@debbugs.gnu.org \
    --cc=contovob@tcd.ie \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).