From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: jonetsu Newsgroups: gmane.emacs.help Subject: Re: Using gdb (windows popping up) Date: Sun, 9 Jun 2019 12:09:08 -0400 Message-ID: <20190609120908.019c5340@mistral> References: <20190609115246.41281b50@mistral> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="65290"; mail-complaints-to="usenet@blaine.gmane.org" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 09 18:09:24 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ha0No-000Gt0-C5 for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Jun 2019 18:09:24 +0200 Original-Received: from localhost ([::1]:36818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha0Nm-0001P8-RS for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Jun 2019 12:09:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47210) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha0Nb-0001Ox-Bi for help-gnu-emacs@gnu.org; Sun, 09 Jun 2019 12:09:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ha0Na-0002ub-CB for help-gnu-emacs@gnu.org; Sun, 09 Jun 2019 12:09:11 -0400 Original-Received: from pmta31.teksavvy.com ([76.10.157.38]:44143) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1ha0Na-0002u7-7g for help-gnu-emacs@gnu.org; Sun, 09 Jun 2019 12:09:10 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2FXCADfLf1c/0Tb1BhlH4QJR3QMFRIoj?= =?us-ascii?q?RCMAzUBjiCMBQkBAQEhGQECAQGEOgICAQECgmokOBMBAwEBAQQBAQEBBAICaSi?= =?us-ascii?q?FTAY6HDMIAwkYJQ9IGYUtp1GIY4FGIoESi3SBP0CEIz6FEYUVBJQIlR8JghGBa?= =?us-ascii?q?ZFNJwyMYIovpVsigVhwFYMnkG4mMIECAQYBAQEVCBMFBQEBjy8BAQ?= X-IPAS-Result: =?us-ascii?q?A2FXCADfLf1c/0Tb1BhlH4QJR3QMFRIojRCMAzUBjiCMBQk?= =?us-ascii?q?BAQEhGQECAQGEOgICAQECgmokOBMBAwEBAQQBAQEBBAICaSiFTAY6HDMIAwkYJ?= =?us-ascii?q?Q9IGYUtp1GIY4FGIoESi3SBP0CEIz6FEYUVBJQIlR8JghGBaZFNJwyMYIovpVs?= =?us-ascii?q?igVhwFYMnkG4mMIECAQYBAQEVCBMFBQEBjy8BAQ?= X-IronPort-AV: E=Sophos;i="5.60,571,1549947600"; d="scan'208";a="94772908" Original-Received: from 24-212-219-68.cable.teksavvy.com (HELO mistral) ([24.212.219.68]) by smtp.teksavvy.com with ESMTP; 09 Jun 2019 12:09:09 -0400 In-Reply-To: <20190609115246.41281b50@mistral> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 76.10.157.38 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:120872 Archived-At: On Sun, 9 Jun 2019 11:52:46 -0400 jonetsu wrote: > ... until the debugging session starts. At which point emacs decides > to create a new whole emacs app/window with the source code in it. It > boldly replaces the source window with the debugged app's output > window and throws the source into a new emacs instance. Using sr-speedbar-open prior to starting gdb solves the problem of popping up a new emacs instance. That is, sr-speedbar with the following added in .emacs (which I found in stack exchange, regarding speedbar not being able to use the current emacs frame) (defadvice delete-other-windows (after my-sr-speedbar-delete-other-window-advice activate) "Check whether we are in speedbar, if it is, jump to next window." (let () (when (and (sr-speedbar-window-exist-p sr-speedbar-window) (eq sr-speedbar-window (selected-window))) (other-window 1) ))) (ad-enable-advice 'delete-other-windows 'after 'my-sr-speedbar-delete-other-window-advice) (ad-activate 'delete-other-windows) Since emacs/gdb will use speedbar anyways to display watch items, might as well load it up front. So this seems to resolve the problem with new instances popping up.