info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading the article/message in elisp


From: Emanuel Berg
Subject: Re: Reading the article/message in elisp
Date: Fri, 14 Jul 2023 03:07:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

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 case that I am in gnus summary page, with the point
> on an unopened article, when I run the following:
>
>         (defun husain--test-gnus-with-article-buffer()
>           (interactive)
>           (gnus-with-article-buffer
>             (message "%s" (message-fetch-field "Subject"))))
>
> It fails to read the subject. However, it works very well
> after I open the article. I think this solves 95% of the
> cases I run into.

If there isn't an article open, you can do that - with code -
from the summary buffer before you fetch the field. If there
is no article buffer and no summary buffer it is hard to think
of a use case and moreover it will be hard to determine, in
a way that makes sense, what mail or post the user refers to
when hitting the command.

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]