Protect against backends (i.e., nnimap) returning nil as the article number.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 22 Jan 2011 19:53:12 +0000 (20:53 +0100)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 22 Jan 2011 19:53:12 +0000 (20:53 +0100)
lisp/ChangeLog
lisp/gnus-sum.el

index 7b615cd..53a0071 100644 (file)
@@ -1,3 +1,8 @@
+2011-01-22  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-sum.el (gnus-summary-move-article): Protect against backends
+       (i.e., nnimap) returning nil as the article number.
+
 2011-01-22  Kazuhiro Ito  <kzhr@d1.dion.ne.jp>
 
        * flow-fill.el (fill-flowed): Make `delete-space' option correspond to
index 2d9986c..101396c 100644 (file)
@@ -9836,7 +9836,8 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
            (unless (member to-group to-groups)
              (push to-group to-groups))
 
-           (unless (memq article gnus-newsgroup-unreads)
+           (when (and (not (memq article gnus-newsgroup-unreads))
+                      (cdr art-group))
              (push 'read to-marks)
              (gnus-info-set-read
               info (gnus-add-to-range (gnus-info-read info)
@@ -9853,14 +9854,16 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
 
              ;; Enter the article into the cache in the new group,
              ;; if that is required.
-             (when gnus-use-cache
+             (when (and to-article
+                        gnus-use-cache)
                (gnus-cache-possibly-enter-article
                 to-group to-article
                 (memq article gnus-newsgroup-marked)
                 (memq article gnus-newsgroup-dormant)
                 (memq article gnus-newsgroup-unreads)))
 
-             (when gnus-preserve-marks
+             (when (and gnus-preserve-marks
+                        to-article)
                ;; Copy any marks over to the new group.
                (when (and (equal to-group gnus-newsgroup-name)
                           (not (memq article gnus-newsgroup-unreads)))