bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10406: 24.0.92; mail-extract-address-components returns strange resu


From: Lars Ingebrigtsen
Subject: bug#10406: 24.0.92; mail-extract-address-components returns strange results
Date: Sun, 15 Apr 2018 20:46:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Sam Steingold <address@hidden> writes:

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

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 "address@hidden <address@hidden>")
=> ("address@hidden" . "address@hidden")

Packages that then want to display the "name" "address@hidden" can
then do whatever they want with it...

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]