From: Lars Ingebrigtsen <larsi@gnus.org>
To: 10406@debbugs.gnu.org
Cc: sds@gnu.org
Subject: bug#10406: 24.0.92; mail-extract-address-components returns strange results
Date: Sun, 15 Apr 2018 20:46:24 +0200 [thread overview]
Message-ID: <874lkc8fzz.fsf@mouse.gnus.org> (raw)
In-Reply-To: <87hb0i4rqf.fsf@gnu.org> (Sam Steingold's message of "Thu, 29 Dec 2011 23:18:32 -0500")
Sam Steingold <sds@gnu.org> writes:
> I find this result surprising (emacs -Q):
> (mail-extract-address-components "foo.bar@quux.com <foo.bar@quux.com>")
> ==> ("foo" "foo.bar@quux.com")
> I expected either
> (nil "foo.bar@quux.com")
> or
> ("foo bar" "foo.bar@quux.com")
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 "foo.bar@quux.com <foo.bar@quux.com>")
=> ("foo.bar@quux.com" . "foo.bar@quux.com")
Packages that then want to display the "name" "foo.bar@quux.com" can
then do whatever they want with it...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
prev parent reply other threads:[~2018-04-15 18:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-30 4:18 bug#10406: 24.0.92; mail-extract-address-components returns strange results Sam Steingold
2018-04-15 18:46 ` Lars Ingebrigtsen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874lkc8fzz.fsf@mouse.gnus.org \
--to=larsi@gnus.org \
--cc=10406@debbugs.gnu.org \
--cc=sds@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.