Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* nnmail-split-fancy?
@ 2003-07-23 19:58 savoie
  2003-07-23 21:35 ` nnmail-split-fancy? Hubert Chan
  0 siblings, 1 reply; 4+ messages in thread
From: savoie @ 2003-07-23 19:58 UTC (permalink / raw)



O.k. smarties.  I'm having problems, and I'm probably a few steps above my
actual lisp knowledge. Maybe one of you can help out.  I want to split mail
based on expressions in the body of a mail message.  I looked in the manual
and found nnmail-split-fancy and the example on how to do this.  I googled
around enough to see how to change my old nnmail-split-methods to use the
nnmail-split-fancy, and now I want to add the split-on-body function, most of
the postings said the example is in the manual, but I think I need a hand
holding step-by-step explanation.  Any help would be greatly appreciated!

Thank in advance,

Matt

relevant information:

GNU Emacs 21.1.1 (i386-suse-linux, X toolkit, Xaw3d scroll bars) of
2002-03-25 on stephens

 Gnus v5.10.2

assume I have two groups:
       2: nnml+private:nsidc-2003 
       0: nnml+private:junk 

I've put this in my .gnus
 -----------------------

(defun split-on-body ()
  (save-excursion
    (set-buffer " *nnmail incoming*")
    (goto-char (point-min))
    (when (re-search-forward "exual" nil t)
      "junk")))

(setq nnmail-split-methods 'nnmail-split-fancy)
(setq nnmail-split-fancy
       '(| 
	 (: split-on-body) 
	 "nsidc-2003"
	 ))

But when I send a message with " sexual " content, or do Bt & Bq, I get in my
*Messages* buffer.

Error in `nnmail-split-methods'; using `bogus' mail group
This message would go to bogus

Thanks again,

Matt

-- 
Matthew Savoie  -  Scientific Programmer
National Snow and Ice Data Center
(303) 735-0785   http://nsidc.org


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: nnmail-split-fancy?
  2003-07-23 19:58 nnmail-split-fancy? savoie
@ 2003-07-23 21:35 ` Hubert Chan
  2003-07-23 22:19   ` nnmail-split-fancy? savoie
  0 siblings, 1 reply; 4+ messages in thread
From: Hubert Chan @ 2003-07-23 21:35 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 761 bytes --]

>>>>> "savoie" == savoie  <savoie@no-spam.nsidc.org> writes:

[...]

savoie> (defun split-on-body ()
savoie>   (save-excursion
savoie>     (set-buffer " *nnmail incoming*")
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

When re-spooling, it doesn't actually use the *nnmail incoming*
buffer.  I've found that it seems to work if you leave out that line,
both when re-spooling and fetching new mail.

savoie>     (goto-char (point-min))
savoie>     (when (re-search-forward "exual" nil t)
savoie>       "junk")))

[...]

-- 
Hubert Chan <hubert@uhoreg.ca> - http://www.uhoreg.ca/
PGP/GnuPG key: 1024D/124B61FA
Fingerprint: 96C5 012F 5F74 A5F7 1FF7  5291 AF29 C719 124B 61FA
Key available at wwwkeys.pgp.net.   Encrypted e-mail preferred.

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: nnmail-split-fancy?
  2003-07-23 21:35 ` nnmail-split-fancy? Hubert Chan
@ 2003-07-23 22:19   ` savoie
       [not found]     ` <4nu19buc44.fsf@chubby.bwh.harvard.edu>
  0 siblings, 1 reply; 4+ messages in thread
From: savoie @ 2003-07-23 22:19 UTC (permalink / raw)



Hubert Chan <hubert@uhoreg.ca> writes:

>>>>>> "savoie" == savoie  <savoie@no-spam.nsidc.org> writes:
>
> [...]
>
> savoie> (defun split-on-body ()
> savoie>   (save-excursion
> savoie>     (set-buffer " *nnmail incoming*")
>             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> When re-spooling, it doesn't actually use the *nnmail incoming*
> buffer.  I've found that it seems to work if you leave out that line,
> both when re-spooling and fetching new mail.

I tried that, and even tried sending mail to my account to see if it was a
problem with respooling not using the *nnmail incoming* buffer.  But still no
dice.

If I change the search text to something in my subject, it says it would move
to junk, but still nothing in the body is found.


Help is appreciated.

Thanks.


> savoie>     (goto-char (point-min))
> savoie>     (when (re-search-forward "exual" nil t)
> savoie>       "junk")))
>
> [...]
>
> -- 
> Hubert Chan <hubert@uhoreg.ca> - http://www.uhoreg.ca/
> PGP/GnuPG key: 1024D/124B61FA
> Fingerprint: 96C5 012F 5F74 A5F7 1FF7  5291 AF29 C719 124B 61FA
> Key available at wwwkeys.pgp.net.   Encrypted e-mail preferred.

-- 
Matthew Savoie  -  Scientific Programmer
National Snow and Ice Data Center
(303) 735-0785   http://nsidc.org


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: nnmail-split-fancy?
       [not found]       ` <ywku4r1bhl2j.fsf@snowblower.colorado.edu>
@ 2003-07-24 18:30         ` Ted Zlatanov
  0 siblings, 0 replies; 4+ messages in thread
From: Ted Zlatanov @ 2003-07-24 18:30 UTC (permalink / raw)


On Thu, 24 Jul 2003, savoie@no-spam.nsidc.org wrote:
> What I'm really looking for is the function that will let me say (:
> junk-this "regexp") in my nnmail-split-fancy, but maybe I should
> look into spam.el and see what it can do for me.

Right now spam.el won't help, but I could add a spam-use-regex-body
function similar to spam-use-regex-headers.  The spam-use-regex-body
function could return an arbitrary group name, unlike
spam-use-regex-headers (only spam-use-ifile can return an arbitrary
group right now so this is somewhat unusual, but not a problem).

Ted


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-07-24 18:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-23 19:58 nnmail-split-fancy? savoie
2003-07-23 21:35 ` nnmail-split-fancy? Hubert Chan
2003-07-23 22:19   ` nnmail-split-fancy? savoie
     [not found]     ` <4nu19buc44.fsf@chubby.bwh.harvard.edu>
     [not found]       ` <ywku4r1bhl2j.fsf@snowblower.colorado.edu>
2003-07-24 18:30         ` nnmail-split-fancy? Ted Zlatanov

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).