emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use of dedicated windows in gdb-mi.el


From: Eli Zaretskii
Subject: Re: Use of dedicated windows in gdb-mi.el
Date: Mon, 09 Feb 2015 17:44:33 +0200

> From: Thibaut Verron <address@hidden>
> Date: Mon, 9 Feb 2015 09:19:48 +0000 (UTC)
> 
> > > From: Oleh Krehel <ohwoeowho <at> gmail.com>
> > > Cc: emacs-devel <at> gnu.org
> > > Date: Fri, 06 Feb 2015 20:14:40 +0100
> > > 
> > > 1. `gdb' a C++ program
> > > 2. `gdb-many-windows'
> > > 3. switch to "*input/output of main*"
> > > 4. issue `ido-switch-buffer`
> > > 
> > > => the buffer is switched in the "main.cc" window, although the point was 
> in the
> > > "*input/output of main*" window. I'm guessing that's because
> > > "*input/output of main*" is dedicated. In fact, all of them are, except
> > > the two that I actually want to see always: "main.cc" and "*gud-main*".
> > 
> > I suggest calling ido-switch-buffer in another frame.

> From what I understand, this work-around is an illustration of the point, 
> rather than a solution:

It depends on your POV, I guess.

> when someone presses C-x b, they want to change the buffer displayed
> in the current window. They do not want to have to switch to another
> window/frame before that, and they do not want to see the desired
> buffer appear in a random window.

The dedicated windows are an explicit _feature_ of GDB-MI.  GDB-MI
attempts to provide a faithful emulation of an IDE-like debugging
environment, where the source is browsed and edited in the source
window, I/O is in the input-output window, registers and breakpoints
in their specialized windows, etc.  What you describe above is the
consequence of that feature.

If you don't like this fixed arrangement of dedicated windows, then
why are you using GDB-MI?  Simply either turn off "the other" windows,
or don't turn them on in the first place (they are disabled by
default).  Then you will have full freedom of selecting which buffer
gets displayed in what window, as usual in Emacs.

My suggestion to use another frame was meant to give you the best of
all worlds -- the ability to switch to any buffer you like without
losing the IDE-like behavior of GDB-MI.  I don't really understand the
nature of your objection to it: doesn't it resolve the dilemma?

IOW, I don't understand why would anyone want GDB-MI, but without its
predefined arrangement of windows.  If we lift the dedicated windows
limitation, Emacs will pop the GDB-MI buffers all over the place, as
you well know.  Why does it make sense to "hunt" for a certain GDB-MI
buffer, like the call-stack buffer, when you can't even remember its
name easily?

Can you explain the motivation, and also why using GDB without the
other windows is not an option?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]