Gnus development mailing list
 help / color / mirror / Atom feed
* What's wrong with this regexp?
@ 2001-11-07 18:48 Frank Schmitt
  2001-11-07 18:54 ` Norbert Koch
  0 siblings, 1 reply; 8+ messages in thread
From: Frank Schmitt @ 2001-11-07 18:48 UTC (permalink / raw)


Is it possible that regexp's in nnmail-split-methods are broken?
I've got the following in my .gnus:

(setq nnmail-split-methods
           '(("NT-Emacs" "^\(CC:\|To:\).*help-emacs-windows@gnu.org.*")
	     ("NT-Emacs" "^\(CC:\|To:\).*ntemacs-users@cs.washington.edu.*")
	     ("XEmacs-NT" "^\(To:\|CC:\).*xemacs-???nt@xemacs.org.*")
	     ("Hamster-src" "^\(CC:\|To:\).*hamster-sourcen@\(yahoogroups\.\(de\|com\)\|egroups\.com\).*")
	     ("Replies" "^\(CC:\|To:\).*usenet@Frank-Schmitt.net.*")
	     ("Uni" "^\(CC:\|To:\).*fschmitt@uni-koblenz.de.*")
             ("mail.general" "")))

But everything goes in mail.general. I have absolutely no idea why.
Some examples of mails which go to mail.general but should definitely go
to a different group:

To: hamster-sourcen@egroups.com
Message-ID: <9jemnj.3vuh011.1@server.heimweb.de>
From: "Andreas Heim" <liste@heimweb.de>
Date: Sun, 22 Jul 2001 14:07:47 +0200
Subject: Re: [Fix]Hamster Events hamwindows.hsm
Xref: FRANK-FMB8GC9RR mail.general:1437
Lines: 17

To: xemacs-nt@xemacs.org
Subject: ldap, win32
From: Fabrice Popineau <Fabrice.Popineau@supelec.fr>
Date: Fri, 07 Sep 2001 16:17:14 +0200
Message-ID: <vgiv2ihh.fsf@supelec.fr>
Lines: 25
Xref: FRANK-FMB8GC9RR XEmacs-NT:360

Message-Id: <200110261117.HAA04621@glass.lplizard.com>
From: Chris Green <chrisg@lplizard.com>
To: help-emacs-windows@gnu.org
Subject: [h-e-w] emacs 21 under win2k
Date: Fri, 26 Oct 2001 07:17:38 -0400
Lines: 5
Xref: FRANK-FMB8GC9RR NT-Emacs:743

(I've snipped irrelevant headers)

-- 
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them
In the Land of Mordor where the Shadows lie.
19. Dezember 2001



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

* Re: What's wrong with this regexp?
  2001-11-07 18:48 What's wrong with this regexp? Frank Schmitt
@ 2001-11-07 18:54 ` Norbert Koch
  2001-11-07 19:32   ` Frank Schmitt
  0 siblings, 1 reply; 8+ messages in thread
From: Norbert Koch @ 2001-11-07 18:54 UTC (permalink / raw)


Frank Schmitt <usereplyto@Frank-Schmitt.net> writes:

> Is it possible that regexp's in nnmail-split-methods are broken?
> I've got the following in my .gnus:
>
> (setq nnmail-split-methods
>            '(("NT-Emacs" "^\(CC:\|To:\).*help-emacs-windows@gnu.org.*")
> 	     ("NT-Emacs" "^\(CC:\|To:\).*ntemacs-users@cs.washington.edu.*")
> 	     ("XEmacs-NT" "^\(To:\|CC:\).*xemacs-???nt@xemacs.org.*")
> 	     ("Hamster-src" "^\(CC:\|To:\).*hamster-sourcen@\(yahoogroups\.\(de\|com\)\|egroups\.com\).*")
> 	     ("Replies" "^\(CC:\|To:\).*usenet@Frank-Schmitt.net.*")
> 	     ("Uni" "^\(CC:\|To:\).*fschmitt@uni-koblenz.de.*")
>              ("mail.general" "")))

Don't you have to use 

^\\(Cc\\To\\):.*...

etc in the regexp?

norbert.



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

* Re: What's wrong with this regexp?
  2001-11-07 18:54 ` Norbert Koch
@ 2001-11-07 19:32   ` Frank Schmitt
  2001-11-07 19:39     ` Karl Kleinpaste
  0 siblings, 1 reply; 8+ messages in thread
From: Frank Schmitt @ 2001-11-07 19:32 UTC (permalink / raw)


Norbert Koch <nk@LF.net> writes:

>>(setq nnmail-split-methods
>>           '(("NT-Emacs" "^\(CC:\|To:\).*help-emacs-windows@gnu.org.*")
>>	     ("NT-Emacs" "^\(CC:\|To:\).*ntemacs-users@cs.washington.edu.*")
>>	     ("XEmacs-NT" "^\(To:\|CC:\).*xemacs-???nt@xemacs.org.*")
>>	     ("Hamster-src" "^\(CC:\|To:\).*hamster-sourcen@\(yahoogroups\.\(de\|com\)\|egroups\.com\).*")
>>	     ("Replies" "^\(CC:\|To:\).*usenet@Frank-Schmitt.net.*")
>>	     ("Uni" "^\(CC:\|To:\).*fschmitt@uni-koblenz.de.*")
>>             ("mail.general" "")))
>
>Don't you have to use 
>
>^\\(Cc\\To\\):.*...
>
>etc in the regexp?

Don't we use the regexp scheme documented under 
(x)emacs->Searching and Replacement->Regexp search?
If we don't, where is the regexp engine of Gnus documented?

-- 
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them
In the Land of Mordor where the Shadows lie.
19. Dezember 2001



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

* Re: What's wrong with this regexp?
  2001-11-07 19:32   ` Frank Schmitt
@ 2001-11-07 19:39     ` Karl Kleinpaste
  2001-11-07 20:05       ` Frank Schmitt
  2001-11-09  9:50       ` Martin Monsorno
  0 siblings, 2 replies; 8+ messages in thread
From: Karl Kleinpaste @ 2001-11-07 19:39 UTC (permalink / raw)


Frank Schmitt <usereplyto@Frank-Schmitt.net> writes:
> Don't we use the regexp scheme documented under 
> (x)emacs->Searching and Replacement->Regexp search?

Yes, but it's a matter of the lisp reader's context: You have to
double most occurrences of `\' in order to get them into a lisp
expression.  What you type in the minibuffer as "\(a\|b\)" must become
"\\(a\\|b\\)" when used in a string expression in elisp.

BTW, nnmail-split-methods usage is case-insensitive unless you
explicitly turn off case-fold-search in nnmail-split-hook.



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

* Re: What's wrong with this regexp?
  2001-11-07 19:39     ` Karl Kleinpaste
@ 2001-11-07 20:05       ` Frank Schmitt
  2001-11-07 20:47         ` Norbert Koch
  2001-11-09  9:50       ` Martin Monsorno
  1 sibling, 1 reply; 8+ messages in thread
From: Frank Schmitt @ 2001-11-07 20:05 UTC (permalink / raw)


Karl Kleinpaste <karl@charcoal.com> writes:

>Frank Schmitt <usereplyto@Frank-Schmitt.net> writes:
>>Don't we use the regexp scheme documented under 
>>(x)emacs->Searching and Replacement->Regexp search?
>
>Yes, but it's a matter of the lisp reader's context: You have to
>double most occurrences of `\' in order to get them into a lisp
>expression.  What you type in the minibuffer as "\(a\|b\)" must become
>"\\(a\\|b\\)" when used in a string expression in elisp.

Is this documented somewhere and if it is, where?

-- 
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them
In the Land of Mordor where the Shadows lie.
19. Dezember 2001



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

* Re: What's wrong with this regexp?
  2001-11-07 20:05       ` Frank Schmitt
@ 2001-11-07 20:47         ` Norbert Koch
  0 siblings, 0 replies; 8+ messages in thread
From: Norbert Koch @ 2001-11-07 20:47 UTC (permalink / raw)


Frank Schmitt <usereplyto@Frank-Schmitt.net> writes:

>>Yes, but it's a matter of the lisp reader's context: You have to
>>double most occurrences of `\' in order to get them into a lisp
>>expression.  What you type in the minibuffer as "\(a\|b\)" must become
>>"\\(a\\|b\\)" when used in a string expression in elisp.
>
> Is this documented somewhere and if it is, where?

Sorry, I should have been more explicit in my first message.  You find
something about this in the lispref manual:

(lispref)Regular Expressions

norbert.



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

* Re: What's wrong with this regexp?
  2001-11-07 19:39     ` Karl Kleinpaste
  2001-11-07 20:05       ` Frank Schmitt
@ 2001-11-09  9:50       ` Martin Monsorno
  2001-12-29 21:37         ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 8+ messages in thread
From: Martin Monsorno @ 2001-11-09  9:50 UTC (permalink / raw)
  Cc: ding

Karl Kleinpaste <karl@charcoal.com> writes:

> Frank Schmitt <usereplyto@Frank-Schmitt.net> writes:
> > Don't we use the regexp scheme documented under 
>> (x)emacs->Searching and Replacement->Regexp search?
>
> Yes, but it's a matter of the lisp reader's context: You have to
> double most occurrences of `\' in order to get them into a lisp
> expression.  What you type in the minibuffer as "\(a\|b\)" must become
> "\\(a\\|b\\)" when used in a string expression in elisp.
>

I had the same problem a few days ago, and finally found the solution
by searching through some of the "other peoples .gnus-files" on the
net. I suppose, just one little example with "\\(To\\|cc\\)" in the
info file about mail-splitting would help very much.

> BTW, nnmail-split-methods usage is case-insensitive unless you
>explicitly turn off case-fold-search in nnmail-split-hook.
>

This would also be nice to be in that info page.

-- 
Martin Monsorno
mailto:monsorno@gmx.de



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

* Re: What's wrong with this regexp?
  2001-11-09  9:50       ` Martin Monsorno
@ 2001-12-29 21:37         ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 2001-12-29 21:37 UTC (permalink / raw)


Martin Monsorno <monsorno@gmx.de> writes:

>> Yes, but it's a matter of the lisp reader's context: You have to
>> double most occurrences of `\' in order to get them into a lisp
>> expression.  What you type in the minibuffer as "\(a\|b\)" must become
>> "\\(a\\|b\\)" when used in a string expression in elisp.
>
> I had the same problem a few days ago, and finally found the solution
> by searching through some of the "other peoples .gnus-files" on the
> net. I suppose, just one little example with "\\(To\\|cc\\)" in the
> info file about mail-splitting would help very much.

Well, the examples in that section of the manual does use \\...

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

end of thread, other threads:[~2001-12-29 21:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-07 18:48 What's wrong with this regexp? Frank Schmitt
2001-11-07 18:54 ` Norbert Koch
2001-11-07 19:32   ` Frank Schmitt
2001-11-07 19:39     ` Karl Kleinpaste
2001-11-07 20:05       ` Frank Schmitt
2001-11-07 20:47         ` Norbert Koch
2001-11-09  9:50       ` Martin Monsorno
2001-12-29 21:37         ` Lars Magne Ingebrigtsen

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