From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: Question about dubious code for terminal frames Date: Mon, 02 Sep 2024 16:11:34 +0200 Message-ID: References: <86wmju8em4.fsf@gnu.org> <86ed628aa3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6060"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org, rudalics@gmx.at To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 02 16:12:34 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 1sl7nG-0001PY-FK for ged-emacs-devel@m.gmane-mx.org; Mon, 02 Sep 2024 16:12:34 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sl7mP-00066I-OP; Mon, 02 Sep 2024 10:11:41 -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 1sl7mO-000663-15 for emacs-devel@gnu.org; Mon, 02 Sep 2024 10:11:40 -0400 Original-Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sl7mM-0003ik-EB; Mon, 02 Sep 2024 10:11:39 -0400 Original-Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-5334adf7249so5540941e87.3; Mon, 02 Sep 2024 07:11:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725286296; x=1725891096; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xm9/WQCt/bqu3Gj1Z6h5Nk1iVao8cgIK+1CcrAWNDAQ=; b=d7aFZ0mqp4DgCxFA7VI20GSyKqt+MzSHjF6RPoYTHA/kxppzLysATW06oBi0dCHY2r Q983wO340nTf8sb6mPitvRycK8ybM0NaV5mauGZ4GTFcxZ3FE9eD4lSbjcT2tsjoyzC9 6QEOPymaxYngjjOtQjOce4KKwpA9l2V4t6m0oU8uwbryVzADevrh7fRMo9vLV6ynpVzF eY0Uc7/xtNeuDpkiWlgSh1137RIVpUPZexQ7y1aqQQE08f9XYfGPiNzgEI7nQcLoUasL I4hzsPGVmwt6XrD8G6VjIJXLw/qFzWOrUhHXl3x3YekbW77cko2OOH65SVMzJT6CnJAg AIqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725286296; x=1725891096; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=xm9/WQCt/bqu3Gj1Z6h5Nk1iVao8cgIK+1CcrAWNDAQ=; b=mMQM2NEx+3djMYv77uu/fOCAqE70EeOJzH53k9CrMwX3qvYcnck9HoVKFgyv7h5Myu +iwJQ63Iyj5dMbHft3n/FSnuOrdF7XIletaQjRPoev7SCD8wyInIIII3ohxdR9OcwCxH BQM0CpqBea7vTgs4wFYyfkfoSmW78AHFzYYuUykKcoQPJgEAF0BDOEk7482Fnrw+CDBk bpcccijW5c2L8vAvsOSWeU0AmWbixSdPLkZeLmjIcLBHL/e6btEYXIO453r9NzBVUzwD f2IF/8HEZaRtVEGtz7HoPIT78M9p/1+6krutQTfA1Dd+wU8t1d4MUruLpZPeaFwGRKVJ tlQQ== X-Gm-Message-State: AOJu0YyrNY1Kk0W9h3hXcEV4FKmuc/02DUvbYk56Mf1AXRC1ESAlGF/H U6SbWP/uEZI/AhyQVpnYYiZBJL0H24rfPULacyWdMgM0m7gAQ7Ew79aJAw== X-Google-Smtp-Source: AGHT+IGehf8WmFsN/Y3Xa+HpqHTlVy1Iy5i30ajlEr/kzXV0Tjv4J4RsjNuDge3jKZr+pXOsHPCVsw== X-Received: by 2002:a05:6512:318e:b0:52c:e170:9d38 with SMTP id 2adb3069b0e04-53546b3f373mr7742344e87.31.1725286295397; Mon, 02 Sep 2024 07:11:35 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a928.dip0.t-ipconnect.de. [79.227.169.40]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8989021f3bsm562317766b.85.2024.09.02.07.11.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2024 07:11:35 -0700 (PDT) In-Reply-To: <86ed628aa3.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 02 Sep 2024 16:17:40 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::133; envelope-from=gerd.moellmann@gmail.com; helo=mail-lf1-x133.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 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, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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:323292 Archived-At: Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: emacs-devel@gnu.org, rudalics@gmx.at >> Date: Mon, 02 Sep 2024 14:59:54 +0200 >>=20 >> Eli Zaretskii writes: >>=20 >> > Did you consider SIGWINCH? Its handler also calls adjust_frame_size. >>=20 >> Thanks, that would be this one, right? > > Right. > >> It also could know and set the terminal size, if get_tty_size can. >>=20 >> How complicated. I guess I rather work around this for now :-). > > 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. >> And I wonder if one could brew a make-frame with some suitable frame >> parameters that lead to setting the terminal size to something that >> leads to a later emacs_abort in cmcheckmagic during redisplay of another >> frame on the same terminal :-). > > Someone already did, see bug#71289. Hahaha :-). 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.=20