GNU bug report logs - #65387
[PATCH] New user option 'submit-emacs-patch-display-help'

Previous Next

Package: emacs;

Reported by: Eshel Yaron <me <at> eshelyaron.com>

Date: Sat, 19 Aug 2023 19:34:01 UTC

Severity: wishlist

Tags: patch

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 65387 in the body.
You can then email your comments to 65387 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#65387; Package emacs. (Sat, 19 Aug 2023 19:34:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eshel Yaron <me <at> eshelyaron.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 19 Aug 2023 19:34:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eshel Yaron <me <at> eshelyaron.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] New user option 'submit-emacs-patch-display-help'
Date: Sat, 19 Aug 2023 21:33:14 +0200
[Message part 1 (text/plain, inline)]
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'

[0001-New-user-option-submit-emacs-patch-display-help.patch (text/patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65387; Package emacs. (Sat, 19 Aug 2023 19:59:02 GMT) Full text and rfc822 format available.

Message #8 received at 65387 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Eshel Yaron <me <at> eshelyaron.com>
Cc: 65387 <at> debbugs.gnu.org
Subject: Re: bug#65387: [PATCH] New user option
 'submit-emacs-patch-display-help'
Date: Sat, 19 Aug 2023 22:58:30 +0300
> Date: Sat, 19 Aug 2023 21:33:14 +0200
> From:  Eshel Yaron via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> This patch adds a user option for disabling the *Patch Help* buffer that
> `submit-emacs-patch` displays.

Thanks, but why is it important to be able to disable the
instructions, enough to justify this new option?  I expect experienced
people not to use this command at all, so its main purpose is for the
newbies.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65387; Package emacs. (Sat, 19 Aug 2023 20:57:02 GMT) Full text and rfc822 format available.

Message #11 received at 65387 <at> debbugs.gnu.org (full text, mbox):

From: Eshel Yaron <me <at> eshelyaron.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 65387 <at> debbugs.gnu.org
Subject: Re: bug#65387: [PATCH] New user option
 'submit-emacs-patch-display-help'
Date: Sat, 19 Aug 2023 22:56:18 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Date: Sat, 19 Aug 2023 21:33:14 +0200
>> From:  Eshel Yaron via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>> 
>> This patch adds a user option for disabling the *Patch Help* buffer that
>> `submit-emacs-patch` displays.
>
> Thanks, but why is it important to be able to disable the
> instructions, enough to justify this new option?  I expect experienced
> people not to use this command at all, so its main purpose is for the
> newbies.

Ah I actually find this command quite convenient, except for that
instructions buffer that tends to get in my way.  So I guess this option
is useful for us semi-newbies :)

I don't know if it justifies a new option, as you say, and I don't mind
keeping a modified `submit-emacs-patch` in my config.

I do wonder, since `(info "(emacs)Sending Patches")` recommends using
`submit-emacs-patch` and that always seemed easier than doing `C-x m`
and adding the destination address and the attachment patch afterwards,
what alternative you'd expect experienced users to go with?


Thanks,

Eshel




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65387; Package emacs. (Sun, 20 Aug 2023 06:08:01 GMT) Full text and rfc822 format available.

Message #14 received at 65387 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Eshel Yaron <me <at> eshelyaron.com>
Cc: 65387 <at> debbugs.gnu.org
Subject: Re: bug#65387: [PATCH] New user option
 'submit-emacs-patch-display-help'
Date: Sun, 20 Aug 2023 09:07:09 +0300
> From: Eshel Yaron <me <at> eshelyaron.com>
> Cc: 65387 <at> debbugs.gnu.org
> Date: Sat, 19 Aug 2023 22:56:18 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> This patch adds a user option for disabling the *Patch Help* buffer that
> >> `submit-emacs-patch` displays.
> >
> > Thanks, but why is it important to be able to disable the
> > instructions, enough to justify this new option?  I expect experienced
> > people not to use this command at all, so its main purpose is for the
> > newbies.
> 
> Ah I actually find this command quite convenient, except for that
> instructions buffer that tends to get in my way.  So I guess this option
> is useful for us semi-newbies :)
> 
> I don't know if it justifies a new option, as you say, and I don't mind
> keeping a modified `submit-emacs-patch` in my config.
> 
> I do wonder, since `(info "(emacs)Sending Patches")` recommends using
> `submit-emacs-patch` and that always seemed easier than doing `C-x m`
> and adding the destination address and the attachment patch afterwards,
> what alternative you'd expect experienced users to go with?

Let's see what others think about this new command.

Would people please voice their opinions about adding it?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65387; Package emacs. (Sun, 20 Aug 2023 07:57:01 GMT) Full text and rfc822 format available.

Message #17 received at 65387 <at> debbugs.gnu.org (full text, mbox):

From: Visuwesh <visuweshm <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Eshel Yaron <me <at> eshelyaron.com>, 65387 <at> debbugs.gnu.org
Subject: Re: bug#65387: [PATCH] New user option
 'submit-emacs-patch-display-help'
Date: Sun, 20 Aug 2023 13:26:26 +0530
[ஞாயிறு ஆகஸ்ட் 20, 2023] Eli Zaretskii wrote:
 
>> Ah I actually find this command quite convenient, except for that
>> instructions buffer that tends to get in my way.  So I guess this option
>> is useful for us semi-newbies :)
>> 
>> I don't know if it justifies a new option, as you say, and I don't mind
>> keeping a modified `submit-emacs-patch` in my config.
>> 
>> I do wonder, since `(info "(emacs)Sending Patches")` recommends using
>> `submit-emacs-patch` and that always seemed easier than doing `C-x m`
>> and adding the destination address and the attachment patch afterwards,
>> what alternative you'd expect experienced users to go with?
>
> Let's see what others think about this new command.
>
> Would people please voice their opinions about adding it?

I was thinking of proposing such a patch myself sometime™.  I think I
would end up using the command more if I could turn off the help buffer.
Though, I think the user option report-emacs-bug-no-explanations could
be reused instead.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65387; Package emacs. (Sun, 20 Aug 2023 10:01:01 GMT) Full text and rfc822 format available.

Message #20 received at 65387 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Martín <mardani29 <at> yahoo.es>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Eshel Yaron <me <at> eshelyaron.com>, 65387 <at> debbugs.gnu.org
Subject: Re: bug#65387: [PATCH] New user option
 'submit-emacs-patch-display-help'
Date: Sun, 20 Aug 2023 11:59:47 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Eshel Yaron <me <at> eshelyaron.com>
>> Cc: 65387 <at> debbugs.gnu.org
>> Date: Sat, 19 Aug 2023 22:56:18 +0200
>> 
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>> 
>> >> This patch adds a user option for disabling the *Patch Help* buffer that
>> >> `submit-emacs-patch` displays.
>> >
>> > Thanks, but why is it important to be able to disable the
>> > instructions, enough to justify this new option?  I expect experienced
>> > people not to use this command at all, so its main purpose is for the
>> > newbies.
>> 
>> Ah I actually find this command quite convenient, except for that
>> instructions buffer that tends to get in my way.  So I guess this option
>> is useful for us semi-newbies :)
>> 
>> I don't know if it justifies a new option, as you say, and I don't mind
>> keeping a modified `submit-emacs-patch` in my config.
>> 
>> I do wonder, since `(info "(emacs)Sending Patches")` recommends using
>> `submit-emacs-patch` and that always seemed easier than doing `C-x m`
>> and adding the destination address and the attachment patch afterwards,
>> what alternative you'd expect experienced users to go with?
>
> Let's see what others think about this new command.
>
> Would people please voice their opinions about adding it?

Instead of just a toggle, we could make the new option a tristate:

- `nil`: Only displays the buffer to compose the email (what is proposed in
  this bug report).
- `help`: Displays instructions on how to send the patch (current
  behavior).  
- `patch`: Displays the patch that you want to submit in the split
  window.

Perhaps this adds useful enough functionality that adding a new
configuration option feels more justified.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65387; Package emacs. (Sun, 20 Aug 2023 11:37:02 GMT) Full text and rfc822 format available.

Message #23 received at 65387 <at> debbugs.gnu.org (full text, mbox):

From: Eshel Yaron <me <at> eshelyaron.com>
To: Daniel Martín <mardani29 <at> yahoo.es>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 65387 <at> debbugs.gnu.org
Subject: Re: bug#65387: [PATCH] New user option
 'submit-emacs-patch-display-help'
Date: Sun, 20 Aug 2023 13:35:56 +0200
[Message part 1 (text/plain, inline)]
Daniel Martín <mardani29 <at> yahoo.es> writes:

> Instead of just a toggle, we could make the new option a tristate:
>
> - `nil`: Only displays the buffer to compose the email (what is proposed in
>   this bug report).
> - `help`: Displays instructions on how to send the patch (current
>   behavior).  
> - `patch`: Displays the patch that you want to submit in the split
>   window.

Good idea, thanks.  I've added something like that in the following
updated patch:


[v2-0001-New-user-option-submit-emacs-patch-display-help.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65387; Package emacs. (Sun, 20 Aug 2023 17:28:04 GMT) Full text and rfc822 format available.

Message #26 received at 65387 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Eshel Yaron <me <at> eshelyaron.com>, 65387 <at> debbugs.gnu.org
Subject: Re: bug#65387: [PATCH] New user option
 'submit-emacs-patch-display-help'
Date: Sun, 20 Aug 2023 19:37:18 +0300
>> I don't know if it justifies a new option, as you say, and I don't mind
>> keeping a modified `submit-emacs-patch` in my config.
>
> Let's see what others think about this new command.
>
> Would people please voice their opinions about adding it?

If 'submit-emacs-patch' used 'pop-to-buffer-same-window'
instead of 'switch-to-buffer' like in the patch below,
then using such simple config would be possible:

  (add-to-list 'display-buffer-alist
               '("\\*Patch Help\\*"
                 display-buffer-no-window
                 (allow-no-window . t)))

PS: This patch doesn't preclude adding an option.

diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index bebaad720db..409ef7165fe 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -509,7 +509,7 @@ submit-emacs-patch
      (list (read-string (format-prompt "This patch is about" guess)
                         nil nil guess)
            file)))
-  (switch-to-buffer "*Patch Help*")
+  (pop-to-buffer-same-window "*Patch Help*")
   (let ((inhibit-read-only t))
     (erase-buffer)
     (insert "Thank you for considering submitting a patch to the Emacs project.\n\n"




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65387; Package emacs. (Wed, 06 Sep 2023 17:48:02 GMT) Full text and rfc822 format available.

Message #29 received at 65387 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Eshel Yaron <me <at> eshelyaron.com>, 65387 <at> debbugs.gnu.org
Subject: Re: bug#65387: [PATCH] New user option
 'submit-emacs-patch-display-help'
Date: Wed, 6 Sep 2023 10:47:41 -0700
Eli Zaretskii <eliz <at> gnu.org> writes:

> Would people please voice their opinions about adding it?

I think it would be nice to eventually make `M-x submit-emacs-patch'
into something even more powerful, more suitable for advanced users.

I'm thinking of something closer to debbugs, so that you set some option
to your Emacs source tree, and it'll create the patches and attach them
to the current email for you.

So I think I like the idea here, as it seems to go in that direction.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65387; Package emacs. (Wed, 06 Sep 2023 18:33:01 GMT) Full text and rfc822 format available.

Message #32 received at 65387 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: me <at> eshelyaron.com, 65387 <at> debbugs.gnu.org
Subject: Re: bug#65387: [PATCH] New user option
 'submit-emacs-patch-display-help'
Date: Wed, 06 Sep 2023 21:31:35 +0300
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Wed, 6 Sep 2023 10:47:41 -0700
> Cc: Eshel Yaron <me <at> eshelyaron.com>, 65387 <at> debbugs.gnu.org
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > Would people please voice their opinions about adding it?
> 
> I think it would be nice to eventually make `M-x submit-emacs-patch'
> into something even more powerful, more suitable for advanced users.
> 
> I'm thinking of something closer to debbugs, so that you set some option
> to your Emacs source tree, and it'll create the patches and attach them
> to the current email for you.
> 
> So I think I like the idea here, as it seems to go in that direction.

TBH, I fail to see how disabling the instruction is going in the
direction you described.  But if this is part of some larger plan to
that effect, I don't mind.




Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 13 Sep 2023 12:39:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65387; Package emacs. (Thu, 16 Nov 2023 07:29:02 GMT) Full text and rfc822 format available.

Message #37 received at 65387 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Eshel Yaron <me <at> eshelyaron.com>, 65387 <at> debbugs.gnu.org
Subject: Re: bug#65387: [PATCH] New user option
 'submit-emacs-patch-display-help'
Date: Thu, 16 Nov 2023 09:25:36 +0200
>>> I don't know if it justifies a new option, as you say, and I don't mind
>>> keeping a modified `submit-emacs-patch` in my config.
>>
>> Let's see what others think about this new command.
>>
>> Would people please voice their opinions about adding it?
>
> If 'submit-emacs-patch' used 'pop-to-buffer-same-window'
> instead of 'switch-to-buffer' like in the patch below,
> then using such simple config would be possible:
>
>   (add-to-list 'display-buffer-alist
>                '("\\*Patch Help\\*"
>                  display-buffer-no-window
>                  (allow-no-window . t)))
>
> @@ -509,7 +509,7 @@ submit-emacs-patch
>       (list (read-string (format-prompt "This patch is about" guess)
>                          nil nil guess)
>             file)))
> -  (switch-to-buffer "*Patch Help*")
> +  (pop-to-buffer-same-window "*Patch Help*")

Now pushed.  And maybe this could be closed?




Reply sent to Stefan Kangas <stefankangas <at> gmail.com>:
You have taken responsibility. (Fri, 15 Dec 2023 01:14:02 GMT) Full text and rfc822 format available.

Notification sent to Eshel Yaron <me <at> eshelyaron.com>:
bug acknowledged by developer. (Fri, 15 Dec 2023 01:14:02 GMT) Full text and rfc822 format available.

Message #42 received at 65387-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>, Eli Zaretskii <eliz <at> gnu.org>
Cc: Eshel Yaron <me <at> eshelyaron.com>, 65387-done <at> debbugs.gnu.org
Subject: Re: bug#65387: [PATCH] New user option
 'submit-emacs-patch-display-help'
Date: Thu, 14 Dec 2023 17:12:59 -0800
Juri Linkov <juri <at> linkov.net> writes:

> Now pushed.  And maybe this could be closed?

Done.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 12 Jan 2024 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 121 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.