]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix problem with new-mail-mark in Gnus with non-unique names
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 27 Jul 2020 22:46:30 +0000 (00:46 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 27 Jul 2020 22:46:37 +0000 (00:46 +0200)
* 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).

lisp/gnus/gnus-group.el
lisp/gnus/gnus-sum.el
lisp/gnus/nnimap.el
lisp/gnus/nnmail.el

index b207c4f1e068e8cf49bbbe0d392c44b08438db77..97e10a37a21b3051b7bb6f6f95c18f2755127994 100644 (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)
index d731893ecec8f6da2e8f3b782294705a6d12db97..c1216a0cc24495e653279f8a68220a035a0adfc8 100644 (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)
index 3c4e75ede8215918c769382c916479a298eaab94..be8ad9a67232d7c8ce1c8a9b05b89c5d8722b676 100644 (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)
index 3be843c91f15a5e22b6b5ac5167bb4727557e43b..729f8e347c7e32e04ee9a18311dc838b1d34bce6 100644 (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.