From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65387: [PATCH] New user option 'submit-emacs-patch-display-help' Date: Sat, 19 Aug 2023 21:33:14 +0200 Message-ID: Reply-To: Eshel Yaron Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9342"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 65387@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 19 21:34:11 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qXRi7-0002Db-A7 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Aug 2023 21:34:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qXRhy-0003xL-1h; Sat, 19 Aug 2023 15:34:02 -0400 Original-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 1qXRhw-0003xA-S1 for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2023 15:34:01 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qXRhw-00056i-Jv for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2023 15:34:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qXRhx-0000Bk-Nq for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2023 15:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Aug 2023 19:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.1692473612687 (code B ref -1); Sat, 19 Aug 2023 19:34:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Aug 2023 19:33:32 +0000 Original-Received: from localhost ([127.0.0.1]:52320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXRhU-0000B1-98 for submit@debbugs.gnu.org; Sat, 19 Aug 2023 15:33:32 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:47536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXRhR-0000Am-Co for submit@debbugs.gnu.org; Sat, 19 Aug 2023 15:33:30 -0400 Original-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 1qXRhK-0003ql-Fv for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2023 15:33:22 -0400 Original-Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qXRhI-00052g-5f for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2023 15:33:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1692473599; bh=6p1RZc9h8CulN/OMao3X/946smaWIL6JioSXIRs/xOU=; h=From:To:Subject:Date:From; b=tsPSVmCx2BwSTRdS28DoZEDTvOplRRMvbd78mV8VBoRMJaHjRWXkxI183q/D5UiHz tE5z0En6e2A6Z5OEiZFC+SMTsJvoyRc4dLL6DDmrVdye4WJVP44dSP1B68PS9m5V95 PtsxT6TGW9kh+14up+k3CcqUodmF99gd6D+M1JwjV3Ph7rs/SEz5bRe99IM8EUQtUE +6urw0h420EyvIghGhARlmqh/236xcJheIdXlp38FjKxQhIHoYFMcFsKtAsR0CK8l4 6hqAN5iMemv4baVLqCOZimkiphXGizL4+LH4f7EON2lOr3wgWj04+EMN3Ewv4HWY4k mRofFrBTFz8Kg== Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@eshelyaron.com; helo=eshelyaron.com 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_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:267909 Archived-At: --=-=-= Content-Type: text/plain Tags: patch Hi, This patch adds a user option for disabling the *Patch Help* buffer that `submit-emacs-patch` displays. In GNU Emacs 30.0.50 (build 23, x86_64-apple-darwin22.5.0, NS appkit-2299.60 Version 13.4 (Build 22F66)) of 2023-08-19 built on Dazzs-MacBook-Pro.local Repository revision: 44697457c6048464a68b6d58a1c4cf967fd5be06 Repository branch: submit-emacs-patch-display-help Windowing system distributor 'Apple', version 10.3.2299 System Description: macOS 13.4 Configured using: 'configure 'CFLAGS=-g0 -O3' --with-native-compilation --with-json --with-imagemagick --with-tree-sitter --enable-link-time-optimization' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-New-user-option-submit-emacs-patch-display-help.patch >From 28bf05cdafa8b9d00a47a932d20569097289b6d4 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sat, 19 Aug 2023 21:24:34 +0200 Subject: [PATCH] New user option 'submit-emacs-patch-display-help' This lets users prevent 'submit-emacs-patch' from displaying a buffer with instructions about submitting patches when they no longer need it. * lisp/mail/emacsbug.el (submit-emacs-patch-display-help): New user option. (submit-emacs-patch): Use it. * doc/emacs/trouble.texi (Sending Patches): Document it. * etc/NEWS: Announce it. --- doc/emacs/trouble.texi | 7 +++++++ etc/NEWS | 6 ++++++ lisp/mail/emacsbug.el | 45 +++++++++++++++++++++++------------------- 3 files changed, 38 insertions(+), 20 deletions(-) diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index d2e8ac3452a..279b17dca2d 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -1336,6 +1336,13 @@ Sending Patches form that is clearly safe to install. @end itemize +@vindex submit-emacs-patch-display-help +By default, @kbd{M-x submit-emacs-patch} displays a buffer with some +instructions alongside the Message mode buffer. If you're already +familiar with these instructions after submitting a patch or two, you +can disable this help by customizing the user option +@code{submit-emacs-patch-display-help} to @code{nil}. + @node Contributing @section Contributing to Emacs Development @cindex contributing to Emacs diff --git a/etc/NEWS b/etc/NEWS index 6588299c532..ab868b9f3a4 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -99,6 +99,12 @@ This allows the user to customize the prompt that is appended by 'yes-or-no-p' when asking questions. The default value is "(yes or no) ". ++++ +** New user option 'submit-emacs-patch-display-help'. +You can set this user option to nil to prevent 'submit-emacs-patch' +from displaying a help buffer with instructions for submitting +patches. + --- ** New face 'display-time-date-and-time'. This is used for displaying the time and date components of diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index bebaad720db..9c2120530a6 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -50,6 +50,10 @@ report-emacs-bug-no-explanations "If non-nil, suppress the explanations given for the sake of novice users." :type 'boolean) +(defcustom submit-emacs-patch-display-help t + "If non-nil, `submit-emacs-patch' displays some help in another buffer." + :type 'boolean) + ;; User options end here. (defvar report-emacs-bug-orig-text nil @@ -509,26 +513,27 @@ submit-emacs-patch (list (read-string (format-prompt "This patch is about" guess) nil nil guess) file))) - (switch-to-buffer "*Patch Help*") - (let ((inhibit-read-only t)) - (erase-buffer) - (insert "Thank you for considering submitting a patch to the Emacs project.\n\n" - "Please describe what the patch fixes (or, if it's a new feature, what it\n" - "implements) in the mail buffer below. When done, use the " - (substitute-command-keys "\\\\[message-send-and-exit] command\n") - "to send the patch as an email to the Emacs issue tracker.\n\n" - "If this is the first time you're submitting an Emacs patch, please\n" - "read the ") - (insert-text-button - "CONTRIBUTE" - 'action (lambda (_) - (view-buffer - (find-file-noselect - (expand-file-name "CONTRIBUTE" installation-directory))))) - (insert " file first.\n") - (goto-char (point-min)) - (view-mode 1) - (button-mode 1)) + (when submit-emacs-patch-display-help + (switch-to-buffer "*Patch Help*") + (let ((inhibit-read-only t)) + (erase-buffer) + (insert "Thank you for considering submitting a patch to the Emacs project.\n\n" + "Please describe what the patch fixes (or, if it's a new feature, what it\n" + "implements) in the mail buffer below. When done, use the " + (substitute-command-keys "\\\\[message-send-and-exit] command\n") + "to send the patch as an email to the Emacs issue tracker.\n\n" + "If this is the first time you're submitting an Emacs patch, please\n" + "read the ") + (insert-text-button + "CONTRIBUTE" + 'action (lambda (_) + (view-buffer + (find-file-noselect + (expand-file-name "CONTRIBUTE" installation-directory))))) + (insert " file first.\n") + (goto-char (point-min)) + (view-mode 1) + (button-mode 1))) (compose-mail-other-window report-emacs-bug-address subject) (message-goto-body) (insert "\n\n\n") -- 2.41.0 --=-=-=--