Emanuel Berg writes:
> We would like an arbitrary header access function where the
> header is provided as an argument, as in
>
> (defun gnus-article-header-value (hdr)
> "Get the value of HDR for the current article."
> (with-current-buffer gnus-original-article-buffer
> (gnus-fetch-fiel
Michael Heerdegen wrote:
>>> It will then be the summary buffer article at point, not
>>> the selected one. If one is selected, it would make more
>>> sense to operate on that.
>>
>> Probably, but how that works I don't know, this
>>
>> (gnus-summary-article-number)
>>
>> is 20086 in the summary b
Michael Heerdegen wrote:
The function `mail-header-subject' works but then you
don't get to select the header.
>>>
>>> What does "you don't get to select the header" mean?
>>
>> You only get the Subject header.
>
> With this accessor function, yes. And with the others, you
> get the othe
Emanuel Berg writes:
> Michael Heerdegen wrote:
>
> >> The function `mail-header-subject' works but then you don't
> >> get to select the header.
> >
> > What does "you don't get to select the header" mean?
>
> You only get the Subject header.
With this accessor function, yes. And with the othe
Emanuel Berg writes:
> > (gnus-data-header (gnus-data-find (gnus-summary-article-number)))
> >
> > It will then be the summary buffer article at point, not the
> > selected one. If one is selected, it would make more sense
> > to operate on that.
>
> Probably, but how that works I don't know, t
> (gnus-data-header (gnus-data-find (gnus-summary-article-number)))
>
> It will then be the summary buffer article at point, not the
> selected one. If one is selected, it would make more sense
> to operate on that.
Probably, but how that works I don't know, this
(gnus-summary-article-number)
Michael Heerdegen wrote:
>> The function `mail-header-subject' works but then you don't
>> get to select the header.
>
> What does "you don't get to select the header" mean?
You only get the Subject header.
--
underground experts united
https://dataswamp.org/~incal
Emanuel Berg writes:
> The function `mail-header-subject' works but then you don't
> get to select the header.
What does "you don't get to select the header" mean?
Michael.
Michael Heerdegen wrote:
However, how will you get the specific header data out of
the result? Don't know ...
>>>
>>> I think the header object is a struct of type
>>> `mail-header' ("nnheader.el").
>>
>> But try to extract with `mail-header', it complains about
>> the data not being a l
Emanuel Berg writes:
> >> However, how will you get the specific header data out of
> >> the result? Don't know ...
> >
> > I think the header object is a struct of type `mail-header'
> > ("nnheader.el").
>
> But try to extract with `mail-header', it complains about the
> data not being a list.
Michael Heerdegen wrote:
>> However, how will you get the specific header data out of
>> the result? Don't know ...
>
> I think the header object is a struct of type `mail-header'
> ("nnheader.el").
But try to extract with `mail-header', it complains about the
data not being a list.
--
undergro
Emanuel Berg writes:
> However, how will you get the specific header data out of
> the result? Don't know ...
I think the header object is a struct of type `mail-header'
("nnheader.el").
Michael.
Get data like this:
(gnus-data-header (gnus-data-find (gnus-summary-article-number)))
It will then be the summary buffer article at point, not the
selected one. If one is selected, it would make more sense to
operate on that.
However, how will you get the specific header data out of
the resul
Husain Alshehhi writes:
> I suppose that gnus-with-article-buffer works, almost. In the case that
> I am in gnus summary page [...]
I'm not sure what information is known by Gnus at that moment. In the
summary, internally each article is identified with a number. This
should be more or less (c
Husain Alshehhi wrote:
>> In a temp buffer, no, but you can access the article buffer
>> using eg `gnus-with-article' or `gnus-with-article-buffer',
>> or even `gnus-with-article-headers' if you only care about
>> the headers.
>
> I suppose that gnus-with-article-buffer works, almost.
> In the cas
Robert Pluim writes:
>
> In a temp buffer, no, but you can access the article buffer using eg
> `gnus-with-article' or `gnus-with-article-buffer', or even
> `gnus-with-article-headers' if you only care about the headers.
I suppose that gnus-with-article-buffer works, almost. In the case that
I a
Robert Pluim writes:
> Husain> (defun husain--test-message-subject-yank ()
> Husain> (interactive)
> Husain> (save-excursion
> Husain> (let ((subj (message-fetch-field "Subject")))
> Husain> (if subj
> Husain>
Robert Pluim wrote:
> In a temp buffer, no, but you can access the article buffer
> using eg `gnus-with-article' or `gnus-with-article-buffer',
> or even `gnus-with-article-headers' if you only care about
> the headers.
You mean like this?
(defun gnus-article-header-value (hdr)
"Get the value
> On Wed, 12 Jul 2023 04:59:08 +, Husain Alshehhi
> said:
Husain> Emanuel Berg writes:
>> You can use `message-fetch-field' to get headers, as in:
>>
>> (defun message-yank-subject ()
>> (interactive)
>> (save-excursion
>> (let ((subj (message-fetch-fiel
Emanuel Berg writes:
> You can use `message-fetch-field' to get headers, as in:
>
> (defun message-yank-subject ()
> (interactive)
> (save-excursion
> (let ((subj (message-fetch-field "Subject")))
> (when subj
> (message-goto-body)
> (insert (format "%s\n" subj)) )))
husain wrote:
> I would like to be able to read the article content in elisp
> and execute processes based on that. For example, if the
> message has TO:per...@work.xyz, or CC:per...@work.xyz, then
> I would like to open the person's profile page.
You can use `message-fetch-field' to get headers,
Hello,
If I am in
- the summary page, with the cursor on an unopen article line, or in
- the summary page, with an open article, or in
- an article
I would like to be able to read the article content in elisp and execute
processes based on that. For example, if the message has
TO:per...@wo
22 matches
Mail list logo