GNU bug report logs -
#74642
31.0.50; [Patch] Turn off current source line indicator when gdb buffer is killed
Previous Next
Reported by: Diancheng Wang <diancheng_wang <at> 163.com>
Date: Mon, 2 Dec 2024 07:06:02 UTC
Severity: normal
Tags: patch
Found in version 31.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #26 received at 74642 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Cc: 74642 <at> debbugs.gnu.org
>> Date: Wed, 04 Dec 2024 15:41:18 +0200
>> From: Eli Zaretskii <eliz <at> gnu.org>
>>
>> > From: Diancheng Wang <diancheng_wang <at> 163.com>
>> > Cc: 74642 <at> debbugs.gnu.org
>> > Date: Wed, 04 Dec 2024 16:22:51 +0800
>> >
>> > > I guess you mean "C-x k RET"?
>> >
>> > Yes, I 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
>> >
>> > Yes, the steps are same with me.
>> >
>> > > (sometimes after a second, which I guess is needed for Emacs to kill
>> > > the process). Isn't that what you see?
>> >
>> > No, the indicator does not disappear after I killed "*gud-myprogram*" buffer.
>> > By the way I started emacs using "emacs -Q".
>>
>> So did I.
>>
>> > The attachment is my running emacs information (the buffer content
>> > created by report-emacs-bug)
>>
>> Looks like some kind of regression in Emacs 31. It works in Emacs 30.
>> If you could bisect to find the offending commit, it will be
>> appreciated.
>
> Crystal ball says that the regression was caused by the change you
> submitted (and I installed) in bug#73687. It added a call to
> gud-hide-current-line-indicator to gdb-starting and to gud-sentinel.
> Could you try reverting those changes and see if that solves the
> problem in Emacs 31?
Yes, There is a regression in my patch: the arrow on the source line is
not stopped displaying when "*gud-myprogram" got killed. But Emacs 30
and Emacs 31 still have another issue:
gud-highlight-current-line-overlay is not destroyed when
"*gud-myprogram*" got killed. To reproduce it, you need to evaluate (setq
gud-highlight-current-line t). I updated my patch to fix this 2 issues,
see attachment.
[stop-highlight-when-gud-buffer-killed.patch (text/x-diff, inline)]
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index a4e611277e4..70daa087c2b 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -2962,6 +2962,8 @@ gud-hide-current-line-indicator
(defun gud-sentinel (proc msg)
(cond ((null (buffer-name (process-buffer proc)))
;; buffer killed
+ ;; Stop displaying an arrow and highlight overlay in a source file.
+ (gud-hide-current-line-indicator t)
(set-process-buffer proc nil)
(if (and (boundp 'speedbar-initial-expansion-list-name)
(string-equal speedbar-initial-expansion-list-name "GUD"))
This bug report was last modified 239 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.