From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/84718 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: [Patch] tell expiry-hook functions where expired messages are going Date: Tue, 29 Jul 2014 17:04:37 +0800 Message-ID: <877g2w3596.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1406624781 17016 80.91.229.3 (29 Jul 2014 09:06:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Jul 2014 09:06:21 +0000 (UTC) Cc: Lars Ingebrigtsen To: ding@gnus.org Original-X-From: ding-owner+M32961@lists.math.uh.edu Tue Jul 29 11:06:13 2014 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XC3MK-0001en-EC for ding-account@gmane.org; Tue, 29 Jul 2014 11:06:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1XC3L7-0007oR-Ih; Tue, 29 Jul 2014 04:04:57 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1XC3L5-0007oI-Sl for ding@lists.math.uh.edu; Tue, 29 Jul 2014 04:04:55 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1XC3L4-0004xU-9g for ding@lists.math.uh.edu; Tue, 29 Jul 2014 04:04:55 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1XC3L2-00054p-BD for ding@gnus.org; Tue, 29 Jul 2014 11:04:52 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XC3L0-00013r-Fs for ding@gnus.org; Tue, 29 Jul 2014 11:04:50 +0200 Original-Received: from 111.197.159.241 ([111.197.159.241]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Jul 2014 11:04:50 +0200 Original-Received: from eric by 111.197.159.241 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Jul 2014 11:04:50 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 57 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 111.197.159.241 User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux) Cancel-Lock: sha1:gA7EcAhJiMJqFDX2UeiDJNJ2LR4= X-Spam-Score: -0.7 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:84718 Archived-At: --=-=-= Content-Type: text/plain This patch lets functions registered in the `summary-article-expire-hook' know which group the expired articles are going to. In particular this is useful for the registry: if people are using expiration to move articles to a different group, rather than deleting them, the registry should know where they've gone. If nnmail-expiry-target is a function, this will still work, but not quite as the docstring says: the hook function is given the from-group as an argument, but is *not* called in a buffer narrowed to the message, as it says. That would be hard to do, though, and this seems better than nothing. Eric --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Tell-expiry-hook-functions-where-the-message-is-goin.patch >From d89d596301fae28f94ce2370b7affe8719361ce3 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Tue, 29 Jul 2014 16:53:09 +0800 Subject: [PATCH] Tell expiry-hook functions where the message is going * lisp/gnus-sum.el (gnus-summary-expire-articles): functions registered to the gnus-summary-article-expire-hook should be told where the function is going. In particular, the gnus registry might want to know. --- lisp/gnus-sum.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index c0e099b..4f061cd 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -10449,7 +10449,10 @@ This will be the case if the article has both been mailed and posted." (gnus-data-header (assoc article (gnus-data-list nil))) gnus-newsgroup-name - nil + (if (fboundp nnmail-expiry-target) + (funcall nnmail-expiry-target + gnus-newsgroup-name) + nnmail-expiry-target) nil))))))) (gnus-message 6 "Expiring articles...done"))))) -- 2.0.3 --=-=-=--