GNU bug report logs - #63378
A single X-Debbugs-CC header must be used

Previous Next

Package: guix;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Mon, 8 May 2023 17:18:02 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #34 received at 63378-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: rekado <at> elephly.net, 63378-done <at> debbugs.gnu.org
Subject: Re: bug#63378: [PATCH] teams: Fix script to produce a single
 X-Debbugs-Cc header.
Date: Thu, 11 May 2023 09:18:46 -0400
Hi Arun,

Arun Isaac <arunisaac <at> 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




This bug report was last modified 2 years and 89 days ago.

Previous Next


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