GNU bug report logs - #17675
24.4.50; *gud* buffer keeps on getting buried

Previous Next

Package: emacs;

Reported by: Michael Welsh Duggan <mwd <at> md5i.com>

Date: Tue, 3 Jun 2014 15:18:02 UTC

Severity: normal

Found in version 24.4.50

Done: Dima Kogan <dima <at> secretsauce.net>

Bug is archived. No further changes may be made.

Full log


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

From: Michael Welsh Duggan <mwd <at> md5i.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Michael Welsh Duggan <mwd <at> md5i.com>, 17675 <at> debbugs.gnu.org
Subject: Re: bug#17675: 24.4.50; *gud* buffer keeps on getting buried
Date: Sun, 23 Nov 2014 18:27:47 -0500
[Message part 1 (text/plain, inline)]
martin rudalics <rudalics <at> gmx.at> writes:

>>>  Where is this `switch-to-buffer' call issued?
>>
>> In `gud-common-init'.
>
> Thanks, I haven't looked into that code for years.  And the final
> `display-buffer' call that causes trouble is in `gud-display-line'?
>
> In that case how about the following: In `gud-common-init' instead of
> `switch-to-buffer' let's call `display-buffer' with an action list that
> would go like
>
>   (display-buffer-reuse-window display-buffer-in-previous-window
>    display-buffer-same-window display-buffer-pop-up-window)
> 		
> and in `gud-display-line' use `inhibit-same-window' as you proposed
> earlier (and maybe `inhibit-switch-frame' as well).  WDYT?  Could you
> try writing an according patch for gud.el?

Sorry this took so long.  I've done minimal testing so far, and will
have to test some more under real debugging situations, but the
included patch does alleviate at least one problem I am having.

[Message part 2 (text/x-patch, inline)]
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 24d5469..82846eb 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -2603,6 +2603,10 @@ comint mode, which see."
 		      file-subst)))
 	 (filepart (and file-word (concat "-" (file-name-nondirectory file))))
 	 (existing-buffer (get-buffer (concat "*gud" filepart "*"))))
+    (select-window
+      (display-buffer
+       (get-buffer-create (concat "*gud" filepart "*"))
+       '(display-buffer-reuse-window display-buffer-in-previous-window)))
     (switch-to-buffer (concat "*gud" filepart "*"))
     (when (and existing-buffer (get-buffer-process existing-buffer))
       (error "This program is already being debugged"))
[Message part 3 (text/plain, inline)]
-- 
Michael Welsh Duggan
(md5i <at> md5i.com)

This bug report was last modified 6 years and 362 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.