From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/18145 Path: main.gmane.org!not-for-mail From: Kai Grossjohann Newsgroups: gmane.emacs.gnus.general Subject: Re: Do stuff on nnchoke-accept-article? Date: 25 Oct 1998 17:23:41 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035156719 4601 80.91.224.250 (20 Oct 2002 23:31:59 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 23:31:59 +0000 (UTC) Return-Path: Original-Received: from fisher.math.uh.edu (fisher.math.uh.edu [129.7.128.35]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id LAA25129 for ; Sun, 25 Oct 1998 11:24:30 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by fisher.math.uh.edu (8.9.1/8.9.1) with ESMTP id KAB24261; Sun, 25 Oct 1998 10:24:11 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sun, 25 Oct 1998 10:24:00 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [209.195.19.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id KAA08170 for ; Sun, 25 Oct 1998 10:23:51 -0600 (CST) Original-Received: from waldorf.cs.uni-dortmund.de (waldorf.cs.uni-dortmund.de [129.217.4.42]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id LAA25118 for ; Sun, 25 Oct 1998 11:23:49 -0500 (EST) Original-Received: from ramses.informatik.uni-dortmund.de (ramses.cs.uni-dortmund.de [129.217.20.180]) by waldorf.cs.uni-dortmund.de with SMTP id RAA13285 for ; Sun, 25 Oct 1998 17:23:44 +0100 (MET) Original-Received: (grossjoh@localhost) by ramses.informatik.uni-dortmund.de id RAA04151; Sun, 25 Oct 1998 17:23:43 +0100 Original-To: ding@gnus.org In-Reply-To: Lars Magne Ingebrigtsen's message of "17 Oct 1998 23:05:49 +0200" Original-Lines: 35 User-Agent: Gnus/5.070039 (Pterodactyl Gnus v0.39) Emacs/20.3 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:18145 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:18145 >>>>> Lars Magne Ingebrigtsen writes: > Kai Grossjohann writes: > > > Is there a way (a hook) to do stuff whenever an article is entered > > into a group? Be it because it's a new mail, be it from B c or B m or > > B r, no matter. > > I don't think so, but I could add one if you want one. Isn't it so that nnchoke-save-mail gets called every time a message is saved? And apparently (I looked at nnfolder and nnml) nnchoke-save-mail runs nnmail-prepare-save-mail-hook rather early on. > > I'd like to remember the message-id and what group the message was > > written to. > > You couldn't do that with a hook, since there really isn't any > variable that says which group the mail is destined for. > `*-request-accept-article', for instance, uses `group', while > `nnfolder-save-mail' uses the `group-art' cons cell. Well, nnmail-prepare-save-mail-hook appears to be run in nnchoke-save-mail, and nnchoke-save-mail appears to be run from nnchoke-request-accept-article, so all that's needed is consistent naming of the parameters of those functions, then they can be accessed from within the hook, no? (Oh, the wonders of dynamic binding, or extent, or whatever it's really called...) (nnfolder-save-mail takes an argument `group-art-list', whereas nnml-save-mail takes an argument `group-art' -- why?) kai -- Life is hard and then you die.