On Mon, 21 Apr 2008 22:05:02 +0200 [EMAIL PROTECTED] (François Lagarde) wrote: 

FL> In the last post, on 04/21 about 10h, "Ted" (Ted Zlatanov) wrote:
Ted> The problem is that this is a slow operation if you need the message
Ted> body over IMAP or NNTP, for example.

FL> you are right. Nevertheless I am using fetchmail, so that, all my mails are
FL> local.

Oh, that's fine then.  You may want to turn it off for non-local groups
though.  Here's how I get the article as a string in spam.el:

(defun spam-get-article-as-string (article)
  (when (numberp article)
    (with-temp-buffer
      (gnus-request-article-this-buffer
       article
       gnus-newsgroup-name)
      (buffer-string))))

You just need the article number, which is available from the parameters
of the formatting function.  This will work for any backend.  I think
you'll get the headers too, so use message-goto-body in the temporary
buffer and then return the substring from the new position to the end.

Ted
_______________________________________________
info-gnus-english mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/info-gnus-english

Reply via email to