From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Stop frames stealing eachothers' minibuffers! Date: Sat, 28 Nov 2020 16:10:31 -0500 Message-ID: References: <53833023-d959-07af-7611-aa2e0bdcc1bc@gmx.at> <0d14bfc4-8e8e-d3b9-e0e1-ee4bf2e6449d@gmx.at> <20201125210947.GB8228@ACM> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25687"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Andrii Kolomoiets , emacs-devel@gnu.org, martin rudalics , enometh@meer.net, Alan Mackenzie , Eli Zaretskii To: Gregory Heytings Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 28 22:12:06 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kj7Vl-0006b1-KZ for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Nov 2020 22:12:05 +0100 Original-Received: from localhost ([::1]:35998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kj7Vk-0007dX-Fz for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Nov 2020 16:12:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kj7US-000730-3F for emacs-devel@gnu.org; Sat, 28 Nov 2020 16:10:45 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:47406) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kj7UP-0002pY-Vj; Sat, 28 Nov 2020 16:10:43 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 46342801E9; Sat, 28 Nov 2020 16:10:40 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 9EB23801F3; Sat, 28 Nov 2020 16:10:38 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1606597838; bh=Mnb4I1YzDOfJL7QLjOtJ3oDH/mWeFU+UE8/opRarCak=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=AMjuqJBFNBWpnEnoKlFy+FObYcf3ZmJOapp5g2d9Vu0G9aCcdhcsRLNspTUhdDyaG nivcU6grFZ8phOz042Ogl02hINIHgFUdL+xodsLVNKfRGox3uVe1vukUQhBoSQrvfx fhhh02qYtVsmByDCOkDXnjWnzrR7XJkt83lcfFYddTRF4nh5mXCpBJrQxRl9NSfOTh B4reg6QdQiNOAx1hcMDK6BmEGs97m/VItne90Y9xIqcgKlIaXW4sXMbAvKkwQ7YR45 DAW9Hsik85To+TR/6AniFW30xNCxHT+ltJDYRSJQufzO3OuyNE0Pq/NsQ/FdG3RQqD neS+9sYQTfVOQ== Original-Received: from alfajor (69-165-136-52.dsl.teksavvy.com [69.165.136.52]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3C3FA12013D; Sat, 28 Nov 2020 16:10:38 -0500 (EST) In-Reply-To: (Gregory Heytings's message of "Sat, 28 Nov 2020 20:59:04 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:259977 Archived-At: >> More specifically, it's the act of leaving MB1 when there's a deeper MB2 >> active: the code for leaving a minibuffer (e.g. `exit-minibuffer` or >> `abort-recursive-edit`) doesn't actually pay attention to which minibuffer >> is currently being used: while it's run from MB1 it actually exits MB2. >> I'm not completely sure why we end up with a broken state, but I guess >> it's because some of the code that "deactivates" the minibuffer upon exit >> in run in the minibuffer that the users thought they were about to exit >> rather than in the one that is actually exited. > Isn't the main reason for this that it has never been possible to interact > with a MBn when a MBm, with m > n, was active? Well, it's at best an indirect cause of the bug, but yes, it's the reason why this bug wasn't visible until now. >> One way to address it might be to make every minibuffer use a different >> exit tag (instead of the constant `exit` symbol), so that the `throw` will >> not be caught by some unrelated `catch`. Additionally, we may want to >> tweak `exit-minibuffer` and `abort-recursive-edit` so that the user is >> warned/prompted before "silently" canceling that other >> (deeper) minibuffer. > Is such an added complexity really worth the price? I don't see much complexity here. The main issue is not complexity but the fact that it's a change, so there can be backward compatibility issues (most likely the catcher will have catch both the old `exit` tag as well as the new tag, in case some old code throws the `exit` tag rather than going through `exit-minibuffer`). Stefan