* split-fancy problem...
@ 1999-09-04 20:47 Norman Walsh
1999-09-06 10:33 ` Robert Bihlmeyer
0 siblings, 1 reply; 4+ messages in thread
From: Norman Walsh @ 1999-09-04 20:47 UTC (permalink / raw)
Hello world,
I decided to try to get split-fancy working today. Mostly
because I'd like to write to both an archive folder and an
appropriate subject folder. (But also because every time I learn
a new gnus feature, I think the world becomes a brighter
place...)
I'm not getting the results I expect, and I figure it's a thinko
or a typo on my part. Anyone care to inspect the following
split-fancy code and tell me what stupid thing I've done wrong?
(defun nwalsh-incoming-group ()
(format-time-string "archive.%Y-%m"))
(setq nnmail-split-methods 'nnmail-split-fancy)
(setq nnmail-split-fancy
'(& (: nwalsh-incoming-group)
(| (| ("subject" "Returned mail: User unknown" "spam")
("subject" "adults only" "spam")
("subject" "EARN" "spam")
("subject" "money making" "spam")
("subject" "credit report" "spam"))
(any "LETPRESS@" "letterpress")
(any "ding@" "emacs.ding")
(any "ntemacs-users@" "emacs.ntemacs")
(any "twg-tds@" "tds")
(any "debian-user" "debian")
(any "debian-announce" "debian-announce")
(any "www-font" "www-font")
(| (any "owner-davenport@" "davenport.admin")
(any "davenport-approval@" "davenport.admin"))
(any "davenport" "davenport")
(any "docbook-eb" "docbook-eb")
(any "docbook-tc" "docbook-tc")
(| (any "cron" "cron")
("subject" "Output from .*cron.* command" "cron"))
("subject" "comp\.fonts" "fonts")
(any "regrep@.*oasis-open.org" "oasis.regrep")
(any "tables@.*oasis-open.org" "oasis.tables")
(any "w3c-dom-ig@" "w3c-dom-ig")
(any "w3c-xsl-wg@" "w3c-xsl-wg")
(any "w3c-xsl-fo-sg@" "w3c-xsl-fo-sg")
(any "spec-prod@w3.org" "w3c-spec-prod")
(any "w3c-format@w3.org" "w3c-format")
(any "xsl-list@" "xsl-list")
(any "xml-dev@" "xml-dev")
(any "dssslist" "dssslist")
(| (any "adepters-digest@" "adepters")
(any "adepters@" "adepters"))
(| ("subject" " Checkins" "arbortext.buildmsgs")
("subject" " Build Log" "arbortext.buildmsgs")
("subject" " Install Log" "arbortext.buildmsgs")
("subject" " Nightly Build Complete" "arbortext.buildmsgs")
("subject" " develbuild log" "arbortext.buildmsgs"))
("subject" "nwalsh timesheet" "arbortext.timesheets")
(any "peppermint@arbortext" "arbortext.peppermint")
(any "peppermint-arch@arbortext" "arbortext.peppermint-arch")
(any "epic-devel@arbortext" "arbortext.epic-devel")
(any "epic-lessons@arbortext" "arbortext.epic-lessons")
(any "dtd-epic@arbortext" "arbortext.dtd-epic")
(any "w3c-team@arbortext" "arbortext.w3c-team")
(any "w3c-people@arbortext" "arbortext.w3c-people")
(any "groves@arbortext" "arbortext.groves")
(any "xml@arbortext" "arbortext.xml")
(any "elmtalk@arbortext" "arbortext.elmtalk")
(any "ask-ati@arbortext" "arbortext.ask-ati")
(any "vantive@arbortext" "arbortext.vantive")
(any "appdev-acl@arbortext" "arbortext.appdev-acl")
(any "appdev@arbortext" "arbortext.appdev")
(any "engin@arbortext" "arbortext.engin")
(any "xsl-support@arbortext" "arbortext.xsl-support")
(any "schema-support@arbortext" "arbortext.schema-support")
(any "htmlhelp@arbortext" "arbortext.htmlhelp")
(| (any "askeve@arbortext" "arbortext.thinktank")
(any "asknorm@arbortext" "arbortext.thinktank")
(any "askpaul@arbortext" "arbortext.thinktank"))
(| (any "arbortext" "arbortext")
(any "doctools" "arbortext")
("message-id" "doctools" "arbortext"))
(any "sgml-tools" "sgml-tools")
(any "wordsmith.org" "wordsmith")
(any "unicode@" "unicode")
(from "majordomo" "list-admin")
(any "perl-xml-docs" "perl-xml-docs")
(any "perl-xml" "perl-xml")
(any "silent-tristero" "silent-tristero")
(| (from "@ora\.com" "ora")
(from "@oreilly\.com" "ora")
(from "@songline\.com" "ora"))
(any "bbdb-info" "bbdb-info")
(| (any "norm@berkshire\.net")
(any "ndw@nwalsh\.com"))
"spam")))
With this split, everything goes in archive.1999-09, but no where else.
If I take out the initial (& and use simply:
(setq nnmail-split-fancy
'(| (| ("subject" "Returned mail: User unknown" "spam")
("subject" "adults only" "spam")
("subject" "EARN" "spam")
("subject" "money making" "spam")
("subject" "credit report" "spam"))
(any "LETPRESS@" "letterpress")
....
Then some things get split properly but others don't. Consider,
for example, a message with the headers:
From: Bob Richardson <InkSprite@AOL.COM>
Subject: POLK'S BOOK
To: LETPRESS@hermes.csd.unb.ca
Date: Sat, 4 Sep 1999 08:41:47 EDT
X-Sent: 8 hours, 3 minutes, 17 seconds ago
Reply-To: Letterpress Discussion List <LETPRESS@hermes.csd.unb.ca>
In a message dated 03/09/99 03:33:08 GMT Daylight Time, BSimon999@AOL.COM
writes:
I would have expected that to go in the letterpress folder, but it
wound up in "spam".
Anyone see the error(s) of my ways?
Cheers,
norm
--
Norman Walsh <ndw@nwalsh.com> | What good is a can of worms if you
http://nwalsh.com/ | never open it?--Bob Arning
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: split-fancy problem...
1999-09-04 20:47 split-fancy problem Norman Walsh
@ 1999-09-06 10:33 ` Robert Bihlmeyer
1999-09-06 17:58 ` Norman Walsh
0 siblings, 1 reply; 4+ messages in thread
From: Robert Bihlmeyer @ 1999-09-06 10:33 UTC (permalink / raw)
Hi,
>>>>> On Sat, 4 Sep 1999 16:47:53 -0400
>>>>> Norman Walsh <ndw@nwalsh.com> said:
Norman> (setq nnmail-split-fancy
Norman> '(| (| ("subject" "Returned mail: User unknown" "spam")
Norman> ("subject" "adults only" "spam")
Norman> ("subject" "EARN" "spam") ("subject" "money
Norman> making" "spam") ("subject" "credit report"
Norman> "spam"))
Norman> (any "LETPRESS@" "letterpress")
Norman> ....
Norman> Then some things get split properly but others don't.
(I'm dry-debugging this, so apply appropriate quantities of salt).
The holy manual says:
In these splits, FIELD must match a complete field name. VALUE must
match a complete word according to the fundamental mode syntax table.
You can use `.*' in the regexps to match partial field names or words.
In other words, all VALUE's are wrapped in `\<' and `\>' pairs.
Because of that, `(any "LETPRESS@" "letterpress")' will not fire, so
this message will end up in your catch-all group - "spam".
Robbe
--
Robert Bihlmeyer reads: Deutsch, English, MIME, Latin-1, NO SPAM!
<robbe@orcus.priv.at> <http://stud2.tuwien.ac.at/~e9426626/sig.html>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: split-fancy problem...
1999-09-06 10:33 ` Robert Bihlmeyer
@ 1999-09-06 17:58 ` Norman Walsh
1999-09-07 7:45 ` Robert Bihlmeyer
0 siblings, 1 reply; 4+ messages in thread
From: Norman Walsh @ 1999-09-06 17:58 UTC (permalink / raw)
| Because of that, `(any "LETPRESS@" "letterpress")' will not fire, so
| this message will end up in your catch-all group - "spam".
Thanks, Robert, that gets me closer. Ok, I've changed all the lines
that read
(any "something@" "something")
to
(any "something@.*" "something")
and that seems to work much better. The splits seem to be working.
But, there's still one problem...
I'm using the leading (& split to make archival copies of all my
messages in
nnml:archive.1999-09
But after the split runs, that group doesn't seem to reflect the new
contents until I exit gnus and restart. Do I have to do something else
to get the active/overview file to update?
Similarly, now that I've got a single archive group for all the incoming
mail, I'd like to make all my outgoing mail archive there as well,
so I set
(setq gnus-message-archive-group
'((if (message-news-p)
"news"
(concat "nnml:" (nwalsh-incoming-group)))))
(Where (nwalsh-incoming-group) returns "archive.yyyy-mm")
Again, after sending a new message, I can see that it's been deposited
in the right directory, but gnus doesn't know about it until I exit
and restart.
Cheers,
norm
--
Norman Walsh <ndw@nwalsh.com> | Nature is amoral, not immoral.
http://nwalsh.com/ | [It] existed for eons before we
| arrived, didn't know we were
| coming, and doesn't give a damn
| about us.--Stephen J. Gould
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: split-fancy problem...
1999-09-06 17:58 ` Norman Walsh
@ 1999-09-07 7:45 ` Robert Bihlmeyer
0 siblings, 0 replies; 4+ messages in thread
From: Robert Bihlmeyer @ 1999-09-07 7:45 UTC (permalink / raw)
Hi,
>>>>> On Mon, 6 Sep 1999 13:58:38 -0400
>>>>> Norman Walsh <ndw@nwalsh.com> said:
Norman> nnml:archive.1999-09
Norman> But after the split runs, that group doesn't seem to reflect
Norman> the new contents until I exit gnus and restart. Do I have to
Norman> do something else to get the active/overview file to update?
I don't really know, this is just a shot into the blue: here I have
the "~/Mail/archive" directory in use by the "nnarchive" server
backend. Maybe you have this too, plus `nnmail-use-long-file-names'
set to nil, which will put the above group also into the
"~/Mail/archive" directory, probably interfering with "nnarchive". So,
just for completeness sake, have you tried group names like
"nnml:fooarc.1999-09"?
Robbe
--
Robert Bihlmeyer reads: Deutsch, English, MIME, Latin-1, NO SPAM!
<robbe@orcus.priv.at> <http://stud2.tuwien.ac.at/~e9426626/sig.html>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1999-09-07 7:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-04 20:47 split-fancy problem Norman Walsh
1999-09-06 10:33 ` Robert Bihlmeyer
1999-09-06 17:58 ` Norman Walsh
1999-09-07 7:45 ` Robert Bihlmeyer
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).