From 0096f165f4beeb69a01302e716cbdd9c9b2c301e Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sat, 22 Jan 2011 20:53:12 +0100 Subject: [PATCH] Protect against backends (i.e., nnimap) returning nil as the article number. --- lisp/ChangeLog | 5 +++++ lisp/gnus-sum.el | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7b615cdcf..53a007159 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-01-22 Lars Ingebrigtsen + + * gnus-sum.el (gnus-summary-move-article): Protect against backends + (i.e., nnimap) returning nil as the article number. + 2011-01-22 Kazuhiro Ito * flow-fill.el (fill-flowed): Make `delete-space' option correspond to diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 2d9986cac..101396c88 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -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))) -- 2.11.4.GIT