unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#74642: 31.0.50; [Patch] Turn off current source line indicator when gdb buffer is killed
@ 2024-12-02  7:04 Diancheng Wang
  2024-12-02 13:17 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Diancheng Wang @ 2024-12-02  7:04 UTC (permalink / raw)
  To: 74642

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: hide-current-line-indicator-kill-buffer.patch --]
[-- Type: text/x-diff, Size: 1041 bytes --]

diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index b60e21ff0ae..110b9f5ed46 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -5278,6 +5278,7 @@ gdb-reset
               (setq gud-minor-mode nil)
               (kill-local-variable 'tool-bar-map)
               (kill-local-variable 'gdb-define-alist))))))
+  (gud-hide-current-line-indicator t)
   (setq gdb-disassembly-position nil)
   (setq overlay-arrow-variable-list
         (delq 'gdb-disassembly-position overlay-arrow-variable-list))
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index a4e611277e4..ffd4dd70762 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -3017,7 +3017,8 @@ gud-reset
       (with-current-buffer buffer
 	(when gud-minor-mode
 	  (setq gud-minor-mode nil)
-	  (kill-local-variable 'tool-bar-map))))))
+	  (kill-local-variable 'tool-bar-map)))))
+    (gud-hide-current-line-indicator t))
 
 (defun gud-display-frame ()
   "Find and obey the last filename-and-line marker from the debugger.

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

* bug#74642: 31.0.50; [Patch] Turn off current source line indicator when gdb buffer is killed
  2024-12-02  7:04 bug#74642: 31.0.50; [Patch] Turn off current source line indicator when gdb buffer is killed Diancheng Wang
@ 2024-12-02 13:17 ` Eli Zaretskii
  2024-12-03  2:04   ` Diancheng Wang
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2024-12-02 13:17 UTC (permalink / raw)
  To: Diancheng Wang; +Cc: 74642

> From: Diancheng Wang <diancheng_wang@163.com>
> Date: Mon, 02 Dec 2024 15:04:46 +0800
> 
> diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
> index b60e21ff0ae..110b9f5ed46 100644
> --- a/lisp/progmodes/gdb-mi.el
> +++ b/lisp/progmodes/gdb-mi.el
> @@ -5278,6 +5278,7 @@ gdb-reset
>                (setq gud-minor-mode nil)
>                (kill-local-variable 'tool-bar-map)
>                (kill-local-variable 'gdb-define-alist))))))
> +  (gud-hide-current-line-indicator t)
>    (setq gdb-disassembly-position nil)
>    (setq overlay-arrow-variable-list
>          (delq 'gdb-disassembly-position overlay-arrow-variable-list))
> diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
> index a4e611277e4..ffd4dd70762 100644
> --- a/lisp/progmodes/gud.el
> +++ b/lisp/progmodes/gud.el
> @@ -3017,7 +3017,8 @@ gud-reset
>        (with-current-buffer buffer
>  	(when gud-minor-mode
>  	  (setq gud-minor-mode nil)
> -	  (kill-local-variable 'tool-bar-map))))))
> +	  (kill-local-variable 'tool-bar-map)))))
> +    (gud-hide-current-line-indicator t))
>  
>  (defun gud-display-frame ()
>    "Find and obey the last filename-and-line marker from the debugger.

Thanks, but can you please describe the scenario in which the
indicator is not removed?  I guess I don't really understand what you
mean by "gdb buffer is killed": what I tried is simply end the
debugging session by typing "q RET" at the GDB prompt.  And that
removed the indicator.





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

* bug#74642: 31.0.50; [Patch] Turn off current source line indicator when gdb buffer is killed
  2024-12-02 13:17 ` Eli Zaretskii
@ 2024-12-03  2:04   ` Diancheng Wang
  2024-12-03 12:32     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Diancheng Wang @ 2024-12-03  2:04 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 74642

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Diancheng Wang <diancheng_wang@163.com>
>> Date: Mon, 02 Dec 2024 15:04:46 +0800
>> 
>> diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
>> index b60e21ff0ae..110b9f5ed46 100644
>> --- a/lisp/progmodes/gdb-mi.el
>> +++ b/lisp/progmodes/gdb-mi.el
>> @@ -5278,6 +5278,7 @@ gdb-reset
>>                (setq gud-minor-mode nil)
>>                (kill-local-variable 'tool-bar-map)
>>                (kill-local-variable 'gdb-define-alist))))))
>> +  (gud-hide-current-line-indicator t)
>>    (setq gdb-disassembly-position nil)
>>    (setq overlay-arrow-variable-list
>>          (delq 'gdb-disassembly-position overlay-arrow-variable-list))
>> diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
>> index a4e611277e4..ffd4dd70762 100644
>> --- a/lisp/progmodes/gud.el
>> +++ b/lisp/progmodes/gud.el
>> @@ -3017,7 +3017,8 @@ gud-reset
>>        (with-current-buffer buffer
>>  	(when gud-minor-mode
>>  	  (setq gud-minor-mode nil)
>> -	  (kill-local-variable 'tool-bar-map))))))
>> +	  (kill-local-variable 'tool-bar-map)))))
>> +    (gud-hide-current-line-indicator t))
>>  
>>  (defun gud-display-frame ()
>>    "Find and obey the last filename-and-line marker from the debugger.
>
> Thanks, but can you please describe the scenario in which the
> indicator is not removed?  I guess I don't really understand what you
> mean by "gdb buffer is killed": what I tried is simply end the
> debugging session by typing "q RET" at the GDB prompt.  And that
> removed the indicator.

Hi,

Sorry for confusing. I mean killing GDB interactive buffer directly by
typing "C-k RET" when gdb is stopped on a source line. The indicator is
not removed.






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

* bug#74642: 31.0.50; [Patch] Turn off current source line indicator when gdb buffer is killed
  2024-12-03  2:04   ` Diancheng Wang
@ 2024-12-03 12:32     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2024-12-03 12:32 UTC (permalink / raw)
  To: Diancheng Wang; +Cc: 74642

> From: Diancheng Wang <diancheng_wang@163.com>
> Cc: 74642@debbugs.gnu.org
> Date: Tue, 03 Dec 2024 10:04:30 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Thanks, but can you please describe the scenario in which the
> > indicator is not removed?  I guess I don't really understand what you
> > mean by "gdb buffer is killed": what I tried is simply end the
> > debugging session by typing "q RET" at the GDB prompt.  And that
> > removed the indicator.
> 
> Hi,
> 
> Sorry for confusing. I mean killing GDB interactive buffer directly by
> typing "C-k RET" when gdb is stopped on a source line. The indicator is
> not removed.

I guess you mean "C-x k RET"?

When I do that, Emacs asks me whether to kill the process associated
with the buffer, and if I say YES, the indicator does disappear
(sometimes after a second, which I guess is needed for Emacs to kill
the process).  Isn't that what you see?





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

end of thread, other threads:[~2024-12-03 12:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-02  7:04 bug#74642: 31.0.50; [Patch] Turn off current source line indicator when gdb buffer is killed Diancheng Wang
2024-12-02 13:17 ` Eli Zaretskii
2024-12-03  2:04   ` Diancheng Wang
2024-12-03 12:32     ` Eli Zaretskii

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).