Subject: bug#57877: [PATCH] Add empty X-Debbugs-Cc header to bug report template

From: Augusto Stoffel <[email-masked]>
Date: Sat, 17 Sep 2022 10:45:55 +0200

Tags: patch

I can never remember what that funny CC header was when I need it, how
about adding an empty X-Debbugs-Cc to the bug report and patch message
templates?

An alternative would be to add a reminder and explanation about it to
that portion of text that gets deleted (“This bug report will be
sent...”).

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.34, cairo version 1.17.6) of 2022-09-14 built on ars3
Repository revision: a9941269683fe50673d0aa81feefb7a9d3d8a6b9
Repository branch: HEAD
System Description: Fedora Linux 36 (Workstation Edition)

Configured using:
 'configure --with-pgtk'

>From 8a15db7a0ad9e102ed7bb50bb8a9e02e232cce96 Mon Sep 17 00:00:00 2001
From: Augusto Stoffel <[email-masked]>
Date: Sat, 17 Sep 2022 10:39:46 +0200
Subject: [PATCH] Add empty X-Debbugs-Cc header to bug report template

* lisp/mail/emacsbug.el: (report-emacs-bug, submit-emacs-patch): Add
empty X-Debbugs-Cc header.
---
 lisp/mail/emacsbug.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index a85ceaf1a5..ea99e3eddc 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -228,7 +228,7 @@ report-emacs-bug
           (set-window-dedicated-p nil nil)
           (set-frame-parameter nil 'unsplittable nil))
       (error nil))
-    (compose-mail report-emacs-bug-address topic)
+    (compose-mail report-emacs-bug-address topic '(("X-Debbugs-Cc" . "")))
     ;; The rest of this does not execute if the user was asked to
     ;; confirm and said no.
     (when (eq major-mode 'message-mode)
@@ -518,7 +518,10 @@ submit-emacs-patch
     (goto-char (point-min))
     (view-mode 1)
     (button-mode 1))
-  (compose-mail-other-window report-emacs-bug-address subject)
+  (compose-mail-other-window report-emacs-bug-address
+                             subject
+                             '(("X-Debbugs-Cc" . "")))
+  (message-sort-headers)
   (message-goto-body)
   (insert "\n\n\n")
   (emacs-bug--system-description)
-- 
2.37.3