GNU bug report logs - #10406
24.0.92; mail-extract-address-components returns strange results

Previous Next

Package: emacs;

Reported by: sds <at> gnu.org

Date: Fri, 30 Dec 2011 04:22:02 UTC

Severity: minor

Found in version 24.0.92

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10406 in the body.
You can then email your comments to 10406 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#10406; Package emacs. (Fri, 30 Dec 2011 04:22:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to sds <at> gnu.org:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 30 Dec 2011 04:22:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sam Steingold <sds <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.92; mail-extract-address-components returns strange results
Date: Thu, 29 Dec 2011 23:18:32 -0500
In GNU Emacs 24.0.92.5 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2011-12-28 on t520sds
Windowing system distributor `The X.Org Foundation', version 11.0.11004000
configured using `configure  '--with-wide-int''

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


-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000
http://jihadwatch.org http://truepeace.org http://camera.org
http://memri.org http://palestinefacts.org http://dhimmi.com http://ffii.org
nobody's life, liberty or property are safe while the legislature is in session




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10406; Package emacs. (Sun, 15 Apr 2018 18:47:02 GMT) Full text and rfc822 format available.

Message #8 received at 10406 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 10406 <at> debbugs.gnu.org
Cc: sds <at> gnu.org
Subject: Re: bug#10406: 24.0.92;
 mail-extract-address-components returns strange results
Date: Sun, 15 Apr 2018 20:46:24 +0200
Sam Steingold <sds <at> gnu.org> writes:

> I find this result surprising (emacs -Q):
>   (mail-extract-address-components "foo.bar <at> quux.com <foo.bar <at> quux.com>")
> ==>  ("foo" "foo.bar <at> quux.com")
> I expected either
>   (nil "foo.bar <at> quux.com")
> or
>   ("foo bar" "foo.bar <at> 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 <at> quux.com <foo.bar <at> quux.com>")
=> ("foo.bar <at> quux.com" . "foo.bar <at> quux.com")

Packages that then want to display the "name" "foo.bar <at> quux.com" can
then do whatever they want with it...

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




bug closed, send any further explanations to 10406 <at> debbugs.gnu.org and sds <at> gnu.org Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 15 Apr 2018 18:47:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 14 May 2018 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 97 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.