From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/69119 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Modify hook in group parameters? Date: Wed, 14 Oct 2009 07:47:35 +0900 Organization: Emacsen advocacy group Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1255474177 13223 80.91.229.12 (13 Oct 2009 22:49:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Oct 2009 22:49:37 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M17532@lists.math.uh.edu Wed Oct 14 00:49:26 2009 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1MxqBH-000738-Bi for ding-account@gmane.org; Wed, 14 Oct 2009 00:49:23 +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 1MxqAD-0003RX-Q9; Tue, 13 Oct 2009 17:48:17 -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 1MxqAC-0003RM-7C for ding@lists.math.uh.edu; Tue, 13 Oct 2009 17:48:16 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1MxqAA-0005yj-Q3 for ding@lists.math.uh.edu; Tue, 13 Oct 2009 17:48:16 -0500 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1MxqAA-0004F4-00 for ; Wed, 14 Oct 2009 00:48:14 +0200 Original-Received: from localhost ([127.0.0.1]:59151) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1Mxq9K-0007zl-Ve for ding@gnus.org; Tue, 13 Oct 2009 17:47:23 -0500 X-Hashcash: 1:20:091013:ding@gnus.org::9umSx8atml1h2phj:00003q80 X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:XM6dQafmtjZQ2MED/d7l6eALWG4= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -1.5 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:69119 Archived-At: >>>>> Steinar Bang wrote: > Is it possible to modify a hook in group parameters? > Specifically, I would like to do > (add-hook 'gnus-summary-prepare-exit-hook 'gnus-summary-expire-articles) > for a limited set of nnimap groups (two, actually). > But I don't want gnus-summary-expire-articles done on exit for any other > groups, because that could potentially take too much time. > Is there any other way of accomplish this? I don't know why it takes too much time though. This will work: (setq gnus-summary-prepare-exit-hook nil) (add-to-list 'gnus-parameters '("\\`nnimap[+:]" (gnus-summary-prepare-exit-hook '(gnus-summary-expire-articles t)))) This makes `gnus-summary-prepare-exit-hook' buffer-local in the summary buffer for only the nnimap groups. `t' there means to run the global part of the hook, so you can use `add-hook' as usual to add functions that run for any groups.