From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/46644 Path: main.gmane.org!not-for-mail From: Alex Schroeder Newsgroups: gmane.emacs.gnus.general Subject: Re: finding the article buffer when splitting Date: Mon, 23 Sep 2002 16:11:51 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: <87k7lcx0bc.fsf@emacswiki.org> References: <03bs7em0a4.fsf@msgid.viggen.net> <03y9ahlu15.fsf@msgid.viggen.net> <873csdrhhi.fsf_-_@emacswiki.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1032790288 25883 127.0.0.1 (23 Sep 2002 14:11:28 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 23 Sep 2002 14:11:28 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17tTvq-0006jK-00 for ; Mon, 23 Sep 2002 16:11:27 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17tTtx-0007LW-00; Mon, 23 Sep 2002 09:09:29 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 23 Sep 2002 09:10:07 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id JAA08378 for ; Mon, 23 Sep 2002 09:09:54 -0500 (CDT) Original-Received: (qmail 25211 invoked by alias); 23 Sep 2002 14:09:06 -0000 Original-Received: (qmail 25206 invoked from network); 23 Sep 2002 14:09:05 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by gnus.org with SMTP; 23 Sep 2002 14:09:05 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 17tUZn-000129-00 for ; Mon, 23 Sep 2002 16:52:43 +0200 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 35 Original-NNTP-Posting-Host: dclient217-162-239-98.hispeed.ch Original-X-Trace: quimby.gnus.org 1032792763 3828 217.162.239.98 (23 Sep 2002 14:52:43 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 23 Sep 2002 14:52:43 GMT X-Face: ^BC$`[IcggstLPyen&dqF+b2'zyK#r.mU*'Nms}@&4zw%SJ#5!/7SMVjBS7'lb;QK)|IPU5U'o1'522W4TyzB3Ab*IBo^iw]l4|kUbdZuUDO6=Um-.4IzhNiV'B"@K#jy_(wW|Zbk[34flKY^|PrQ?$u2\fKg^]AY>wOX#H32i User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2.90 (i686-pc-linux-gnu) Cancel-Lock: sha1:FH+AGLYaazHgRwjD/5GYLpP7RM4= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:46644 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:46644 jhbrown@ai.mit.edu (Jeremy H. Brown) writes: > Having thought about this more, I think what we really want is not a > variable gnus-the-article-buffer, but a function > (gnus-current-article-buffer) which returns a buffer containing the > current article. We want a function because if you're using the > imap backend, normal splitting functions don't download the whole > article, just the headers; this function can download the article > body if necessary, and otherwise just immediately return the buffer > with the body in it. Hm, my spam-stat.el still has some problems. I use the following macro, and now found message that was considered spam when splitting, and not-spam when respooling. To me, that suggests that something in this article buffer business is still malfunctioning. Alex. (defmacro with-article-buffer (&rest body) "Make the article buffer current while executing BODY. This is useful when splitting mail with `nnmail-split-fancy'. The article buffer is stored either in `gnus-original-article-buffer' or `nnmail-article-buffer'." `(save-excursion (cond ((and (boundp 'gnus-original-article-buffer) (gnus-buffer-live-p gnus-original-article-buffer)) (set-buffer gnus-original-article-buffer) ,@body) ((and (boundp 'nnmail-article-buffer) (gnus-buffer-live-p nnmail-article-buffer)) (set-buffer nnmail-article-buffer) ,@body) (t (error "There is no article buffer available.")))))