From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Cc: Lars Ingebrigtsen <larsi@gnus.org>
Subject: [Patch] tell expiry-hook functions where expired messages are going
Date: Tue, 29 Jul 2014 17:04:37 +0800 [thread overview]
Message-ID: <877g2w3596.fsf@ericabrahamsen.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 618 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Tell-expiry-hook-functions-where-the-message-is-goin.patch --]
[-- Type: text/x-diff, Size: 1075 bytes --]
From d89d596301fae28f94ce2370b7affe8719361ce3 Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen <eric@ericabrahamsen.net>
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
next reply other threads:[~2014-07-29 9:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 9:04 Eric Abrahamsen [this message]
2014-08-06 8:06 ` Alan Schmitt
2014-08-06 8:45 ` Eric Abrahamsen
2014-08-06 11:00 ` Katsumi Yamaoka
2014-08-06 11:14 ` Katsumi Yamaoka
2014-08-06 16:22 ` Eric Abrahamsen
2014-08-11 14:07 ` Alan Schmitt
2014-08-14 7:42 ` Eric Abrahamsen
2014-08-14 11:30 ` Katsumi Yamaoka
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=877g2w3596.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=ding@gnus.org \
--cc=larsi@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).