From: Ted Zlatanov <tzz@lifelogs.com>
Cc: ding@gnus.org
Subject: Re: Possible SpamAssassin node info documentation error.
Date: Thu, 16 Oct 2003 10:50:56 -0400 [thread overview]
Message-ID: <4nu1696xtb.fsf@lockgroove.bwh.harvard.edu> (raw)
In-Reply-To: <87ptgy5mc0.fsf@raven.i.defaultvalue.org> (Rob Browning's message of "Wed, 15 Oct 2003 14:31:59 -0500")
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
prev parent reply other threads:[~2003-10-16 14:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-15 19:31 Rob Browning
2003-10-15 19:42 ` Rob Browning
2003-10-16 14:52 ` Ted Zlatanov
2003-10-16 13:42 ` Lars Magne Ingebrigtsen
2003-12-03 23:03 ` Kevin Ryde
2003-12-04 16:32 ` Ted Zlatanov
2003-10-16 14:50 ` Ted Zlatanov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4nu1696xtb.fsf@lockgroove.bwh.harvard.edu \
--to=tzz@lifelogs.com \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).