[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trying to set nnmail-split-methods neatly
From: |
Enila Nero |
Subject: |
Re: trying to set nnmail-split-methods neatly |
Date: |
Thu, 22 Apr 2004 16:07:07 GMT |
Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:
> On Thu, Apr 22 2004, Rafael Villarroel wrote:
>
>> (setq common-string "stuff")
>>
>> (setq nnmail-split-methods
>> '(("Foo" (concat common-string "more-stuff")
>> "Foo2" (concat common-string "other-stuff")
>> ("Misc" ""))))
>>
>> but everything goes into Misc, even those mails that go into Foo when
>> I write that rule directly as ("Foo" "stuffmore-stuff").
>
> (setq common-string "stuff"
> nnmail-split-methods
> `(("Foo" ,(concat common-string "more-stuff")
> "Foo2" ,(concat common-string "other-stuff")
> ("Misc" ""))))
>
> See (info "(elisp)Backquote") for explanations.
>
> Bye, Reiner.
> --
> ,,,
> (o o)
> ---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/
The other problem is that the syntax for nnmail-split-methods is
wrong: first goes the newsgroup name and then the pattern:
(setq nnmail-split-methods
'(("mail.4ad" "From:.*4ad")
("mail.junk" "From:.*Lars\\|Subject:.*buy")
("mail.misc" "")))
(via C-h v nnmail-split-methods)
May use the backquote syntax or something like
(setq nnmail-split-methods
(list
(list (concat common-string "." "spam") "^X-Spam-Flag: YES")
(list (concat common-string "." "newshub") "^From.*newshub")
(list "mail.misc" "")
))
Enila