Gnus development mailing list
 help / color / mirror / Atom feed
From: Kai Grossjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
Subject: Re: Do stuff on nnchoke-accept-article?
Date: 25 Oct 1998 17:23:41 +0100	[thread overview]
Message-ID: <vafu30swqya.fsf@ramses.cs.uni-dortmund.de> (raw)
In-Reply-To: Lars Magne Ingebrigtsen's message of "17 Oct 1998 23:05:49 +0200"

>>>>> Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

  > Kai Grossjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> 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.


  parent reply	other threads:[~1998-10-25 16:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-14 21:27 Kai Grossjohann
1998-10-14 21:28 ` Kai Grossjohann
1998-10-17 21:05 ` Lars Magne Ingebrigtsen
1998-10-19 19:53   ` Kai Grossjohann
1998-10-19 20:12     ` Lars Magne Ingebrigtsen
1998-10-20 11:30       ` Kai Grossjohann
1998-10-25 16:23   ` Kai Grossjohann [this message]
1998-10-25 16:28     ` Kai Grossjohann
1998-10-25 17:07       ` Lars Magne Ingebrigtsen
1998-10-25 17:08     ` Lars Magne Ingebrigtsen
1998-10-25 16:36 ` Kai Grossjohann
1998-10-26  2:44   ` Lars Magne Ingebrigtsen

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=vafu30swqya.fsf@ramses.cs.uni-dortmund.de \
    --to=kai.grossjohann@cs.uni-dortmund.de \
    /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).