Kimmo Suominen <[EMAIL PROTECTED]> (Kimmo) writes:

Ian> When I want it to return:
Ian> ("Ian Flanigan" "xstacy::foo")

Kimmo> How about ("Ian Flanigan" "[EMAIL PROTECTED]") ?

Kimmo>   (setq
Kimmo>    bbdb-canonicalize-net-hook
Kimmo>    '(lambda (addr)
Kimmo>       (cond ((string-match "\\`\\([^:.]+\\)::\\([^@]+\\)" addr)
Kimmo>       (concat (substring addr (match-beginning 2) (match-end 2))
Kimmo>               "@"
Kimmo>               (substring addr (match-beginning 1) (match-end 1))
Kimmo>               ".enet.dec.com"))
Kimmo>      (t addr)))
Kimmo>    )

Indeed, that is similar to what I have, yet not sufficient.  Before
bbdb-canonicalize-net-hook gets called, the various parts of the
address are extracted with mail-extract-address-components.  It is the
second element of the list returned from m-e-a-c that
bbdb-canonicalize-net-hook gets called on.

One (that would be me) would expect that for:

        Ian Flanigan <xstacy::iflanigan>

m-e-a-c would return:

        ("Ian Flanigan" "xstacy::foo")

But, alas, it doesn't.  It replaces the "::" with "  ", which makes
things a bit difficult since the above regexp wouldn't grok it. :-6
(Yeah, I can look for the "  ", which is what I do now, but that seems
gross.)

Thanks.

-- 
Ian Flanigan

Digital Equipment International         "Slower pizza's more luscious"
[EMAIL PROTECTED]              -- "King of Spain," Moxy Fruvous

Reply via email to