Subject: bug#56555: [PATCH] Use compose-mail in submit-emacs-patch

From: Visuwesh <[email-masked]>
Date: Thu, 14 Jul 2022 19:41:50 +0530

Tags: patch

This makes the command respect the mail-user-agent.  In my particular
case, it ensures that Gnus archives the message being sent.

[ This is the last patch in my train.  ]

In GNU Emacs 29.0.50 (build 11, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars)
 of 2022-07-14 built on astatine
Repository revision: d37ba6f259b972aa44c66ecb76210e03a3084183
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101003
System Description: Debian GNU/Linux bookworm/sid

Configured using:
 'configure --with-sound=alsa --with-x-toolkit=lucid --with-json
 --without-xaw3d --without-gconf --without-libsystemd --without-cairo'

>From 45ee5e4e8648e81cd7246db77ec6d84fb227d541 Mon Sep 17 00:00:00 2001
From: Visuwesh <[email-masked]>
Date: Thu, 14 Jul 2022 19:40:42 +0530
Subject: [PATCH] Use compose-mail in submit-emacs-patch

This ensures that Gnus can put the Gcc header for archiving.

* lisp/mail/emacsbug.el (submit-emacs-patch): Prefer
compose-mail-other-window over message-mail-other-window.
---
 lisp/mail/emacsbug.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index d743802ead..6cc99c2134 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -518,7 +518,7 @@ submit-emacs-patch
     (goto-char (point-min))
     (view-mode 1)
     (button-mode 1))
-  (message-mail-other-window report-emacs-bug-address subject)
+  (compose-mail-other-window report-emacs-bug-address subject)
   (message-goto-body)
   (insert "\n\n\n")
   (emacs-bug--system-description)
-- 
2.35.1