Gnus development mailing list
 help / color / mirror / Atom feed
* Header Fields and Split Fancy
@ 2000-04-18 10:00 Holger Sparr
  2000-04-18 10:57 ` Kai Großjohann
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Holger Sparr @ 2000-04-18 10:00 UTC (permalink / raw)



Hi,

I tried to set up nnmail-split-fancy. I encountered a problem caused
by the capitals in the header fields of my messages.

In the variable `nnmail-split-abbrev-alist' all of the field names
start with a down-case character. I tried to add regular expressions in
the same manner which include the capitalized field names like this.

,----
|  (add-to-list nnmail-split-abbrev-alist 
|              '((anyuc ."From\\|To\\|Cc\\|Sender\\|Newsgroup")
|                (mailuc . "Mailer-daemon\\|Postmaster\\|Uucp")
|                (touc . "To\\|Cc\\|Apparently-To\\|Resent-To\\|Resent-Cc")
|                (fromuc . "From\\|Sender\\|Resent-From"))
|              :group 'nnmail-split
|              :type '(repeat (cons :format "%v" symbol regexp)))
`----

but did not succeed. Neither I did receive an error message nor Gnus
was adding the changes.

What do I miss here? 

Is it possible to "wash" the headers as assumed by nnmail-split-fancy?

TIA,

Holger

-- 
Using Gnus 5.8.3 with Emacs 20.3.1




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

* Re: Header Fields and Split Fancy
  2000-04-18 10:00 Header Fields and Split Fancy Holger Sparr
@ 2000-04-18 10:57 ` Kai Großjohann
  2000-04-18 11:29   ` Holger Sparr
  2000-04-18 11:52 ` Kai Großjohann
  2000-04-19 13:34 ` Per Abrahamsen
  2 siblings, 1 reply; 9+ messages in thread
From: Kai Großjohann @ 2000-04-18 10:57 UTC (permalink / raw)
  Cc: ding

Holger Sparr <sparr@mfkrs1.mw.tu-dresden.de> writes:

> I tried to set up nnmail-split-fancy. I encountered a problem caused
> by the capitals in the header fields of my messages.

Did you really see a problem with these abbrevs, ie did you see wrong
splitting because of header case?

If so, then Gnus should set case-fold-search to t while matching the
header names.

kai
-- 
Beware of flying birch trees.



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

* Re: Header Fields and Split Fancy
  2000-04-18 10:57 ` Kai Großjohann
@ 2000-04-18 11:29   ` Holger Sparr
  2000-04-19 13:36     ` Per Abrahamsen
  0 siblings, 1 reply; 9+ messages in thread
From: Holger Sparr @ 2000-04-18 11:29 UTC (permalink / raw)
  Cc: ding

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Holger Sparr <sparr@mfkrs1.mw.tu-dresden.de> writes:
> 
> > I tried to set up nnmail-split-fancy. I encountered a problem caused
> > by the capitals in the header fields of my messages.
> 
> Did you really see a problem with these abbrevs, ie did you see wrong
> splitting because of header case?

Right now, I am using this for splitting:

	("From"	".*elsevier"			"mail.elsevier")
        [...]
	("To"	"sparr@\\|Sparr@"		"mail.other")
	("Cc"	"sparr@\\|Sparr@"		"mail.other")
	("To"	"sparr+usenet@"
	    (| ("subject"	"Re:.*"		"mail.answer")
	       ("references"	".*@.*"		"mail.answer")
	       "mail.spam"))
	"mail.spam")

Without being case sensitive like:

	(from	".*elsevier"			"mail.elsevier")
        [...]
	(to	"sparr@\\|Sparr@"		"mail.other")
	(to	"sparr+usenet@"
	    (| ("subject"	"Re:.*"		"mail.answer")
	       ("references"	".*@.*"		"mail.answer")
	       "mail.spam"))
	"mail.spam")

the incoming messages went to "spam".

I think, using these abbrevs looks nicer. I just wanted to keep these
additional abbrevs in the right place. 
I am curious about what was wrong in my (add-to-list...) formulation.


Thanks for your time.


Holger
-- 




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

* Re: Header Fields and Split Fancy
  2000-04-18 10:00 Header Fields and Split Fancy Holger Sparr
  2000-04-18 10:57 ` Kai Großjohann
@ 2000-04-18 11:52 ` Kai Großjohann
  2000-04-18 14:28   ` Holger Sparr
  2000-04-19 13:34 ` Per Abrahamsen
  2 siblings, 1 reply; 9+ messages in thread
From: Kai Großjohann @ 2000-04-18 11:52 UTC (permalink / raw)
  Cc: ding

Holger Sparr <sparr@mfkrs1.mw.tu-dresden.de> writes:

> ,----
> |  (add-to-list nnmail-split-abbrev-alist 
> |              '((anyuc ."From\\|To\\|Cc\\|Sender\\|Newsgroup")
> |                (mailuc . "Mailer-daemon\\|Postmaster\\|Uucp")
> |                (touc . "To\\|Cc\\|Apparently-To\\|Resent-To\\|Resent-Cc")
> |                (fromuc . "From\\|Sender\\|Resent-From"))
> |              :group 'nnmail-split
> |              :type '(repeat (cons :format "%v" symbol regexp)))
> `----

Delete the `:group' and `:type' clauses:

(add-to-list nnmail-split-abbrev-alist 
             '((anyuc ."From\\|To\\|Cc\\|Sender\\|Newsgroup")
               (mailuc . "Mailer-daemon\\|Postmaster\\|Uucp")
               (touc . "To\\|Cc\\|Apparently-To\\|Resent-To\\|Resent-Cc")
               (fromuc . "From\\|Sender\\|Resent-From")))

kai
-- 
Beware of flying birch trees.



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

* Re: Header Fields and Split Fancy
  2000-04-18 11:52 ` Kai Großjohann
@ 2000-04-18 14:28   ` Holger Sparr
  2000-04-18 14:43     ` Kai Großjohann
  0 siblings, 1 reply; 9+ messages in thread
From: Holger Sparr @ 2000-04-18 14:28 UTC (permalink / raw)
  Cc: ding

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Grossjohann) writes:

> > ,----
> > |  (add-to-list nnmail-split-abbrev-alist 
> > |              '((anyuc ."From\\|To\\|Cc\\|Sender\\|Newsgroup")
> > |                (mailuc . "Mailer-daemon\\|Postmaster\\|Uucp")
> > |                (touc . "To\\|Cc\\|Apparently-To\\|Resent-To\\|Resent-Cc")
> > |                (fromuc . "From\\|Sender\\|Resent-From"))
> > |              :group 'nnmail-split
> > |              :type '(repeat (cons :format "%v" symbol regexp)))
> > `----
> 
> Delete the `:group' and `:type' clauses:
> 
> (add-to-list nnmail-split-abbrev-alist 
>              '((anyuc ."From\\|To\\|Cc\\|Sender\\|Newsgroup")
>                (mailuc . "Mailer-daemon\\|Postmaster\\|Uucp")
>                (touc . "To\\|Cc\\|Apparently-To\\|Resent-To\\|Resent-Cc")
>                (fromuc . "From\\|Sender\\|Resent-From")))

I did that before and got:

         Wrong type argument: symbolp, ((any . "from\\|to\\|cc ...))

So, I figured the `:type' part should be provided. Guess, I got
confused by all these different *Help* buffers, locating all kinds of
functions.

However, the error message remains.

Holger

-- 




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

* Re: Header Fields and Split Fancy
  2000-04-18 14:28   ` Holger Sparr
@ 2000-04-18 14:43     ` Kai Großjohann
  0 siblings, 0 replies; 9+ messages in thread
From: Kai Großjohann @ 2000-04-18 14:43 UTC (permalink / raw)
  Cc: ding

Holger Sparr <sparr@mfkrs1.mw.tu-dresden.de> writes:

> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Grossjohann) writes:
> 
> > > ,----
> > > |  (add-to-list nnmail-split-abbrev-alist 
> 
> I did that before and got:
> 
>          Wrong type argument: symbolp, ((any . "from\\|to\\|cc ...))

Argh.  I missed the missing single quote:

(add-to-list 'nnmail-split-abbrev-alist
;            ^
;            missing

Sorry.

kai
-- 
Beware of flying birch trees.



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

* Re: Header Fields and Split Fancy
  2000-04-18 10:00 Header Fields and Split Fancy Holger Sparr
  2000-04-18 10:57 ` Kai Großjohann
  2000-04-18 11:52 ` Kai Großjohann
@ 2000-04-19 13:34 ` Per Abrahamsen
  2000-04-19 13:47   ` Karl Kleinpaste
  2 siblings, 1 reply; 9+ messages in thread
From: Per Abrahamsen @ 2000-04-19 13:34 UTC (permalink / raw)


Holger Sparr <sparr@mfkrs1.mw.tu-dresden.de> writes:

> I tried to set up nnmail-split-fancy. I encountered a problem caused
> by the capitals in the header fields of my messages.

The matching is supposed to be case insensitive, and according to my
own tests it is.



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

* Re: Header Fields and Split Fancy
  2000-04-18 11:29   ` Holger Sparr
@ 2000-04-19 13:36     ` Per Abrahamsen
  0 siblings, 0 replies; 9+ messages in thread
From: Per Abrahamsen @ 2000-04-19 13:36 UTC (permalink / raw)


Holger Sparr <sparr@mfkrs1.mw.tu-dresden.de> writes:

> Without being case sensitive like:
> 
> 	(from	".*elsevier"			"mail.elsevier")
>         [...]
> 	(to	"sparr@\\|Sparr@"		"mail.other")
> 	(to	"sparr+usenet@"
> 	    (| ("subject"	"Re:.*"		"mail.answer")
> 	       ("references"	".*@.*"		"mail.answer")
> 	       "mail.spam"))
> 	"mail.spam")

Can you try to create a small, self-contained "nnmail-split-fancy"
where you can reproduce the problem?



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

* Re: Header Fields and Split Fancy
  2000-04-19 13:34 ` Per Abrahamsen
@ 2000-04-19 13:47   ` Karl Kleinpaste
  0 siblings, 0 replies; 9+ messages in thread
From: Karl Kleinpaste @ 2000-04-19 13:47 UTC (permalink / raw)


Per Abrahamsen <abraham@dina.kvl.dk> writes:
> The matching is supposed to be case insensitive, and according to my
> own tests it is.

Yes, in fact I explicitly want case-sensitivity at times, so I have to
use this to get it during nnmail's activities:

(add-hook 'nnmail-split-hook (lambda nil (setq case-fold-search nil)))



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

end of thread, other threads:[~2000-04-19 13:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-18 10:00 Header Fields and Split Fancy Holger Sparr
2000-04-18 10:57 ` Kai Großjohann
2000-04-18 11:29   ` Holger Sparr
2000-04-19 13:36     ` Per Abrahamsen
2000-04-18 11:52 ` Kai Großjohann
2000-04-18 14:28   ` Holger Sparr
2000-04-18 14:43     ` Kai Großjohann
2000-04-19 13:34 ` Per Abrahamsen
2000-04-19 13:47   ` Karl Kleinpaste

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