From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: ding@gnus.org
Subject: Re: [Patch] tell expiry-hook functions where expired messages are going
Date: Mon, 11 Aug 2014 16:07:23 +0200 [thread overview]
Message-ID: <m2ha1jf7c4.fsf@polytechnique.org> (raw)
In-Reply-To: <b4msil927lj.fsf@jpl.org>
[-- Attachment #1.1: Type: text/plain, Size: 673 bytes --]
Hello,
On 2014-08-06 20:14, Katsumi Yamaoka <yamaoka@jpl.org> writes:
> I've reverted the change in the Gnus git master and the Emacs trunk.
> Please reinstall the feature if you get a good solution. I have
> no idea for it so far, sorry.
Here is an adaptation of Eric's patch that takes these problems into
account. As the target is either a string, the 'delete symbol, or
a function, I test those in turn. In the case it's a function, the
result from the call should be either a string or a 'delete symbol or
a string. In the case it's a 'delete symbole, the hook is called with
'nil' as target.
Eric: I reused your log message, I hope you don't mind.
Best,
Alan
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-Tell-expiry-hook-functions-where-the-message-is-goin.patch --]
[-- Type: text/x-patch, Size: 1710 bytes --]
From d79800074d63ff4242402ff7f7af7b2c9afdc6eb Mon Sep 17 00:00:00 2001
From: Alan Schmitt <alan.schmitt@polytechnique.org>
Date: Mon, 11 Aug 2014 16:01:06 +0200
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 | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el
index c0e099b..d54fe91 100644
--- a/lisp/gnus-sum.el
+++ b/lisp/gnus-sum.el
@@ -10444,13 +10444,18 @@ This will be the case if the article has both been mailed and posted."
(when (and (not (memq article es))
(gnus-data-find article))
(gnus-summary-mark-article article gnus-canceled-mark)
- (run-hook-with-args 'gnus-summary-article-expire-hook
- 'delete
- (gnus-data-header
- (assoc article (gnus-data-list nil)))
- gnus-newsgroup-name
- nil
- nil)))))))
+ (run-hook-with-args
+ 'gnus-summary-article-expire-hook
+ 'delete
+ (gnus-data-header (assoc article (gnus-data-list nil)))
+ gnus-newsgroup-name
+ (cond
+ ((stringp nnmail-expiry-target) nnmail-expiry-target)
+ ((eq nnmail-expiry-target 'delete) nil)
+ (t
+ (let ((rescall (funcall nnmail-expiry-target gnus-newsgroup-name)))
+ (if (stringp rescall) rescall nil))))
+ nil)))))))
(gnus-message 6 "Expiring articles...done")))))
(defun gnus-summary-expire-articles-now ()
--
2.0.3
[-- Attachment #1.3: Type: text/plain, Size: 44 bytes --]
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]
next prev parent reply other threads:[~2014-08-11 14:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 9:04 Eric Abrahamsen
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 [this message]
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=m2ha1jf7c4.fsf@polytechnique.org \
--to=alan.schmitt@polytechnique.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).