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

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

Re: beginning of a mail in the summary view


From: Ted Zlatanov
Subject: Re: beginning of a mail in the summary view
Date: Tue, 22 Apr 2008 10:34:11 -0500
User-agent: Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.60 (gnu/linux)

On Mon, 21 Apr 2008 22:05:02 +0200 firstname.name@gmail.com (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


reply via email to

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