From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/84765 Path: news.gmane.org!not-for-mail From: Alan Schmitt Newsgroups: gmane.emacs.gnus.general Subject: Re: [Patch] tell expiry-hook functions where expired messages are going Date: Mon, 11 Aug 2014 16:07:23 +0200 Message-ID: References: <877g2w3596.fsf@ericabrahamsen.net> <871tsurooq.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1407766121 21273 80.91.229.3 (11 Aug 2014 14:08:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Aug 2014 14:08:41 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M33008@lists.math.uh.edu Mon Aug 11 16:08:33 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 1XGqH2-0006Ql-RH for ding-account@gmane.org; Mon, 11 Aug 2014 16:08:33 +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 1XGqGN-0005vZ-9t; Mon, 11 Aug 2014 09:07:51 -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 1XGqGL-0005vR-Uy for ding@lists.math.uh.edu; Mon, 11 Aug 2014 09:07:49 -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 1XGqGG-0005GZ-GB for ding@lists.math.uh.edu; Mon, 11 Aug 2014 09:07:47 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1XGqGE-0002gk-GG for ding@gnus.org; Mon, 11 Aug 2014 16:07:42 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XGqGE-00060J-5n for ding@gnus.org; Mon, 11 Aug 2014 16:07:42 +0200 Original-Received: from cbg35-2-78-242-14-140.fbx.proxad.net ([78.242.14.140]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Aug 2014 16:07:42 +0200 Original-Received: from alan.schmitt by cbg35-2-78-242-14-140.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Aug 2014 16:07:42 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 109 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: cbg35-2-78-242-14-140.fbx.proxad.net User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.3 (darwin) Cancel-Lock: sha1:34lVxoZcOLcSpZohkjuLfbeY+Q8= X-Spam-Score: -3.6 (---) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:84765 Archived-At: --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hello, On 2014-08-06 20:14, Katsumi Yamaoka 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Tell-expiry-hook-functions-where-the-message-is-goin.patch Content-Transfer-Encoding: quoted-printable From=20d79800074d63ff4242402ff7f7af7b2c9afdc6eb Mon Sep 17 00:00:00 2001 From: Alan Schmitt 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. =2D-- 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 =2D-- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -10444,13 +10444,18 @@ This will be the case if the article has both bee= n mailed and posted." (when (and (not (memq article es)) (gnus-data-find article)) (gnus-summary-mark-article article gnus-canceled-mark) =2D (run-hook-with-args 'gnus-summary-article-expire-hook =2D 'delete =2D (gnus-data-header =2D (assoc article (gnus-data-list nil))) =2D gnus-newsgroup-name =2D nil =2D 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"))))) =20 (defun gnus-summary-expire-articles-now () =2D-=20 2.0.3 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBCgAGBQJT6M4gAAoJEAQNCjtO0uXHt/YH/ReXWyPcENy9U7bNYPSKEJb4 BzbfTctCnsxPiS0snBPnzOX65nDlNfTKvDqoAq5xl4Bh9n02VQz/5XOcbJE085tk RBEbd92UUjvXNut2vwR9kXt9dnvGcgbH5WOc1aeeYQWVK3H6053KaRwK2V0WfMOv 8/G3l83z7eyckknmmtyFpM5iBbzepem2xf4zCvM1KKRtDo7tUN2/5Ux4e/TydzZt 3O/pR60J5ahMNMjS9RHMGEAs2o9Xh797r4CPGafsHIw4Nxe1nQN5WmI+vLmMVPWK J1b89P9j21l6RYg2rTiJDSRMAYx29vmmcr8iWJb0yQa3OAU9PvCBJmvsI9j135Y= =XuLY -----END PGP SIGNATURE----- --==-=-=--