From: Lars Ingebrigtsen Date: Thu, 26 Sep 2019 23:14:01 +0000 (+0200) Subject: Tweak updating of readedness marks on the IMAP server X-Git-Tag: emacs-27.0.90~1411 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ff8a72fbe0f6e168e2871a53bbdaded4d0cc5612;p=emacs.git 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). --- 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.