Gnus development mailing list
 help / color / mirror / Atom feed
* Fetching Article Headers
@ 2003-04-26  1:31 Taso N. Devetzis
  2003-04-27  3:40 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Taso N. Devetzis @ 2003-04-26  1:31 UTC (permalink / raw)


Greetings,

I have written some hooks to snarf and examine article headers (for
mail back-ends -- I am using nnml if it matters), but I have a couple
of questions regarding the available functions and their behaviour.

I can find the headers easily enough as follows:

(defun blat-find-header (hdr)
  (gnus-with-article-headers
    (message-fetch-field hdr)))

This function, however, requires the headers in question to be visible
(since it uses *gnus-article-buffer*, I presume).  I have had similar
results with manually (or using some of the built-ins) searching via
*gnus-parse-headers-hook* (wrong concept altogether on my part) and
*nnmail-prepare-incoming-header-hook* (same deal).  The hooks and
functions (such as the *gnus-with-article-headers* macro) that rely on
the article buffer will also not work unless the article is selected
(and *gnus-article-buffer* is therefore current).

*gnus-alter-header-function* seems promising, but I am not convinced
that this is its Intended Purpose.

I know enough about gnus to be a danger to myself and others, so I
would ask your indulgence in pointing me in the right direction to
examine (all of) the article headers (for mail back-ends), regardless
of whether or not the article is selected (you know, cruise through
them in Summary mode).  I understand that I may have to manually
select the article and parse the headers, but I want to make sure I am
not missing an obvious hook.  Nothing in the docs springs out at me.

Thanks.

/taso



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

* Re: Fetching Article Headers
  2003-04-26  1:31 Fetching Article Headers Taso N. Devetzis
@ 2003-04-27  3:40 ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-04-27  3:40 UTC (permalink / raw)


"Taso N. Devetzis" <devetzis@snet.net> writes:

> I have written some hooks to snarf and examine article headers (for
> mail back-ends -- I am using nnml if it matters), but I have a couple
> of questions regarding the available functions and their behaviour.
>
> I can find the headers easily enough as follows:
>
> (defun blat-find-header (hdr)
>   (gnus-with-article-headers
>     (message-fetch-field hdr)))
>
> This function, however, requires the headers in question to be visible
> (since it uses *gnus-article-buffer*, I presume).

Yes.  If you wish to look at the actual article headers, you have to
fetch them.  This is either done by setting *-nov-is-evil, or by
letting Gnus select the article.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

end of thread, other threads:[~2003-04-27  3:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-26  1:31 Fetching Article Headers Taso N. Devetzis
2003-04-27  3:40 ` Lars Magne Ingebrigtsen

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