From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/84788 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: Hooks for moving an article and for setting it expirable Date: Mon, 18 Aug 2014 08:03:32 +0800 Message-ID: <87d2byoe97.fsf@ericabrahamsen.net> References: <87silaykb6.fsf@aura.christopherculver.com> <87mwbflp13.fsf@ericabrahamsen.net> <87fvguzxke.fsf@aura.christopherculver.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1408320041 6331 80.91.229.3 (18 Aug 2014 00:00:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Aug 2014 00:00:41 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M33031@lists.math.uh.edu Mon Aug 18 02:00: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 1XJAND-0003Kp-Vr for ding-account@gmane.org; Mon, 18 Aug 2014 02:00:32 +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 1XJAMH-0003wR-Qj; Sun, 17 Aug 2014 18:59:33 -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 1XJAMF-0003wB-Vb for ding@lists.math.uh.edu; Sun, 17 Aug 2014 18:59:31 -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 1XJAME-0004fO-Ko for ding@lists.math.uh.edu; Sun, 17 Aug 2014 18:59:31 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1XJAMC-0004JH-4w for ding@gnus.org; Mon, 18 Aug 2014 01:59:28 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XJAM9-0002mR-34 for ding@gnus.org; Mon, 18 Aug 2014 01:59:25 +0200 Original-Received: from 101.229.137.29 ([101.229.137.29]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 18 Aug 2014 01:59:25 +0200 Original-Received: from eric by 101.229.137.29 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 18 Aug 2014 01:59:25 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 101.229.137.29 User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux) Cancel-Lock: sha1:Ygc63VVGjTCBKVUL2/X0mhCDqx4= X-Spam-Score: -0.7 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:84788 Archived-At: Christopher Culver writes: > Eric Abrahamsen writes: >> Christopher Culver writes: >>> I’ve had a look at the "Function Hooks" chapter in the Gnus manual, but >>> I cannot find an appropriate hook for when an article is moved or when >>> it is marked expirable. Do such hooks exist? >> >> gnus-summary-article-move-hook >> gnus-summary-article-expire-hook > > Thanks, it is very strange that there is no mention of this in the > officially hosted Gnus manual. But when you attach a function to > these hooks, what arguments exactly is the function called with? Hmm, it is a little unfortunate that the docstrings of those hooks don't say... Both of them are called with the same arguments: ACTION (which can be a symbol like move, delete, crosspost, or copy), DATA (which is the header data as returned by `gnus-data-header'), FROM-GROUP (where the article's coming from), TO-GROUP (where it's going), and SELECT-METHOD, for the current select method. See, for example, the body of `gnus-summary-move-article' for both the move hook and the delete hook in action. Hope that helps, Eric