[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reappearing marks--a clue!



Mark Plaksin <happy@arches.uga.edu> writes:

> > > I think I've discovered why certain marks reappear.
> > 
> > A wonderful bug report, Thanks!  Could you try this patch?
> 
> A wonderful patch--thanks! :)  It works great!  Yay!
> 
> It didn't apply cleanly to pgnus 0.83; a patch against that is
> below.

I couldn't see any difference between our patches so I guess we could
blame the -w flag to diff.

> Will you ship it off to Lars?

Yup.

This is the final version, the previous added superflous empty stuff
into the group info. Also without the -w flag.

1999-04-22  Simon Josefsson  <jas@pdc.kth.se>

	* gnus-sum.el (gnus-update-marks): Process null mark lists.

--- gnus-sum.el-	Thu Apr 22 20:55:58 1999
+++ gnus-sum.el	Thu Apr 22 22:22:58 1999
@@ -4264,13 +4264,14 @@
 	(uncompressed '(score bookmark killed))
 	type list newmarked symbol delta-marks)
     (when info
-      ;; Add all marks lists that are non-nil to the list of marks lists.
+      ;; Add all marks lists to the list of marks lists.
       (while (setq type (pop types))
-	(when (setq list (symbol-value
-			  (setq symbol
-				(intern (format "gnus-newsgroup-%s"
-						(car type))))))
+	(setq list (symbol-value
+		    (setq symbol
+			  (intern (format "gnus-newsgroup-%s"
+					  (car type))))))
 
+	(when list
 	  ;; Get rid of the entries of the articles that have the
 	  ;; default score.
 	  (when (and (eq (cdr type) 'score)
@@ -4287,25 +4288,25 @@
 		(setq arts (cdr arts)))
 	      (setq list (cdr all))))
 
-	  (when (gnus-check-backend-function 'request-set-mark
-					     gnus-newsgroup-name)
-	    ;; uncompressed:s are not proper flags (they are cons cells)
-	    ;; cache is a internal gnus flag
-	    (unless (memq (cdr type) (cons 'cache uncompressed))
-	      (let* ((old (cdr (assq (cdr type) (gnus-info-marks info))))
-		     (list (gnus-compress-sequence (sort list '<)))
-		     (del (gnus-remove-from-range old list))
-		     (add (gnus-remove-from-range list old)))
-		(if add
-		    (push (list add 'add (list (cdr type))) delta-marks))
-		(if del
-		    (push (list del 'del (list (cdr type))) delta-marks)))))
-	  
 	  (push (cons (cdr type)
 		      (if (memq (cdr type) uncompressed) list
 			(gnus-compress-sequence
 			 (set symbol (sort list '<)) t)))
-		newmarked)))
+		newmarked))
+	
+	(when (gnus-check-backend-function 'request-set-mark
+					   gnus-newsgroup-name)
+	  ;; uncompressed:s are not proper flags (they are cons cells)
+	  ;; cache is a internal gnus flag
+	  (unless (memq (cdr type) (cons 'cache uncompressed))
+	    (let* ((old (cdr (assq (cdr type) (gnus-info-marks info))))
+		   (list (gnus-compress-sequence (sort list '<)))
+		   (del (gnus-remove-from-range old list))
+		   (add (gnus-remove-from-range list old)))
+	      (if add
+		  (push (list add 'add (list (cdr type))) delta-marks))
+	      (if del
+		  (push (list del 'del (list (cdr type))) delta-marks))))))
 
       (when delta-marks
 	(unless (gnus-check-group gnus-newsgroup-name)