From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#56305: 29.0.50; 'yes-or-no-p' deselects minibuffer frame Date: Mon, 11 Jul 2022 20:33:44 +0300 Message-ID: <837d4jzh8n.fsf@gnu.org> References: <61fe102b-eec2-9711-560e-c141ed3cc6e4@gmx.at> <83fsj7zjkw.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14446"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rudalics@gmx.at, 56305@debbugs.gnu.org, monnier@iro.umontreal.ca, acm@muc.de To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 11 19:35:48 2022 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 1oAxJz-0003VU-GX for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Jul 2022 19:35:47 +0200 Original-Received: from localhost ([::1]:58332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oAxJy-0003cL-4f for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Jul 2022 13:35:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50898) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAxJG-0003bW-IN for bug-gnu-emacs@gnu.org; Mon, 11 Jul 2022 13:35:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47028) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oAxJG-0000kJ-3g for bug-gnu-emacs@gnu.org; Mon, 11 Jul 2022 13:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oAxJF-0001HA-W7 for bug-gnu-emacs@gnu.org; Mon, 11 Jul 2022 13:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Jul 2022 17:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56305 X-GNU-PR-Package: emacs Original-Received: via spool by 56305-submit@debbugs.gnu.org id=B56305.16575608464831 (code B ref 56305); Mon, 11 Jul 2022 17:35:01 +0000 Original-Received: (at 56305) by debbugs.gnu.org; 11 Jul 2022 17:34:06 +0000 Original-Received: from localhost ([127.0.0.1]:40925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAxIM-0001Fq-Hn for submit@debbugs.gnu.org; Mon, 11 Jul 2022 13:34:06 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAxIK-0001FG-N1 for 56305@debbugs.gnu.org; Mon, 11 Jul 2022 13:34:05 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57084) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAxIE-0000dl-Hp; Mon, 11 Jul 2022 13:33:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=mwuymJ4kHwipUiZjm4kfQDnjYMz8FCI+mQy3KNRF8ck=; b=TEE8YzH1F0sg fs60arclO6YMmliyZsoTonXkRIqkaFm4yRL8QGOFA5KQDWEB1slHZ5snSzCuEegN2H0FxtSYIdks/ rX/BoUdwpAifJOnrdJvrQEj07nfmrBQ8O7KIKy25CMBx01LnnfHHYZZdS6qJXOtrNjfNNm7fGCf2t pFHC9I/9VeYF4GS37CcRxXY4pmJXAINfpuW4RVFRZzZqzUfVbnPxEH78sW5Id3ywKrDQCFDH3qV5g 8JlWVex5ZX80GLLBDszfdCpDGOQ7+LcBSFgU5eZScLXAnd0fxzEWaHEy7wnWhnuI5DirADs66ngCA MqM7XSPceXNHf1tekW8kdQ==; Original-Received: from [87.69.77.57] (port=2022 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAxIC-0003ZD-SK; Mon, 11 Jul 2022 13:33:58 -0400 In-Reply-To: (message from Alan Mackenzie on Mon, 11 Jul 2022 17:15:08 +0000) 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:236710 Archived-At: > Date: Mon, 11 Jul 2022 17:15:08 +0000 > Cc: rudalics@gmx.at, monnier@iro.umontreal.ca, 56305@debbugs.gnu.org, > acm@muc.de > From: Alan Mackenzie > > > Please don't forget that Emacs is not entirely in control of what > > happens here: the window manager is also an important part of this > > dance, and it has its own ideas about which frame should be raised and > > which should be given focus. It is unreasonable to expect Emacs to be > > able to work around every idiosyncratic aspect of the behavior of > > every window manager, let alone customized by users. > > Perhaps that "sometimes" could be expanded upon. How is the Lisp hacker > supposed to know when she's got to raise or focus the frame in addition > to selecting a window? The documentation answers that question in the best way we can. > OK, but that doesn't really address the point I was trying to make. That > is, that select-window (and other functions too) should have an > unambiguous, clear function, which should be unambiguously documented. select-window _does_ have a well-defined function: it makes the window the selected window. That's all. > Whether select-window raises the frame or not (and you say here not), it > should _always_ either do it or not do it. There shouldn't be a > "sometimes" in the doc. It is these "sometimes"es which lead to bugs > like the current one. Whether select-window also raises the frame and/or redirect focus is determined by other settings, some of them in Emacs and some of them outside Emacs. > OK, so maybe we could agree that select-window ought to move focus onto > the target frame, but not raise it (modulo fascistic window managers). Isn't that what happens, at least in the vast majority of cases? > Then we'd probably want a separate function which does raise that frame. We already have that: raise-frame. > My larger point is that all these functionalities, focussing, raising, > selecting, "highlighting", whatever, seem to be mixed together in the > code. If we could separate them into coherent functions, we would have > fewer bugs like the current one in the future. I'm not sure it's possible (or even desirable).