Tommy Kelly writes: > OK, I'm stopping here for comments from y'all. Note that I'm thinking > aloud in the above. For example, the idea that there are four > forms of split could probably be simplified into a single syntax > covering all forms. But I haven't figure out what that looks like yet. Great idea and rewrite! I was confused at first when reading the fancy split method, as I thought the | and & operations was logical operations, but instead they are group operations. Each SPLIT will be processed (&) or until one matched (|). I am implementing the logical operators, so the split rule will look like sieve rule: --8<---------------cut here---------------start------------->8--- (setq nnmail-split-fancy `(| (or (("x-bogosity" "spam" t) ("x-spam-status" "yes" t) ("list-id" ".*yahoogroups.com" t) (to "undisclosed.*recipients" t)) "mail.spam") (or (("list-id" "awesome" t) ("list-id" "notmuch" t) ("list-id" "madbutterfly" t)) "mail.list") ,(format-time-string "mail.misc-%Y"))) --8<---------------cut here---------------end--------------->8--- The logical operator syntax is: --8<---------------cut here---------------start------------->8--- ( ( ...) SPLIT) --8<---------------cut here---------------end--------------->8--- Each clause is a field split that returns non-nil SPLIT, if the OP of the clauses was true, then split to SPLIT. The syntax is not finalized yet, but already fulfilled my needs. I'd like to drop the third argument of field split, so that the clauses looks more clear. I need your comments! - Kanru P.S. Draft patch attached.