]> git.eshelyaron.com Git - emacs.git/commitdiff
Tweak updating of readedness marks on the IMAP server
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 26 Sep 2019 23:14:01 +0000 (01:14 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 26 Sep 2019 23:14:06 +0000 (01:14 +0200)
* 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

index 6f2ebfb7fe69e03a52cbb65292fc28556ceb86dc..363e4186cbc9f10e96345d32c31767d2c0c94b94 100644 (file)
@@ -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.