[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#56824: 29.0.50; mail-header-parse-address drops the 1st character fr
From: |
Lars Ingebrigtsen |
Subject: |
bug#56824: 29.0.50; mail-header-parse-address drops the 1st character from the name |
Date: |
Fri, 29 Jul 2022 15:36:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Sam Steingold <sds@gnu.org> writes:
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=10406
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56422
>
> Lars told me to use `mail-header-parse-address' instead of
> `mail-extract-address-components'.
Well, not exactly.
> Well, I tried, with a positive effect (thanks Lars!),
> but here is the 1st time the former is deficient:
>
> (mail-header-parse-addresses "Štěpán Němec <stepnem@gmail.com>")
> ==> (("stepnem@gmail.com" . "těpán Němec"))
> (mail-extract-address-components "Štěpán Němec <stepnem@gmail.com>")
> ==> ("Štěpán Němec" "stepnem@gmail.com")
`mail-header-parse-addresses' is for parsing RFC822bis mail addresses.
"Štěpán Němec <stepnem@gmail.com>" is definitely not one of those.
You're probably looking for `mail-header-parse-address-lax':
(mail-header-parse-address-lax "Štěpán Němec <stepnem@gmail.com>")
-> ("stepnem@gmail.com" . "Štěpán Němec")
This should probably be documented better.