unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#64590: Patch: fix gud-go in gdb-mi.el
@ 2023-07-13  4:40 Wang Diancheng
  2023-07-13  8:58 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Wang Diancheng @ 2023-07-13  4:40 UTC (permalink / raw)
  To: 64590

[-- Attachment #1: Type: text/plain, Size: 290 bytes --]

Hi,
document of gud-go says "Start or continue execution.  Use a prefix to
specify arguments." but it always prompts for program arguments
regardless of whether "C-u" is pressed because arg is numeric prefix
here. The attachment is a patch to change gud-go just prompts if
prefix is not 1.

[-- Attachment #2: gud-go.patch --]
[-- Type: text/x-patch, Size: 830 bytes --]

diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 199be3318a1..e81c1452c55 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -987,14 +987,14 @@ gdb
 	   "\C-u" "Continue to current line or address.")
   (gud-def
    gud-go (progn
-            (when arg
+            (when (/= arg 1)
               (gud-call (concat "-exec-arguments "
                                 (read-string "Arguments to exec-run: "))))
             (gud-call
              (if gdb-active-process
                  (gdb-gud-context-command "-exec-continue")
                "-exec-run")))
-   "\C-v" "Start or continue execution.  Use a prefix to specify arguments.")
+   "\C-v" "Start or continue execution.  Use a prefix other than 1 to specify arguments.")
 
   ;; For debugging Emacs only.
   (gud-def gud-pp

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#64590: Patch: fix gud-go in gdb-mi.el
  2023-07-13  4:40 bug#64590: Patch: fix gud-go in gdb-mi.el Wang Diancheng
@ 2023-07-13  8:58 ` Eli Zaretskii
  2023-07-14  3:06   ` Wang Diancheng
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2023-07-13  8:58 UTC (permalink / raw)
  To: Wang Diancheng; +Cc: 64590

> From: Wang Diancheng <dianchengwang@gmail.com>
> Date: Thu, 13 Jul 2023 12:40:58 +0800
> 
> document of gud-go says "Start or continue execution.  Use a prefix to
> specify arguments." but it always prompts for program arguments
> regardless of whether "C-u" is pressed because arg is numeric prefix
> here.

Right, gud-def specifies '(interactive "p")'.

> The attachment is a patch to change gud-go just prompts if
> prefix is not 1.

This will have the subtlety that "C-u 1 C-v" will fail to ask for
program arguments.  Shouldn't we instead look at current-prefix-arg?

Thanks.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#64590: Patch: fix gud-go in gdb-mi.el
  2023-07-13  8:58 ` Eli Zaretskii
@ 2023-07-14  3:06   ` Wang Diancheng
  2023-07-15  8:42     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Wang Diancheng @ 2023-07-14  3:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 64590

[-- Attachment #1: Type: text/plain, Size: 780 bytes --]

Eli Zaretskii <eliz@gnu.org> 于2023年7月13日周四 16:58写道:
>
> > From: Wang Diancheng <dianchengwang@gmail.com>
> > Date: Thu, 13 Jul 2023 12:40:58 +0800
> >
> > document of gud-go says "Start or continue execution.  Use a prefix to
> > specify arguments." but it always prompts for program arguments
> > regardless of whether "C-u" is pressed because arg is numeric prefix
> > here.
>
> Right, gud-def specifies '(interactive "p")'.
>
> > The attachment is a patch to change gud-go just prompts if
> > prefix is not 1.
>
> This will have the subtlety that "C-u 1 C-v" will fail to ask for
> program arguments.  Shouldn't we instead look at current-prefix-arg?
>

Thanks.

Yes, I think it's a good idea. the patch is updated as that.

> Thanks.

[-- Attachment #2: gud-go-v2.patch --]
[-- Type: text/x-patch, Size: 493 bytes --]

diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 199be3318a1..a1091de43e9 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -987,7 +987,7 @@ gdb
 	   "\C-u" "Continue to current line or address.")
   (gud-def
    gud-go (progn
-            (when arg
+            (when (and current-prefix-arg arg)
               (gud-call (concat "-exec-arguments "
                                 (read-string "Arguments to exec-run: "))))
             (gud-call

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#64590: Patch: fix gud-go in gdb-mi.el
  2023-07-14  3:06   ` Wang Diancheng
@ 2023-07-15  8:42     ` Eli Zaretskii
  2023-07-17  9:07       ` Wang Diancheng
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2023-07-15  8:42 UTC (permalink / raw)
  To: Wang Diancheng; +Cc: 64590-done

> From: Wang Diancheng <dianchengwang@gmail.com>
> Date: Fri, 14 Jul 2023 11:06:32 +0800
> Cc: 64590@debbugs.gnu.org
> 
> Eli Zaretskii <eliz@gnu.org> 于2023年7月13日周四 16:58写道:
> >
> > > From: Wang Diancheng <dianchengwang@gmail.com>
> > > Date: Thu, 13 Jul 2023 12:40:58 +0800
> > >
> > > document of gud-go says "Start or continue execution.  Use a prefix to
> > > specify arguments." but it always prompts for program arguments
> > > regardless of whether "C-u" is pressed because arg is numeric prefix
> > > here.
> >
> > Right, gud-def specifies '(interactive "p")'.
> >
> > > The attachment is a patch to change gud-go just prompts if
> > > prefix is not 1.
> >
> > This will have the subtlety that "C-u 1 C-v" will fail to ask for
> > program arguments.  Shouldn't we instead look at current-prefix-arg?
> >
> 
> Thanks.
> 
> Yes, I think it's a good idea. the patch is updated as that.

Thanks, installed on the emacs-29 branch, and closing the bug.

With this contribution, you have exhausted the amount of changes we
can accept from you without a copyright assignment.  Would you like to
start the legal paperwork of assigning to the FSF the copyright for
your changes, so that we could in the future accept more contributions
from you without limitations?  If yes, I will send you the form to
fill.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#64590: Patch: fix gud-go in gdb-mi.el
  2023-07-15  8:42     ` Eli Zaretskii
@ 2023-07-17  9:07       ` Wang Diancheng
  0 siblings, 0 replies; 5+ messages in thread
From: Wang Diancheng @ 2023-07-17  9:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 64590-done

Eli Zaretskii <eliz@gnu.org> 于2023年7月15日周六 16:42写道:
>
> > From: Wang Diancheng <dianchengwang@gmail.com>
> > Date: Fri, 14 Jul 2023 11:06:32 +0800
> > Cc: 64590@debbugs.gnu.org
> >
> > Eli Zaretskii <eliz@gnu.org> 于2023年7月13日周四 16:58写道:
> > >
> > > > From: Wang Diancheng <dianchengwang@gmail.com>
> > > > Date: Thu, 13 Jul 2023 12:40:58 +0800
> > > >
> > > > document of gud-go says "Start or continue execution.  Use a prefix to
> > > > specify arguments." but it always prompts for program arguments
> > > > regardless of whether "C-u" is pressed because arg is numeric prefix
> > > > here.
> > >
> > > Right, gud-def specifies '(interactive "p")'.
> > >
> > > > The attachment is a patch to change gud-go just prompts if
> > > > prefix is not 1.
> > >
> > > This will have the subtlety that "C-u 1 C-v" will fail to ask for
> > > program arguments.  Shouldn't we instead look at current-prefix-arg?
> > >
> >
> > Thanks.
> >
> > Yes, I think it's a good idea. the patch is updated as that.
>
> Thanks, installed on the emacs-29 branch, and closing the bug.
>

Thanks.

> With this contribution, you have exhausted the amount of changes we
> can accept from you without a copyright assignment.  Would you like to
> start the legal paperwork of assigning to the FSF the copyright for
> your changes, so that we could in the future accept more contributions
> from you without limitations?  If yes, I will send you the form to
> fill.

My copyright assignment has been in progress.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-07-17  9:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-13  4:40 bug#64590: Patch: fix gud-go in gdb-mi.el Wang Diancheng
2023-07-13  8:58 ` Eli Zaretskii
2023-07-14  3:06   ` Wang Diancheng
2023-07-15  8:42     ` Eli Zaretskii
2023-07-17  9:07       ` Wang Diancheng

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).