Gnus development mailing list
 help / color / mirror / Atom feed
* auto auto-expirable
@ 2009-05-29 11:19 Katsumi Yamaoka
  2009-05-29 12:08 ` Didier Verna
  2009-06-01  3:36 ` Mike Kupfer
  0 siblings, 2 replies; 14+ messages in thread
From: Katsumi Yamaoka @ 2009-05-29 11:19 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 742 bytes --]

The expirable mark of a read article if any is stripped when it
is copied or moved to the group in which to do not automatically
mark read articles as expirable.  That is good.

However, it will not be marked as expirable when copying or moving
a read article (that has not been marked as expirable) to the group
in which to automatically mark read articles as expirable.  So,
such an article will never be expired unless it is read.  Actually
I have a number of such articles in the auto-expirable groups.

The attached patch solves it, i.e., read articles copied or moved
to auto-expirable group are automatically marked as expirable.
Does anyone see any harm with this change?   Though I will not
commit it until the next release anyway.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1134 bytes --]

--- gnus-sum.el~	2009-02-05 09:09:28 +0000
+++ gnus-sum.el	2009-05-29 09:45:03 +0000
@@ -9753,10 +9753,8 @@
 				       (list (cdr art-group)))))
 
 	    ;; See whether the article is to be put in the cache.
-	    (let ((marks (if (gnus-group-auto-expirable-p to-group)
-			     gnus-article-mark-lists
-			   (delete '(expirable . expire)
-				   (copy-sequence gnus-article-mark-lists))))
+	    (let ((marks (delete '(expirable . expire)
+				 (copy-sequence gnus-article-mark-lists)))
 		  (to-article (cdr art-group)))
 
 	      ;; Enter the article into the cache in the new group,
@@ -9796,6 +9794,15 @@
 		       to-group (cdar marks) (list to-article) info)))
 		  (setq marks (cdr marks)))
 
+		(when (gnus-group-auto-expirable-p to-group)
+		  ;; Mark this article as expirable
+		  (push 'expire to-marks)
+		  (when (equal to-group gnus-newsgroup-name)
+		    (push to-article gnus-newsgroup-expirable))
+		  ;; Copy the expirable mark to other group.
+		  (gnus-add-marked-articles
+		   to-group 'expire (list to-article) info))
+
 		(gnus-request-set-mark
 		 to-group (list (list (list to-article) 'add to-marks))))
 

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2009-08-12  8:28 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-29 11:19 auto auto-expirable Katsumi Yamaoka
2009-05-29 12:08 ` Didier Verna
2009-06-01  3:36 ` Mike Kupfer
2009-06-01  8:35   ` Didier Verna
2009-06-01 11:20     ` Katsumi Yamaoka
2009-06-01 12:47       ` Tim Landscheidt
2009-06-02  2:23       ` Mike Kupfer
2009-06-02 11:12         ` Katsumi Yamaoka
2009-06-02 11:38           ` Katsumi Yamaoka
2009-06-04  4:13           ` Mike Kupfer
2009-06-13 14:22           ` Tim Landscheidt
2009-08-12  8:28             ` Katsumi Yamaoka
2009-06-02 17:34         ` Reiner Steib
2009-06-05 12:34       ` Greg Troxel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).