Fix moving unticked messages between IMAP groups
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 25 Dec 2012 11:26:32 +0000 (12:26 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 25 Dec 2012 11:26:32 +0000 (12:26 +0100)
* gnus-sum.el (gnus-summary-push-marks-to-backend): Push the complete
mark state when moving articles.  Otherwise unticked articles will get
their ticks back after moving.

lisp/ChangeLog
lisp/gnus-sum.el

index 93e06eb..69558f9 100644 (file)
@@ -1,3 +1,9 @@
+2012-12-25  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-sum.el (gnus-summary-push-marks-to-backend): Push the complete
+       mark state when moving articles.  Otherwise unticked articles will get
+       their ticks back after moving.
+
 2012-12-24  Lars Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-srvr.el (gnus-browse-delete-group): Fix syntax error.
index 91f369b..744afdb 100644 (file)
@@ -10135,17 +10135,20 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
 
 (defun gnus-summary-push-marks-to-backend (article)
   (let ((set nil)
+       (del nil)
        (marks gnus-article-mark-lists))
     (unless (memq article gnus-newsgroup-unreads)
       (push 'read set))
     (while marks
-      (when (and (eq (gnus-article-mark-to-type (cdar marks)) 'list)
-                (memq article (symbol-value
-                               (intern (format "gnus-newsgroup-%s"
-                                               (caar marks))))))
-       (push (cdar marks) set))
+      (if (and (eq (gnus-article-mark-to-type (cdar marks)) 'list)
+              (memq article (symbol-value
+                             (intern (format "gnus-newsgroup-%s"
+                                             (caar marks))))))
+         (push (cdar marks) set)
+       (push (cdar marks) del))
       (pop marks))
-    (gnus-request-set-mark gnus-newsgroup-name `(((,article) set ,set)))))
+    (gnus-request-set-mark gnus-newsgroup-name `(((,article) set ,set)
+                                                ((,article) del ,del)))))
 
 (defun gnus-summary-copy-article (&optional n to-newsgroup select-method)
   "Copy the current article to some other group.