GNU bug report logs -
#56824
29.0.50; mail-header-parse-address drops the 1st character from the name
Previous Next
Reported by: sds <at> gnu.org
Date: Fri, 29 Jul 2022 13:32:02 UTC
Severity: normal
Found in version 29.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 56824 <at> debbugs.gnu.org (full text, mbox):
Sam Steingold <sds <at> 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 <at> gmail.com>")
> ==> (("stepnem <at> gmail.com" . "těpán Němec"))
> (mail-extract-address-components "Štěpán Němec <stepnem <at> gmail.com>")
> ==> ("Štěpán Němec" "stepnem <at> gmail.com")
`mail-header-parse-addresses' is for parsing RFC822bis mail addresses.
"Štěpán Němec <stepnem <at> 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 <at> gmail.com>")
-> ("stepnem <at> gmail.com" . "Štěpán Němec")
This should probably be documented better.
This bug report was last modified 2 years and 347 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.