Gnus development mailing list
 help / color / mirror / Atom feed
* what's available in fancy-split functions?
@ 2001-04-25 22:43 Josh Huber
  2001-04-26  6:20 ` Kai Großjohann
  0 siblings, 1 reply; 3+ messages in thread
From: Josh Huber @ 2001-04-25 22:43 UTC (permalink / raw)


I can't seem to find any documentation mentioning what kind of data is
available to a function called with a fancy-split rule.  I'd like to
do some special sorting on incoming messages, with the form like:

(: my-gnus-filter "mail.junk")

I'm passing in the group which will be returned in certain cases.

Does my function have access to the whole message?

can I:

(save-restriction
  (widen)
  ...

I guess on the same topic, does gnus have functions for extracting
particular headers from a message for use in custom user functions?

Thanks for the help,

-- 
Josh Huber


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: what's available in fancy-split functions?
  2001-04-25 22:43 what's available in fancy-split functions? Josh Huber
@ 2001-04-26  6:20 ` Kai Großjohann
  2001-04-26 20:40   ` Josh Huber
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Großjohann @ 2001-04-26  6:20 UTC (permalink / raw)


On 25 Apr 2001, Josh Huber wrote:

> I can't seem to find any documentation mentioning what kind of data
> is available to a function called with a fancy-split rule.

Note the following paragraph in the documentation for
nnmail-split-methods:

/----
| The second element can also be a function.  In that case, it will be
| called narrowed to the headers with the first element of the rule as
| the argument.  It should return a non-nil value if it thinks that the
| mail belongs in that group.
\----

Sadly, it's not made explicit that this also applies to
nnmail-split-fancy.

But the documentation for nnmail-split-fancy (the variable) does
mention that functions called via `:' are called ``in a buffer
containing the message headers''.

> I'd like to do some special sorting on incoming messages, with the
> form like:
> 
> (: my-gnus-filter "mail.junk")
> 
> I'm passing in the group which will be returned in certain cases.
> 
> Does my function have access to the whole message?
> 
> can I:
> 
> (save-restriction
>   (widen)
>   ...

Yes, this has been suggested a couple of weeks ago.

> I guess on the same topic, does gnus have functions for extracting
> particular headers from a message for use in custom user functions?

message-fetch-field?

kai
-- 
The passive voice should never be used.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: what's available in fancy-split functions?
  2001-04-26  6:20 ` Kai Großjohann
@ 2001-04-26 20:40   ` Josh Huber
  0 siblings, 0 replies; 3+ messages in thread
From: Josh Huber @ 2001-04-26 20:40 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> > (save-restriction
> >   (widen)
> >   ...
> 
> Yes, this has been suggested a couple of weeks ago.

Yes, I just noticed that right after I posted my original
question. (oops!)

> message-fetch-field?

Thanks, this is just what I was looking for.

-- 
Josh Huber


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-04-26 20:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-25 22:43 what's available in fancy-split functions? Josh Huber
2001-04-26  6:20 ` Kai Großjohann
2001-04-26 20:40   ` Josh Huber

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).