From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: issue with mail-extract-address-components Date: Wed, 15 Mar 2017 14:08:18 -0700 Message-ID: <87wpbqjlj1.fsf@ericabrahamsen.net> References: <874lyunvvi.fsf@ericabrahamsen.net> <877f3qp90j.fsf@linux-m68k.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1489612795 10014 195.159.176.226 (15 Mar 2017 21:19:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 15 Mar 2017 21:19:55 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 15 22:19:52 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1coGKk-0002C8-Qq for ged-emacs-devel@m.gmane.org; Wed, 15 Mar 2017 22:19:50 +0100 Original-Received: from localhost ([::1]:39547 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coGKq-0000Td-Rn for ged-emacs-devel@m.gmane.org; Wed, 15 Mar 2017 17:19:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coGJJ-0000D8-6Z for emacs-devel@gnu.org; Wed, 15 Mar 2017 17:18:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1coG9u-0005HP-2T for emacs-devel@gnu.org; Wed, 15 Mar 2017 17:08:41 -0400 Original-Received: from [195.159.176.226] (port=42643 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1coG9t-0005HH-SD for emacs-devel@gnu.org; Wed, 15 Mar 2017 17:08:37 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1coG9i-0001sc-Cj for emacs-devel@gnu.org; Wed, 15 Mar 2017 22:08:26 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 37 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:pd1CnFNIU66BqsOB/pkvR3laH4w= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:213059 Archived-At: Andreas Schwab writes: > On Mär 15 2017, Eric Abrahamsen wrote: > >> I got an email with a malformed CC line: >> >> Lörsch, Karl , "Wegner, Simon" >> >> Ie, no quotes around the first name. `mail-extract-address-components' >> splits on the comma, as I suppose it should, and its return value is: >> >> (("Lörsch" "Lörsch") >> ("Karl" "loersch@domain.cc") >> ("Simon Wegner" "Wegner@domain.cc")) >> >> It's doing the best it can here, but I would expect ("Lörsch" nil) as >> the first element, which would make it easier for other functions to >> handle the return value correctly. > > Does mail-extract-address-components actually care whether the singleton > is a valid address? Should it handle foo@bar different from foo? But > foo could actually be a valid address in the local domain. I don't know if it should care or not, that's really what I'm asking here. Later on in the conversion Karl sent an email directly, and his name in the From: header was again with a comma but no quotes. When I replied to him my Message buffer looked like this: To: Lörsch Cc: karl "Lörsch" might be a valid address in the local domain, but personally I'd prefer if it got it wrong the other way. E