From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/54236 Path: main.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: Possible SpamAssassin node info documentation error. Date: Thu, 16 Oct 2003 10:50:56 -0400 Organization: =?koi8-r?q?=F4=C5=CF=C4=CF=D2=20=FA=CC=C1=D4=C1=CE=CF=D7?= @ Cienfuegos Sender: ding-owner@lists.math.uh.edu Message-ID: <4nu1696xtb.fsf@lockgroove.bwh.harvard.edu> References: <87ptgy5mc0.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1066324801 24312 80.91.224.253 (16 Oct 2003 17:20:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 16 Oct 2003 17:20:01 +0000 (UTC) Cc: ding@gnus.org Original-X-From: ding-owner+M2777@lists.math.uh.edu Thu Oct 16 19:19:57 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AABn3-0000l3-00 for ; Thu, 16 Oct 2003 19:19:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1AABlA-0003EC-00; Thu, 16 Oct 2003 12:18:00 -0500 Original-Received: from justine.libertine.org ([66.139.78.221]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1AABkv-0003Dy-00 for ding@lists.math.uh.edu; Thu, 16 Oct 2003 12:17:45 -0500 Original-Received: from clifford.bwh.harvard.edu (clifford.bwh.harvard.edu [134.174.9.41]) by justine.libertine.org (Postfix) with ESMTP id 0CA4F3A00CE for ; Thu, 16 Oct 2003 09:51:37 -0500 (CDT) Original-Received: from lockgroove.bwh.harvard.edu (lockgroove [134.174.9.133]) by clifford.bwh.harvard.edu (8.10.2+Sun/8.11.0) with ESMTP id h9GEpD716392; Thu, 16 Oct 2003 10:51:13 -0400 (EDT) Original-Received: (from tzz@localhost) by lockgroove.bwh.harvard.edu (8.11.6+Sun/8.11.0) id h9GEovM23304; Thu, 16 Oct 2003 10:50:57 -0400 (EDT) Original-To: Rob Browning X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Followup-To: Rob Browning , ding@gnus.org In-Reply-To: <87ptgy5mc0.fsf@raven.i.defaultvalue.org> (Rob Browning's message of "Wed, 15 Oct 2003 14:31:59 -0500") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (usg-unix-v) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:54236 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:54236 On Wed, 15 Oct 2003, rlb@defaultvalue.org wrote: > In the current info pages (for 5.10.2), in the "SpamAssassin, > Vipul's Razor, DCC, etc" node, it suggests: > > (defun kevin-spamassassin () > (save-excursion > (let ((buf (or (get-buffer " *nnmail incoming*") > (get-buffer " *nnml move*")))) > (if (not buf) > (progn (message "Oops, cannot find message buffer") > nil) > (set-buffer buf) > (if (eq 1 (call-process-region (point-min) (point-max) > "spamc" nil nil nil > "-c")) > "spam"))))) > > but my experience is that this doesn't actually work because the > buffer (at least during a "B q") is narrowed to the headers. For > this to work as advertized, you need to add a (widen) after setting > the buffer, perhaps like this (also happen to be using spamassassin > in this example rather than spamc): > > (defun kevin-spamassassin () > (save-excursion > (let ((buf (or (get-buffer " *nnmail incoming*") > (get-buffer " *nnml move*") > ;; probably just respooling or tracing... > (set-buffer gnus-original-article-buffer)))) > (if (not buf) > (progn (message "Oops, cannot find message buffer") > nil) > (set-buffer buf) > (widen) > (if (zerop (call-process-region (point-min) (point-max) > "spamassassin" nil nil > nil "-e")) > nil > "spam"))))) > > Hope this helps. This was already fixed in the CVS manual. Thanks Ted