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: Michael Heerdegen
Subject: Re: Reading the article/message in elisp
Date: Thu, 13 Jul 2023 02:26:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Robert Pluim <rpluim@gmail.com> writes:

>     Husain>         (defun husain--test-message-subject-yank ()
>     Husain>           (interactive)
>     Husain>           (save-excursion
>     Husain>             (let ((subj (message-fetch-field "Subject")))
>     Husain>               (if subj
>     Husain>                   (message subj)
>     Husain>                 (gnus-summary-show-article)
>     Husain>                 (gnus-summary-select-article-buffer)
>     Husain>                 (message (message-fetch-field "Subject"))))))
>
>     Husain> this still doesn't work as intended because it does not
>     Husain> restore the window if the point is in a gnus-summary
>     Husain> buffer pointing to an article not open.
>
>     Husain> Is there a gnus function that can build the message in a
>     Husain> temp buffer?
>
> 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.

And you want to call `message' like (message "%s" ...) here, Husain:

When the ... can be arbitrary text, `message' will barf when the argument
accidentally contains %-sequences, like in

 (message "D'Oh, didn't expect a %-sequence here")


Michael.




reply via email to

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