Robert Pluim <rpl...@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.