all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jonas Bernoulli <jonas@bernoul.li>
To: 48592@debbugs.gnu.org
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	[thread overview]
Message-ID: <20210522203250.2216-2-jonas@bernoul.li> (raw)
In-Reply-To: <20210522203250.2216-1-jonas@bernoul.li>

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






  reply	other threads:[~2021-05-22 20:32 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-22 20:25 bug#48592: [PATCH 0/2] Support plural forms of Author and Maintainer library headers Jonas Bernoulli
2021-05-22 20:32 ` bug#48592: [PATCH 1/2] " Jonas Bernoulli
2021-05-22 20:32   ` Jonas Bernoulli [this message]
2021-05-23  6:46 ` bug#48592: [PATCH 0/2] " Eli Zaretskii
2021-05-23  8:43   ` Jonas Bernoulli
2021-05-23  9:31     ` Eli Zaretskii
2021-05-23  9:52       ` Colin Baxter
2021-05-23 11:08       ` Lars Ingebrigtsen
2021-05-23 11:48         ` Michael Albinus
2021-05-23 18:21           ` Jonas Bernoulli
2021-05-23 18:45             ` Michael Albinus
2021-05-23 21:14               ` Jonas Bernoulli
2021-05-24  7:04                 ` Michael Albinus
2021-05-24  7:28                   ` Eli Zaretskii
2021-05-24  8:58                     ` Jonas Bernoulli
2021-05-24  9:22                       ` Christopher Dimech
2021-05-24 12:16                         ` Michael Albinus
2021-05-24  9:44                       ` Eli Zaretskii
2021-05-24 12:10                         ` Michael Albinus
2021-05-24 13:51                         ` Lars Ingebrigtsen
2021-06-30 17:59                           ` Jonas Bernoulli
2021-06-30 19:24                             ` Michael Albinus
2021-06-30 19:41                               ` Jonas Bernoulli
2021-07-01 11:40                             ` Lars Ingebrigtsen
2024-02-14  1:43 ` J.P.

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=20210522203250.2216-2-jonas@bernoul.li \
    --to=jonas@bernoul.li \
    --cc=48592@debbugs.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.