Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: Hooks for moving an article and for setting it expirable
Date: Mon, 18 Aug 2014 08:03:32 +0800	[thread overview]
Message-ID: <87d2byoe97.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87fvguzxke.fsf@aura.christopherculver.com>

Christopher Culver <crculver@christopherculver.com> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>> Christopher Culver <crculver@christopherculver.com> 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




  reply	other threads:[~2014-08-18  0:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-05 16:26 Christopher Culver
2014-08-07 20:45 ` Adam Sjøgren
2014-08-08  1:59 ` Eric Abrahamsen
2014-08-17 20:10   ` Christopher Culver
2014-08-18  0:03     ` Eric Abrahamsen [this message]
2014-08-18 13:47       ` Christopher Culver
2014-08-18 14:25         ` Eric Abrahamsen
2014-08-18 15:27           ` Christopher Culver
2014-08-18 17:16             ` Christopher Culver
2014-08-19  1:16               ` Eric Abrahamsen
2014-08-20 18:16                 ` Christopher Culver
2014-08-24  3:22                   ` Eric Abrahamsen
2014-08-26 23:50                     ` Christopher Culver
2014-08-27  2:07                       ` Eric Abrahamsen

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=87d2byoe97.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --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).