From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#45072: 28.0.50; Emacs switches other buffer back uncontrollably, if other window's buffer is changed by user during minibuffer editing Date: Mon, 19 Apr 2021 21:09:59 +0300 Organization: LINKOV.NET Message-ID: <87eef6nqdc.fsf@mail.linkov.net> References: <86eek3hvu5.fsf@protected.rcdrun.com> <87eek1fvgf.fsf@gnus.org> <83eek18ref.fsf@gnu.org> <835z5d8lhc.fsf@gnu.org> <87pn3k87tx.fsf@mail.linkov.net> <877dpqzx3o.fsf@mail.linkov.net> <57c673d0-e6e7-120d-8893-92b02ab1530e@gmx.at> <87wnxqxdx5.fsf@mail.linkov.net> <73e2a032-d3e9-bc94-2f72-246096ce03cb@gmx.at> <87pn3e697i.fsf@mail.linkov.net> <35666a8a-6888-972c-4e20-bf05cf09d764@gmx.at> <87tuso16qn.fsf@mail.linkov.net> <87pn26y3uj.fsf@mail.linkov.net> <85dc6e0f-4430-0c82-4b96-aa7e2b92d937@gmx.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32490"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: larsi@gnus.org, Stefan Monnier , Jean Louis , 45072@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 19 20:24:13 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 1lYYZA-0008KY-MN for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Apr 2021 20:24:12 +0200 Original-Received: from localhost ([::1]:54138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYYZ9-00066G-Ph for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Apr 2021 14:24:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36856) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYYY2-000641-BG for bug-gnu-emacs@gnu.org; Mon, 19 Apr 2021 14:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40494) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYYY2-0003JD-31 for bug-gnu-emacs@gnu.org; Mon, 19 Apr 2021 14:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lYYY1-0007yT-VT for bug-gnu-emacs@gnu.org; Mon, 19 Apr 2021 14:23:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Apr 2021 18:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45072 X-GNU-PR-Package: emacs Original-Received: via spool by 45072-submit@debbugs.gnu.org id=B45072.161885655030576 (code B ref 45072); Mon, 19 Apr 2021 18:23:01 +0000 Original-Received: (at 45072) by debbugs.gnu.org; 19 Apr 2021 18:22:30 +0000 Original-Received: from localhost ([127.0.0.1]:52034 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYYXW-0007x6-Dm for submit@debbugs.gnu.org; Mon, 19 Apr 2021 14:22:30 -0400 Original-Received: from relay10.mail.gandi.net ([217.70.178.230]:50705) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYYXT-0007wq-GN for 45072@debbugs.gnu.org; Mon, 19 Apr 2021 14:22:28 -0400 Original-Received: from mail.gandi.net (m91-129-102-166.cust.tele2.ee [91.129.102.166]) (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 0093F240008; Mon, 19 Apr 2021 18:22:18 +0000 (UTC) In-Reply-To: <85dc6e0f-4430-0c82-4b96-aa7e2b92d937@gmx.at> (martin rudalics's message of "Mon, 19 Apr 2021 18:02:35 +0200") 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:204494 Archived-At: >>> It seems that problem is that read_minibuf messes up the windows so much, >>> that at the end currently the only way to fix this mess is by restoring >>> the previous window configuration. This means that there is a need >>> to fix read_minibuf to restore all previous window states without using >>> restore_window_configuration. Only then it will be possible to add >>> a user option to disable using restore_window_configuration. >> >> But without such an option, it's hard to find and fix the problems, >> because they're hidden by the `restore_window_configuration`. >> So maybe we should introduce such an option, and then force ourselves to >> live with it and then fix the problems we encounter. > > Exiting from and quitting `read-minibuffer' is hairy, in particular with > multiple frames. IIRC it's hard to tell for an application how to clean > up the state when the user quits and throws it back to the top level. Since restore_window_configuration doesn't restore multiple frames, we already don't clean up the previous state completely. So maybe really it should be sufficient for a new option just to select the original window if it still exists.