GNU bug report logs - #20034
25.0.50; [PATCH] gud never displays a source buffer over the gud window

Previous Next

Package: emacs;

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.

Full log


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

From: Dima Kogan <dima <at> secretsauce.net>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 20034 <at> debbugs.gnu.org
Subject: Re: bug#20034: 25.0.50;
 [PATCH] gud never displays a source buffer over the gud window
Date: Sun, 08 Mar 2015 18:25:27 -0700
[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


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.