From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/54227 Path: main.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.emacs.gnus.general Subject: Possible SpamAssassin node info documentation error. Date: Wed, 15 Oct 2003 14:31:59 -0500 Sender: ding-owner@lists.math.uh.edu Message-ID: <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 1066246356 24397 80.91.224.253 (15 Oct 2003 19:32:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Oct 2003 19:32:36 +0000 (UTC) Original-X-From: ding-owner+M2768@lists.math.uh.edu Wed Oct 15 21:32:34 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 1A9rNp-0001Qx-00 for ; Wed, 15 Oct 2003 21:32:33 +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 1A9rNQ-0006MS-00; Wed, 15 Oct 2003 14:32:08 -0500 Original-Received: from justine.libertine.org ([66.139.78.221]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1A9rNL-0006MN-00 for ding@lists.math.uh.edu; Wed, 15 Oct 2003 14:32:03 -0500 Original-Received: from defaultvalue.org (dsl093-216-237.aus1.dsl.speakeasy.net [66.93.216.237]) by justine.libertine.org (Postfix) with ESMTP id C3D533A009F for ; Wed, 15 Oct 2003 14:32:01 -0500 (CDT) Original-Received: from raven.i.defaultvalue.org (raven.i.defaultvalue.org [192.168.1.7]) by defaultvalue.org (Postfix) with ESMTP id 9BE0D3FCA for ; Wed, 15 Oct 2003 14:32:00 -0500 (CDT) Original-Received: by raven.i.defaultvalue.org (Postfix, from userid 1000) id EA6772CF057; Wed, 15 Oct 2003 14:31:59 -0500 (CDT) Original-To: ding@gnus.org User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:54227 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:54227 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. -- Rob Browning rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4