From unknown Mon Jun 23 07:48:12 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#54931 <54931@debbugs.gnu.org> To: bug#54931 <54931@debbugs.gnu.org> Subject: Status: [PATCH] Have submit-emacs-patch prompt for patch file before subject Reply-To: bug#54931 <54931@debbugs.gnu.org> Date: Mon, 23 Jun 2025 14:48:12 +0000 retitle 54931 [PATCH] Have submit-emacs-patch prompt for patch file before = subject reassign 54931 emacs submitter 54931 Philip Kaludercic severity 54931 normal tag 54931 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 14 06:16:19 2022 Received: (at submit) by debbugs.gnu.org; 14 Apr 2022 10:16:19 +0000 Received: from localhost ([127.0.0.1]:55284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1newWQ-00044x-QR for submit@debbugs.gnu.org; Thu, 14 Apr 2022 06:16:19 -0400 Received: from lists.gnu.org ([209.51.188.17]:55186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1newWP-00044q-DE for submit@debbugs.gnu.org; Thu, 14 Apr 2022 06:16:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1newWP-00069T-5N for bug-gnu-emacs@gnu.org; Thu, 14 Apr 2022 06:16:17 -0400 Received: from mout01.posteo.de ([185.67.36.65]:55425) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1newWN-0000N6-7A for bug-gnu-emacs@gnu.org; Thu, 14 Apr 2022 06:16:16 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D824624002A for ; Thu, 14 Apr 2022 12:16:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1649931372; bh=6zHGAtTWYFUur/kYaty4GVzAMn7OtJB29rEYoNHUxDE=; h=From:To:Subject:Autocrypt:Date:From; b=ewwJArfVyopOq0jNZt/QiyxyhwBESuQ5oK6r1yz5rJSK3fw6+iuVWr9OOFpo6kHLa 6BZvG6ShadCuRv3ghWpFsQWwPXVvAhJNAuTJ0UFsisUG7YdEK751mCOt5mywT/5+uR IecddBla9vk3xqpEenHrOPxYTLeGAQDd3kN7oHqCwp2Bo8Y94mUeBpQZIWAK1Yt87X Yb3EsEzWnuf2hwvGdIqu80dvqWkB/cY/gbEMVY7HNqu1G2HbYOcEwL7j2k6xvdV9iN nTg7Th6NG7vWr6VjyXHka8PzUzx7UVEokrn+lr52MEDy8wrsf3mZZXMTsY8IXWcvOV l23C/JXOfyyTw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4KfFjS1vS5z9rxH for ; Thu, 14 Apr 2022 12:16:12 +0200 (CEST) From: Philip Kaludercic To: bug-gnu-emacs@gnu.org Subject: [PATCH] Have submit-emacs-patch prompt for patch file before subject Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB Date: Thu, 14 Apr 2022 10:16:11 +0000 Message-ID: <8735ig55sk.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.3 (-) X-Debbugs-Envelope-To: submit 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.3 (--) --=-=-= Content-Type: text/plain Tags: patch When sending patches using submit-emacs-patch, I usually want to reuse the commit title for the message subject. As a minor convenience, this can be guessed when the patch file is prompted before the subject, allowing for a default value to be provided by extracting the "Subject" header from the patch file. In GNU Emacs 29.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0) of 2022-04-10 built on viero Repository revision: 0023cfdc4e6d348519198cf75553d1afad0ed153 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Guix System Configured using: 'configure PKG_CONFIG_PATH=/home/philip/.guix-profile/lib/pkgconfig:/home/philip/.guix-profile/share/pkgconfig' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Have-submit-emacs-patch-prompt-for-patch-file-before.patch >From 5a0509166c184178f65506615db225eac9426e41 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Thu, 14 Apr 2022 12:13:27 +0200 Subject: [PATCH] Have submit-emacs-patch prompt for patch file before subject * emacsbug.el (submit-emacs-patch): Prompt for patch file and use that to guess the subject. --- lisp/mail/emacsbug.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index 1bda609d10..3cc727e6cf 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -488,7 +488,14 @@ submit-emacs-patch Interactively, you will be prompted for SUBJECT and a patch FILE name (which will be attached to the mail). You will end up in a Message buffer where you can explain more about the patch." - (interactive "sThis patch is about: \nfPatch file name: ") + (interactive + (let* ((file (read-file-name "Patch file name: ")) + (guess (with-temp-buffer + (insert-file-contents file) + (mail-fetch-field "Subject")))) + (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) -- 2.34.0 --=-=-= Content-Type: text/plain -- Philip Kaludercic --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 14 09:52:55 2022 Received: (at 54931) by debbugs.gnu.org; 14 Apr 2022 13:52:55 +0000 Received: from localhost ([127.0.0.1]:55666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nezu3-0003k6-3N for submit@debbugs.gnu.org; Thu, 14 Apr 2022 09:52:55 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nezu0-0003jq-Td for 54931@debbugs.gnu.org; Thu, 14 Apr 2022 09:52:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References: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=g0y6ptNl+Rugy4hKpHPRgX5JY5JeYRY7Ih9++QWZ7VM=; b=O7ZLIMECxFlywL8ob1ddqq3Oij 9LXdOkn1ao9KxvJRJd8BYmb4U619GVBFndHAKfW10q8AR/YZlCg0bd8M6LhhigWH3dVwSqTBFTh9G bJvfwbecMro5EdYdLp+4h94iXg0cFzJ82/sDUavq3RujrvGYnl6n4uEVP/9+gXWphRpc=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nezts-000281-Gd; Thu, 14 Apr 2022 15:52:46 +0200 From: Lars Ingebrigtsen To: Philip Kaludercic Subject: Re: bug#54931: [PATCH] Have submit-emacs-patch prompt for patch file before subject References: <8735ig55sk.fsf@posteo.net> Date: Thu, 14 Apr 2022 15:52:43 +0200 In-Reply-To: <8735ig55sk.fsf@posteo.net> (Philip Kaludercic's message of "Thu, 14 Apr 2022 10:16:11 +0000") Message-ID: <875ynbn55g.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > When sending patches using submit-emacs-patch, I usually want to reuse > the commit title for the message subject. As a minor convenience, this > can be guessed when the patch file is prompted befor [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54931 Cc: 54931@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: -3.3 (---) Philip Kaludercic writes: > When sending patches using submit-emacs-patch, I usually want to reuse > the commit title for the message subject. As a minor convenience, this > can be guessed when the patch file is prompted before the subject, > allowing for a default value to be provided by extracting the "Subject" > header from the patch file. Looks good to me, please go ahead and push. > + (list (read-string (format-prompt "This patch is about" guess ) > + nil nil guess) But without that space between "guess" and ")". -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 14 12:41:19 2022 Received: (at 54931) by debbugs.gnu.org; 14 Apr 2022 16:41:19 +0000 Received: from localhost ([127.0.0.1]:57078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nf2X1-0004bX-G6 for submit@debbugs.gnu.org; Thu, 14 Apr 2022 12:41:19 -0400 Received: from mout01.posteo.de ([185.67.36.65]:45871) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nf2Wz-0004bI-GQ for 54931@debbugs.gnu.org; Thu, 14 Apr 2022 12:41:18 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 193FE240027 for <54931@debbugs.gnu.org>; Thu, 14 Apr 2022 18:41:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1649954471; bh=Z0VavKz+YA/Q1oWNwqCiZ8EXoxDsGJNPOdCjgUySUKg=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=WFpm8+Ws9JIe4Ak3PhVq108OaeHrKy6oiKef4L2OqIRTrhfC7FL9J25rWWxtun5Qo LtKJZDXl8lJ9ECwnH3xAF1WKsCjiL2dcxjjWwgZSdwPPywfwEmcctXUEiwtgmCdzNF 8NxMhJQDWCmoNuVMVy15V9fZmDqjmZZMh2087Skrh0T+qf2zh7cp1taAMu3vz0frn+ 1Vnl2xFYql6lnmJlZyZutJMNC6JJTOMCRtJbjaJmFoK+QxU4/qn64w+G0xKAIpBTyk nmDyFbpMf3ROziTLaCQe4W9wv54XAqkyTknFJC6MM7Sb41NNWUfrTmVSDm/0zBzkRO bcFSO5yQ0JFEA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4KfQFf2vRZz6tnx; Thu, 14 Apr 2022 18:41:10 +0200 (CEST) From: Philip Kaludercic To: Lars Ingebrigtsen Subject: Re: bug#54931: [PATCH] Have submit-emacs-patch prompt for patch file before subject References: <8735ig55sk.fsf@posteo.net> <875ynbn55g.fsf@gnus.org> Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB Date: Thu, 14 Apr 2022 16:41:08 +0000 In-Reply-To: <875ynbn55g.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 14 Apr 2022 15:52:43 +0200") Message-ID: <87ee1z4nyz.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54931 Cc: 54931@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: -3.3 (---) Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> When sending patches using submit-emacs-patch, I usually want to reuse >> the commit title for the message subject. As a minor convenience, this >> can be guessed when the patch file is prompted before the subject, >> allowing for a default value to be provided by extracting the "Subject" >> header from the patch file. > > Looks good to me, please go ahead and push. Done, >> + (list (read-string (format-prompt "This patch is about" guess ) >> + nil nil guess) > > But without that space between "guess" and ")". done, Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> Reading through time_cmp, I didn't understand why the lisp_time struct >> was calculated for the first argument before checking if both are eq. >>>>From what I see lisp_time struct is not a destructive function, so it >> should be possible to call the function when calculating the lisp_time >> struct for the second argument. > > Looks good to me; please go ahead and push. and done. -- Philip Kaludercic From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 15 03:44:28 2022 Received: (at control) by debbugs.gnu.org; 15 Apr 2022 07:44:28 +0000 Received: from localhost ([127.0.0.1]:58036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nfGd2-0004B7-1L for submit@debbugs.gnu.org; Fri, 15 Apr 2022 03:44:28 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nfGd0-0004Aq-PB for control@debbugs.gnu.org; Fri, 15 Apr 2022 03:44:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding: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=SGBow1skgaryUrQ+18qNR6DILC6xgvUcuxWMebqXXHw=; b=DGcrBicOrxfv0+0TnlUFdL7O0c leNQQwvpBedyqj49MIU6jn+c09oB4Pxyt7V4brTE8L8qs3HcwY5DtXgW2rjEAk4WEtNp8UW43V96O 50h1T9nhOJ9kUXj17bgDAEvocNUF00z5o8hNAGshMQTe0lao5NVpKpZij1LKwZDfq5Kk=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nfGcs-0007uh-Ml for control@debbugs.gnu.org; Fri, 15 Apr 2022 09:44:20 +0200 Date: Fri, 15 Apr 2022 09:44:15 +0200 Message-Id: <87mtgmiyeo.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #54931 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: close 54931 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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: -3.3 (---) close 54931 29.1 quit From unknown Mon Jun 23 07:48:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 13 May 2022 11:24:05 +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