Fix problem with new-mail-mark in Gnus with non-unique names

* lisp/gnus/gnus-group.el (gnus-group-new-mail): Call with Gnus
group name.
(gnus-group-catchup): Ditto.

* lisp/gnus/gnus-sum.el (gnus-summary-exit): Ditto.

* lisp/gnus/nnimap.el (nnimap-update-info): Store Gnus group name.

* lisp/gnus/nnmail.el (nnmail-check-duplication): Store unique
Gnus names in the history instead of backend-specific (possibly
duplicated) group names (bug#41842).
This commit is contained in:
Lars Ingebrigtsen 2020-07-28 00:46:30 +02:00
parent 9903b39148
commit 3bd748ebba
4 changed files with 11 additions and 6 deletions

View file

@ -1768,7 +1768,7 @@ already. If INFO-UNCHANGED is non-nil, dribble buffer is not updated."
(get-text-property (point-at-bol) 'gnus-unread))
(defun gnus-group-new-mail (group)
(if (nnmail-new-mail-p (gnus-group-real-name group))
(if (nnmail-new-mail-p group)
gnus-new-mail-mark
?\s))
@ -3600,7 +3600,7 @@ or nil if no action could be taken."
(marks (gnus-info-marks (nth 1 entry)))
(unread (gnus-sequence-of-unread-articles group)))
;; Remove entries for this group.
(nnmail-purge-split-history (gnus-group-real-name group))
(nnmail-purge-split-history group)
;; Do the updating only if the newsgroup isn't killed.
(if (not (numberp (car entry)))
(gnus-message 1 "Can't catch up %s; non-active group" group)

View file

@ -7311,7 +7311,7 @@ If FORCE (the prefix), also save the .newsrc file(s)."
(when gnus-use-cache
(gnus-cache-write-active))
;; Remove entries for this group.
(nnmail-purge-split-history (gnus-group-real-name group))
(nnmail-purge-split-history group)
;; Make all changes in this group permanent.
(unless quit-config
(gnus-run-hooks 'gnus-exit-group-hook)

View file

@ -1670,8 +1670,7 @@ If LIMIT, first try to limit the search to the N last articles."
(when (and active
recent
(> (car (last recent)) (cdr active)))
(push (list (cons (gnus-group-real-name group) 0))
nnmail-split-history)))
(push (list (cons group 0)) nnmail-split-history)))
;; Note the active level for the next run-through.
(gnus-group-set-parameter info 'active (gnus-active group))
(gnus-group-set-parameter info 'uidvalidity uidvalidity)

View file

@ -1749,7 +1749,13 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
(nreverse (nnmail-article-group artnum-func))))))
;; Add the group-art list to the history list.
(if group-art
(push group-art nnmail-split-history)
;; We need to get the unique Gnus group name for this article
;; -- there may be identically named groups from several
;; backends.
(push (cons (gnus-group-prefixed-name (car group-art)
gnus-command-method)
(cdr group-art))
nnmail-split-history)
(delete-region (point-min) (point-max)))))
;;; Get new mail.