Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: auto auto-expirable
Date: Fri, 29 May 2009 20:19:15 +0900	[thread overview]
Message-ID: <b4mtz34tavg.fsf@jpl.org> (raw)

[-- 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))))
 

             reply	other threads:[~2009-05-29 11:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-29 11:19 Katsumi Yamaoka [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4mtz34tavg.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).