Subject: Re: bug#10406: 24.0.92; mail-extract-address-components returns strange results

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 15 Apr 2018 20:46:24 +0200

Sam Steingold <[email-masked]> writes:

> I find this result surprising (emacs -Q):
>   (mail-extract-address-components "[email-masked] <[email-masked]>")
> ==>  ("foo" "[email-masked]")
> I expected either
>   (nil "[email-masked]")
> or
>   ("foo bar" "[email-masked]")

Yes, that function is weird.  I've updated the doc string to it to refer
users to `mail-header-parse-address' instead.

(mail-header-parse-address "[email-masked] <[email-masked]>")
=> ("[email-masked]" . "[email-masked]")

Packages that then want to display the "name" "[email-masked]" can
then do whatever they want with it...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no