all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Arun Isaac <arunisaac@systemreboot.net>
Cc: rekado@elephly.net, 63378-done@debbugs.gnu.org
Subject: bug#63378: [PATCH] teams: Fix script to produce a single X-Debbugs-Cc header.
Date: Thu, 11 May 2023 09:18:46 -0400	[thread overview]
Message-ID: <87y1lvngzt.fsf@gmail.com> (raw)
In-Reply-To: <87zg6b5dew.fsf@systemreboot.net> (Arun Isaac's message of "Thu,  11 May 2023 12:13:27 +0100")

Hi Arun,

Arun Isaac <arunisaac@systemreboot.net> writes:

> Hi Maxim,
>
> Thank you for the updated patch! :-) It LGTM. Please push.
>
>> OK!  I opted for simplicity and double-quoted all the names.
>
> Fair enough. Though a check is only one condition away! ;-)
>
> (if (string-contains? (person-name member) ",")
>     (string-append "\"" (person-name member) "\"")
>     (person-name member))

It's string-contains without ?, apparently.  Let's try this (and save a
few bytes per submission :-)):

--8<---------------cut here---------------start------------->8---
modified   etc/teams.scm.in
@@ -618,7 +618,11 @@ (define (sort-members members)

 (define (member->string member)
   "Return the 'email <name>' string representation of MEMBER."
-  (format #false "\"~a\" <~a>" (person-name member) (person-email member)))
+  (let* ((name (person-name member))
+         (quoted-name/maybe (if (string-contains name ",")
+                                (string-append "\"" name "\"")
+                                name)))
+    (format #false "~a <~a>" quoted-name/maybe (person-email member))))

 (define* (list-members team #:optional port (prefix ""))
   "Print the members of the given TEAM."
--8<---------------cut here---------------end--------------->8---

The change is now installed; thanks for the review!

-- 
Thanks,
Maxim




  reply	other threads:[~2023-05-11 13:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-08 17:17 bug#63378: A single X-Debbugs-CC header must be used Maxim Cournoyer
2023-05-08 18:29 ` bug#63378: [PATCH] teams: Fix script to produce a single X-Debbugs-Cc header Maxim Cournoyer
2023-05-09 13:33   ` bug#63378: A single X-Debbugs-CC header must be used Maxim Cournoyer
2023-05-09 23:43     ` Arun Isaac
2023-05-10  1:15       ` Maxim Cournoyer
2023-05-09 23:55   ` bug#63378: [PATCH] teams: Fix script to produce a single X-Debbugs-Cc header Arun Isaac
2023-05-10 16:15     ` Maxim Cournoyer
2023-05-11 11:13       ` Arun Isaac
2023-05-11 13:18         ` Maxim Cournoyer [this message]
2023-05-11 23:59           ` Arun Isaac
2023-05-10  2:55 ` bug#63378: [PATCH v2] " Maxim Cournoyer

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=87y1lvngzt.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=63378-done@debbugs.gnu.org \
    --cc=arunisaac@systemreboot.net \
    --cc=rekado@elephly.net \
    /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/guix.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.