GNU bug report logs -
#56422
29.0.50; mail-extract-address-components poorly handles " via " addresses
Previous Next
Reported by: sds <at> gnu.org
Date: Wed, 6 Jul 2022 15:23:01 UTC
Severity: normal
Found in version 29.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 56422 <at> debbugs.gnu.org (full text, mbox):
Sam Steingold <sds <at> gnu.org> writes:
> The correct handling would be
>
> (mail-extract-address-components "Po Lu via \"Emacs development discussions.\" <emacs-devel <at> gnu.org>")
> => ("Emacs development discussions." "emacs-devel <at> gnu.org")
mail-extract-address-components is a DWIM-ish thing that doesn't have
much documented behaviour -- it just tries to make things "pretty" by
applying lots of (mostly misguided) heuristics. So talking about
"correct" here isn't er correct.
If you have an RFC822bis From header, you should use
`mail-header-parse-address'. If you have something that's vaguely like
a mail header and want to split it, use `mail-header-parse-address-lax'.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 2 years and 313 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.