unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Welsh Duggan <mwd@md5i.com>
To: martin rudalics <rudalics@gmx.at>
Cc: Michael Welsh Duggan <mwd@md5i.com>, 17675@debbugs.gnu.org
Subject: bug#17675: 24.4.50; *gud* buffer keeps on getting buried
Date: Sun, 23 Nov 2014 18:27:47 -0500	[thread overview]
Message-ID: <878uj15wgc.fsf@maru2.md5i.com> (raw)
In-Reply-To: <539020D0.6020208@gmx.at> (martin rudalics's message of "Thu, 05 Jun 2014 09:48:32 +0200")

[-- Attachment #1: Type: text/plain, Size: 948 bytes --]

martin rudalics <rudalics@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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 708 bytes --]

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

[-- Attachment #3: Type: text/plain, Size: 42 bytes --]


-- 
Michael Welsh Duggan
(md5i@md5i.com)

  reply	other threads:[~2014-11-23 23:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03 15:17 bug#17675: 24.4.50; *gud* buffer keeps on getting buried Michael Welsh Duggan
2014-06-03 16:08 ` martin rudalics
2014-06-04  0:52   ` Michael Welsh Duggan
2014-06-04  6:41     ` martin rudalics
2014-06-04 11:20       ` Michael Welsh Duggan
2014-06-04 14:51         ` martin rudalics
2014-06-05  0:48           ` Michael Welsh Duggan
2014-06-05  7:48             ` martin rudalics
2014-11-23 23:27               ` Michael Welsh Duggan [this message]
2014-11-23 23:31                 ` Michael Welsh Duggan
2014-11-23 23:34                   ` Michael Welsh Duggan
2018-05-20 23:59                     ` Noam Postavsky
2018-05-21  0:18                       ` Michael Welsh Duggan
2018-05-21  1:06                         ` Noam Postavsky
2018-05-21  6:49                       ` martin rudalics
2018-05-21 20:38                         ` bug#22374: Buffers of previously open files appear in gud interaction window instead of source window in many-windows mode Noam Postavsky
2018-05-22  7:24                           ` martin rudalics
2018-05-23 23:11                             ` Noam Postavsky
2015-03-09 14:02 ` bug#17675: patch Dima Kogan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878uj15wgc.fsf@maru2.md5i.com \
    --to=mwd@md5i.com \
    --cc=17675@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).