From: Tim Landscheidt <tim@tim-landscheidt.de>
To: "Husain Alshehhi" <husain@alshehhi.io>
Cc: ding@gnus.org
Subject: Re: Extracting Header and Content from an Article
Date: Tue, 19 Nov 2024 19:22:15 +0000 [thread overview]
Message-ID: <871pz7av14.fsf@vagabond.tim-landscheidt.de> (raw)
In-Reply-To: <29523.5648796492$1731988489@news.gmane.org> (Husain Alshehhi's message of "Mon, 18 Nov 2024 21:53:23 -0600")
"Husain Alshehhi" <husain@alshehhi.io> wrote:
>> 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.
> Thank you. Extracting the field worked well.
> For the body, however, I noticed that I need a little more: what I want
> to search in is the the whole email, not just the article buffer. In
> particular, I want to be able to search the text/plain as well as the
> text/html parts. gnus-with-article-buffer and article-goto-body, on the
> other hand, only allow me to search within the buffer, which has only
> the visible part of the email (text/html in my case).
I have one use case where I need to search (or rather copy
parts of) the raw article text, and I use
gnus-summary-show-raw-article for that as Gijs suggested.
For another use case, more similar to yours, I want to pro-
perly iterate over attachments, etc. I haven't done any ac-
tual work in that direction, but noted that it would proba-
bly involve iterating over (gnus-article-mime-handles). If
someone has a working example, any pointer would be much
appreciated.
Tim
next prev parent reply other threads:[~2024-11-19 19:22 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
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 [this message]
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=871pz7av14.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).