Gnus development mailing list
 help / color / mirror / Atom feed
* nnmail-split-fancy question
@ 1999-04-28 17:43 Neil Crellin
  1999-04-28 19:04 ` Alexandre Oliva
  1999-04-28 19:58 ` Per Abrahamsen
  0 siblings, 2 replies; 7+ messages in thread
From: Neil Crellin @ 1999-04-28 17:43 UTC (permalink / raw)


I've been using nnmail-split-fancy for a long time now, and can
usually make it do what I want. But there's a really simple case
that's giving me more trouble than it should. Since I switched to
getting mail via POP, I occasionally need to split mail sent by users
as local delivery on the popserver, so the from or to lines contain no
@hostname. I figured I could do a simple rule like

(to "^[^@]+$" "work")

in nnmail-split-fancy to make this work, but it doesn't, and no amount
of double backwhacking pieces of it or pondering
nnmail-split-fancy-syntax-table is enlightening me as to why.
Any nnmail-split-fancy regexp masters feel like helping me out here?

-- 
Neil Crellin <neilc@wallaby.cc>


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

* Re: nnmail-split-fancy question
  1999-04-28 17:43 nnmail-split-fancy question Neil Crellin
@ 1999-04-28 19:04 ` Alexandre Oliva
  1999-04-28 22:29   ` Justin Sheehy
  1999-04-29  7:51   ` Kai.Grossjohann
  1999-04-28 19:58 ` Per Abrahamsen
  1 sibling, 2 replies; 7+ messages in thread
From: Alexandre Oliva @ 1999-04-28 19:04 UTC (permalink / raw)
  Cc: ding

On Apr 28, 1999, Neil Crellin <neilc@wallaby.cc> wrote:

> nnmail-split-fancy-syntax-table is enlightening me as to why.

This reminded me of another problem I've been observing.  My
nnmail-split-fancy looks like:

(| (& ; ...
      (any "\\(libtool@gnu\\.org\\)" "libtool")
      ; ...
      (any "\\(bug-libtool@gnu\\.org\\)" "bug-libtool")
      ; ...
   )
   "mail.others"))

The problem is that all messages posted to bug-libtool end up in both
libtool and bug-libtool folders :-(

I've tried to prepend \(^\|[: ,]\) to the `libtool' entry, but then
nothing would match it, because of the restriction on matching full
words.  Wouldn't it be better not to set `-' as a word separator in
the syntax table?  Or is there some simpler fix I'm missing?

I know I could use
 (| (any "\\(bug-libtool@gnu\\.org\\)" "bug-libtool")
    (any "\\(libtool@gnu\\.org\\)" "libtool"))

But then messages posted to both groups wouldn't be stored as such.
And then, my nnmail-split-fancy is automatically generated from
the `to-list' group parameters, so I'd rather keep it like that.

(BTW, Lars, my copyright assignment has been filed at FSF already, so
you may already install the patch that implements this)

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists



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

* Re: nnmail-split-fancy question
  1999-04-28 17:43 nnmail-split-fancy question Neil Crellin
  1999-04-28 19:04 ` Alexandre Oliva
@ 1999-04-28 19:58 ` Per Abrahamsen
  1999-05-03 19:12   ` Neil Crellin
  1 sibling, 1 reply; 7+ messages in thread
From: Per Abrahamsen @ 1999-04-28 19:58 UTC (permalink / raw)
  Cc: ding

Neil Crellin <neilc@wallaby.cc> writes:

> I figured I could do a simple rule like
> 
> (to "^[^@]+$" "work")

Try to reverse the test 

(| (to ".*@.*" ( ... has @, do normal processing ... ))
   "work")



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

* Re: nnmail-split-fancy question
  1999-04-28 19:04 ` Alexandre Oliva
@ 1999-04-28 22:29   ` Justin Sheehy
  1999-04-29  3:42     ` Alexandre Oliva
  1999-04-29  7:51   ` Kai.Grossjohann
  1 sibling, 1 reply; 7+ messages in thread
From: Justin Sheehy @ 1999-04-28 22:29 UTC (permalink / raw)


Alexandre Oliva <oliva@dcc.unicamp.br> writes:

> This reminded me of another problem I've been observing.  My
> nnmail-split-fancy looks like:
> 
> (| (& ; ...
>       (any "\\(libtool@gnu\\.org\\)" "libtool")
>       ; ...
>       (any "\\(bug-libtool@gnu\\.org\\)" "bug-libtool")
>       ; ...
>    )
>    "mail.others"))
> 
> The problem is that all messages posted to bug-libtool end up in both
> libtool and bug-libtool folders :-(

`nnmail-crosspost' is a variable declared in Lisp.

Value: t

Documentation:
If non-nil, do crossposting if several split methods match the mail.
If nil, the first match found will be used.

So, just set that to nil and switch the order of those rules.

-- 
Justin Sheehy

In a cloud bones of steel.
  




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

* Re: nnmail-split-fancy question
  1999-04-28 22:29   ` Justin Sheehy
@ 1999-04-29  3:42     ` Alexandre Oliva
  0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Oliva @ 1999-04-29  3:42 UTC (permalink / raw)
  Cc: ding

On Apr 28, 1999, Justin Sheehy <justin@linus.mitre.org> wrote:

> Alexandre Oliva <oliva@dcc.unicamp.br> writes:

>> The problem is that all messages posted to bug-libtool end up in both
>> libtool and bug-libtool folders :-(

> `nnmail-crosspost' is a variable declared in Lisp.

You didn't read the rest of my message, did you? :-)

I value crossposting very much, but only when appropriate.  The point
is that, if a message was posted *only* to bug-libtool@gnu.org, I
don't want it to appear in my libtool mail group, only in bug-libtool.
But, if a message was posted to bug-libtool *and* libtool@gnu.org, I
want the message in both.

My particular problem is just an instance of a more general problem:
there's no way (that I know of) to match a *complete* e-mail address.
We can only match sub-strings that are a full word (or more than one
word), but I'd like to be able to say that I don't want to match
partial incomplete addresses, or at least to say `this must match a
complete e-mail address'.  Could somebody *please* prove me wrong? :-)

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists



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

* Re: nnmail-split-fancy question
  1999-04-28 19:04 ` Alexandre Oliva
  1999-04-28 22:29   ` Justin Sheehy
@ 1999-04-29  7:51   ` Kai.Grossjohann
  1 sibling, 0 replies; 7+ messages in thread
From: Kai.Grossjohann @ 1999-04-29  7:51 UTC (permalink / raw)


Alexandre Oliva <oliva@dcc.unicamp.br> writes:

  > I've tried to prepend \(^\|[: ,]\) to the `libtool' entry, but then
  > nothing would match it, because of the restriction on matching full
  > words.

Try \(^\|.*[: ,]\) .
         ^^
         because of the full-words restriction

Double your backslashes as appropriate.

kai
-- 
Abort this operation?   [Abort]  [Cancel]


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

* Re: nnmail-split-fancy question
  1999-04-28 19:58 ` Per Abrahamsen
@ 1999-05-03 19:12   ` Neil Crellin
  0 siblings, 0 replies; 7+ messages in thread
From: Neil Crellin @ 1999-05-03 19:12 UTC (permalink / raw)
  Cc: ding

Per Abrahamsen <abraham@dina.kvl.dk> writes:
> Neil Crellin <neilc@wallaby.cc> writes:
> 
> > I figured I could do a simple rule like
> > 
> > (to "^[^@]+$" "work")
> 
> Try to reverse the test 
> 
> (| (to ".*@.*" ( ... has @, do normal processing ... ))
>    "work")

Ugh. Just wanted to follow-up and thank Per. While this seems like an
ass-backwards way to do this to me, it works, and that's a lot better
than I'd managed myself. Many thanks, Per.

-- 
Neil Crellin <neilc@wallaby.cc>


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

end of thread, other threads:[~1999-05-03 19:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-28 17:43 nnmail-split-fancy question Neil Crellin
1999-04-28 19:04 ` Alexandre Oliva
1999-04-28 22:29   ` Justin Sheehy
1999-04-29  3:42     ` Alexandre Oliva
1999-04-29  7:51   ` Kai.Grossjohann
1999-04-28 19:58 ` Per Abrahamsen
1999-05-03 19:12   ` Neil Crellin

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