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.devel Subject: Re: Question about dubious code for terminal frames Date: Mon, 02 Sep 2024 17:35:53 +0300 Message-ID: <868qwa86nq.fsf@gnu.org> References: <86wmju8em4.fsf@gnu.org> <86ed628aa3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22431"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, rudalics@gmx.at To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 02 16:36:46 2024 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 1sl8Ag-0005gB-Bo for ged-emacs-devel@m.gmane-mx.org; Mon, 02 Sep 2024 16:36:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sl89u-0002y6-Cr; Mon, 02 Sep 2024 10:35:58 -0400 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 1sl89s-0002xx-Ua for emacs-devel@gnu.org; Mon, 02 Sep 2024 10:35:57 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sl89s-0006CB-1B; Mon, 02 Sep 2024 10:35:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=IXgXhHK1k2t8aOCEdOtcb6GAktbjVGP7FU6lWW/nLCA=; b=DNVYirh7u1nj4YfyBjM3 0lgPy3N8Pm5zLbTEQMEUyFMy/rJT4VXumILQoS2tdzhXmJkmU5CurGntVGzJ2Pxrgyi7LuQqtbF1A p+DTEfI+2jPv57x2G2Dmv8N2EpkW4WO7R1yf4/qFnOH3vLqGCMdxZnKDY+4FTaPOWb3wemZDCORAY zSwgtBiCm7CljiXrjLcx4NXlgemFVxe6QtaSC4RRdTHiWcWTh9NZ66aiNO8Yw91Pn3tbLDIhtIqiz KW3orHU63LS4yGCLxrbgzNS94nMF4PZqSGlYFlSZjiHYP2CdglFe7z0AiXS1tLQrP3zPt1UG1ehk6 LPrEUX/ovlhNmA==; In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Mon, 02 Sep 2024 16:11:34 +0200) 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:323293 Archived-At: > From: Gerd Möllmann > Cc: emacs-devel@gnu.org, rudalics@gmx.at > Date: Mon, 02 Sep 2024 16:11:34 +0200 > > Eli Zaretskii writes: > > > What exactly is the problem? Doesn't change_frame_size support child > > frames? > > Not on terminals, no, for exactly the reason that adjust_frame_size for > terminal frames sets the terminal's size. So, when I opened a new child > frame of size 20x30 suddenty the terminal had size 20x30. And the > innocent root frame redisplay got an emacs_abort because it wrote > outside of that range because the root frame was of course much larger. OK, but the behavior on TTY terminals in this regard should be exactly the same as on GUI terminals, when you drag the frame's border with the mouse. So I very much hope there's code in Emacs that you can simply copy or maybe even just call. > I personally think it's wrong to set FrameCols/Rows in this way in > adjust_frame_size. From my POV, it's should be a physical property of > the terminal that Emacs does not change. If we can't determine the size > of the terminal (and I wonder how often that is the case), we should > devise a way to let the user specify the size, but without the current > magic. But with the current proliferation of terminal emulators whose window can be resized, what other choice do we have when the only source of information about the resize is SIGWINCH? How else can we update the Emacs notion of the frame's size?