From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Edebug, with Elisp source in different frame - Edebug doesn't select the source window. Date: Wed, 17 Oct 2018 16:22:53 +0000 Message-ID: <20181017162253.GD4753@ACM> References: <20181017142226.GC4753@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1539793786 13036 195.159.176.226 (17 Oct 2018 16:29:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 17 Oct 2018 16:29:46 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 17 18:29:42 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCohZ-0003Hd-ES for ged-emacs-devel@m.gmane.org; Wed, 17 Oct 2018 18:29:41 +0200 Original-Received: from localhost ([::1]:38079 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCojg-0003YK-25 for ged-emacs-devel@m.gmane.org; Wed, 17 Oct 2018 12:31:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCoiz-0003XP-Lx for emacs-devel@gnu.org; Wed, 17 Oct 2018 12:31:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCois-0003cF-QB for emacs-devel@gnu.org; Wed, 17 Oct 2018 12:31:06 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:60200 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1gCois-0003AA-CV for emacs-devel@gnu.org; Wed, 17 Oct 2018 12:31:02 -0400 Original-Received: (qmail 21250 invoked by uid 3782); 17 Oct 2018 16:30:51 -0000 Original-Received: from acm.muc.de (p5B14724C.dip0.t-ipconnect.de [91.20.114.76]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 17 Oct 2018 18:30:50 +0200 Original-Received: (qmail 3671 invoked by uid 1000); 17 Oct 2018 16:22:53 -0000 Content-Disposition: inline In-Reply-To: <20181017142226.GC4753@ACM> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:230456 Archived-At: Hello, Emacs. On Wed, Oct 17, 2018 at 14:22:26 +0000, Alan Mackenzie wrote: > Before I submit a bug report for this, I wonder if I'm doing something > silly. > In a GUI Emacs (26.1 or master), instrument a function for edebug with > C-u C-M-x in frame F1. From a different frame, F2, cause this function > to be called, thus entering edebug. F2 is still selected. Surely edebug > should have selected F1? > Note that in a text terminal, F1 gets selected as expected. (Normally I > run Emacs in a text terminal.) > Does anybody have any ideas why this is happening to me in a GUI > environment? Do other people see the same? Why has nobody else > submitted a bug report for this? Anything else? I've found the answer, I think. Edebug is using select-window to select the frame. What select-window doesn't do is to shift the X-Window focus. For that, one needs to call select-frame-set-input-focus, something which the current incarnation of edebug fails to do. My first experimentation with s-f-set-i-focus indicates this is the problem. I will come up with a patch. -- Alan Mackenzie (Nuremberg, Germany).