From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Use of dedicated windows in gdb-mi.el Date: Mon, 09 Feb 2015 17:44:33 +0200 Message-ID: <83fvaf9jj2.fsf@gnu.org> References: <87h9uynckc.fsf@gmail.com> <83iofedfkz.fsf@gnu.org> <877fvun97j.fsf@gmail.com> <83fvaid8sa.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1423496705 13885 80.91.229.3 (9 Feb 2015 15:45:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Feb 2015 15:45:05 +0000 (UTC) Cc: emacs-devel@gnu.org To: Thibaut Verron Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 09 16:45:04 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YKqWG-0000mW-7J for ged-emacs-devel@m.gmane.org; Mon, 09 Feb 2015 16:45:04 +0100 Original-Received: from localhost ([::1]:33531 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKqWF-0002WY-Ox for ged-emacs-devel@m.gmane.org; Mon, 09 Feb 2015 10:45:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKqWC-0002WL-Af for emacs-devel@gnu.org; Mon, 09 Feb 2015 10:45:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKqW4-0003Q2-MU for emacs-devel@gnu.org; Mon, 09 Feb 2015 10:45:00 -0500 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:37484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKqW4-0003Nf-9Q for emacs-devel@gnu.org; Mon, 09 Feb 2015 10:44:52 -0500 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NJI00100GRTWI00@mtaout29.012.net.il> for emacs-devel@gnu.org; Mon, 09 Feb 2015 17:40:58 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NJI00NSCGWADP30@mtaout29.012.net.il>; Mon, 09 Feb 2015 17:40:58 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.185 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:182698 Archived-At: > From: Thibaut Verron > Date: Mon, 9 Feb 2015 09:19:48 +0000 (UTC) > > > > From: Oleh Krehel gmail.com> > > > Cc: emacs-devel 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?