From unknown Fri Jun 20 18:11:38 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#63802 <63802@debbugs.gnu.org> To: bug#63802 <63802@debbugs.gnu.org> Subject: Status: [mumi PATCH 0/3] Use consolidated X-Debbugs-Cc header Reply-To: bug#63802 <63802@debbugs.gnu.org> Date: Sat, 21 Jun 2025 01:11:38 +0000 retitle 63802 [mumi PATCH 0/3] Use consolidated X-Debbugs-Cc header reassign 63802 mumi submitter 63802 Arun Isaac severity 63802 normal tag 63802 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue May 30 08:12:05 2023 Received: (at submit) by debbugs.gnu.org; 30 May 2023 12:12:05 +0000 Received: from localhost ([127.0.0.1]:60351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3yCq-0004s8-Sd for submit@debbugs.gnu.org; Tue, 30 May 2023 08:12:05 -0400 Received: from lists.gnu.org ([209.51.188.17]:49742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3yCn-0004ro-LM for submit@debbugs.gnu.org; Tue, 30 May 2023 08:12:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3yCn-0002f2-FF for guix-patches@gnu.org; Tue, 30 May 2023 08:12:01 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3yCk-0005KB-3q for guix-patches@gnu.org; Tue, 30 May 2023 08:12:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=3QDt9SON2Zjw65tjEXAbIDpK3g3Oi9L/OdlU55vKdOY=; b=j1w89hQiREODVoaFMR1kbZl/rI xLj2ENv8YYSXB9eXP1rkEvM1rQTZqvcMoqTT4haRgbx8D5NRD67kUtswZV4d2bh0hPtyhoWIxt/Ae EQVBhOlM0FnNcWQ9elVjtEJ5FI2rQqVjVBX9oSLmfFxUPNUq4uOaySb5vjTxDvCw90rRRrzRIqn7d 6AZjd7bM5zXF5wCKyY5b65uQG3ZKS0lDhNcdsy23LEfNxmtzGfJkx5lYgwznkMNvaQinRwBwpsQC2 nUfDwToQlujFHv3gQo5Z7pOVK7QmM6A8Rw3VajqDqUpp0B0RbfIlzweaNro66Kh54Smm6LPg1kh/i p98yA7Ug==; Received: from [192.168.2.1] (port=40514 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1q3yCW-001s2Q-2I; Tue, 30 May 2023 13:11:45 +0100 From: Arun Isaac To: guix-patches@gnu.org Subject: [mumi PATCH 0/3] Use consolidated X-Debbugs-Cc header Date: Tue, 30 May 2023 13:11:32 +0100 Message-Id: <20230530121132.26057-1-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=139.59.75.54; envelope-from=arunisaac@systemreboot.net; helo=mugam.systemreboot.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Arun Isaac , Maxim Cournoyer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hi, With this patchset, mumi invokes teams.scm and combines its X-Debbugs-Cc with that produced by teams.scm. Thus, there is only a single consolidated X-Debbugs-Cc header in the outgoing email. This is achieved by providing a new `mumi git-send-email-headers' subcommand that is passed to `git send-email` via --header-cmd. I'm Ccing Maxim as this is related to https://issues.guix.gnu.org/63378 Regards, Arun Arun Isaac (3): client: Do not pass --add-header to git send-email. client: Add git-send-email-headers subcommand. client: Use mumi git-send-email-headers subcommand. mumi/client.scm | 52 ++++++++++++++++++++++++++++++++++++++++++------ scripts/mumi.in | 4 +++- tests/client.scm | 19 ++++++++++++------ 3 files changed, 62 insertions(+), 13 deletions(-) -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Tue May 30 08:15:20 2023 Received: (at 63802) by debbugs.gnu.org; 30 May 2023 12:15:20 +0000 Received: from localhost ([127.0.0.1]:60365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3yFz-0004yD-Lr for submit@debbugs.gnu.org; Tue, 30 May 2023 08:15:20 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:37734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3yFx-0004y1-3I for 63802@debbugs.gnu.org; Tue, 30 May 2023 08:15:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yUlYpvfQWxzu+iyIo3RJYtjbgXmZFCK8ueJflisrn/Y=; b=Jy36cEjs5oXwUbUuJC2dXwyphn rM0ew37HoTMPlszbQmNp4Rur7TtuGTZl/GO1Yjh9fsKuAoi+DvgPEE5PCakfsnonkzt8/5Ao5ouWY AU04BbFmFiHyuWEBtxmAScL3MnaMyMlazzvSS6nIQmVcyh/ORm+sxEs/JRWRgcSX8bkgUdSOC/t0E Wh19Vb9Qt4Vp7ymhSKDGGEJNIeujfntAXlJx4p/FO8nXBelHfF7Q0FdJ4PAaxT/uy0O5w5uR2QE2L owFZSnrhX4RpAX9t5L5y2kPOUWU7XIxK9PX8iKGkuubC7gP5l2sy3OBOKHRZeAlT5KEDIei5SodyW poR0V28Q==; Received: from [192.168.2.1] (port=38898 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1q3yFq-001s3y-1K; Tue, 30 May 2023 13:15:11 +0100 From: Arun Isaac To: 63802@debbugs.gnu.org Subject: [mumi PATCH 1/3] client: Do not pass --add-header to git send-email. Date: Tue, 30 May 2023 13:14:45 +0100 Message-Id: <20230530121447.26236-1-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: Arun Isaac , Maxim Cournoyer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) git send-email accepts --add-header only when passed a git format-patch style revision list. * mumi/client.scm (send-email): Do not pass --add-header to git-send-email. * tests/client.scm ("send patch to existing issue and Cc other participants"): Do not expect --add-header. --- mumi/client.scm | 5 +---- tests/client.scm | 6 +----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/mumi/client.scm b/mumi/client.scm index b575daa..5befd42 100644 --- a/mumi/client.scm +++ b/mumi/client.scm @@ -287,10 +287,7 @@ ISSUE-NUMBER." (git-send-email (string-append (number->string issue-number) "@" (client-config 'debbugs-host)) - patches - (map (cut string-append "--add-header=X-Debbugs-Cc: " <>) - (assq-ref (reply-email-headers issue-number) - 'cc)))) + patches)) (match patches ;; If it's a single patch, send it to the patch email address ;; and be done with it diff --git a/tests/client.scm b/tests/client.scm index 5729521..5352b08 100644 --- a/tests/client.scm +++ b/tests/client.scm @@ -126,11 +126,7 @@ called with." (list "foo.patch"))))))) (test-equal "send patch to existing issue and Cc other participants" - '(("git" "send-email" - "--to=12345@example.com" - "--add-header=X-Debbugs-Cc: John Doe " - "--add-header=X-Debbugs-Cc: Mary Smith " - "foo.patch")) + '(("git" "send-email" "--to=12345@example.com" "foo.patch")) (map (match-lambda ((command _) command)) (trace-calls (var@@ (mumi client) call-with-input-pipe*) -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Tue May 30 08:15:24 2023 Received: (at 63802) by debbugs.gnu.org; 30 May 2023 12:15:24 +0000 Received: from localhost ([127.0.0.1]:60368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3yG4-0004yd-29 for submit@debbugs.gnu.org; Tue, 30 May 2023 08:15:24 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:37738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3yFz-0004y5-0e for 63802@debbugs.gnu.org; Tue, 30 May 2023 08:15:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=k4WIF/8ImVOTSX34H7i2lVUfFPW37agFqivrA/NI1RQ=; b=CSAruXzdrIwOfdgX0D2PiYhA9D YpS3h4qZ5I9bKGP4vBEtS+bt99RCTSi0+wUj0vf+Bqgd+jvcaA6xy012FRbZiy+mX7q78wQIGy+f6 29/TzPww9+mAJ9QFCXe4zdRau4lzS2u19XyNikQCPXtVAb0uI4sKb4LLu4LpfD2ona/v0N/SofFpM 15ZPbrBAHDOiZGx3tPA6y0Jo8wrgw4sNyty16iHaXsjhTjqiJ7440lHECyAUJQp3WJGqyY8KUIX3q /v/bgq1mX9QLPgKy5OMsQnkN5HwN0S1KdcC55gaMDUPJJvO/VNQdyoACif2ekZsjweqWI9dsTlb+0 QD3FTggQ==; Received: from [192.168.2.1] (port=38898 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1q3yFu-001s3y-14; Tue, 30 May 2023 13:15:15 +0100 From: Arun Isaac To: 63802@debbugs.gnu.org Subject: [mumi PATCH 2/3] client: Add git-send-email-headers subcommand. Date: Tue, 30 May 2023 13:14:46 +0100 Message-Id: <20230530121447.26236-2-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230530121447.26236-1-arunisaac@systemreboot.net> References: <20230530121447.26236-1-arunisaac@systemreboot.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: Arun Isaac , Maxim Cournoyer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * mumi/client.scm: Import (rnrs exceptions). (git-send-email-headers): New public function. * scripts/mumi.in: Add git-send-email-headers subcommand. --- mumi/client.scm | 42 +++++++++++++++++++++++++++++++++++++++++- scripts/mumi.in | 2 ++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/mumi/client.scm b/mumi/client.scm index 5befd42..c70fe61 100644 --- a/mumi/client.scm +++ b/mumi/client.scm @@ -17,6 +17,7 @@ ;;; along with mumi. If not, see . (define-module (mumi client) + #:use-module (rnrs exceptions) #:use-module (rnrs io ports) #:use-module (srfi srfi-1) #:use-module (srfi srfi-19) @@ -38,7 +39,9 @@ print-current-issue set-current-issue! clear-current-issue! - send-email)) + send-email + git-send-email-headers + compose)) (define (git-top-level) "Return the top-level directory of the current git repository." @@ -306,3 +309,40 @@ ISSUE-NUMBER." "@" (client-config 'debbugs-host)) other-patches))))) + +(define (git-send-email-headers patch) + "Print send-email headers for PATCH." + (let* (;; Compute headers if configured in git config. + (header-command + (guard (ex (#t #f)) + (call-with-input-pipe* (list "git" "config" "sendemail.headerCmd") + get-line))) + (headers + (if header-command + (call-with-input-pipe (string-append header-command " " patch) + get-string-all) + "")) + (external-x-debbugs-cc + (assq-ref (parse-email-headers + (string-append (string-trim-right headers #\newline) + "\n")) + 'x-debbugs-cc)) + ;; Fetch Cc addresses for current issue. + (x-debbugs-cc + (assq-ref (reply-email-headers (current-issue-number)) + 'cc))) + ;; Print X-Debbugs-Cc header. + (when (or x-debbugs-cc external-x-debbugs-cc) + (display "X-Debbugs-Cc: ") + (display (if (and x-debbugs-cc external-x-debbugs-cc) + (string-append x-debbugs-cc ", " external-x-debbugs-cc) + (or x-debbugs-cc external-x-debbugs-cc))) + (newline)) + ;; Print headers other than X-Debbugs-Cc. + ;; TODO: RFC5322 headers are not restricted to a single + ;; line. "Folded" multi-line headers are allowed. Support them. + (for-each (lambda (line) + (unless (string-prefix-ci? "X-Debbugs-Cc:" line) + (display line) + (newline))) + (string-split headers #\newline)))) diff --git a/scripts/mumi.in b/scripts/mumi.in index 2295328..8fb7cd4 100644 --- a/scripts/mumi.in +++ b/scripts/mumi.in @@ -163,6 +163,8 @@ (client:clear-current-issue!)) (("send-email" . patches) (client:send-email patches)) + (("git-send-email-headers" patch) + (client:git-send-email-headers patch)) (("mailer" . rest) (let* ((opts (parse-options rest)) (sender (assoc-ref opts 'sender)) -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Tue May 30 08:15:25 2023 Received: (at 63802) by debbugs.gnu.org; 30 May 2023 12:15:25 +0000 Received: from localhost ([127.0.0.1]:60370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3yG4-0004yg-PI for submit@debbugs.gnu.org; Tue, 30 May 2023 08:15:25 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:37746) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3yG1-0004yN-I6 for 63802@debbugs.gnu.org; Tue, 30 May 2023 08:15:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=EH0wzgtfXZeFw+mOFLJG09BispslagQMEE2KeRQsdAA=; b=MagmIp0OTqh6waMFBvaVcTFUxF C3hv/wQDZAUF6DBvS0+icF1oggWvi6Pq1cNoOg1cfsY9OETcZpOmV3Ept3fAphnJIJdALbXHJl8MK AiesFlznkqRYcTOFXBQ9IILIjJnbslg+KdUAj5AEShvoAZv1rHGPgNITbiXIfbQUwrruL1Q329QAh hvco9HBeFsC1kSnWHDIrGQ30u2vZk616ViE/7jAAwGfgeEXVi3JyWscqk60S64q5wWwUKnMyUeYnO mwtxOt6JCq6HxQh6JgDnJRq0cTFHv0C5MaO1TCckeY89r9XKXe6hivQ7xNYL23jI42mxw6sxyuwKs fx2WzZgg==; Received: from [192.168.2.1] (port=38898 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1q3yFw-001s3y-2h; Tue, 30 May 2023 13:15:17 +0100 From: Arun Isaac To: 63802@debbugs.gnu.org Subject: [mumi PATCH 3/3] client: Use mumi git-send-email-headers subcommand. Date: Tue, 30 May 2023 13:14:47 +0100 Message-Id: <20230530121447.26236-3-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230530121447.26236-1-arunisaac@systemreboot.net> References: <20230530121447.26236-1-arunisaac@systemreboot.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: Arun Isaac , Maxim Cournoyer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * mumi/client.scm (send-email): Accept mumi-arg0 argument and use it to construct --header-cmd. * scripts/mumi.in: Pass arg0 to send-email. * tests/client.scm ("send patches to new issue", "send patches to existing issue", "send single patch to new issue", "send single patch to existing issue", "send patch to existing issue and Cc other participants"): Adjust tests. --- mumi/client.scm | 9 ++++++--- scripts/mumi.in | 2 +- tests/client.scm | 17 ++++++++++++++--- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/mumi/client.scm b/mumi/client.scm index c70fe61..9cb2bd8 100644 --- a/mumi/client.scm +++ b/mumi/client.scm @@ -281,8 +281,9 @@ ISSUE-NUMBER." (() (list)) (cc (list (cons 'cc (string-join cc ", ")))))))) -(define (send-email patches) - "Send PATCHES via email." +(define (send-email mumi-arg0 patches) + "Send PATCHES via email. MUMI-ARG0 is the mumi program currently +invoked." (if (current-issue-number) ;; If an issue is current, send patches to that issue's email ;; address. @@ -290,7 +291,9 @@ ISSUE-NUMBER." (git-send-email (string-append (number->string issue-number) "@" (client-config 'debbugs-host)) - patches)) + patches + (list (string-append "--header-cmd=" + mumi-arg0 " git-send-email-headers")))) (match patches ;; If it's a single patch, send it to the patch email address ;; and be done with it diff --git a/scripts/mumi.in b/scripts/mumi.in index 8fb7cd4..5b98634 100644 --- a/scripts/mumi.in +++ b/scripts/mumi.in @@ -162,7 +162,7 @@ (("new") (client:clear-current-issue!)) (("send-email" . patches) - (client:send-email patches)) + (client:send-email (car (program-arguments)) patches)) (("git-send-email-headers" patch) (client:git-send-email-headers patch)) (("mailer" . rest) diff --git a/tests/client.scm b/tests/client.scm index 5352b08..fa80dad 100644 --- a/tests/client.scm +++ b/tests/client.scm @@ -80,10 +80,13 @@ called with." (const 12345)) client-config-stub) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch" "bar.patch" "foobar.patch"))))))) (test-equal "send patches to existing issue" - '(("git" "send-email" "--to=12345@example.com" "foo.patch" "bar.patch" "foobar.patch")) + '(("git" "send-email" "--to=12345@example.com" + "--header-cmd=mumi git-send-email-headers" + "foo.patch" "bar.patch" "foobar.patch")) (map (match-lambda ((command _) command)) (trace-calls (var@@ (mumi client) call-with-input-pipe*) @@ -95,6 +98,7 @@ called with." client-config-stub do-not-poll-server-for-issue-number) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch" "bar.patch" "foobar.patch"))))))) (test-equal "send single patch to new issue" @@ -108,10 +112,13 @@ called with." client-config-stub do-not-poll-server-for-issue-number) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch"))))))) (test-equal "send single patch to existing issue" - '(("git" "send-email" "--to=12345@example.com" "foo.patch")) + '(("git" "send-email" "--to=12345@example.com" + "--header-cmd=mumi git-send-email-headers" + "foo.patch")) (map (match-lambda ((command _) command)) (trace-calls (var@@ (mumi client) call-with-input-pipe*) @@ -123,10 +130,13 @@ called with." client-config-stub do-not-poll-server-for-issue-number) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch"))))))) (test-equal "send patch to existing issue and Cc other participants" - '(("git" "send-email" "--to=12345@example.com" "foo.patch")) + '(("git" "send-email" "--to=12345@example.com" + "--header-cmd=mumi git-send-email-headers" + "foo.patch")) (map (match-lambda ((command _) command)) (trace-calls (var@@ (mumi client) call-with-input-pipe*) @@ -138,6 +148,7 @@ called with." client-config-stub do-not-poll-server-for-issue-number) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch"))))))) (test-end "client") -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 04 22:21:26 2023 Received: (at 63802) by debbugs.gnu.org; 5 Jun 2023 02:21:26 +0000 Received: from localhost ([127.0.0.1]:47619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5zqX-0000fo-Ux for submit@debbugs.gnu.org; Sun, 04 Jun 2023 22:21:26 -0400 Received: from mail-qt1-f179.google.com ([209.85.160.179]:47549) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5zqV-0000fZ-Hb for 63802@debbugs.gnu.org; Sun, 04 Jun 2023 22:21:24 -0400 Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-3f829e958bdso39785281cf.3 for <63802@debbugs.gnu.org>; Sun, 04 Jun 2023 19:21:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685931678; x=1688523678; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=gWAjIaTV3sEooNKkhFua8M8x9b99ztEuTBbf44qUfb0=; b=VLhdoqCi4z8Tf6mhjjhd4FXauDD3Kv81H5o7G4UgCBG9V0DDjuD3t6YVy5R3sIxHIe QSmbfFxYHxWojpgp1mLkXrzz044y7nt7PjutfCvgNRR+2dnoxFLFcC5XdFdWmVD+3rAN e8X1ZxOPNYKqZGqs5Ryqmk8U6FzaBn2cBO7H6EG+TLD8U6ZbG2K1SwIscvE+s1gGOuyt 89+c6i6iwLA9L2tAN5cINSMnhgpSYk2Yfg2PlYePRJUJC7WhL5Wmp8m5BRxan4ThKYtJ 5aSM7PkdmwiRxWr2guW63W3hURis34Rz6BhfwiCZvJIr9/wTs6hejJi97Mo3gwy9iTjY zdJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685931678; x=1688523678; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=gWAjIaTV3sEooNKkhFua8M8x9b99ztEuTBbf44qUfb0=; b=i6zjeSWpzhOtksUykVj9JVHCRYELAd/1kPgVdFn8v41B/ZlgpXd9Tjerzg50tut0/f Kg0b+ctujlr2T+1t82aXkt0EZaRQCBkzD5O0bM4OORgie+AOSZ9P31AdHSEvZ5l4rFQH ECqgb0DH0bcQ1frx0e/H+61cwK24x5dZDhMurF/drDluCSOthR9oAd/qEUXWTr3yhB+q Ss+tfWd9Z2Ey9WJQ9i8nbw1gMvb5+0nuXyuDaHdLCt7VLGelRWZJipUWGjIdc4e//nto WDwxfPnRAjlPLKln1ySKb7b9+NIAD7vOH2tw4Kq0s/dqhMI3FHMiJjRTjFizVtK9/NyJ NjpA== X-Gm-Message-State: AC+VfDy4ce8FUDUfpNo8EKZveZMuRifsVMbu8g0USBd1TUIhbLffKJNc KMMUjWygaPBDAruUTYuhvC+dwvuFy0fieg== X-Google-Smtp-Source: ACHHUZ6dtTwTzSlkEE4vVN5sxxrsia9RJi54bFF+TYNxkcBVhwzB4LUDVi7+DsBb7RwhYMeoR3dR/g== X-Received: by 2002:ac8:5b4d:0:b0:3e6:3851:b945 with SMTP id n13-20020ac85b4d000000b003e63851b945mr4833027qtw.67.1685931677686; Sun, 04 Jun 2023 19:21:17 -0700 (PDT) Received: from hurd (dsl-152-122.b2b2c.ca. [66.158.152.122]) by smtp.gmail.com with ESMTPSA id fe3-20020a05622a4d4300b003f98ccee846sm734490qtb.75.2023.06.04.19.21.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jun 2023 19:21:17 -0700 (PDT) From: Maxim Cournoyer To: Arun Isaac Subject: Re: [mumi PATCH 1/3] client: Do not pass --add-header to git send-email. References: <20230530121447.26236-1-arunisaac@systemreboot.net> Date: Sun, 04 Jun 2023 22:21:15 -0400 In-Reply-To: <20230530121447.26236-1-arunisaac@systemreboot.net> (Arun Isaac's message of "Tue, 30 May 2023 13:14:45 +0100") Message-ID: <875y82ejj8.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: 63802@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Arun! Arun Isaac writes: > git send-email accepts --add-header only when passed a git > format-patch style revision list. LGTM. The idea is that this is now handled by a configured git 'add-header-cmd' such as Guix' etc/teams.scm, correct? -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 04 22:31:54 2023 Received: (at 63802) by debbugs.gnu.org; 5 Jun 2023 02:31:54 +0000 Received: from localhost ([127.0.0.1]:47625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q600g-0000vp-3i for submit@debbugs.gnu.org; Sun, 04 Jun 2023 22:31:54 -0400 Received: from mail-qv1-f53.google.com ([209.85.219.53]:47591) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q600d-0000vb-Ld for 63802@debbugs.gnu.org; Sun, 04 Jun 2023 22:31:52 -0400 Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-6259c242c96so36846426d6.3 for <63802@debbugs.gnu.org>; Sun, 04 Jun 2023 19:31:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685932305; x=1688524305; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=kYeyn4uzFNWcU4c+AeWsOYMIczYZOI1AjS8jT9s4GXA=; b=bKwexNKrke9v+NvK2GskMMyBnck0DKNP+IZQ6lZPwd64gGIwYfoKV3B+3nU6HaCQP9 yjpSfuQyw9XdHiZfkwtqVEYvgbii5LBldoq5nAmNbp+I2EYO9fiubSSLhHB+IyD1tyjR P05BthMlSKQngmRjQpxbDfZ+ujktmhj9i8IegvT7VFGkxz+hvsk3JWM4AWKMWJtTWXwX XwJNwGE0qNGO3gjOcrT8U90KiJanyfcyjz+VxpFDj6iRuDbvSCGvSSWvTQk0P9MepowS +G/UssYNS8+kyvGpOqcJoMOuydn6JiQsN+Me2UXKUjjyWrYwM4k+DQSVJ4uCjx/v60i/ OQzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685932305; x=1688524305; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=kYeyn4uzFNWcU4c+AeWsOYMIczYZOI1AjS8jT9s4GXA=; b=kTf3LomXpX8JTR725fRrVG8zvG8YtwWthplTC9qTXUKUq3XIbyZBXaSd4NZkxcclef ojWA57mMg3cZsxiqrv8HKV8/H4HjHH9Q6dbg6hGyF+rg0ZBw7eBwdvs+o8ZQ1EFhiXRE omZk6L22NJDuXtXlZluoRGuyPCjw9S/pQfJe7+mI8Y70oIcUF+KD92UWhykLbjvpJbHs Ne+/RmuF4csbT5ogfktbpfqkL0/P3UK/vPh4qFZC16rq7IzTDdO2eDimk1fJtqpXpZV4 F3zN4/fMY0LvPBXg/1GrZ3IVGQkXcCyEvA/vxN4loYKd3JS8mPNKL9nFVurocRW9o8E4 KbnA== X-Gm-Message-State: AC+VfDz4iLuX1ZDyau12e2jg4jYJV1qhyRrWF1VGKocfNKyuh/JgtcSB FM9c0Q2O9ePi/NQxkylHr1AP2Vo1PbaQcQ== X-Google-Smtp-Source: ACHHUZ6W+7nS1kVbypRrwAI0zibF3Cud7xnmfE8i+NtL0elW2EO/sUpSQDnyKsFg8M+JsVWVd883PA== X-Received: by 2002:ad4:5c81:0:b0:625:aa1a:b6d3 with SMTP id o1-20020ad45c81000000b00625aa1ab6d3mr7781938qvh.53.1685932305522; Sun, 04 Jun 2023 19:31:45 -0700 (PDT) Received: from hurd (dsl-152-122.b2b2c.ca. [66.158.152.122]) by smtp.gmail.com with ESMTPSA id a5-20020a0ce905000000b0062618962ec0sm4000603qvo.133.2023.06.04.19.31.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jun 2023 19:31:45 -0700 (PDT) From: Maxim Cournoyer To: Arun Isaac Subject: Re: [mumi PATCH 2/3] client: Add git-send-email-headers subcommand. References: <20230530121447.26236-1-arunisaac@systemreboot.net> <20230530121447.26236-2-arunisaac@systemreboot.net> Date: Sun, 04 Jun 2023 22:31:43 -0400 In-Reply-To: <20230530121447.26236-2-arunisaac@systemreboot.net> (Arun Isaac's message of "Tue, 30 May 2023 13:14:46 +0100") Message-ID: <87ttvmd4hc.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: 63802@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Arun, Arun Isaac writes: > * mumi/client.scm: Import (rnrs exceptions). > (git-send-email-headers): New public function. > * scripts/mumi.in: Add git-send-email-headers subcommand. > --- > mumi/client.scm | 42 +++++++++++++++++++++++++++++++++++++++++- > scripts/mumi.in | 2 ++ > 2 files changed, 43 insertions(+), 1 deletion(-) > > diff --git a/mumi/client.scm b/mumi/client.scm > index 5befd42..c70fe61 100644 > --- a/mumi/client.scm > +++ b/mumi/client.scm > @@ -17,6 +17,7 @@ > ;;; along with mumi. If not, see . > > (define-module (mumi client) > + #:use-module (rnrs exceptions) > #:use-module (rnrs io ports) > #:use-module (srfi srfi-1) > #:use-module (srfi srfi-19) > @@ -38,7 +39,9 @@ > print-current-issue > set-current-issue! > clear-current-issue! > - send-email)) > + send-email > + git-send-email-headers > + compose)) > > (define (git-top-level) > "Return the top-level directory of the current git repository." > @@ -306,3 +309,40 @@ ISSUE-NUMBER." > "@" > (client-config 'debbugs-host)) > other-patches))))) > + > +(define (git-send-email-headers patch) > + "Print send-email headers for PATCH." > + (let* (;; Compute headers if configured in git config. > + (header-command > + (guard (ex (#t #f)) > + (call-with-input-pipe* (list "git" "config" "sendemail.headerCmd") > + get-line))) > + (headers > + (if header-command > + (call-with-input-pipe (string-append header-command " " patch) > + get-string-all) > + "")) > + (external-x-debbugs-cc > + (assq-ref (parse-email-headers > + (string-append (string-trim-right headers #\newline) > + "\n")) > + 'x-debbugs-cc)) > + ;; Fetch Cc addresses for current issue. > + (x-debbugs-cc > + (assq-ref (reply-email-headers (current-issue-number)) > + 'cc))) > + ;; Print X-Debbugs-Cc header. > + (when (or x-debbugs-cc external-x-debbugs-cc) > + (display "X-Debbugs-Cc: ") > + (display (if (and x-debbugs-cc external-x-debbugs-cc) > + (string-append x-debbugs-cc ", " external-x-debbugs-cc) > + (or x-debbugs-cc external-x-debbugs-cc))) I find the or/if/and/or mix here a bit dense to parse. I think it'd be a cleaner and easier to follow to process external-x-debbugs-cc and x-debbug-cc into a list of values (potentially '()), merge then, deduplicate them, and finally string-join them back before displaying the combined value. What do you think? -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 04 22:36:25 2023 Received: (at 63802) by debbugs.gnu.org; 5 Jun 2023 02:36:25 +0000 Received: from localhost ([127.0.0.1]:47629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6053-00012g-3Q for submit@debbugs.gnu.org; Sun, 04 Jun 2023 22:36:25 -0400 Received: from mail-qt1-f171.google.com ([209.85.160.171]:59850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6050-00012S-Eb for 63802@debbugs.gnu.org; Sun, 04 Jun 2023 22:36:23 -0400 Received: by mail-qt1-f171.google.com with SMTP id d75a77b69052e-3f86a04f741so8508351cf.3 for <63802@debbugs.gnu.org>; Sun, 04 Jun 2023 19:36:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685932576; x=1688524576; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=INulXblUSGdvACkpAxzT5L8X6v1ASWPdSZq8qYsMego=; b=j8IsW5p02r/p++B3ULVUJxI+vf49X+cKtR1kIYphA9KfeyTWt3eWKRphY6sTPU70TE hXFKX9+I3Cea/qlqZoKOaMLMv4aRZywUyT7NkmmYFit3p6H4WJ4jwDhL5ZCsphbdaqeo lTd5krMof4r10luhffDEQz3MYMzlruKKMIIz3kSybVhgfHAmT/uJTOdkVaxIJ+SXP2ex elnoAPgnUgjYj7R71XWr4Fd7Qn7NCGd9j9/iur07KBRKObxwmCPh9gB1PUFeV06zzH+D Rb6OR2BLexHyU//oBDNekQbRjvjF0pMCmkDebomoSkqc/z6SXQgM6VEEJNblcr1kaHOt +ukA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685932576; x=1688524576; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=INulXblUSGdvACkpAxzT5L8X6v1ASWPdSZq8qYsMego=; b=IAetzEgtLP6QLdfwzjcCyDBpu3diEaCth1uvAmXltT3N5yDoJByJkdagKK+z7A2qrN RsZNJ9+ZPSA0bBqWwXSp/hX1jgeZBu0FgkssLed6grmGT82ZwpcDNXu9wOYKcwHkHoZ1 16Gb5CQWadI++ch57BwAM9YSL7oScYTtBlcKjkguRZcpP5yYbNNihGPQhXp+XmHP51/c MxEyU8yxlgMZcvpEJ+Sy0HWfFKq6c+B0hydYZAOf6BkFcXLVfE2Tw8dtpqRa/noNoPHN JE5IODUsD3j8IEEGCVMUYpVMlQnNPtJRGDI2kZta65tW/v6llPciHjf3RwVK4938D67z n4tw== X-Gm-Message-State: AC+VfDya2J5OXX/06bKD+FMvBv59rFM2uR0nXddgTlWp+i35mcu4Guj1 LNTDjGk8ID8m88MoB4Rp8U9B7TV2kBMwwQ== X-Google-Smtp-Source: ACHHUZ5ZZxCvcuCMA9sMhxAEAokrJrDSRv6yYDLmA6zgw1Sh+WyJDHbkiuWDoJ6wDQg83gA1BnBxqQ== X-Received: by 2002:ac8:5705:0:b0:3f3:9564:1148 with SMTP id 5-20020ac85705000000b003f395641148mr6319145qtw.29.1685932576565; Sun, 04 Jun 2023 19:36:16 -0700 (PDT) Received: from hurd (dsl-152-122.b2b2c.ca. [66.158.152.122]) by smtp.gmail.com with ESMTPSA id e17-20020ac84e51000000b003f6b22de8f8sm4081222qtw.91.2023.06.04.19.36.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jun 2023 19:36:16 -0700 (PDT) From: Maxim Cournoyer To: Arun Isaac Subject: Re: [mumi PATCH 3/3] client: Use mumi git-send-email-headers subcommand. References: <20230530121447.26236-1-arunisaac@systemreboot.net> <20230530121447.26236-3-arunisaac@systemreboot.net> Date: Sun, 04 Jun 2023 22:36:15 -0400 In-Reply-To: <20230530121447.26236-3-arunisaac@systemreboot.net> (Arun Isaac's message of "Tue, 30 May 2023 13:14:47 +0100") Message-ID: <87pm6ad49s.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: 63802@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Arun, Arun Isaac writes: > * mumi/client.scm (send-email): Accept mumi-arg0 argument and > use it to construct --header-cmd. > * scripts/mumi.in: Pass arg0 to send-email. > * tests/client.scm ("send patches to new issue", "send patches to > existing issue", "send single patch to new issue", "send single patch > to existing issue", "send patch to existing issue and Cc other > participants"): Adjust tests. > --- > mumi/client.scm | 9 ++++++--- > scripts/mumi.in | 2 +- > tests/client.scm | 17 ++++++++++++++--- > 3 files changed, 21 insertions(+), 7 deletions(-) > > diff --git a/mumi/client.scm b/mumi/client.scm > index c70fe61..9cb2bd8 100644 > --- a/mumi/client.scm > +++ b/mumi/client.scm > @@ -281,8 +281,9 @@ ISSUE-NUMBER." > (() (list)) > (cc (list (cons 'cc (string-join cc ", ")))))))) > > -(define (send-email patches) > - "Send PATCHES via email." > +(define (send-email mumi-arg0 patches) > + "Send PATCHES via email. MUMI-ARG0 is the mumi program currently > +invoked." > (if (current-issue-number) > ;; If an issue is current, send patches to that issue's email > ;; address. > @@ -290,7 +291,9 @@ ISSUE-NUMBER." > (git-send-email (string-append (number->string issue-number) > "@" > (client-config 'debbugs-host)) > - patches)) > + patches > + (list (string-append "--header-cmd=" > + mumi-arg0 " git-send-email-headers")))) > (match patches > ;; If it's a single patch, send it to the patch email address > ;; and be done with it > diff --git a/scripts/mumi.in b/scripts/mumi.in > index 8fb7cd4..5b98634 100644 > --- a/scripts/mumi.in > +++ b/scripts/mumi.in > @@ -162,7 +162,7 @@ > (("new") > (client:clear-current-issue!)) > (("send-email" . patches) > - (client:send-email patches)) > + (client:send-email (car (program-arguments)) patches)) > (("git-send-email-headers" patch) > (client:git-send-email-headers patch)) > (("mailer" . rest) > diff --git a/tests/client.scm b/tests/client.scm > index 5352b08..fa80dad 100644 > --- a/tests/client.scm > +++ b/tests/client.scm > @@ -80,10 +80,13 @@ called with." > (const 12345)) > client-config-stub) > (cut (@@ (mumi client) send-email) > + "mumi" > (list "foo.patch" "bar.patch" "foobar.patch"))))))) > > (test-equal "send patches to existing issue" > - '(("git" "send-email" "--to=12345@example.com" "foo.patch" "bar.patch" "foobar.patch")) > + '(("git" "send-email" "--to=12345@example.com" > + "--header-cmd=mumi git-send-email-headers" > + "foo.patch" "bar.patch" "foobar.patch")) > (map (match-lambda > ((command _) command)) > (trace-calls (var@@ (mumi client) call-with-input-pipe*) > @@ -95,6 +98,7 @@ called with." > client-config-stub > do-not-poll-server-for-issue-number) > (cut (@@ (mumi client) send-email) > + "mumi" > (list "foo.patch" "bar.patch" "foobar.patch"))))))) > > (test-equal "send single patch to new issue" > @@ -108,10 +112,13 @@ called with." > client-config-stub > do-not-poll-server-for-issue-number) > (cut (@@ (mumi client) send-email) > + "mumi" > (list "foo.patch"))))))) > > (test-equal "send single patch to existing issue" > - '(("git" "send-email" "--to=12345@example.com" "foo.patch")) > + '(("git" "send-email" "--to=12345@example.com" > + "--header-cmd=mumi git-send-email-headers" > + "foo.patch")) > (map (match-lambda > ((command _) command)) > (trace-calls (var@@ (mumi client) call-with-input-pipe*) > @@ -123,10 +130,13 @@ called with." > client-config-stub > do-not-poll-server-for-issue-number) > (cut (@@ (mumi client) send-email) > + "mumi" > (list "foo.patch"))))))) > > (test-equal "send patch to existing issue and Cc other participants" > - '(("git" "send-email" "--to=12345@example.com" "foo.patch")) > + '(("git" "send-email" "--to=12345@example.com" > + "--header-cmd=mumi git-send-email-headers" > + "foo.patch")) > (map (match-lambda > ((command _) command)) > (trace-calls (var@@ (mumi client) call-with-input-pipe*) > @@ -138,6 +148,7 @@ called with." > client-config-stub > do-not-poll-server-for-issue-number) > (cut (@@ (mumi client) send-email) > + "mumi" > (list "foo.patch"))))))) > > (test-end "client") Fun! So mumi now implements its own git 'header command', which builds on top of any pre-configured one such as etc/teams.scm, then overrides said pre-configured headerCmd with itself. LGTM. -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 08 13:09:55 2023 Received: (at 63802) by debbugs.gnu.org; 8 Jun 2023 17:09:55 +0000 Received: from localhost ([127.0.0.1]:57423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7J91-0008Ec-6d for submit@debbugs.gnu.org; Thu, 08 Jun 2023 13:09:55 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:39730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7J8w-0008EJ-HQ for 63802@debbugs.gnu.org; Thu, 08 Jun 2023 13:09:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=zyIlx+md5u5ldLPhZSoCJwlDifVTQlqtroGyEZn7y/I=; b=SbkynHek87+PFUYdZ/+b6+e3yY aWHDQYFyYXYv70iIVjMdyytQCUFXiycXl9k7c3N66EZEgYREgDxmasZnOBoaJuVrgx4T8QZ7gY3lE PvOFksJtsSQdZGrYDHinY8PcmyTlZtFVdlrsv250yp1bOnniTPDAFEYvP/UiVJFkY348DABTRaCnc GIayPl5LziQIWpY8Mnn8qwTlfXZdZrA/vmG86CkedCdIzxZnwflUzah7dqiXAin6hyj6uXgnTx0Up 7+Pgz7941vrvUq8+w0MU9dhUMXjUD7V+P2g/JnmdtuO8uPbafkzSnBnzJUANB6QDVdDVa20Jrq/EU C02Wy9RQ==; Received: from [192.168.2.1] (port=60304 helo=localhost) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1q7J8q-000UZA-1V; Thu, 08 Jun 2023 18:09:45 +0100 From: Arun Isaac To: Maxim Cournoyer Subject: Re: [mumi PATCH 2/3] client: Add git-send-email-headers subcommand. In-Reply-To: <87ttvmd4hc.fsf@gmail.com> References: <20230530121447.26236-1-arunisaac@systemreboot.net> <20230530121447.26236-2-arunisaac@systemreboot.net> <87ttvmd4hc.fsf@gmail.com> Date: Thu, 08 Jun 2023 18:09:40 +0100 Message-ID: <877csd6fu3.fsf@systemreboot.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: 63802@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > I find the or/if/and/or mix here a bit dense to parse. I think it'd be > a cleaner and easier to follow to process external-x-debbugs-cc and > x-debbug-cc into a list of values (potentially '()), merge then, > deduplicate them, and finally string-join them back before displaying > the combined value. Good point! I avoided splitting and joining due to the complexity of handling the escaping of commas in names. But, I have done it now, and it does make the code a lot clearer. Patches follow subsequently. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 08 13:15:28 2023 Received: (at 63802) by debbugs.gnu.org; 8 Jun 2023 17:15:28 +0000 Received: from localhost ([127.0.0.1]:57430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7JEN-0008Nr-TR for submit@debbugs.gnu.org; Thu, 08 Jun 2023 13:15:28 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:53342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7JEK-0008NS-9x for 63802@debbugs.gnu.org; Thu, 08 Jun 2023 13:15:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=TxIsWRb933kbMKt20ovYCT1l+gLthf3NXnuRFqR0Wx8=; b=KxX/2Kh+zHWkqwukMUPHKez07t 9jTGCEL8PsXtaqJC+wUuHqp5ufL53KFiNEHPdmsc4kOcq5DWxe4l2Ed4xkSYNOq27ShOXWQSO6Bj/ 5XoMyfIPjOZuwEAPhw+yRI2JCSXFHr5PGPa+lTRVK14OGf0LhDO7xNuER10r5rOmojlpw7p0tVpY7 z/aw2xzCYcS5LRfHpP8z5dNr8mb5wwRXOzxwedPkG3weTb9mex9pisdeU4nf35wYwMYkBV9xwvYN2 dF0mvYKjoCzfHEs+AQhtck79Z4uyCf7kMrFcqbjDppJwfP7c8g9c6vAlMj8/fqSIVSI0HU7MUCu8g 8L8VWBQg==; Received: from [192.168.2.1] (port=42546 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1q7JEG-000UaF-2L; Thu, 08 Jun 2023 18:15:21 +0100 From: Arun Isaac To: 63802@debbugs.gnu.org Subject: [PATCH 2/3] client: Add git-send-email-headers subcommand. Date: Thu, 8 Jun 2023 18:14:51 +0100 Message-Id: <20230608171453.14788-2-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230608171453.14788-1-arunisaac@systemreboot.net> References: <20230608171453.14788-1-arunisaac@systemreboot.net> MIME-Version: 1.0 X-Debbugs-Cc: Arun Isaac , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: Arun Isaac X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * mumi/client.scm: Import (rnrs exceptions). (git-send-email-headers): New public function. (split-cc): New function. * scripts/mumi.in: Add git-send-email-headers subcommand. * tests/client.scm (split-cc): New variable. ("split Cc field"): New test. --- mumi/client.scm | 52 +++++++++++++++++++++++++++++++++++++++++++++++- scripts/mumi.in | 2 ++ tests/client.scm | 8 ++++++++ 3 files changed, 61 insertions(+), 1 deletion(-) diff --git a/mumi/client.scm b/mumi/client.scm index c30429d..b89e608 100644 --- a/mumi/client.scm +++ b/mumi/client.scm @@ -17,6 +17,7 @@ ;;; along with mumi. If not, see . (define-module (mumi client) + #:use-module (rnrs exceptions) #:use-module (rnrs io ports) #:use-module (srfi srfi-1) #:use-module (srfi srfi-19) @@ -38,7 +39,9 @@ print-current-issue set-current-issue! clear-current-issue! - send-email)) + send-email + git-send-email-headers + compose)) (define (git-top-level) "Return the top-level directory of the current git repository." @@ -229,6 +232,13 @@ arguments." name) " <" address ">")) +(define (split-cc cc) + "Split CC into a list of email addresses." + (map (lambda (address) + (serialize-email-address (assq-ref address 'name) + (assq-ref address 'address))) + (assq-ref (parse-email-headers (string-append "Cc: " cc "\n")) + 'cc))) (define* (git-send-email to patches #:optional (options '())) "Send PATCHES using git send-email to the TO address with @@ -311,3 +321,43 @@ ISSUE-NUMBER." "@" (client-config 'debbugs-host)) other-patches))))) + +(define (git-send-email-headers patch) + "Print send-email headers for PATCH." + (let* (;; Compute headers if configured in git config. + (header-command + (guard (ex (#t #f)) + (call-with-input-pipe* (list "git" "config" "sendemail.headerCmd") + get-line))) + (headers + (if header-command + (call-with-input-pipe (string-append header-command " " patch) + get-string-all) + "")) + (external-x-debbugs-cc + (cond + ((assq-ref (parse-email-headers (string-append headers "\n")) + 'x-debbugs-cc) + => split-cc) + (else '()))) + ;; Fetch Cc addresses for current issue. + (x-debbugs-cc + (cond + ((assq-ref (reply-email-headers (current-issue-number)) + 'cc) + => split-cc) + (else '())))) + ;; Print X-Debbugs-Cc header. + (display "X-Debbugs-Cc: ") + (display (string-join (delete-duplicates + (append x-debbugs-cc external-x-debbugs-cc)) + ", ")) + (newline) + ;; Print headers other than X-Debbugs-Cc. + ;; TODO: RFC5322 headers are not restricted to a single + ;; line. "Folded" multi-line headers are allowed. Support them. + (for-each (lambda (line) + (unless (string-prefix-ci? "X-Debbugs-Cc:" line) + (display line) + (newline))) + (string-split headers #\newline)))) diff --git a/scripts/mumi.in b/scripts/mumi.in index 2295328..8fb7cd4 100644 --- a/scripts/mumi.in +++ b/scripts/mumi.in @@ -163,6 +163,8 @@ (client:clear-current-issue!)) (("send-email" . patches) (client:send-email patches)) + (("git-send-email-headers" patch) + (client:git-send-email-headers patch)) (("mailer" . rest) (let* ((opts (parse-options rest)) (sender (assoc-ref opts 'sender)) diff --git a/tests/client.scm b/tests/client.scm index 2b2c1be..ced573b 100644 --- a/tests/client.scm +++ b/tests/client.scm @@ -68,6 +68,9 @@ called with." (define serialize-email-address (@@ (mumi client) serialize-email-address)) +(define split-cc + (@@ (mumi client) split-cc)) + (test-begin "client") (test-equal "serialize email address" @@ -78,6 +81,11 @@ called with." "\"Bar, Foo\" " (serialize-email-address "Bar, Foo" "foobar@example.com")) +(test-equal "split Cc field" + (list "Foo " + "\"Bar, Foo\" ") + (split-cc "Foo , \"Bar, Foo\" ")) + (test-equal "send patches to new issue" '(("git" "send-email" "--to=foo@patches.com" "foo.patch") ("git" "send-email" "--to=12345@example.com" "bar.patch" "foobar.patch")) -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 08 13:15:28 2023 Received: (at 63802) by debbugs.gnu.org; 8 Jun 2023 17:15:28 +0000 Received: from localhost ([127.0.0.1]:57432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7JEO-0008Nv-CC for submit@debbugs.gnu.org; Thu, 08 Jun 2023 13:15:28 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:53218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7JEI-0008NM-KY for 63802@debbugs.gnu.org; Thu, 08 Jun 2023 13:15:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=VLicOmtPWuLioUpjienGnh8ece+vix/OAeeBScqY8zU=; b=dIC672Lxoj07WIf1SZT8PEYGgQ WAuclSB1MhnjLzGp/4wYHZSizFxjNGcgVvoy8/VECue/fKPoeMK5dpSd5MRBeXr1L4NrYfJeVC2GY dV7BXQnwW+PlSgXzkF7p8tisMrG7nEPzJs9rCoVCdwAc5USu1JC3EcN7zNe2O10Th5LPLtRBHdSNV WmMZ5UOysyHtK5AAoG8mBxcVrLlo/+ztL2lJRKhYu6TBJLJ+UMWa/W37q9hn805rSa/TRLwJZuL4D O5YbBBSkoHNiVcefZlfCQsKsghrzF92/fQbbXJDCD6irsg9OKiBcppviNcVG8Qh0NZHAB4FSfStGE t23oCDzQ==; Received: from [192.168.2.1] (port=42546 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1q7JED-000UaF-39; Thu, 08 Jun 2023 18:15:18 +0100 From: Arun Isaac To: 63802@debbugs.gnu.org Subject: [PATCH 1/3] client: Separate serialize-email-address into a function. Date: Thu, 8 Jun 2023 18:14:50 +0100 Message-Id: <20230608171453.14788-1-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Debbugs-Cc: Arun Isaac , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: Arun Isaac X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * mumi/client.scm (serialize-email-address): New function. (reply-email-headers): Use serialize-email-address. * tests/client.scm (serialize-email-address): New variable. ("serialize email address", "serialize email address with comma in name"): New tests. --- mumi/client.scm | 14 ++++++++++---- tests/client.scm | 11 +++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/mumi/client.scm b/mumi/client.scm index 64ccbeb..c30429d 100644 --- a/mumi/client.scm +++ b/mumi/client.scm @@ -221,6 +221,14 @@ arguments." (unless (zero? (close-pipe port)) (error "Command invocation failed" command)))))))) +(define (serialize-email-address name address) + "Combine NAME and ADDRESS into a complete email address of the form +\"NAME
\". Double quote NAME if necessary." + (string-append (if (string-contains name ",") + (string-append "\"" name "\"") + name) + " <" address ">")) + (define* (git-send-email to patches #:optional (options '())) "Send PATCHES using git send-email to the TO address with @@ -269,10 +277,8 @@ ISSUE-NUMBER." ,@(match (delete-duplicates (map (lambda (message) (let ((from (assoc-ref message "from"))) - (string-append (if (string-contains (assoc-ref from "name") ",") - (string-append "\"" (assoc-ref from "name") "\"") - (assoc-ref from "name")) - " <" (assoc-ref from "address") ">"))) + (serialize-email-address (assoc-ref from "name") + (assoc-ref from "address")))) (vector->list (assoc-ref issue "messages")))) (() (list)) (cc (list (cons 'cc (string-join cc ", ")))))))) diff --git a/tests/client.scm b/tests/client.scm index 5352b08..2b2c1be 100644 --- a/tests/client.scm +++ b/tests/client.scm @@ -65,8 +65,19 @@ called with." (lambda _ (error "Do not poll server for issue number")))) +(define serialize-email-address + (@@ (mumi client) serialize-email-address)) + (test-begin "client") +(test-equal "serialize email address" + "Foo " + (serialize-email-address "Foo" "foo@example.com")) + +(test-equal "serialize email address with comma in name" + "\"Bar, Foo\" " + (serialize-email-address "Bar, Foo" "foobar@example.com")) + (test-equal "send patches to new issue" '(("git" "send-email" "--to=foo@patches.com" "foo.patch") ("git" "send-email" "--to=12345@example.com" "bar.patch" "foobar.patch")) -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 08 13:15:31 2023 Received: (at 63802) by debbugs.gnu.org; 8 Jun 2023 17:15:31 +0000 Received: from localhost ([127.0.0.1]:57434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7JEQ-0008O9-QJ for submit@debbugs.gnu.org; Thu, 08 Jun 2023 13:15:31 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:53350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7JEM-0008NZ-MW for 63802@debbugs.gnu.org; Thu, 08 Jun 2023 13:15:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=BlHu1DbWh0/7hHaMnRwnNVITcHXrUy8CcqxuzBbAH98=; b=p71JYVPGZSnMh/ceryS2s+aqWI dZbgAget+elAjfBe45d9KUNHpP8NdLanRsrReXXE6JiGBUEMZIq8VGH2KbDmGHM1vok4xRfmM7ujN +1tmtpylLxZOiVEWI4XPhqhw8HwQnGOQWg20re+RP/tsyJzHOQ0FPxRLuA1usrOIlifI/1ZeIGlob Ry7IeeyfCOF85Me5k3zjrB8AkxmGMkTIsst9hSvrQaaUQrtIIaG6AC7WVSNudhr7KGaeWkulE1htb nbPoSgqITSfvIZmeqYh7tznqGHGdQ1ubVJbwm2gfjkqshqXw8riqQSBAh0P951LtyetMlVWcTCxnH xeW5N1RA==; Received: from [192.168.2.1] (port=42546 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1q7JEJ-000UaF-1Z; Thu, 08 Jun 2023 18:15:24 +0100 From: Arun Isaac To: 63802@debbugs.gnu.org Subject: [PATCH 3/3] client: Use mumi git-send-email-headers subcommand. Date: Thu, 8 Jun 2023 18:14:52 +0100 Message-Id: <20230608171453.14788-3-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230608171453.14788-1-arunisaac@systemreboot.net> References: <20230608171453.14788-1-arunisaac@systemreboot.net> MIME-Version: 1.0 X-Debbugs-Cc: Arun Isaac , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: Arun Isaac X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * mumi/client.scm (send-email): Accept mumi-arg0 argument and use it to construct --header-cmd. * scripts/mumi.in: Pass arg0 to send-email. * tests/client.scm ("send patches to new issue", "send patches to existing issue", "send single patch to new issue", "send single patch to existing issue", "send patch to existing issue and Cc other participants"): Adjust tests. --- mumi/client.scm | 9 ++++++--- scripts/mumi.in | 2 +- tests/client.scm | 17 ++++++++++++++--- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/mumi/client.scm b/mumi/client.scm index b89e608..1fe9d2c 100644 --- a/mumi/client.scm +++ b/mumi/client.scm @@ -293,8 +293,9 @@ ISSUE-NUMBER." (() (list)) (cc (list (cons 'cc (string-join cc ", ")))))))) -(define (send-email patches) - "Send PATCHES via email." +(define (send-email mumi-arg0 patches) + "Send PATCHES via email. MUMI-ARG0 is the mumi program currently +invoked." (if (current-issue-number) ;; If an issue is current, send patches to that issue's email ;; address. @@ -302,7 +303,9 @@ ISSUE-NUMBER." (git-send-email (string-append (number->string issue-number) "@" (client-config 'debbugs-host)) - patches)) + patches + (list (string-append "--header-cmd=" + mumi-arg0 " git-send-email-headers")))) (match patches ;; If it's a single patch, send it to the patch email address ;; and be done with it diff --git a/scripts/mumi.in b/scripts/mumi.in index 8fb7cd4..5b98634 100644 --- a/scripts/mumi.in +++ b/scripts/mumi.in @@ -162,7 +162,7 @@ (("new") (client:clear-current-issue!)) (("send-email" . patches) - (client:send-email patches)) + (client:send-email (car (program-arguments)) patches)) (("git-send-email-headers" patch) (client:git-send-email-headers patch)) (("mailer" . rest) diff --git a/tests/client.scm b/tests/client.scm index ced573b..d28bc1a 100644 --- a/tests/client.scm +++ b/tests/client.scm @@ -99,10 +99,13 @@ called with." (const 12345)) client-config-stub) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch" "bar.patch" "foobar.patch"))))))) (test-equal "send patches to existing issue" - '(("git" "send-email" "--to=12345@example.com" "foo.patch" "bar.patch" "foobar.patch")) + '(("git" "send-email" "--to=12345@example.com" + "--header-cmd=mumi git-send-email-headers" + "foo.patch" "bar.patch" "foobar.patch")) (map (match-lambda ((command _) command)) (trace-calls (var@@ (mumi client) call-with-input-pipe*) @@ -114,6 +117,7 @@ called with." client-config-stub do-not-poll-server-for-issue-number) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch" "bar.patch" "foobar.patch"))))))) (test-equal "send single patch to new issue" @@ -127,10 +131,13 @@ called with." client-config-stub do-not-poll-server-for-issue-number) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch"))))))) (test-equal "send single patch to existing issue" - '(("git" "send-email" "--to=12345@example.com" "foo.patch")) + '(("git" "send-email" "--to=12345@example.com" + "--header-cmd=mumi git-send-email-headers" + "foo.patch")) (map (match-lambda ((command _) command)) (trace-calls (var@@ (mumi client) call-with-input-pipe*) @@ -142,10 +149,13 @@ called with." client-config-stub do-not-poll-server-for-issue-number) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch"))))))) (test-equal "send patch to existing issue and Cc other participants" - '(("git" "send-email" "--to=12345@example.com" "foo.patch")) + '(("git" "send-email" "--to=12345@example.com" + "--header-cmd=mumi git-send-email-headers" + "foo.patch")) (map (match-lambda ((command _) command)) (trace-calls (var@@ (mumi client) call-with-input-pipe*) @@ -157,6 +167,7 @@ called with." client-config-stub do-not-poll-server-for-issue-number) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch"))))))) (test-end "client") -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 08 13:30:07 2023 Received: (at 63802) by debbugs.gnu.org; 8 Jun 2023 17:30:07 +0000 Received: from localhost ([127.0.0.1]:57484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7JSY-0000M9-Js for submit@debbugs.gnu.org; Thu, 08 Jun 2023 13:30:06 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:43206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7JSU-0000LA-33 for 63802@debbugs.gnu.org; Thu, 08 Jun 2023 13:30:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=g+r+Z1HZyTH2nzfL6fIT3N+R1d5ErI1TonIMm1ssvwo=; b=fDwx+ZwL6/NcL7zU/ZFy0/WorK arwg/YBpbQJLhCmY75HiL+p2gFplCfeezRD88IlRPerLa6Zeo+pNw6EdCfAf2+2LUBQzT7gg63L7h wVvADCVHKxUek+AZ2rkCT8zFhuqVVG/yQMAaYGwNaR6/Gtflz9xO4laxoj6IkPu5ebpWyU6e4pxfp o04iSbolYRB/g7Y52k6I/bcJl9+SZ2uULvkirBPhwaKFHpBDKimiyyqVgt/VeVdLe7gqKrue5ZOur SBZJT9J8p/dQc10tZ4gRzBbYOnlRUPZZM/zPojcjrfNPeLh94I4TeGZFCR0c5wFG9k4D6IhRQ9qSJ ktclar/Q==; Received: from [192.168.2.1] (port=41026 helo=localhost) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1q7JSO-000Ucp-0r; Thu, 08 Jun 2023 18:29:56 +0100 From: Arun Isaac To: Maxim Cournoyer Subject: Re: [mumi PATCH 2/3] client: Add git-send-email-headers subcommand. In-Reply-To: <877csd6fu3.fsf@systemreboot.net> References: <20230530121447.26236-1-arunisaac@systemreboot.net> <20230530121447.26236-2-arunisaac@systemreboot.net> <87ttvmd4hc.fsf@gmail.com> <877csd6fu3.fsf@systemreboot.net> Date: Thu, 08 Jun 2023 18:29:37 +0100 Message-ID: <8735316ewu.fsf@systemreboot.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: 63802@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Note that, last week, I pushed "client: Do not pass --add-header to git send-email." from the previous patchset. It was urgently required for deploying the latest mumi on berlin. In the latest patchset I have sent today, I have added a new commit "client: Separate serialize-email-address into a function.". So, there are still 3 patches in total. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 15 23:14:30 2023 Received: (at 63802) by debbugs.gnu.org; 16 Jul 2023 03:14:30 +0000 Received: from localhost ([127.0.0.1]:46305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKsDO-0007sj-1p for submit@debbugs.gnu.org; Sat, 15 Jul 2023 23:14:30 -0400 Received: from mail-oi1-x22d.google.com ([2607:f8b0:4864:20::22d]:59769) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKsDJ-0007sU-RM for 63802@debbugs.gnu.org; Sat, 15 Jul 2023 23:14:28 -0400 Received: by mail-oi1-x22d.google.com with SMTP id 5614622812f47-3a3efee1d44so2499450b6e.3 for <63802@debbugs.gnu.org>; Sat, 15 Jul 2023 20:14:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689477259; x=1692069259; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=F9nrkDMhejBUIvKP06F9lVv5dSPpbp8bngBhc4wE1ps=; b=rCWEzzEfjbxUUZbHyVi/F5oAbJOQv65w+tLSIRxAzmlPGilE3I5eU+1dgSUYfeui4s CHKwRC0hiESKMkoBDsgzE1RxaEqdqRk6qBeh2xJAn+U0atPIfwpNvtns3HXkWjFXCvQH Ir6wLrcMqYV7gfEdML2YpnDgfG5Tbb1Pknml74dTEG9vFKCbg8YcmzQ1QqpxZok6S09e mweZq+5R88oF63aWkFfZEz4gBWoTPzCCnOp40Cvk+lO59QZ23AdLCS6D78NWRZ/WgFWk omQK7H+5EQytpdbRjF7DKO4dzH2rtIltysJCeYIi3n1Safm3c2d5RgtZrY3ZH9K+dXH9 w3Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689477259; x=1692069259; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=F9nrkDMhejBUIvKP06F9lVv5dSPpbp8bngBhc4wE1ps=; b=kzj8x3/+cqp+orq8cAJfPFAuH4GAt0rwraa7u++F/Y7qbWDRJeAStRm8XN1+dMSPSk RT0mcrmxPcAPpkBl8qQ71jSJs6Fg/E6QCRVh96FaQPa+ycb7QtWzUHudgs5oZIm2VnFG oO+Lv6U9j7W5h7BaGehO57ql+QqIwjUgSq5aLxgXAXBlLwxai0cStrD5+5WGZrjfyrFN I7/JQ4fMRzFe+5o5qL1m2x8h9CaeHp4ChfEx30/OaGTR46ELxP0suAAobVdewhGBMK79 qKjms05jxmRdQDJ10Vbo7cb5cuVkRmC6ob4fY/iqDR9XmQNYj+2kbNoe+Tbjh6ROY3D3 ptOA== X-Gm-Message-State: ABy/qLZtLfC379Zk/AlCguJb+cqOtGFjm3FsJTbtJG6zZpFKmmKeTUG9 +AYaU/hVAbRavQ6wTRAxRNGtflA+T6o= X-Google-Smtp-Source: APBJJlHHQo04+zgJoEuV2A6psvEV4ETyN2dlkUoV7r7lreqalMN+03HpQ5NMZ6bgUIyoJFAssaY2wA== X-Received: by 2002:a05:6808:18a5:b0:3a1:e96c:2001 with SMTP id bi37-20020a05680818a500b003a1e96c2001mr9817021oib.55.1689477259390; Sat, 15 Jul 2023 20:14:19 -0700 (PDT) Received: from hurd (dsl-205-151-56-16.b2b2c.ca. [205.151.56.16]) by smtp.gmail.com with ESMTPSA id v11-20020a0c8e0b000000b00623813aa1d5sm5369539qvb.89.2023.07.15.20.14.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jul 2023 20:14:18 -0700 (PDT) From: Maxim Cournoyer To: Arun Isaac Subject: Re: bug#63802: [mumi PATCH 0/3] Use consolidated X-Debbugs-Cc header References: <20230530121132.26057-1-arunisaac@systemreboot.net> <20230608171453.14788-1-arunisaac@systemreboot.net> Date: Sat, 15 Jul 2023 23:14:17 -0400 In-Reply-To: <20230608171453.14788-1-arunisaac@systemreboot.net> (Arun Isaac's message of "Thu, 8 Jun 2023 18:14:50 +0100") Message-ID: <877cr0v986.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: 63802@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Arun! Arun Isaac writes: > * mumi/client.scm (serialize-email-address): New function. > (reply-email-headers): Use serialize-email-address. > * tests/client.scm (serialize-email-address): New variable. > ("serialize email address", "serialize email address with comma in > name"): New tests. LGTM! -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 15 23:39:59 2023 Received: (at 63802) by debbugs.gnu.org; 16 Jul 2023 03:39:59 +0000 Received: from localhost ([127.0.0.1]:46316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKsc2-0008TU-OQ for submit@debbugs.gnu.org; Sat, 15 Jul 2023 23:39:59 -0400 Received: from mail-qv1-xf2f.google.com ([2607:f8b0:4864:20::f2f]:44034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKsbw-0008TF-Rs for 63802@debbugs.gnu.org; Sat, 15 Jul 2023 23:39:57 -0400 Received: by mail-qv1-xf2f.google.com with SMTP id 6a1803df08f44-635e5b06aaeso17884936d6.0 for <63802@debbugs.gnu.org>; Sat, 15 Jul 2023 20:39:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689478787; x=1692070787; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=JUYZKhL9o48FI/kXgJftiNWvgrQI+jq7smJ137lFoiE=; b=UzsVCsVqIUJAUnsgtcqfxA0ab2fcqT2Qo7TdKRV3XQKUBqDMUFDgGS4EuF2yt/1Vh4 DzTvPQeUb+PHJa90gnMHj4IhnDJQOUSAcn6RbUYJ1bjhtRW1VCn4FwqyLuRs15cJnpDC Ad/caP6tSRWWSR+zGeHpRwcU4IH1ZP2ElYIa6pdtem4pYULra5JT6GeKbJj/NdctSXfW cWgKRJr9TC1EqFO52PLnypo2qqdHR61FvzqSsjATzR67PRzas0OYjXG72GnxZ5+sVW9T EntfHlivFe/QyQ4eMCW/CmLB7s7FBjjt1evZUJ0mbIqgNUMY2GBeAomjhl+Mt7uTW2kF qekA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689478787; x=1692070787; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=JUYZKhL9o48FI/kXgJftiNWvgrQI+jq7smJ137lFoiE=; b=J/0gPBgzMhXuSPtItjy2nhNGGglSYR75+V/2nLSuVgNaEk3N3RHHN9cwdBeZqSHPpt Y4Ya0JFRP3kP7DANanYWdK5i6Ioq5oDA3oFxlgUlCpiHabJLTlQFki9bveO10qQsk43F NHJZ7lcsBz1q5QoiIAVs+YsplGorkDPEcC6tahcRDF9ZLlj/PC4PSqhm3H4REf/FTl70 9ije755RwywrPxiJPUhkYNn1OiWYWCORMh7euMBjUipd0SEiuxRXj0ck8oWajuGcmwcM Lyn0WDc1Tp/Yo1eCX3KFul8vIPnj2z1feijj5YXKt6YsbFEc5y8Ixu9yIO+GMWWj/tia Dg0g== X-Gm-Message-State: ABy/qLbrhlJEFIP2+8MhcB0Lc0WCACHK6uUZlS8//kI0D/PGqzDYnBEz 7piBcvghOX9Fc97oCil4yW8= X-Google-Smtp-Source: APBJJlGxznfD26FLpJVOubxk1/dyJH7oFi9h6kwHuSOvwtcrv8tm8G3/BvitLeenY07PqBrzwK2Wmw== X-Received: by 2002:a05:620a:191a:b0:767:4016:29f3 with SMTP id bj26-20020a05620a191a00b00767401629f3mr9415434qkb.58.1689478786839; Sat, 15 Jul 2023 20:39:46 -0700 (PDT) Received: from hurd (dsl-205-151-56-16.b2b2c.ca. [205.151.56.16]) by smtp.gmail.com with ESMTPSA id w12-20020a05620a128c00b00767e9662d4bsm4018479qki.115.2023.07.15.20.39.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jul 2023 20:39:46 -0700 (PDT) From: Maxim Cournoyer To: Arun Isaac Subject: Re: bug#63802: [mumi PATCH 0/3] Use consolidated X-Debbugs-Cc header References: <20230608171453.14788-1-arunisaac@systemreboot.net> <20230608171453.14788-2-arunisaac@systemreboot.net> Date: Sat, 15 Jul 2023 23:39:44 -0400 In-Reply-To: <20230608171453.14788-2-arunisaac@systemreboot.net> (Arun Isaac's message of "Thu, 8 Jun 2023 18:14:51 +0100") Message-ID: <87351ov81r.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: =?utf-8?Q?Ludovic_Court=C3=A8s?= , 63802@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Arun Isaac writes: > * mumi/client.scm: Import (rnrs exceptions). > (git-send-email-headers): New public function. > (split-cc): New function. nitpick: I guess these should be called 'procedures', which seems to be the preferred term in Scheme (ironically enough for a functional language? eh!). CC'ing Ludovic in case they have some thoughts on the matter, as I think they were the one originally teaching me that. If that was just me, intuitively I'd use 'procedure' for something involving side effects while 'function' as something taking an input and always returning the same output, without side effects (pure function), but that doesn't seem to be the prevalent style in the Scheme community. > * scripts/mumi.in: Add git-send-email-headers subcommand. > * tests/client.scm (split-cc): New variable. > ("split Cc field"): New test. > --- > mumi/client.scm | 52 +++++++++++++++++++++++++++++++++++++++++++++++- > scripts/mumi.in | 2 ++ > tests/client.scm | 8 ++++++++ > 3 files changed, 61 insertions(+), 1 deletion(-) > > diff --git a/mumi/client.scm b/mumi/client.scm > index c30429d..b89e608 100644 > --- a/mumi/client.scm > +++ b/mumi/client.scm > @@ -17,6 +17,7 @@ > ;;; along with mumi. If not, see . > > (define-module (mumi client) > + #:use-module (rnrs exceptions) > #:use-module (rnrs io ports) > #:use-module (srfi srfi-1) > #:use-module (srfi srfi-19) > @@ -38,7 +39,9 @@ > print-current-issue > set-current-issue! > clear-current-issue! > - send-email)) > + send-email > + git-send-email-headers > + compose)) I think you've exported 'compose' erroneously here. > (define (git-top-level) > "Return the top-level directory of the current git repository." > @@ -229,6 +232,13 @@ arguments." > name) > " <" address ">")) > > +(define (split-cc cc) > + "Split CC into a list of email addresses." > + (map (lambda (address) > + (serialize-email-address (assq-ref address 'name) > + (assq-ref address 'address))) > + (assq-ref (parse-email-headers (string-append "Cc: " cc "\n")) > + 'cc))) > > (define* (git-send-email to patches #:optional (options '())) > "Send PATCHES using git send-email to the TO address with > @@ -311,3 +321,43 @@ ISSUE-NUMBER." > "@" > (client-config 'debbugs-host)) > other-patches))))) > + > +(define (git-send-email-headers patch) > + "Print send-email headers for PATCH." > + (let* (;; Compute headers if configured in git config. > + (header-command > + (guard (ex (#t #f)) > + (call-with-input-pipe* (list "git" "config" "sendemail.headerCmd") > + get-line))) Ain't this guard equivalent to '(false-if-exception (call-with-input-pipe* ...))' ? I find the later more readable if yes, but: does call-with-input-pipe* raise an exception when git is available but 'sendemail.headerCmd' not set, thus exiting with status 1? I wasn't able to find its documentation in the Guile Reference manual. Otherwise you'd get header-command set to the empty string, which seems like it'd be a problem... > + (headers > + (if header-command > + (call-with-input-pipe (string-append header-command " " patch) ^ ... here. Also, why the mixed use of 'call-with-input-pipe*' and 'call-with-input-pipe'? I'd stick with the former. > + get-string-all) > + "")) > + (external-x-debbugs-cc > + (cond > + ((assq-ref (parse-email-headers (string-append headers "\n")) > + 'x-debbugs-cc) > + => split-cc) > + (else '()))) > + ;; Fetch Cc addresses for current issue. > + (x-debbugs-cc > + (cond > + ((assq-ref (reply-email-headers (current-issue-number)) > + 'cc) > + => split-cc) > + (else '())))) > + ;; Print X-Debbugs-Cc header. > + (display "X-Debbugs-Cc: ") > + (display (string-join (delete-duplicates > + (append x-debbugs-cc external-x-debbugs-cc)) > + ", ")) > + (newline) > + ;; Print headers other than X-Debbugs-Cc. > + ;; TODO: RFC5322 headers are not restricted to a single > + ;; line. "Folded" multi-line headers are allowed. Support them. > + (for-each (lambda (line) > + (unless (string-prefix-ci? "X-Debbugs-Cc:" line) > + (display line) > + (newline))) > + (string-split headers #\newline)))) > diff --git a/scripts/mumi.in b/scripts/mumi.in > index 2295328..8fb7cd4 100644 > --- a/scripts/mumi.in > +++ b/scripts/mumi.in > @@ -163,6 +163,8 @@ > (client:clear-current-issue!)) > (("send-email" . patches) > (client:send-email patches)) > + (("git-send-email-headers" patch) > + (client:git-send-email-headers patch)) > (("mailer" . rest) > (let* ((opts (parse-options rest)) > (sender (assoc-ref opts 'sender)) > diff --git a/tests/client.scm b/tests/client.scm > index 2b2c1be..ced573b 100644 > --- a/tests/client.scm > +++ b/tests/client.scm > @@ -68,6 +68,9 @@ called with." > (define serialize-email-address > (@@ (mumi client) serialize-email-address)) > > +(define split-cc > + (@@ (mumi client) split-cc)) > + > (test-begin "client") > > (test-equal "serialize email address" > @@ -78,6 +81,11 @@ called with." > "\"Bar, Foo\" " > (serialize-email-address "Bar, Foo" "foobar@example.com")) > > +(test-equal "split Cc field" > + (list "Foo " > + "\"Bar, Foo\" ") > + (split-cc "Foo , \"Bar, Foo\" ")) > + > (test-equal "send patches to new issue" > '(("git" "send-email" "--to=foo@patches.com" "foo.patch") > ("git" "send-email" "--to=12345@example.com" "bar.patch" "foobar.patch")) The rest LGTM. -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 16 00:01:12 2023 Received: (at 63802) by debbugs.gnu.org; 16 Jul 2023 04:01:12 +0000 Received: from localhost ([127.0.0.1]:46325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKswa-0000gn-Av for submit@debbugs.gnu.org; Sun, 16 Jul 2023 00:01:12 -0400 Received: from mail-qt1-x82a.google.com ([2607:f8b0:4864:20::82a]:57837) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKswY-0000gY-2E for 63802@debbugs.gnu.org; Sun, 16 Jul 2023 00:01:11 -0400 Received: by mail-qt1-x82a.google.com with SMTP id d75a77b69052e-403a3df88a8so25074601cf.3 for <63802@debbugs.gnu.org>; Sat, 15 Jul 2023 21:01:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689480064; x=1692072064; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=kT3Va43xqZPLw33RyZn7zdCycs6+6IKAQTVdN/1P4Ys=; b=TSsWQj4UR6glWtLJNmoGchD+mRZ/N+YyppVtpl0b9WoYUEXycOVHr46BQUt2mJuYaI kS0wOu5c+fNaQr2xTpq25phRzIWj3M1Zok7h+pZJ++KEWUc8xrLf09gSzd8FOmCJKtbv t/KqqN5cKnrleng/naqb6KMz5u0nghz8ylhksBAbOqvr7tBfzu8D7t10f1TDIl4NGrR5 z1REKnSwSW4XC8GYO3ec8Q+DpBgdtWfNEKwv9zAm6YsrESZfqI/y10H3RPG4QOzioI3z 3JwGF1p/Fi+8rQsRV3DBm/f5sElBeCFIpxJFaeTNiDzm4/D59ikX7dhIbwqt5eDHwf+6 sjlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689480064; x=1692072064; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=kT3Va43xqZPLw33RyZn7zdCycs6+6IKAQTVdN/1P4Ys=; b=VyeEYAbXX6kGaErRNGw8/P2/fznVvj3cQKFXAOIz8rpZZbpAhG3GOagKOuC+CnNLQq btkndZxWq1QhTCw7CIF5+Mla5eOUUmJ1ygs+hOcdpuC0Nq8iv4S0qSQYbYE0OZ7fUIZu r50N31nNT4C0ERklFZjL8hswf8vhTqgxIDeAoe4GNs4ecVC08IlRTrEQ54vxQfCAG6OT s/TRzWqj8hDsgR8040VTMFTM86xc+8YDrVWaHz8fsXcVABeBgFYsImmExKX+bWaqhWTH b3HZofcCQhrsjKgy2TIUdjMi2yOOxIPhr4i26gMN3hgHvveJQBMFQIPVfxb0dgIMSVc8 P1Sw== X-Gm-Message-State: ABy/qLYRN/WvJYsigpp33XLeoiSH2Futvf4k5zVvrxZFSlq2CT245KBL Do6i86qEo0yj+icHc3n8eYoApOBvxIg= X-Google-Smtp-Source: APBJJlGr8hrGUk2mD4XTnnOFE2U7oEwSfiQlajcfcffWmbNLMqZ9WhB2qmvZcE9zFtFcxLq4V0QNyQ== X-Received: by 2002:a05:622a:11c2:b0:403:b23f:9aab with SMTP id n2-20020a05622a11c200b00403b23f9aabmr12175366qtk.7.1689480063947; Sat, 15 Jul 2023 21:01:03 -0700 (PDT) Received: from hurd (dsl-205-151-56-16.b2b2c.ca. [205.151.56.16]) by smtp.gmail.com with ESMTPSA id t15-20020a0cde0f000000b00636d2482dd4sm5329263qvk.17.2023.07.15.21.01.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jul 2023 21:01:03 -0700 (PDT) From: Maxim Cournoyer To: Arun Isaac Subject: Re: bug#63802: [mumi PATCH 0/3] Use consolidated X-Debbugs-Cc header References: <20230608171453.14788-1-arunisaac@systemreboot.net> <20230608171453.14788-3-arunisaac@systemreboot.net> Date: Sun, 16 Jul 2023 00:01:02 -0400 In-Reply-To: <20230608171453.14788-3-arunisaac@systemreboot.net> (Arun Isaac's message of "Thu, 8 Jun 2023 18:14:52 +0100") Message-ID: <87v8ektsht.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: 63802@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Arun Isaac writes: > * mumi/client.scm (send-email): Accept mumi-arg0 argument and > use it to construct --header-cmd. > * scripts/mumi.in: Pass arg0 to send-email. > * tests/client.scm ("send patches to new issue", "send patches to > existing issue", "send single patch to new issue", "send single patch > to existing issue", "send patch to existing issue and Cc other > participants"): Adjust tests. I'd maybe just call mumi-arg0 'mumi-command' or similar, but otherwise, LGTM! -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 17 18:14:33 2023 Received: (at 63802) by debbugs.gnu.org; 17 Jul 2023 22:14:33 +0000 Received: from localhost ([127.0.0.1]:51072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLWUD-0002Gs-Dm for submit@debbugs.gnu.org; Mon, 17 Jul 2023 18:14:33 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:57296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLWU7-0002Gd-9t for 63802@debbugs.gnu.org; Mon, 17 Jul 2023 18:14:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=EzplKs6G0UJ6KzdI/hMMhyYxXPccAQ1gmnDr/o6vXVk=; b=O3qhjDNhHrhZQD9Q7hYicvvpLM GaMKhvOl6tr4UDFBq3YSzoZ+Oo3Erw30Ka7VBBye/k60opgllG4BGx58oGCLH9pBY1+m7aCXKnlQZ kKniQH/Tt1XASXTePVGjlomHqSuIE9YLHyZBI3kUmWMKCy2X/utr20VWrN1DVIc6vL0+LPdXv8uIC bYJm09iyvjAW3StfRH1iMGhk/6GH6eQHOzw3Ye34h9r48pQ7cKN1drWXDpK3ZpxosypS3EnAu3SZy cihfDEyyLklFIT50QphBVeGJbuBvxZQCZDZGuIiZE6mNMRO9MWA7ff9OCOtEJaL9ErwPGwdM97EYv fyu8TmJw==; Received: from [192.168.2.1] (port=44338 helo=localhost) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qLWTz-001GoF-2V; Mon, 17 Jul 2023 23:14:20 +0100 From: Arun Isaac To: Maxim Cournoyer Subject: Re: bug#63802: [mumi PATCH 0/3] Use consolidated X-Debbugs-Cc header In-Reply-To: <87351ov81r.fsf_-_@gmail.com> References: <20230608171453.14788-1-arunisaac@systemreboot.net> <20230608171453.14788-2-arunisaac@systemreboot.net> <87351ov81r.fsf_-_@gmail.com> Date: Mon, 17 Jul 2023 23:14:15 +0100 Message-ID: <87r0p6qj7s.fsf@systemreboot.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , 63802@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Maxim, > nitpick: I guess these should be called 'procedures', which seems to be > the preferred term in Scheme (ironically enough for a functional > language? eh!). CC'ing Ludovic in case they have some thoughts on the > matter, as I think they were the one originally teaching me that. > > If that was just me, intuitively I'd use 'procedure' for something > involving side effects while 'function' as something taking an input and > always returning the same output, without side effects (pure function), > but that doesn't seem to be the prevalent style in the Scheme > community. Exactly, that was my intuition too. Maybe, we should break with tradition! :-) In any case, I have changed all instances of "function" to "procedure". >> + git-send-email-headers >> + compose)) > > I think you've exported 'compose' erroneously here. Good catch! compose is part of a new "mumi compose" feature I am working on. I had accidentally committed it. I have removed it from this commit. Now that you mention it, maybe I should call it compose-email so as to not conflict with compose from guile core. >> +(define (git-send-email-headers patch) >> + "Print send-email headers for PATCH." >> + (let* (;; Compute headers if configured in git config. >> + (header-command >> + (guard (ex (#t #f)) >> + (call-with-input-pipe* (list "git" "config" "sendemail.headerCmd") >> + get-line))) > > Ain't this guard equivalent to '(false-if-exception > (call-with-input-pipe* ...))' ? I find the later more readable if yes, Good point! I was not aware of false-if-exception. I have changed to using it now. > but: does call-with-input-pipe* raise an exception when git is available > but 'sendemail.headerCmd' not set, thus exiting with status 1? I wasn't > able to find its documentation in the Guile Reference manual. call-with-input-pipe* and call-with-input-pipe are both defined in mumi/client.scm. They are not part of guile. The only difference between them is whether they accept the command as a string or as a list of arguments---thus, they parallel open-pipe and open-pipe*. > Otherwise you'd get header-command set to the empty string, which > seems like it'd be a problem... call-with-input-pipe* does raise an exception when git is available but sendemail.headerCmd is not set. I checked. So, this is not a problem. >> + (headers >> + (if header-command >> + (call-with-input-pipe (string-append header-command " " patch) > > ^ ... here. Also, why the mixed use of > 'call-with-input-pipe*' and 'call-with-input-pipe'? I'd > stick with the former. sendemail.headerCmd is only available to us as a string, and not as a list of arguments. It is quite non-trivial to correctly split the string back into a list of arguments. That would require correct handling of quotes like the shell does. So, we use call-with-input-pipe to handle this case. But everywhere else (such as when invoking "git config sendemail.headerCmd"), we prefer to pass commands as a list of arguments. So, we need call-with-input-pipe*. I understand it's a bit confusing to have two very similar functions. But, the only possible compromise is to use call-with-input-pipe everywhere. Should I make that compromise? WDYT? Thanks for the review! Regards, Arun From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 17 18:14:55 2023 Received: (at 63802) by debbugs.gnu.org; 17 Jul 2023 22:14:55 +0000 Received: from localhost ([127.0.0.1]:51075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLWUY-0002HU-RY for submit@debbugs.gnu.org; Mon, 17 Jul 2023 18:14:54 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:48408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLWUV-0002HK-Fb for 63802@debbugs.gnu.org; Mon, 17 Jul 2023 18:14:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ldici9I7tLr3bPUxkBBHSc3H0VBOcWUK+qkG02lHVnE=; b=R9uv4BrVts7/nqF1ZGocjziD4e wpBDXSsI4taIHmd0/K2Ea/x9YLw7AUcuPpVkWOk6COp9KyfQ2TBSyyy9fLG4yandzvD4TGXHw01Lx rlF8/5sV8+sLx74gPaEsxFHSrNGkj430ClozRtnO/C+w2o8n1GEAgzHJRyHdINGeSsJRmjUC0Be0v U6feqsgdPXwBSwgbJgRM/roH4EoXKjy8ZQxNEaMwNPhzQgkGzTv3Ug4ccSqbB0FeiudTDP5Xp86Pw EEdcXDwsebwJvr7ek64Gn+cd+nrLqvzp+/3EIhUpOynu0BSbJJsxUwRHhZHJcNCWhCvNmM+E4cjSw w/BAuU8g==; Received: from [192.168.2.1] (port=48314 helo=localhost) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qLWUP-001GoS-2D; Mon, 17 Jul 2023 23:14:46 +0100 From: Arun Isaac To: Maxim Cournoyer Subject: Re: bug#63802: [mumi PATCH 0/3] Use consolidated X-Debbugs-Cc header In-Reply-To: <87v8ektsht.fsf_-_@gmail.com> References: <20230608171453.14788-1-arunisaac@systemreboot.net> <20230608171453.14788-3-arunisaac@systemreboot.net> <87v8ektsht.fsf_-_@gmail.com> Date: Mon, 17 Jul 2023 23:14:42 +0100 Message-ID: <87o7kaqj71.fsf@systemreboot.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: 63802@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > I'd maybe just call mumi-arg0 'mumi-command' or similar, but otherwise, > LGTM! Done! From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 17 18:19:33 2023 Received: (at 63802) by debbugs.gnu.org; 17 Jul 2023 22:19:33 +0000 Received: from localhost ([127.0.0.1]:51080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLWZ3-0002Oa-E7 for submit@debbugs.gnu.org; Mon, 17 Jul 2023 18:19:33 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:41898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLWZ1-0002OQ-Ji for 63802@debbugs.gnu.org; Mon, 17 Jul 2023 18:19:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=baP/c8eJUcFVvXrI1jjZO8yt7cHdFvNJrQXdw5e/pwo=; b=oU2nOOT/EJ2s3oc/OWjebbuAv2 6hTBGBA7WMlNMOSrRkP5uyaVFB+7zUSw4xJYFh/AnSQymJyd4s/wKSeNDCGa4KmW8a542b2LK1Rzq MfO8xeHGLm5sTaoN02nBQpr8QaOnLUH9uHlyqhK6BHNdbzDv39rIEqY0e92sVSV5rRPeE9EUJJgJ/ svWjilSIDywZHIzNvKE1OOXyC1GTBmxv2LLFnJGkIf99tIrTbGiXauhP05iprY3/cOxwMq3PEjeFs ETOjYrHohYxCSqKgTlH/d8XKaX7MBj1y186rzMEX5tK9LOD0tsusOy8W7QCeLiFWCvs8b86u3JrWh HJESIsUQ==; Received: from [192.168.2.1] (port=50314 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qLWYx-001Gpv-11; Mon, 17 Jul 2023 23:19:28 +0100 From: Arun Isaac To: 63802@debbugs.gnu.org Subject: [PATCH 1/3] client: Separate serialize-email-address into a procedure. Date: Mon, 17 Jul 2023 23:19:19 +0100 Message-Id: <20230717221921.28889-1-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Debbugs-Cc: Arun Isaac , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: Arun Isaac X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * mumi/client.scm (serialize-email-address): New procedure. (reply-email-headers): Use serialize-email-address. * tests/client.scm (serialize-email-address): New variable. ("serialize email address", "serialize email address with comma in name"): New tests. --- mumi/client.scm | 14 ++++++++++---- tests/client.scm | 11 +++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/mumi/client.scm b/mumi/client.scm index 64ccbeb..c30429d 100644 --- a/mumi/client.scm +++ b/mumi/client.scm @@ -221,6 +221,14 @@ arguments." (unless (zero? (close-pipe port)) (error "Command invocation failed" command)))))))) +(define (serialize-email-address name address) + "Combine NAME and ADDRESS into a complete email address of the form +\"NAME
\". Double quote NAME if necessary." + (string-append (if (string-contains name ",") + (string-append "\"" name "\"") + name) + " <" address ">")) + (define* (git-send-email to patches #:optional (options '())) "Send PATCHES using git send-email to the TO address with @@ -269,10 +277,8 @@ ISSUE-NUMBER." ,@(match (delete-duplicates (map (lambda (message) (let ((from (assoc-ref message "from"))) - (string-append (if (string-contains (assoc-ref from "name") ",") - (string-append "\"" (assoc-ref from "name") "\"") - (assoc-ref from "name")) - " <" (assoc-ref from "address") ">"))) + (serialize-email-address (assoc-ref from "name") + (assoc-ref from "address")))) (vector->list (assoc-ref issue "messages")))) (() (list)) (cc (list (cons 'cc (string-join cc ", ")))))))) diff --git a/tests/client.scm b/tests/client.scm index 5352b08..2b2c1be 100644 --- a/tests/client.scm +++ b/tests/client.scm @@ -65,8 +65,19 @@ called with." (lambda _ (error "Do not poll server for issue number")))) +(define serialize-email-address + (@@ (mumi client) serialize-email-address)) + (test-begin "client") +(test-equal "serialize email address" + "Foo " + (serialize-email-address "Foo" "foo@example.com")) + +(test-equal "serialize email address with comma in name" + "\"Bar, Foo\" " + (serialize-email-address "Bar, Foo" "foobar@example.com")) + (test-equal "send patches to new issue" '(("git" "send-email" "--to=foo@patches.com" "foo.patch") ("git" "send-email" "--to=12345@example.com" "bar.patch" "foobar.patch")) -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 17 18:19:37 2023 Received: (at 63802) by debbugs.gnu.org; 17 Jul 2023 22:19:37 +0000 Received: from localhost ([127.0.0.1]:51085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLWZ6-0002Or-QM for submit@debbugs.gnu.org; Mon, 17 Jul 2023 18:19:37 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:51466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLWZ4-0002OZ-1y for 63802@debbugs.gnu.org; Mon, 17 Jul 2023 18:19:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Y4F8IAtxdSvYstMc95O1MVzT+4J3DPVl3euRSElbZyA=; b=ERp4qYc2yMCwXuVwiYkpW97JNZ HcJOCs+JkxxZYwmzxj2/3y1w3z56koIYk/xbB+5iaCivZmpVWfKu0UxOj4H/6rGYgWMtEW3IU75uJ W4lTNjVvdxToobcpvAHhhhnEZILICkU1wvvFlquCIWmKw4uHHfcs/d9+Hd5geDvVjEprEFbswqYjF olfID35IfT1douIX/sSwqzk32q7IPNayVv4X2iFC7yY6XNRzrMqzW0uqfsfCIv0micy4hjvTWKaXm Zu72EbDgort4/2wnoDsHPav1EaQwQ7x0a69x9pTBNQOn1oQIk64lDQvEB3BkEXxJMSuMn3k+8TG6b 80B/U3QA==; Received: from [192.168.2.1] (port=50314 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qLWZ1-001Gpv-0U; Mon, 17 Jul 2023 23:19:31 +0100 From: Arun Isaac To: 63802@debbugs.gnu.org Subject: [PATCH 2/3] client: Add git-send-email-headers subcommand. Date: Mon, 17 Jul 2023 23:19:20 +0100 Message-Id: <20230717221921.28889-2-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230717221921.28889-1-arunisaac@systemreboot.net> References: <20230717221921.28889-1-arunisaac@systemreboot.net> MIME-Version: 1.0 X-Debbugs-Cc: Arun Isaac , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: Arun Isaac X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * mumi/client.scm: Import (rnrs exceptions). (git-send-email-headers): New public procedure. (split-cc): New procedure. * scripts/mumi.in: Add git-send-email-headers subcommand. * tests/client.scm (split-cc): New variable. ("split Cc field"): New test. --- mumi/client.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++++- scripts/mumi.in | 2 ++ tests/client.scm | 8 ++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) diff --git a/mumi/client.scm b/mumi/client.scm index c30429d..797ec91 100644 --- a/mumi/client.scm +++ b/mumi/client.scm @@ -17,6 +17,7 @@ ;;; along with mumi. If not, see . (define-module (mumi client) + #:use-module (rnrs exceptions) #:use-module (rnrs io ports) #:use-module (srfi srfi-1) #:use-module (srfi srfi-19) @@ -38,7 +39,8 @@ print-current-issue set-current-issue! clear-current-issue! - send-email)) + send-email + git-send-email-headers)) (define (git-top-level) "Return the top-level directory of the current git repository." @@ -229,6 +231,13 @@ arguments." name) " <" address ">")) +(define (split-cc cc) + "Split CC into a list of email addresses." + (map (lambda (address) + (serialize-email-address (assq-ref address 'name) + (assq-ref address 'address))) + (assq-ref (parse-email-headers (string-append "Cc: " cc "\n")) + 'cc))) (define* (git-send-email to patches #:optional (options '())) "Send PATCHES using git send-email to the TO address with @@ -311,3 +320,43 @@ ISSUE-NUMBER." "@" (client-config 'debbugs-host)) other-patches))))) + +(define (git-send-email-headers patch) + "Print send-email headers for PATCH." + (let* (;; Compute headers if configured in git config. + (header-command + (false-if-exception + (call-with-input-pipe* (list "git" "config" "sendemail.headerCmd") + get-line))) + (headers + (if header-command + (call-with-input-pipe (string-append header-command " " patch) + get-string-all) + "")) + (external-x-debbugs-cc + (cond + ((assq-ref (parse-email-headers (string-append headers "\n")) + 'x-debbugs-cc) + => split-cc) + (else '()))) + ;; Fetch Cc addresses for current issue. + (x-debbugs-cc + (cond + ((assq-ref (reply-email-headers (current-issue-number)) + 'cc) + => split-cc) + (else '())))) + ;; Print X-Debbugs-Cc header. + (display "X-Debbugs-Cc: ") + (display (string-join (delete-duplicates + (append x-debbugs-cc external-x-debbugs-cc)) + ", ")) + (newline) + ;; Print headers other than X-Debbugs-Cc. + ;; TODO: RFC5322 headers are not restricted to a single + ;; line. "Folded" multi-line headers are allowed. Support them. + (for-each (lambda (line) + (unless (string-prefix-ci? "X-Debbugs-Cc:" line) + (display line) + (newline))) + (string-split headers #\newline)))) diff --git a/scripts/mumi.in b/scripts/mumi.in index 2295328..8fb7cd4 100644 --- a/scripts/mumi.in +++ b/scripts/mumi.in @@ -163,6 +163,8 @@ (client:clear-current-issue!)) (("send-email" . patches) (client:send-email patches)) + (("git-send-email-headers" patch) + (client:git-send-email-headers patch)) (("mailer" . rest) (let* ((opts (parse-options rest)) (sender (assoc-ref opts 'sender)) diff --git a/tests/client.scm b/tests/client.scm index 2b2c1be..ced573b 100644 --- a/tests/client.scm +++ b/tests/client.scm @@ -68,6 +68,9 @@ called with." (define serialize-email-address (@@ (mumi client) serialize-email-address)) +(define split-cc + (@@ (mumi client) split-cc)) + (test-begin "client") (test-equal "serialize email address" @@ -78,6 +81,11 @@ called with." "\"Bar, Foo\" " (serialize-email-address "Bar, Foo" "foobar@example.com")) +(test-equal "split Cc field" + (list "Foo " + "\"Bar, Foo\" ") + (split-cc "Foo , \"Bar, Foo\" ")) + (test-equal "send patches to new issue" '(("git" "send-email" "--to=foo@patches.com" "foo.patch") ("git" "send-email" "--to=12345@example.com" "bar.patch" "foobar.patch")) -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 17 18:19:42 2023 Received: (at 63802) by debbugs.gnu.org; 17 Jul 2023 22:19:42 +0000 Received: from localhost ([127.0.0.1]:51090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLWZB-0002PI-4o for submit@debbugs.gnu.org; Mon, 17 Jul 2023 18:19:42 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:51468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLWZ6-0002Op-O6 for 63802@debbugs.gnu.org; Mon, 17 Jul 2023 18:19:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ou4IyKPVaciCMGK+XlhN/X0j7I6dOSl1KI/tfKO/+ds=; b=Heh1KSftPD8UlvOvOVCzq1Pd9a BwF+l1jmFmiEqiy4OCzbtFO4ealTpiwrhBtH+or5PGv39hPWmp8Kqzf8N6fSepyc/oxYEd9fFRui5 meypCnZ8x2M69nvEEp5bpQDtZF3EqnDVArPaxBG0MBJagGADgVn/iDXj9QMFsO8VgoeZGS9fiiEMN 3ltvayLvGgOUeEABxyKaaLqj82cHix9Qvz3gp2Q/xfO9p+reiaJxn6/9lB7B2VgeQrfAryF/EPABB SANNDPg+F8NqCpvnZ6W2t4UQJTzYD18N6ZLzvYX3fUfwbhe1XpT0f8X/HO2cjUAXxi5K1oIMR3eBh LYtNsjLw==; Received: from [192.168.2.1] (port=50314 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qLWZ3-001Gpv-2X; Mon, 17 Jul 2023 23:19:34 +0100 From: Arun Isaac To: 63802@debbugs.gnu.org Subject: [PATCH 3/3] client: Use mumi git-send-email-headers subcommand. Date: Mon, 17 Jul 2023 23:19:21 +0100 Message-Id: <20230717221921.28889-3-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230717221921.28889-1-arunisaac@systemreboot.net> References: <20230717221921.28889-1-arunisaac@systemreboot.net> MIME-Version: 1.0 X-Debbugs-Cc: Arun Isaac , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: Arun Isaac X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * mumi/client.scm (send-email): Accept mumi-command argument and use it to construct --header-cmd. * scripts/mumi.in: Pass command to send-email. * tests/client.scm ("send patches to new issue", "send patches to existing issue", "send single patch to new issue", "send single patch to existing issue", "send patch to existing issue and Cc other participants"): Adjust tests. --- mumi/client.scm | 10 +++++++--- scripts/mumi.in | 2 +- tests/client.scm | 17 ++++++++++++++--- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/mumi/client.scm b/mumi/client.scm index 797ec91..6ac69f9 100644 --- a/mumi/client.scm +++ b/mumi/client.scm @@ -292,8 +292,9 @@ ISSUE-NUMBER." (() (list)) (cc (list (cons 'cc (string-join cc ", ")))))))) -(define (send-email patches) - "Send PATCHES via email." +(define (send-email mumi-command patches) + "Send PATCHES via email. MUMI-COMMAND is the mumi program currently +invoked." (if (current-issue-number) ;; If an issue is current, send patches to that issue's email ;; address. @@ -301,7 +302,10 @@ ISSUE-NUMBER." (git-send-email (string-append (number->string issue-number) "@" (client-config 'debbugs-host)) - patches)) + patches + (list (string-append "--header-cmd=" + mumi-command + " git-send-email-headers")))) (match patches ;; If it's a single patch, send it to the patch email address ;; and be done with it diff --git a/scripts/mumi.in b/scripts/mumi.in index 8fb7cd4..5b98634 100644 --- a/scripts/mumi.in +++ b/scripts/mumi.in @@ -162,7 +162,7 @@ (("new") (client:clear-current-issue!)) (("send-email" . patches) - (client:send-email patches)) + (client:send-email (car (program-arguments)) patches)) (("git-send-email-headers" patch) (client:git-send-email-headers patch)) (("mailer" . rest) diff --git a/tests/client.scm b/tests/client.scm index ced573b..d28bc1a 100644 --- a/tests/client.scm +++ b/tests/client.scm @@ -99,10 +99,13 @@ called with." (const 12345)) client-config-stub) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch" "bar.patch" "foobar.patch"))))))) (test-equal "send patches to existing issue" - '(("git" "send-email" "--to=12345@example.com" "foo.patch" "bar.patch" "foobar.patch")) + '(("git" "send-email" "--to=12345@example.com" + "--header-cmd=mumi git-send-email-headers" + "foo.patch" "bar.patch" "foobar.patch")) (map (match-lambda ((command _) command)) (trace-calls (var@@ (mumi client) call-with-input-pipe*) @@ -114,6 +117,7 @@ called with." client-config-stub do-not-poll-server-for-issue-number) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch" "bar.patch" "foobar.patch"))))))) (test-equal "send single patch to new issue" @@ -127,10 +131,13 @@ called with." client-config-stub do-not-poll-server-for-issue-number) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch"))))))) (test-equal "send single patch to existing issue" - '(("git" "send-email" "--to=12345@example.com" "foo.patch")) + '(("git" "send-email" "--to=12345@example.com" + "--header-cmd=mumi git-send-email-headers" + "foo.patch")) (map (match-lambda ((command _) command)) (trace-calls (var@@ (mumi client) call-with-input-pipe*) @@ -142,10 +149,13 @@ called with." client-config-stub do-not-poll-server-for-issue-number) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch"))))))) (test-equal "send patch to existing issue and Cc other participants" - '(("git" "send-email" "--to=12345@example.com" "foo.patch")) + '(("git" "send-email" "--to=12345@example.com" + "--header-cmd=mumi git-send-email-headers" + "foo.patch")) (map (match-lambda ((command _) command)) (trace-calls (var@@ (mumi client) call-with-input-pipe*) @@ -157,6 +167,7 @@ called with." client-config-stub do-not-poll-server-for-issue-number) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch"))))))) (test-end "client") -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 18 11:32:48 2023 Received: (at 63802) by debbugs.gnu.org; 18 Jul 2023 15:32:48 +0000 Received: from localhost ([127.0.0.1]:53998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLmgx-000860-Pm for submit@debbugs.gnu.org; Tue, 18 Jul 2023 11:32:48 -0400 Received: from mail-oa1-x34.google.com ([2001:4860:4864:20::34]:55626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLmgv-00085l-3x for 63802@debbugs.gnu.org; Tue, 18 Jul 2023 11:32:46 -0400 Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-1b049163c93so3430198fac.3 for <63802@debbugs.gnu.org>; Tue, 18 Jul 2023 08:32:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689694359; x=1692286359; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=gSy44+9MVv/0xVqeRHH285rMKhZpkflM9AVY2c8/yjQ=; b=QVH7zRf2T9GVjUH+jqLdTE+Z3Z6sAz0Oxvf+MBryhvYDd8ueUStquU9etRmSRbuF3n iKZe5psd45hg43eCeJxzlYJ0HlaKc2X9ZrwUWB+zd43tQL9mmPan+CkLNqjf/ZeiP6E6 WpcnrGqcOTcUmRzJyRxlOZgJZ7TePMBuVStyQ/gTIqnUS8BcrcjqY/ZqIAIbjLTQUxW5 /omyexePhRYDoB2n3fZdujEHeZWOK9UFbi9uxgXfxgoqMbO7VP5hEep8i2NBNQdqWgFb +xiAsbMyhlhbE1Ng5POHssizc5HS3kMnLI0L1Y/fa1IwRZLPInwfIEEaFk1Gdc2Xaosu HGug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689694359; x=1692286359; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=gSy44+9MVv/0xVqeRHH285rMKhZpkflM9AVY2c8/yjQ=; b=WBraHcVW5pmKL4ptIANt3plgYGvOIaDC6tBnOLhVPD2EGdPz+srLkASG/IhYc9TKN6 QMcaNTfFc59esivFcSiRl9CthfrVeP1EM0H1kEKX/VsGL8R+0imvxTqTvMjj8Um/K5US K/cqqHQUJy7oQKIKQ9KzV9FaY3/7A0CbmfBVAfx8+pQib/ca/21pkAkO2X8bOdGH16wd 0lhqoRfgMSKnTP3IG+Uf6uLrXnKtFKiBlkyRK66lxOdBMep1S0tCFAHWQd4LATJjcWdC 8/PGDQ5meCymA1OznimQyGuG3tAFnlO8k9EUVUaWCZdMEp1AKLzYgSsaDR0F8w7dmpwu NYSg== X-Gm-Message-State: ABy/qLbkiyzCiwnnXpbFRpo5897SGz+OOSbUn+j0kh/tBtzILjGWoFCd YCmNb0Vx3l8pdNpYGJOz45Y= X-Google-Smtp-Source: APBJJlEwJgdjEQLHiYTzZGoG27xUHGAurMItQ/RoVa1YwZcWi2q+GKuz5oVrFJ89aWgxrm0vOCydoA== X-Received: by 2002:a05:6870:e750:b0:1ba:66c1:da4c with SMTP id t16-20020a056870e75000b001ba66c1da4cmr6964755oak.57.1689694359257; Tue, 18 Jul 2023 08:32:39 -0700 (PDT) Received: from raisin ([2607:fad8:4:6::984a]) by smtp.gmail.com with ESMTPSA id pe8-20020a05620a850800b00767502e8601sm674916qkn.35.2023.07.18.08.32.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jul 2023 08:32:39 -0700 (PDT) From: Maxim Cournoyer To: Arun Isaac Subject: Re: bug#63802: [mumi PATCH 0/3] Use consolidated X-Debbugs-Cc header References: <20230608171453.14788-1-arunisaac@systemreboot.net> <20230608171453.14788-2-arunisaac@systemreboot.net> <87351ov81r.fsf_-_@gmail.com> <87r0p6qj7s.fsf@systemreboot.net> Date: Tue, 18 Jul 2023 11:32:38 -0400 In-Reply-To: <87r0p6qj7s.fsf@systemreboot.net> (Arun Isaac's message of "Mon, 17 Jul 2023 23:14:15 +0100") Message-ID: <87wmyxteuh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 63802 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , 63802@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Arun Isaac writes: [...] >>> + git-send-email-headers >>> + compose)) >> >> I think you've exported 'compose' erroneously here. > > Good catch! compose is part of a new "mumi compose" feature I am working > on. I had accidentally committed it. I have removed it from this commit. > > Now that you mention it, maybe I should call it compose-email so as to > not conflict with compose from guile core. Good idea! Shadowing builtins should be avoided; the warnings are annoying and require the use of #:hide on imports (and the code more confusing to read). [...] >> but: does call-with-input-pipe* raise an exception when git is available >> but 'sendemail.headerCmd' not set, thus exiting with status 1? I wasn't >> able to find its documentation in the Guile Reference manual. > > call-with-input-pipe* and call-with-input-pipe are both defined in > mumi/client.scm. They are not part of guile. The only difference between > them is whether they accept the command as a string or as a list of > arguments---thus, they parallel open-pipe and open-pipe*. > >> Otherwise you'd get header-command set to the empty string, which >> seems like it'd be a problem... > > call-with-input-pipe* does raise an exception when git is available but > sendemail.headerCmd is not set. I checked. So, this is not a problem. Good, thanks for checking. >>> + (headers >>> + (if header-command >>> + (call-with-input-pipe (string-append header-command " " patch) >> >> ^ ... here. Also, why the mixed use of >> 'call-with-input-pipe*' and 'call-with-input-pipe'? I'd >> stick with the former. > > sendemail.headerCmd is only available to us as a string, and not as a > list of arguments. It is quite non-trivial to correctly split the string > back into a list of arguments. That would require correct handling of > quotes like the shell does. So, we use call-with-input-pipe to handle > this case. Ah, I see. It's reasonable then to use it as is. > But everywhere else (such as when invoking "git config > sendemail.headerCmd"), we prefer to pass commands as a list of > arguments. So, we need call-with-input-pipe*. > > I understand it's a bit confusing to have two very similar > functions. But, the only possible compromise is to use > call-with-input-pipe everywhere. Should I make that compromise? WDYT? No, just the explanation here (and a possible comment in the source mirroring it) is enough! LGTM. -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 19 12:49:37 2023 Received: (at 63802-done) by debbugs.gnu.org; 19 Jul 2023 16:49:37 +0000 Received: from localhost ([127.0.0.1]:57063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMAMq-0002bY-Qr for submit@debbugs.gnu.org; Wed, 19 Jul 2023 12:49:37 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:35388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMAMm-0002bM-Es for 63802-done@debbugs.gnu.org; Wed, 19 Jul 2023 12:49:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1vaNsXEwNAWBGgn3LR9tTOsCCGF+/IlAA0wUFk+rv4Q=; b=itjUdlTR+QMhLn+zcBdOveEEqA +xCaNr91n8NUYmAYagZSZKFo8y7WpkemdF/nzCmNA/TBgpxqELuz6vM+iEN43P5aeMkI0rn/2fX9k q+T/j9nwdxSt0iOldQjGVaodX1Z3mZqzVzG/olVJ1IvduCT0N5vG+IqmcSFyJcWYQQOUIyMjZygNx R7YaLj8d2QryHXLTrm+fZiNcvt7miExZ67bLDynDooeCKrgsduoruI5Auko9Iwdo2+PLP/ACffXA6 Jqg8rs/rhlLhO9/z67sBxz9Wk2HBfkvxqL313va+VKb7fJ62Mudj6E58X+dNwc2anWCpRfR5lWg5U LLyw/74g==; Received: from [192.168.2.1] (port=52956 helo=localhost) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qMAMe-001WHk-14; Wed, 19 Jul 2023 17:49:25 +0100 From: Arun Isaac To: Maxim Cournoyer Subject: Re: bug#63802: [mumi PATCH 0/3] Use consolidated X-Debbugs-Cc header In-Reply-To: <87wmyxteuh.fsf@gmail.com> References: <20230608171453.14788-1-arunisaac@systemreboot.net> <20230608171453.14788-2-arunisaac@systemreboot.net> <87351ov81r.fsf_-_@gmail.com> <87r0p6qj7s.fsf@systemreboot.net> <87wmyxteuh.fsf@gmail.com> Date: Wed, 19 Jul 2023 17:49:20 +0100 Message-ID: <87fs5jzw1b.fsf@systemreboot.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 63802-done Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , 63802-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Good idea! Shadowing builtins should be avoided; the warnings are > annoying and require the use of #:hide on imports (and the code more > confusing to read). I definitely agree. I was engrossed in writing mumi-compose, and quite forgot about the builtin compose. > No, just the explanation here (and a possible comment in the source > mirroring it) is enough! Done, and pushed! Thanks! From unknown Fri Jun 20 18:11:38 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 17 Aug 2023 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 23 08:24:11 2024 Received: (at control) by debbugs.gnu.org; 23 Feb 2024 13:24:11 +0000 Received: from localhost ([127.0.0.1]:38392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdVX9-0000M9-9g for submit@debbugs.gnu.org; Fri, 23 Feb 2024 08:24:11 -0500 Received: from sail-ipv4.us-core.com ([208.82.101.137]:52832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdVX7-0000Lx-DD for control@debbugs.gnu.org; Fri, 23 Feb 2024 08:24:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=2017; bh=0PeEJYVffjYOBZE HGZWFMzZuqMQDkikIxyohJDTEc0c=; h=date:cc:to:from; d=lease-up.com; b=hd uWOtzruwXENaYv9M3KDGM1xgXMQYebOROpyi0dQOtUdq2T6NJqybegl/3CYFadl66+XGCW UBykA+2Hr1VxczMBuTammIk7z3rZCtX5l1M2wILplj4MsIJKCrQt59gJs9+QO10yOuBB1/ DQRuB/cf0/1x1pROxNrsDEG9pWvE4= Received: by sail-ipv4.us-core.com (OpenSMTPD) with ESMTPSA id ed37bc2b (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for ; Fri, 23 Feb 2024 13:23:44 +0000 (UTC) From: Felix Lechner To: control@debbugs.gnu.org Date: Fri, 23 Feb 2024 05:23:44 -0800 Message-ID: <875xyf1fhb.fsf@lease-up.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: unarchive 68680 reassign 68680 mumi archive 68680 unarchive 63802 reassign 63802 mumi archive 63802 unarchive 63215 reassign 63215 mumi archive 63215 Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) unarchive 68680 reassign 68680 mumi archive 68680 unarchive 63802 reassign 63802 mumi archive 63802 unarchive 63215 reassign 63215 mumi archive 63215 unarchive 61645 reassign 61645 mumi archive 61645 unarchive 60410 reassign 60410 mumi archive 60410 unarchive 60292 reassign 60292 mumi archive 60292 unarchive 60292 reassign 60292 mumi archive 60292 unarchive 58573 reassign 58573 mumi archive 58573 unarchive 54024 reassign 54024 mumi archive 54024 unarchive 49115 reassign 49115 mumi archive 49115 unarchive 48160 reassign 48160 mumi archive 48160 unarchive 47739 reassign 47739 mumi archive 47739 unarchive 47520 reassign 47520 mumi archive 47520 unarchive 47121 reassign 47121 mumi archive 47121 unarchive 45015 reassign 45015 mumi archive 45015 unarchive 43661 reassign 43661 mumi archive 43661 unarchiv 43166 reassign 43166 mumi archive 43166 unarchive 41906 reassign 41906 mumi archive 41906 unarchive 41098 reassign 41098 mumi archive 41098 unarchive 39924 reassign 39924 mumi archive 39924 unarchive 39924 reassign 39924 mumi archive 39924 unarchive 39924 reassign 39924 mumi archive 39924 thanks