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.devel Subject: Re: "Final" version of tty child frames Date: Thu, 9 Jan 2025 11:24:08 +0100 Message-ID: References: <86wmi0g0x6.fsf@gnu.org> <11a86987cce9fe0a257c3fa58703dc33@finder.org> <86wmgl6jzv.fsf@gnu.org> <092cb755eee3a9b5e06d15c0b07e90b1@finder.org> <276414b03c24964aaeb9e43e8dba5e77@finder.org> <19ca4d76-cd63-4abe-8c8d-ca85c4d15ef2@gmx.at> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------daiDeT6T74jj2N5FCvHgxPMr" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13398"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Jared Finder , Eli Zaretskii , emacs-devel@gnu.org To: =?UTF-8?Q?Gerd_M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 09 11:25:34 2025 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 1tVpjH-0003FY-0s for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Jan 2025 11:25:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVpiK-0007bI-EF; Thu, 09 Jan 2025 05:24:32 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tVpiF-0007ay-KO for emacs-devel@gnu.org; Thu, 09 Jan 2025 05:24:28 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tVpi6-0001ux-KB; Thu, 09 Jan 2025 05:24:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1736418249; x=1737023049; i=rudalics@gmx.at; bh=BNQtPv1M/uaTGeuMISfIbBxSBoSJquxlN5acc5QDKrM=; h=X-UI-Sender-Class:Content-Type:Message-ID:Date:MIME-Version: Subject:To:Cc:References:From:In-Reply-To:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=rWp8vj5GJDYcAuopm3J/jwirfoPpxsC2shMbmoj4kwg08a8rhsMVC9FiTfVcXmW7 0GhzTwVfMC73i2csrewIL7vxIYrmV56zHDD9emEHF1AJdvyfH2vNlG/h7ZwdyOABU wy488CnhBfJw2xvfbQKNngnl/Xitqb471JuwEdXv0SmOf67bHivd2MOEFG0xjDNLd v/8t89qFKh/3wvbdDak8+ENnim5V0vI3X7Hw7Hp8HO2FYMUR3ThJnlj93hgwTZ7Ab i8ePiJW7fP9uu7G5hWd/rgU5gV/SGg5SciwwkIcIJMATgh4OaAb3+vNfKWjUgGfsx annuTYVJ8jyTz7/POA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([213.142.97.150]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MhU9j-1tzgLq1fnP-00iuBC; Thu, 09 Jan 2025 11:24:09 +0100 Content-Language: en-US In-Reply-To: X-Provags-ID: V03:K1:c8+QYJxjr7mQMGmC65c+oIg8NSWmGwVl9BxnSc4tHVvNw0qcCjE 19mXBWqR4VOGdOkGsDQIN5/jL7fXKW49uyaH7R4dR9o7D3zIKLjlRTrJruokSA+lfV74PnG rwr42CtnY5lLBHp5gfR4Yhd3d6Cce99ZN9eRtyNP0vzBZnP/Bq9RFeFfyvd/Cke1BgwBdjq ET+jhxMhaIPtwicrgNy6A== UI-OutboundReport: notjunk:1;M01:P0:/CGT4DDZFbI=;abahhXAbNZZ+OqOvRGfsQunyUnb DJ5uj+c8JOqC/sx/HK7Rg7Bs7PZ7RY5ngrewLf0jzBd0dNtae2khTOrRv7M8chWmYIZ8CIH0a dLGJZ/sE7xj+o/xiO1+ETkeWEIHBdpX6ZpiUH8ixijY2JDUDyddNaNhEzJy45wnzG70aCoNuz VXkkw2kEH5zkBpl8GiFoQl08X6tGORRvNeJhxRU2A9w4SxMO/jEHLrawPasvYtKps/rkVyv+J SQ5mK3Ng4D06XuPRnpJsiSjYErKqaNsbopyV+uGiyvDdU1q3WSMFuO9YQ350OQf5ylQXLz+fE QPlZHXwYBBQ3l8xq8q23TVe+pbmA19aE6rBqS4BU+XgcFK5AvKXnfeTOTdhPoHn3NAE4aju3i PSNGHmpQL+DIFUKjcF9kmQYs4auaL2ufIgY6MoYVcRU8GK4jdarXHox30JK4W5uzmVo8h2FvJ My2/D1PtxYL8kPcMZzHMnNtTLUi4OJrtLs7oEmvaGkk6AKVwpnWLTEualJeXUUylJcBY8HTtw hJdigwu8el3vCa5i7tbcmziLWUxckeTMyZeuyFr/0jQbfxTG/b1aDEAWJInzo9jrYwE5fE3eZ 3z4QUGexg2PJNBuureVF+iFzycU34b92MXvNnVeT+cBYn5iRMMtRR9gJjpVaO4x+Ejz+RLYpg 1zDXpFxDJ8IR884RjlSBjosGowZ+2LBxVae6Hc3Xvm48PJgYfHEbjh4Kq/d9h5h6NMABD214/ /TBwt2T5ddfYgD5gt4xVR10I4oeC2tvLSGklY+WlDbQTXgAfOyh8IFzLN3wAgLWrL2Rf6MfV Received-SPF: pass client-ip=212.227.17.22; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:327815 Archived-At: This is a multi-part message in MIME format. --------------daiDeT6T74jj2N5FCvHgxPMr Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > I've not yet understood where the third frame is created. Probably have to > see this in the debugger to get into this again. Without really checking it must be here /* Use default-minibuffer-frame if possible. */ if (!FRAMEP (KVAR (kb, Vdefault_minibuffer_frame)) || ! FRAME_LIVE_P (XFRAME (KVAR (kb, Vdefault_minibuffer_frame)))) { Lisp_Object initial_frame; /* If there's no minibuffer frame to use, create one. */ initial_frame = call1 (Qmake_initial_minibuffer_frame, display); kset_default_minibuffer_frame (kb, initial_frame); } 'default-minibuffer-frame' on ttys is nil, only 'x-create-frame' and the like set it AFAICT. Even if it were some frame, it might be of no use: On a tty the mini window to use _must_ be on the visible frame. So Emacs makes a new initial_frame and uses that frame's mini window. But the child frame gets another root frame and sooner or later this will crash anyway. The attached patch fixes it here. martin (who can still post a bug report if you think it's needed) --------------daiDeT6T74jj2N5FCvHgxPMr Content-Type: text/x-patch; charset=UTF-8; name="tty-child-frame.diff" Content-Disposition: attachment; filename="tty-child-frame.diff" Content-Transfer-Enco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gKEVRIChtaW5pLCBRb25seSkpCiAJICAgIGVycm9yICgibWluaWJ1ZmZlci1vbmx5IGNo aWxkIGZyYW1lcyBhcmUgbm90IGltcGxlbWVudGVkIik7CiAJICBlbHNlIGlmIChXSU5ET1dQ IChtaW5pKSkK --------------daiDeT6T74jj2N5FCvHgxPMr--