From ff8a72fbe0f6e168e2871a53bbdaded4d0cc5612 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 27 Sep 2019 01:14:01 +0200 Subject: [PATCH] Tweak updating of readedness marks on the IMAP server * lisp/gnus/nnimap.el (nnimap-request-set-mark): Ensure that ticking/unticking also toggles readedness on the IMAP server (bug#22590). --- lisp/gnus/nnimap.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 6f2ebfb7fe6..363e4186cbc 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -1163,6 +1163,12 @@ If LIMIT, first try to limit the search to the N last articles." ;; response. If they're successful, they're successful. (dolist (action actions) (cl-destructuring-bind (range action marks) action + ;; If we add/remove a tick mark, then do the same with the + ;; readedness mark on the IMAP server. Other IMAP clients + ;; can have marked messages without having them read, but + ;; Gnus can't. + (when (memq 'tick marks) + (push 'read marks)) (let ((flags (nnimap-marks-to-flags marks))) (when flags (setq sequence (nnimap-send-command @@ -1492,8 +1498,9 @@ If LIMIT, first try to limit the search to the N last articles." (defun nnimap-update-info (info marks) (cl-destructuring-bind (existing flags high low uidnext start-article - permanent-flags uidvalidity - vanished highestmodseq) marks + permanent-flags uidvalidity + vanished highestmodseq) + marks (cond ;; Ignore groups with no UIDNEXT/marks. This happens for ;; completely empty groups. -- 2.39.2