Gnus development mailing list
 help / color / mirror / Atom feed
From: Tim Landscheidt <tim@tim-landscheidt.de>
To: "Husain Alshehhi" <husain@alshehhi.io>
Cc: ding <ding@gnus.org>
Subject: Re: Extracting Header and Content from an Article
Date: Sun, 17 Nov 2024 14:29:58 +0000	[thread overview]
Message-ID: <87jzd253x5.fsf@vagabond.tim-landscheidt.de> (raw)
In-Reply-To: <30844.7794335493$1731379178@news.gmane.org> (Husain Alshehhi's message of "Mon, 11 Nov 2024 20:38:14 -0600")

"Husain Alshehhi" <husain@alshehhi.io> wrote:

> When the point is in the summary page while viewing an
> article, or while a point is in an open article, I want to
> be able to (1) extract a header value which is not in the
> gnus-extra-headers, and (2) get some content from the
> article via regexp search (using capture groups). What are
> the right GNUS APIs to use for my use case?

I do not know if it is the right way, but I use patterns of
the type:

| (gnus-with-article-buffer
|   (gnus-fetch-original-field "User-Agent"))

Similarly, I use gnus-with-article-buffer and
save-mark-and-excursion to "enter" the article buffer, then
article-goto-body to go to the article body's top, and then
search-forward-regexp to capture text.

Tim


       reply	other threads:[~2024-11-18 17:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <30844.7794335493$1731379178@news.gmane.org>
2024-11-17 14:29 ` Tim Landscheidt [this message]
2024-11-19  3:53   ` Husain Alshehhi
     [not found]   ` <29523.5648796492$1731988489@news.gmane.org>
2024-11-19  9:08     ` Gijs Hillenius
2024-11-19 19:22     ` Tim Landscheidt
2024-11-12  2:38 Husain Alshehhi

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=87jzd253x5.fsf@vagabond.tim-landscheidt.de \
    --to=tim@tim-landscheidt.de \
    --cc=ding@gnus.org \
    --cc=husain@alshehhi.io \
    /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).