From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#56305: 29.0.50; 'yes-or-no-p' deselects minibuffer frame Date: Sun, 17 Jul 2022 10:03:23 -0400 Message-ID: References: <61fe102b-eec2-9711-560e-c141ed3cc6e4@gmx.at> <171bab25-5eb2-884b-5c32-bcfe4fed21cc@gmx.at> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40444"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: martin rudalics , Eli Zaretskii , 56305@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 17 16:04:11 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 1oD4sU-000AJI-GG for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Jul 2022 16:04:10 +0200 Original-Received: from localhost ([::1]:43562 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oD4sT-0002bX-32 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Jul 2022 10:04:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oD4sM-0002af-6r for bug-gnu-emacs@gnu.org; Sun, 17 Jul 2022 10:04:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50509) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oD4sL-0005lH-RN for bug-gnu-emacs@gnu.org; Sun, 17 Jul 2022 10:04:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oD4sL-0002YT-My for bug-gnu-emacs@gnu.org; Sun, 17 Jul 2022 10:04:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Jul 2022 14:04: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.16580666239790 (code B ref 56305); Sun, 17 Jul 2022 14:04:01 +0000 Original-Received: (at 56305) by debbugs.gnu.org; 17 Jul 2022 14:03:43 +0000 Original-Received: from localhost ([127.0.0.1]:48268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oD4s2-0002Xp-Jc for submit@debbugs.gnu.org; Sun, 17 Jul 2022 10:03:42 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:20768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oD4rw-0002XZ-Vf for 56305@debbugs.gnu.org; Sun, 17 Jul 2022 10:03:40 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 8B941440A04; Sun, 17 Jul 2022 10:03:31 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 32D204409E8; Sun, 17 Jul 2022 10:03:30 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1658066610; bh=6efY54x2303H4McJqZFT4/nhoNGg6bVyDlJo7GpOT4k=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=f91PNzcA/7Za0QkYDaHlT8TL6lglvB4TRfkn6gcHtQe2/LWY1VnB2LuAc38iQ5tyD 6Lci+0o8Q6v6otFUKCpnZnnnoX0zC+yXHrGoHS70I+P1wxpUFz/OSWaNzkblu7ydHv IIsUAP3V/it77hTK2KvG17RL7zFZ7trfy+QkyrBOYyzbbphDTNmIWP9U1F3AViaeC1 AnHqt1blIoWJpHHLzbDkNafwJYHdbVxoO7+lc3MHLQjAtWMJjRLu8Cf1F2weZw18Xo 6eQdQhEoGxn3R4PZhDEwUwXyT93pQoPuP+nc2rNIlr0kktUuBlgkV3T9YhyJ5syI59 TOdnCpUgohuzQ== Original-Received: from pastel (unknown [45.72.196.165]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id EB7231203B8; Sun, 17 Jul 2022 10:03:29 -0400 (EDT) In-Reply-To: (Alan Mackenzie's message of "Sun, 17 Jul 2022 11:29:51 +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:237265 Archived-At: > Fselect_frame (or more precisely do_switch_frame) is a place where the > trouble occurs, or certainly was before my removal of the 53 lines focus > redirecting/shifting code ~10 days ago. That removed code seems to be > needed for correct frame switching with a minibuffer-only frame, but in > the middle of do_switch_frame doesn't seem to be the optimal place for > it. But the interactive calls have nil for `norecord`. >> It seems clear to me, for example, that when called with a non-nil >> `norecord` (like in the mode-line code), `Fselect_window` should never >> cause any change to the focus redirection (or the focus itself). >> And neither should it call things like `resize_mini_window`, I think. > > It would be a mistake to couple focus switching with NORECORD, something > which is only coincidentally tied to the focus. Currently `norecord` is the flag used to indicate that this is an "internal" `select-window` call, typically part of something like `with-selected-window` or `save-window-excursion`, which seem like good candidates to use the more "bare bones" select-window semantics (whose difference in semantics I don't fully comprehend, to be honest, so hopefully, this discussion will lead to doc (or at least comment) changes to describe those differences). There might indeed be other calls to `select-window` that specify the `norecord` arg for some other reason, so maybe linking the two that way is not a good idea, I don't know. > Neither can I, but Martin's spent quite a few years analysing these > things. The mechanisms of these bugs, and their connection with that > 2008 patch are likely involved and complicated. Yes, I didn't mean to say they didn't exist, just that I wasn't able to see them. > The current state of affairs is that Emacs 28 is unusable to some > people who prefer a separate minibuffer frame (in particular, Drew > Adams) and it may well be worth our while to identify the current bugs > and fix them. As you might know, I'm in that same boat :-) Stefan