From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jonas Bernoulli Newsgroups: gmane.emacs.bugs Subject: bug#48592: [PATCH 2/2] * lisp/emacs-lisp/lisp-mnt.el (lm-crack-address): Right-trim name. Date: Sat, 22 May 2021 22:32:50 +0200 Message-ID: <20210522203250.2216-2-jonas@bernoul.li> References: <20210522202519.32549-1-jonas@bernoul.li> <20210522203250.2216-1-jonas@bernoul.li> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8399"; mail-complaints-to="usenet@ciao.gmane.io" To: 48592@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 22 22:34:27 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lkYKJ-0001vS-Gv for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 May 2021 22:34:27 +0200 Original-Received: from localhost ([::1]:44560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkYKH-0006fQ-LQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 May 2021 16:34:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkYJu-0006d8-A7 for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 16:34:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56813) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lkYJu-0001sL-2f for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 16:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lkYJt-0002bZ-Um for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 16:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jonas Bernoulli Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 May 2021 20:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48592 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 48592-submit@debbugs.gnu.org id=B48592.16217155959955 (code B ref 48592); Sat, 22 May 2021 20:34:01 +0000 Original-Received: (at 48592) by debbugs.gnu.org; 22 May 2021 20:33:15 +0000 Original-Received: from localhost ([127.0.0.1]:40126 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkYJ9-0002aU-2K for submit@debbugs.gnu.org; Sat, 22 May 2021 16:33:15 -0400 Original-Received: from mail.hostpark.net ([212.243.197.30]:54680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkYIt-0002Zi-IT for 48592@debbugs.gnu.org; Sat, 22 May 2021 16:33:14 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id EDD16160BF; Sat, 22 May 2021 22:32:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bernoul.li; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=sel2011a; t=1621715575; bh=ax14ujPY88ppCy4 Aparq/YTEf4Os8QNY4PT4I6mpM58=; b=Dz4lGjrIWfBHNXOqbF3NQbYfY+TuOsk Ud4KnznxezmaUfO1EqDsylperIzR0BEpMZgaX7ck4R2OSOBGBWz+xuOiksVlMS15 93ESvH9Es7+JM7FeQ32cPhVDIG6vfXBAf5c14l30k0qEyQcDdwKTQwoZUMFhJzqN LPv5Y/sr6l8k= X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Original-Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail1.hostpark.net [127.0.0.1]) (amavisd-new, port 10224) with ESMTP id lPfCxOQTWqNw; Sat, 22 May 2021 22:32:55 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id C18C3160DE; Sat, 22 May 2021 22:32:55 +0200 (CEST) X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210522203250.2216-1-jonas@bernoul.li> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:207064 Archived-At: The addresses might be aligned in which case we have to trim the extra whitespace at the end of the names. --- lisp/emacs-lisp/lisp-mnt.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index 25b5e8c5bd..a73c53def4 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -360,10 +360,10 @@ lm-crack-address "Split up an email address X into full name and real email address. The value is a cons of the form (FULLNAME . ADDRESS)." (cond ((string-match "\\(.+\\) [(<]\\(\\S-+@\\S-+\\)[>)]" x) - (cons (match-string 1 x) + (cons (string-trim-right (match-string 1 x)) (match-string 2 x))) ((string-match "\\(\\S-+@\\S-+\\) [(<]\\(.*\\)[>)]" x) - (cons (match-string 2 x) + (cons (string-trim-right (match-string 2 x)) (match-string 1 x))) ((string-match "\\S-+@\\S-+" x) (cons nil x)) -- 2.30.1