From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Question about dubious code for terminal frames Date: Mon, 02 Sep 2024 12:23:25 +0200 Message-ID: References: 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="26154"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Emacs Devel , martin rudalics 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 12:24:23 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 1sl4EQ-0006dO-VE for ged-emacs-devel@m.gmane-mx.org; Mon, 02 Sep 2024 12:24:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sl4Dc-0005zt-EP; Mon, 02 Sep 2024 06:23:32 -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 1sl4Db-0005yJ-2v for emacs-devel@gnu.org; Mon, 02 Sep 2024 06:23:31 -0400 Original-Received: from smtp-out2.suse.de ([2a07:de40:b251:101:10:150:64:2]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sl4DZ-0006gd-9O for emacs-devel@gnu.org; Mon, 02 Sep 2024 06:23:30 -0400 Original-Received: from hawking.nue2.suse.org (unknown [IPv6:2a07:de40:a101:3:92b1:1cff:fe69:ddc]) by smtp-out2.suse.de (Postfix) with ESMTP id 6B2091F78A; Mon, 2 Sep 2024 10:23:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1725272605; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DoqPCOhf/Q8SqjhttAVJVnse55g1BaMvRlazILqBnhI=; b=aZrTyzeiyRysKet2qyjnJGnuxPY8Vyj5ouCk8Q9hHbS6Xm0bN+LKxkLYExsz0ce8aszL4+ HUi6l3xMQwdtTqiiv7h9I0BAwwcZmB0Qho+WNkscj6WS2efQ9emocFRKJ31o/4dfwMjK4I GtJHVbOJ3cKyhHcEbf5uJ0TP8fp38Ns= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1725272605; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DoqPCOhf/Q8SqjhttAVJVnse55g1BaMvRlazILqBnhI=; b=hdiMRQ+U68/UGcNCklNliFHAKqHy8jIYDAcArjB+sqNQnLLPuRZ3MXptxFTGhB3nI3JyoC xYccrSvoB+/4smCw== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=aZrTyzei; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=hdiMRQ+U DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1725272605; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DoqPCOhf/Q8SqjhttAVJVnse55g1BaMvRlazILqBnhI=; b=aZrTyzeiyRysKet2qyjnJGnuxPY8Vyj5ouCk8Q9hHbS6Xm0bN+LKxkLYExsz0ce8aszL4+ HUi6l3xMQwdtTqiiv7h9I0BAwwcZmB0Qho+WNkscj6WS2efQ9emocFRKJ31o/4dfwMjK4I GtJHVbOJ3cKyhHcEbf5uJ0TP8fp38Ns= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1725272605; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DoqPCOhf/Q8SqjhttAVJVnse55g1BaMvRlazILqBnhI=; b=hdiMRQ+U68/UGcNCklNliFHAKqHy8jIYDAcArjB+sqNQnLLPuRZ3MXptxFTGhB3nI3JyoC xYccrSvoB+/4smCw== Original-Received: by hawking.nue2.suse.org (Postfix, from userid 17005) id 52F7A4A0513; Mon, 2 Sep 2024 12:23:25 +0200 (CEST) In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Mon, 02 Sep 2024 11:48:45 +0200") X-Yow: I'm changing the CHANNEL.. But all I get is commercials for ``RONCO MIRACLE BAMBOO STEAMERS''! X-Spamd-Result: default: False [0.59 / 50.00]; BAYES_HAM(-3.00)[99.99%]; HFILTER_HOSTNAME_UNKNOWN(2.50)[]; RDNS_NONE(2.00)[]; DWL_DNSWL_MED(-2.00)[suse.de:dkim]; ONCE_RECEIVED(1.20)[]; HFILTER_HELO_IP_A(1.00)[hawking.nue2.suse.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; HFILTER_HELO_NORES_A_OR_MX(0.30)[hawking.nue2.suse.org]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-0.999]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.at]; DIRECT_TO_MX(0.00)[Gnus/5.13 (Gnus v5.13)]; FREEMAIL_TO(0.00)[gmail.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; ARC_NA(0.00)[]; TO_DN_ALL(0.00)[]; FREEMAIL_CC(0.00)[gnu.org,gmx.at]; MIME_TRACE(0.00)[0:+]; DNSWL_BLOCKED(0.00)[2a07:de40:a101:3:92b1:1cff:fe69:ddc:from]; FROM_EQ_ENVF X-Spamd-Bar: / X-Rspamd-Queue-Id: 6B2091F78A X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action Received-SPF: pass client-ip=2a07:de40:b251:101:10:150:64:2; envelope-from=schwab@suse.de; helo=smtp-out2.suse.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:323272 Archived-At: On Sep 02 2024, Gerd Möllmann wrote: > Andreas Schwab writes: > >> On Sep 02 2024, Gerd Möllmann wrote: >> >>> AFAIU, these two values give the physical size of a terminal (screen, >>> window), as returned from the co and li escape sequences on termcap >>> frames. >> >> Only if get_tty_size cannot determine the real size. > > Hm, yes, thanks. I guess setting cols and rows should then be > conditionalized on being unknown? if (FrameCols (tty) <= 0) FrameCols (tty) = tgetnum ("co"); if (FrameRows (tty) <= 0) FrameRows (tty) = tgetnum ("li"); -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."