From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#45844: 27.1; unwanted raising of other frame when emacs is in the backgound and switch-to-buffer is used in a dedicated frame Date: Thu, 14 Jan 2021 10:26:01 +0100 Message-ID: <2ffee8ea-15af-a54c-ac5c-b214b299535d@gmx.at> References: <698ea7a3-c2b2-7705-3fc4-16d52c8a7acd@gmx.at> <7420050f-39bc-61ce-5f04-706f0b63e3e8@gmx.at> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33350"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "45844@debbugs.gnu.org" <45844@debbugs.gnu.org> To: emacser Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 14 10:27:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kzyuM-0008Wx-Kw for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jan 2021 10:27:10 +0100 Original-Received: from localhost ([::1]:48486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzyuL-0006i4-Kg for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jan 2021 04:27:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzyuE-0006g8-30 for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 04:27:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53873) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kzyuD-0007yW-S6 for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 04:27:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kzyuD-0007jK-OB for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 04:27:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jan 2021 09:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45844 X-GNU-PR-Package: emacs Original-Received: via spool by 45844-submit@debbugs.gnu.org id=B45844.161061637429656 (code B ref 45844); Thu, 14 Jan 2021 09:27:01 +0000 Original-Received: (at 45844) by debbugs.gnu.org; 14 Jan 2021 09:26:14 +0000 Original-Received: from localhost ([127.0.0.1]:37186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzytR-0007iG-OP for submit@debbugs.gnu.org; Thu, 14 Jan 2021 04:26:13 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:38143) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzytP-0007i1-I5 for 45844@debbugs.gnu.org; Thu, 14 Jan 2021 04:26:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1610616362; bh=6STUyG83PBfkfMr/2Hv5ZEZ/fX6MhAiFIsOy3zZujpw=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=gZWfeqdfR6Ozk0iQmlDoDwdebRgdMNU53BswXoya3r0cN23RAijNYPaw4m7Vv45Tf 4Ey+qGRDmAz55Gq20dihXfpih1CyrS6SKavP+gO2PIK6eXmF42olW1JVG4b4lVSI3b 3To+4VL573/AhwnrPyYLPQO2KDZ+YoRzn4lMNrlQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([212.95.5.215]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MxUnp-1lxrwO4185-00xtcH; Thu, 14 Jan 2021 10:26:02 +0100 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K1:Saapss4k1j7T0QApP5ykKOrp6ts+9opMOV3stplL/vjJ7ykT43D QPFHim6F+wOtvr8zS3oPcCyvqDpu2EVnVsroNo4E4yJlFgqRMD376CV7MyNnoefg6r4ksqk 7biA4mlvc6GPxWI1vPzcSIKr/Oe0M6PuHB+CKGLSTlhnk4tPyDl+0QfDV4aCjxKbIgz2Xbn jDbMkmdCXaP1AKKfKgJGQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:QFa0dOiXRu0=:lZGJRD0/WX48BeN6HX3g7X I5D3ubnpVPDmIpL9CdIsWhspOlWgu4tWrA49syoiDbawJiGUG4xjgWH1EbidO+pQ4ZC9/Yw83 xVrztd5jtoOzTdWy2nkM4Z86F2lHuUP9PV5ZTSaXVXV+dlEkMhUETpIFAqV8ekoR0k4rFyTls 1I9RpXJvjn2PbjgHV8Cz4zgDEk5JIuY9mCw5jd6koxxca51xdyLUQmn1NJXYEW3Ugr9/Cnjno +NoZLndzK5HvC/seGvNfntXur8ub4Q0utmy/LCEVjf/9fxrjRJ4MbQ22K1tXV/hH+GtL2vyRL g91fcq+U9qEAeSdpvkjkUhCh0jnpWp2DXoN4e4i3juuCmx8iPDdK+KbBNAjnAYJznwSftloFL d3DdIn/VuJv17ypJoF5VXcIITv0mxV8JXKZ61twByGNZ4puSxz4uXywhGGQQXp82Wr9xgZRdH njm5Bg0vvLRF/I15m7bmHlUY3/6orQNqRuyQtuNnp5J6jzesgQbXN1+B2R8xzDlg5vmNuGkNZ J31tifeNzCocT51RP8fMlDzt9JQyjEHevPAbw1cqVbYkDGzVtx7TupdP70zXw4sD1ipidPlMN KZzGhzPl/scpBqU56k49wt2F5G8uLuwAk1I+7HTyYi4WHUMcxdJv9pa6ZbfmOhvMpapD7lZ8Y LZVJSbdDrhkZNCSHRnFqxOBNSBOoOQZsmmCwHtbMtKdW4+tlM5qorUfG8Lk3+Sid9cYY5atwo dRhsQoXgR9utZ4ie2+2MoE60DZVgsqfo8NHXp2kAmlDzswqj4ZQY+0E2Uq5Hminre8Pp7m9E X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197932 Archived-At: > I'll try that, I only found it strange that if a background timer uses > switch-to-buffer Timers should never use `switch-to-buffer'. If they want to draw attention to the object they want to display, they should use `pop-to-buffer'. Otherwise, `display-buffer' is the function to be preferred although if that needs a new frame, it will raise that frame too unless your WM prevents it. 'switch-to-buffer' is a user command and should not be called by any Lisp code. Unfortunately, it's done a hundred times in the Emacs code base and there's nothing we can reasonably do about that. > and the frame is in in the background then why the frame > is raised. If it's not triggered by a user interaction then there is > no practical reason to bring the frame into the foreground, because the > user is using an other app, so he doesn't want to type into that frame > at that point. The frame should only switch to the buffer and remain in the > background, so when the user get backs to emacs then he can see the result > of the background process presented to him. > > It sounds like a bug to me, but I accept if you say it's hard to implement > for some reason and I'll change my code to use an other method. It's by no means hard to implement (preventing a new frame from getting raised is much harder). But we cannot change the semantics of `switch-to-buffer' in this regard. As long as window managers permit us to do that, it will raise the frame it uses and give it focus. martin