Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Subject: Re: Modify hook in group parameters?
Date: Tue, 13 Oct 2009 14:23:12 -0500	[thread overview]
Message-ID: <8763ajp07z.fsf@lifelogs.com> (raw)
In-Reply-To: <m363ajwbul.fsf@dod.no>

On Tue, 13 Oct 2009 17:30:10 +0200 Steinar Bang <sb@dod.no> wrote: 

SB> Is it possible to modify a hook in group parameters?
SB> Specifically, I would like to do
SB>  (add-hook 'gnus-summary-prepare-exit-hook 'gnus-summary-expire-articles)
SB> for a limited set of nnimap groups (two, actually).

SB> But I don't want gnus-summary-expire-articles done on exit for any other
SB> groups, because that could potentially take too much time.

SB> Is there any other way of accomplish this?

Not currently.  I do this in a global hook, checking gnus-newsgroup-name
to see if I'm in the right group.

I think it would make sense to have

(add-gnus-conditional-hook 'test-function-or-string 'hook-name 'function-to-run)

to do what you're looking for.  I'd use it :)

Ted




  parent reply	other threads:[~2009-10-13 19:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-13 15:30 Steinar Bang
2009-10-13 17:57 ` Reiner Steib
2009-10-13 19:23 ` Ted Zlatanov [this message]
2009-10-13 22:47 ` Katsumi Yamaoka
2009-10-14 11:18   ` Steinar Bang
2009-10-14 22:44     ` 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=8763ajp07z.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --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).