Gnus development mailing list
 help / color / mirror / Atom feed
* What Headers Are Checked With split-fancy 'any'
@ 2003-10-29 17:05 Jake Colman
  2003-10-29 17:33 ` Reiner Steib
  0 siblings, 1 reply; 10+ messages in thread
From: Jake Colman @ 2003-10-29 17:05 UTC (permalink / raw)



As the subject says, is it all headers including 'subject'?  Specifically, if
I want file into the same group all messages from any of

spamassassin-talk@lists.sourceforge.net
spamassassin-talk@sourceforge.net
spamassassin-announce@lists.sourceforge.net
spamassassin-announce@sourceforge.net

or with a subject of "spamassassin"

can I just say

(any "spamassassin" "mail.spamassassin").

If that's correct, then how can I ensure that it only processes messages that
are sent from spamassassin.* (as specified in one of the headers: 'To', 'CC',
'From', 'Resent-From')?

-- 
Jake Colman                     

Principia Partners LLC                    Phone: (201) 209-2467
Harborside Financial Center                 Fax: (201) 946-0320
902 Plaza Two                          E-mail: colman@ppllc.com
Jersey City, NJ 07311                 www.principiapartners.com



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

* Re: What Headers Are Checked With split-fancy 'any'
  2003-10-29 17:05 What Headers Are Checked With split-fancy 'any' Jake Colman
@ 2003-10-29 17:33 ` Reiner Steib
  2003-10-29 19:33   ` Jake Colman
  0 siblings, 1 reply; 10+ messages in thread
From: Reiner Steib @ 2003-10-29 17:33 UTC (permalink / raw)


On Wed, Oct 29 2003, Jake Colman wrote:

> spamassassin-talk@lists.sourceforge.net
> spamassassin-talk@sourceforge.net
> spamassassin-announce@lists.sourceforge.net
> spamassassin-announce@sourceforge.net
>
> or with a subject of "spamassassin"
>
> can I just say
>
> (any "spamassassin" "mail.spamassassin").

`any' doesn't include "Subject":

,----[ (info "(gnus)Fancy Mail Splitting") ]
| `from'
|      Matches the `From', `Sender' and `Resent-From' fields.
| 
| `to'
|      Matches the `To', `Cc', `Apparently-To', `Resent-To' and
|      `Resent-Cc' fields.
| 
| `any'
|      Is the union of the `from' and `to' entries.
`----

It seems to me, that the following should do what you want:

("Subject" "spamassassin" "mail.spamassassin")
(any
 "spamassassin-\\(talk\\|announce\\)@\\(lists\\.\\)?sourceforge\\.net"
 "mail.spamassassin")

Assuming `nnmail-crosspost' is set to nil:

,----[ (info "(gnus)Splitting Mail") ]
|    The mail back ends all support cross-posting.  If several regexps
| match, the mail will be "cross-posted" to all those groups.
| `nnmail-crosspost' says whether to use this mechanism or not.  Note
| that no articles are crossposted to the general (`*') group.
`----

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/




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

* Re: What Headers Are Checked With split-fancy 'any'
  2003-10-29 17:33 ` Reiner Steib
@ 2003-10-29 19:33   ` Jake Colman
  2003-10-29 20:41     ` Reiner Steib
  0 siblings, 1 reply; 10+ messages in thread
From: Jake Colman @ 2003-10-29 19:33 UTC (permalink / raw)


>>>>> "RS" == Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:

   RS> It seems to me, that the following should do what you want:

   RS> (any
   RS>  "spamassassin-\\(talk\\|announce\\)@\\(lists\\.\\)?sourceforge\\.net"
   RS>  "mail.spamassassin")

Just to be sure I understand correctly...

This will match spamassassin-talk and spamassassin-announce whether it is
followed by lists.sourceforge.net or sourceforge.net.  The construct
"\\(lists\\.\\)?" says zero or more "lists." preceded by "@" and followed by
the rest of it.

Does the match always start with the first character or do I have to use "^"
if I am concerned about something preceding it?

   RS> Assuming `nnmail-crosspost' is set to nil:

Yup!

-- 
Jake Colman                     

Principia Partners LLC                    Phone: (201) 209-2467
Harborside Financial Center                 Fax: (201) 946-0320
902 Plaza Two                          E-mail: colman@ppllc.com
Jersey City, NJ 07311                 www.principiapartners.com



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

* Re: What Headers Are Checked With split-fancy 'any'
  2003-10-29 19:33   ` Jake Colman
@ 2003-10-29 20:41     ` Reiner Steib
  2003-10-30  7:11       ` era
  0 siblings, 1 reply; 10+ messages in thread
From: Reiner Steib @ 2003-10-29 20:41 UTC (permalink / raw)


On Wed, Oct 29 2003, Jake Colman wrote:

> This will match spamassassin-talk and spamassassin-announce whether it is
> followed by lists.sourceforge.net or sourceforge.net.  The construct
> "\\(lists\\.\\)?" says zero or more "lists." preceded by "@" and followed by
> the rest of it.

Yup.

> Does the match always start with the first character 

No.

> or do I have to use "^" if I am concerned about something preceding
> it?

It depends.  If the address is written as
| To: Spamassassin Talk <spamassassin-talk@sourceforge.net>
or
| To: <spamassassin-talk@sourceforge.net>
it will not match.

Also note ...

,----[ (info "(gnus)Fancy Mail Splitting") ]
|    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.
`----

... and the variable `nnmail-split-fancy-match-partial-words':

,----[ C-h v nnmail-split-fancy-match-partial-words RET ]
| nnmail-split-fancy-match-partial-words's value is nil
| 
| Documentation:
| Whether to match partial words when fancy splitting.
| Normally, regexes given in `nnmail-split-fancy' are implicitly surrounded
| by "\<...\>".  If this variable is true, they are not implicitly surrounded
| by anything.
| 
| You can customize this variable.
| 
| Defined in `nnmail'.
`----

You can check your split rules by doing `B q', `B t' and `B r', see
(info "(gnus)Mail Group Commands") for more explanations.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/




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

* Re: What Headers Are Checked With split-fancy 'any'
  2003-10-29 20:41     ` Reiner Steib
@ 2003-10-30  7:11       ` era
  2003-10-30 14:03         ` Jake Colman
  0 siblings, 1 reply; 10+ messages in thread
From: era @ 2003-10-30  7:11 UTC (permalink / raw)


On Wed, 29 Oct 2003 21:41:10 +0100, Reiner Steib
<4.uce.03.r.s@nurfuerspam.de> posted to gmane.emacs.gnus.general:
 > On Wed, Oct 29 2003, Jake Colman wrote:
 >> The construct "\\(lists\\.\\)?" says zero or more "lists."
 > Yup.

Actually it's "zero or one". The operator * is "zero or more".

Jake, you'd do well to read the Info node "(emacs)Regexps" for a summary of
what the various regular expression operators do. C-h i "(emacs)Regexps" RET

For more information, Friedl's book is The Book. I hear there's a new
edition out, BTW. <http://www.oreilly.com/catalog/regex2/> (Okay, it's not
so "new" anymore -- Summer 2002.)

/* era */

-- 
The email address era     the contact information   Just for kicks, imagine
at iki dot fi is heavily  link on my home page at   what it's like to get
spam filtered.  If you    <http://www.iki.fi/era/>  500 pieces of spam for
want to reach me, see     instead.                  each wanted message.




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

* Re: What Headers Are Checked With split-fancy 'any'
  2003-10-30  7:11       ` era
@ 2003-10-30 14:03         ` Jake Colman
  2003-10-30 14:26           ` era
  2003-10-30 14:35           ` Reiner Steib
  0 siblings, 2 replies; 10+ messages in thread
From: Jake Colman @ 2003-10-30 14:03 UTC (permalink / raw)


>>>>> "e" == era  <era@iki.fi> writes:

   e> For more information, Friedl's book is The Book. I hear there's a new
   e> edition out, BTW. <http://www.oreilly.com/catalog/regex2/> (Okay, it's not
   e> so "new" anymore -- Summer 2002.)

Actually I'm embarressed to say that I just realized I have The Book sitting
on my shelf!  Does XEmacs follow those rules or is it a different dialect?

-- 
Jake Colman                     

Principia Partners LLC                    Phone: (201) 209-2467
Harborside Financial Center                 Fax: (201) 946-0320
902 Plaza Two                          E-mail: colman@ppllc.com
Jersey City, NJ 07311                 www.principiapartners.com



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

* Re: What Headers Are Checked With split-fancy 'any'
  2003-10-30 14:03         ` Jake Colman
@ 2003-10-30 14:26           ` era
  2003-10-30 14:35           ` Reiner Steib
  1 sibling, 0 replies; 10+ messages in thread
From: era @ 2003-10-30 14:26 UTC (permalink / raw)


On Thu, 30 Oct 2003 09:03:39 -0500, Jake Colman <colman@ppllc.com>
posted to gmane.emacs.gnus.general:
 >>>>>> "e" == era  <era@iki.fi> writes:
 e> For more information, Friedl's book is The Book. I hear there's a new
 e> edition out, BTW. <http://www.oreilly.com/catalog/regex2/>
 > Actually I'm embarressed to say that I just realized I have The
 > Book sitting on my shelf! Does XEmacs follow those rules or is it a
 > different dialect?

I believe it should be identical to FSF Emacs in this respect.

/* era */

-- 
The email address era     the contact information   Just for kicks, imagine
at iki dot fi is heavily  link on my home page at   what it's like to get
spam filtered.  If you    <http://www.iki.fi/era/>  500 pieces of spam for
want to reach me, see     instead.                  each wanted message.




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

* Re: What Headers Are Checked With split-fancy 'any'
  2003-10-30 14:03         ` Jake Colman
  2003-10-30 14:26           ` era
@ 2003-10-30 14:35           ` Reiner Steib
  2003-10-30 15:10             ` era
  1 sibling, 1 reply; 10+ messages in thread
From: Reiner Steib @ 2003-10-30 14:35 UTC (permalink / raw)


On Thu, Oct 30 2003, Jake Colman wrote:

>>>>>> "e" == era  <era@iki.fi> writes:
>
>    e> Actually it's "zero or one". The operator * is "zero or more".

Sure, sorry I only checked Jake's text roughly.

[ <http://www.oreilly.com/catalog/regex2/> ]
> Actually I'm embarressed to say that I just realized I have The Book
> sitting on my shelf!  Does XEmacs follow those rules or is it a
> different dialect?

There are subtle differences, depending on your (X)Emacs version.  The
online manual should tell you all.  See (info "(Emacs)Regexps") or
(Info-goto-node "(XEmacs)Regexps").

THe most significant difference brobably (I don't have the book) is,
that often you need to write »\\« in Lisp expression instead of »\«:

,----
| In Lisp syntax, the string constant begins and ends with a
| double-quote.  `\"' stands for a double-quote as part of the regexp,
| `\\' for a backslash as part of the regexp, `\t' for a tab and `\n' for
| a newline.
`----

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/




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

* Re: What Headers Are Checked With split-fancy 'any'
  2003-10-30 14:35           ` Reiner Steib
@ 2003-10-30 15:10             ` era
  2003-10-30 15:48               ` Reiner Steib
  0 siblings, 1 reply; 10+ messages in thread
From: era @ 2003-10-30 15:10 UTC (permalink / raw)


On Thu, 30 Oct 2003 15:35:20 +0100, Reiner Steib
<4.uce.03.r.s@nurfuerspam.de> posted to gmane.emacs.gnus.general:
 > On Thu, Oct 30 2003, Jake Colman wrote:
 >>>>>>> "e" == era  <era@iki.fi> writes:
 e> Actually it's "zero or one". The operator * is "zero or more".
 > Sure, sorry I only checked Jake's text roughly.

(Of course. I just wanted to correct any possible misunderstandings.
It seems that Jake is asking a lot about regular expressions here.)

 > [ <http://www.oreilly.com/catalog/regex2/> ]
 >> Actually I'm embarressed to say that I just realized I have The Book
 >> sitting on my shelf!  Does XEmacs follow those rules or is it a
 >> different dialect?
 > There are subtle differences, depending on your (X)Emacs version.  The
 > online manual should tell you all.  See (info "(Emacs)Regexps") or
 > (Info-goto-node "(XEmacs)Regexps").

The book covers Emacs as one "dialect" of regular expressions, and the
question (as I interpreted it) is whether Emacs and XEmacs use the
same regex flavor. The answer to that I still believe to be yes.

/* era */

-- 
The email address era     the contact information   Just for kicks, imagine
at iki dot fi is heavily  link on my home page at   what it's like to get
spam filtered.  If you    <http://www.iki.fi/era/>  500 pieces of spam for
want to reach me, see     instead.                  each wanted message.




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

* Re: What Headers Are Checked With split-fancy 'any'
  2003-10-30 15:10             ` era
@ 2003-10-30 15:48               ` Reiner Steib
  0 siblings, 0 replies; 10+ messages in thread
From: Reiner Steib @ 2003-10-30 15:48 UTC (permalink / raw)


On Thu, Oct 30 2003, era@iki.fi wrote:

> On Thu, 30 Oct 2003 15:35:20 +0100, Reiner Steib

>  > There are subtle differences, depending on your (X)Emacs version.  The
>  > online manual should tell you all.  See (info "(Emacs)Regexps") or
>  > (Info-goto-node "(XEmacs)Regexps").
>
> The book covers Emacs as one "dialect" of regular expressions, 

Nice.

> and the question (as I interpreted it) is whether Emacs and XEmacs
> use the same regex flavor. The answer to that I still believe to be
> yes.

Already Emacs 20.7 and Emacs 21.3 differ in some aspects.  IIRC, some
examples not supported by Emacs 20.7 are shy groups `\(?: ... \)',
repetition `\{N,M\}' and character classes (string-match "[[:digit:]]"
"1").  CMIIW.

See e.g. the conditional in `gnus-button-url-regexp' or missing of
\{N,M\} in `gnus-button-mid-or-mail-heuristic-alist'.  We could
simplify these expressions, if support for Emacs 20 would be dropped
some day. Maybe already in No Gnus?

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/




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

end of thread, other threads:[~2003-10-30 15:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-29 17:05 What Headers Are Checked With split-fancy 'any' Jake Colman
2003-10-29 17:33 ` Reiner Steib
2003-10-29 19:33   ` Jake Colman
2003-10-29 20:41     ` Reiner Steib
2003-10-30  7:11       ` era
2003-10-30 14:03         ` Jake Colman
2003-10-30 14:26           ` era
2003-10-30 14:35           ` Reiner Steib
2003-10-30 15:10             ` era
2003-10-30 15:48               ` Reiner Steib

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