GNU bug report logs -
#20034
25.0.50; [PATCH] gud never displays a source buffer over the gud window
Previous Next
Reported by: Dima Kogan <dima <at> secretsauce.net>
Date: Sun, 8 Mar 2015 02:00:02 UTC
Severity: normal
Tags: patch
Found in version 25.0.50
Done: Dima Kogan <dima <at> secretsauce.net>
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 20034 in the body.
You can then email your comments to 20034 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20034
; Package
emacs
.
(Sun, 08 Mar 2015 02:00:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Dima Kogan <dima <at> secretsauce.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 08 Mar 2015 02:00:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi.
Sometime between emacs 23 and emacs 24 the behavior of display-buffer
changed to show the buffer in the current window at times (emacs 23
always used a different window). As a (presumably unwanted) side-effect
it is now possible for a gud user to lose the gud window as one
interacts with gud. I often encounter this when I open a core dump in
gud-gdb, then invoke "up" repeatedly to traverse the call stack.
Eventually a source buffer takes over the gud window and I have to
switch back to gud to keep navigating the stack.
Trivial recipe:
1. Create any C program in /tmp/tst.c. Can be as simple as
int main(void)
{
return 0;
}
2. gcc -g -o tst tst.c
3. emacs -Q
4. C-x 3 (split window horizontally)
5. C-x C-f tst.c (open tst.c)
6. M-x gud-gdb, 'gdb --fullname /tmp/tst' (start up gud in the same
window that's currently showing tst.c)
7. b main
8. r
On my machine this switches to tst.c on top of the gud buffer, replacing
gud in its window. With the attached patch this does not happen.
This is similar, but not identical to bug
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17675
The proposed fix in that bug does not handle the above recipe.
[0001-gud-never-displays-a-source-buffer-over-the-gud-wind.patch (text/x-diff, inline)]
From d3b42eb74be145969dd829aeedcb7ceac629de03 Mon Sep 17 00:00:00 2001
From: Dima Kogan <dima <at> secretsauce.net>
Date: Sat, 7 Mar 2015 17:37:20 -0800
Subject: [PATCH] gud never displays a source buffer over the gud window
---
lisp/progmodes/gud.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 42c5b20..ac830e7 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -2813,7 +2813,7 @@ Obeying it means displaying in another window the specified file and line."
(gud-find-file true-file)))
(window (and buffer
(or (get-buffer-window buffer)
- (display-buffer buffer))))
+ (display-buffer buffer '(nil (inhibit-same-window . t))))))
(pos))
(when buffer
(with-current-buffer buffer
--
2.1.4
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20034
; Package
emacs
.
(Sun, 08 Mar 2015 10:05:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 20034 <at> debbugs.gnu.org (full text, mbox):
> Sometime between emacs 23 and emacs 24 the behavior of display-buffer
> changed to show the buffer in the current window at times (emacs 23
> always used a different window).
No. `display-buffer' displays the buffer in the selected window just as
often as before the changes you mention.
> On my machine this switches to tst.c on top of the gud buffer, replacing
> gud in its window. With the attached patch this does not happen.
>
> This is similar, but not identical to bug
>
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17675
>
> The proposed fix in that bug does not handle the above recipe.
Would your fix handle Bug#17675 as well? And maybe some of the related
bugs in this area (see Bug#19901, for a recent example)? There also was
a proposal to only "softly" dedicate some gud window to its buffer. See
the thread entitled "Use of dedicated windows in gdb-mi.el".
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20034
; Package
emacs
.
(Mon, 09 Mar 2015 01:30:06 GMT)
Full text and
rfc822 format available.
Message #11 received at 20034 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
martin rudalics <rudalics <at> gmx.at> writes:
> > On my machine this switches to tst.c on top of the gud buffer, replacing
> > gud in its window. With the attached patch this does not happen.
> >
> > This is similar, but not identical to bug
> >
> > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17675
> >
> > The proposed fix in that bug does not handle the above recipe.
>
> Would your fix handle Bug#17675 as well? And maybe some of the related
> bugs in this area (see Bug#19901, for a recent example)?
Hi. The patch fixes 17676. 19901 is a slightly different problem, and
the attached patch fixes that as well.
> There also was a proposal to only "softly" dedicate some gud window to
> its buffer. See the thread entitled "Use of dedicated windows in
> gdb-mi.el".
I'm not concerned about gdb-mi here; just the old-style gud. I've seen
the new display-buffer behavior similarly affect the behavior of some
other things, like xcscope.el for instance (I'll handle that once this
change is OKed). I feel like the attached patch is the default behavior
I want most of the time, but this is probably different for each user.
Thanks
[0001-gud-never-displays-a-source-buffer-over-the-gud-wind.patch (text/x-diff, inline)]
From 41bc170051c5541d5379aed97a634ca3ed094682 Mon Sep 17 00:00:00 2001
From: Dima Kogan <dima <at> secretsauce.net>
Date: Sat, 7 Mar 2015 17:37:20 -0800
Subject: [PATCH] gud never displays a source buffer over the gud window
---
lisp/progmodes/gud.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index a12bdd9..f6dadeb 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -2813,7 +2813,7 @@ Obeying it means displaying in another window the specified file and line."
(gud-find-file true-file)))
(window (and buffer
(or (get-buffer-window buffer)
- (display-buffer buffer))))
+ (display-buffer buffer '(nil (inhibit-same-window . t))))))
(pos))
(when buffer
(with-current-buffer buffer
--
2.1.4
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20034
; Package
emacs
.
(Mon, 09 Mar 2015 10:38:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 20034 <at> debbugs.gnu.org (full text, mbox):
>> Would your fix handle Bug#17675 as well? And maybe some of the related
>> bugs in this area (see Bug#19901, for a recent example)?
>
> Hi. The patch fixes 17676.
17675, hopefully.
> 19901 is a slightly different problem, and
> the attached patch fixes that as well.
Maybe people who reported problems with their gud-/gdb interface could
try whether the patch fixes them.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20034
; Package
emacs
.
(Mon, 09 Mar 2015 16:03:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 20034 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
In the last email I attached the older patch by mistake. Correct patch
attached this time. It fixes this, 17675 and 19901 I believe.
martin rudalics <rudalics <at> gmx.at> writes:
> Maybe people who reported problems with their gud-/gdb interface could
> try whether the patch fixes them.
I sent requests to the tracker of 17675 and 19901
[0001-gud-never-displays-a-source-buffer-over-the-gud-wind.patch (text/x-diff, inline)]
From ed24aed33bd27ddd66b7288fb3999eaa619a0c27 Mon Sep 17 00:00:00 2001
From: Dima Kogan <dima <at> secretsauce.net>
Date: Sat, 7 Mar 2015 17:37:20 -0800
Subject: [PATCH] gud never displays a source buffer over the gud window
---
lisp/progmodes/gud.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index a12bdd9..ea6f53c 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -2813,8 +2813,8 @@ Obeying it means displaying in another window the specified file and line."
(gud-find-file true-file)))
(window (and buffer
(or (get-buffer-window buffer)
- (display-buffer buffer))))
- (pos))
+ (display-buffer buffer '(display-buffer-use-some-window (inhibit-same-window . t))))))
+ (pos))
(when buffer
(with-current-buffer buffer
(unless (or (verify-visited-file-modtime buffer) gud-keep-buffer)
--
2.1.4
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20034
; Package
emacs
.
(Tue, 10 Mar 2015 08:10:03 GMT)
Full text and
rfc822 format available.
Message #20 received at 20034 <at> debbugs.gnu.org (full text, mbox):
>> Maybe people who reported problems with their gud-/gdb interface could
>> try whether the patch fixes them.
>
> I sent requests to the tracker of 17675 and 19901
Thank you.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20034
; Package
emacs
.
(Mon, 16 Mar 2015 19:34:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 20034 <at> debbugs.gnu.org (full text, mbox):
martin rudalics <rudalics <at> gmx.at> writes:
>>> Maybe people who reported problems with their gud-/gdb interface could
>>> try whether the patch fixes them.
>>
>> I sent requests to the tracker of 17675 and 19901
Reporters of those bugs haven't replied for a week. I did test the
latest patch earlier, and it appeared to address both of those bugs as
well as mine. Do we need to keep waiting for those reporters before
taking the patch?
Thanks
dima
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20034
; Package
emacs
.
(Tue, 17 Mar 2015 10:26:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 20034 <at> debbugs.gnu.org (full text, mbox):
> Reporters of those bugs haven't replied for a week. I did test the
> latest patch earlier, and it appeared to address both of those bugs as
> well as mine. Do we need to keep waiting for those reporters before
> taking the patch?
No. Please install your change and close the bugs (referencing the
commit). If the patch doesn't work for them, people can always reopen
these bugs.
Thanks, martin
Reply sent
to
Dima Kogan <dima <at> secretsauce.net>
:
You have taken responsibility.
(Wed, 18 Mar 2015 07:43:04 GMT)
Full text and
rfc822 format available.
Notification sent
to
Dima Kogan <dima <at> secretsauce.net>
:
bug acknowledged by developer.
(Wed, 18 Mar 2015 07:43:04 GMT)
Full text and
rfc822 format available.
Message #31 received at 20034-done <at> debbugs.gnu.org (full text, mbox):
Fixed with this commit:
http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=fd93edbb1cabfdf0c732dbb0c6892a515b406a65
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 15 Apr 2015 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 72 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.