From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Akib Azmain Turja Newsgroups: gmane.emacs.devel Subject: Re: Emacs doesn't use only terminfo database to identify a terminal Date: Sat, 10 Sep 2022 17:27:39 +0600 Message-ID: <877d2b5v10.fsf@disroot.org> References: <87pmg38ro8.fsf@disroot.org> <83zgf7a570.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28784"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 10 14:47:23 2022 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 1oWztL-0007Gl-KZ for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Sep 2022 14:47:23 +0200 Original-Received: from localhost ([::1]:41110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWztK-00023q-IH for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Sep 2022 08:47:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51334) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWzsE-0000hG-RW for emacs-devel@gnu.org; Sat, 10 Sep 2022 08:46:14 -0400 Original-Received: from knopi.disroot.org ([178.21.23.139]:57382) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWzsD-0000Tl-9Q; Sat, 10 Sep 2022 08:46:14 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 1D86649F8D; Sat, 10 Sep 2022 14:46:11 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Original-Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D-5J7bFeoF1Z; Sat, 10 Sep 2022 14:46:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1662813970; bh=ncoTyBeo8KbvJAvT+GXaGxV5bdRkcE+DqWTpTNfGlAY=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=HYwECaYt8BKL2vngfKBsLfFhMehdCvQl+vvjHxdpqG2KP1Nxzs0hFTOn7WBhKt0rk iBoRJBXU6vFMbe+mzq+9b3CzAOcX+ybIHzKjBHv6zA2SJo/lMJXlAuHLmpuPe1BgpE DKSaAWd9GsSZ5SjxDZZpIqon1OBToCzuKv9r+4G/7HbfjPYVMyYwPy4OeC7chbwJJN DNzc5Alm5cL90OE9YVLpAnI0dlwHP9d1fYpll38Gq/4sMxuq1sGm5EactUYMEKW4Fg xOo3/oUzmmJfJsUZ4oFnI842vWG9HJ+FTql2IA6sXQh/7lPBnxOGRCwl/45z+xjuBH 9gNhwclCcD96A== In-Reply-To: <83zgf7a570.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 10 Sep 2022 13:34:27 +0300") Received-SPF: pass client-ip=178.21.23.139; envelope-from=akib@disroot.org; helo=knopi.disroot.org 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" Xref: news.gmane.io gmane.emacs.devel:295121 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> From: Akib Azmain Turja >> Date: Sat, 10 Sep 2022 16:11:51 +0600 >>=20 >> Emacs uses something more than just a terminfo database to determine the >> capabilities of a terminal. For example, if I run Emacs in St, keys >> like C-, M- work. Then I modified the terminal name by >> changing the terminfo source file (st-256color -> est-256color). If I >> run Emacs with the new terminfo database, keys like C-, M- >> no longer work, although infocmp shows that both (st-256color and >> est-256color) terminfo databases contain identical capabilities. Now if >> I rename the terminal name to something like "st-..." (I used >> "st-foo-bar-baz"), those keys work again. >>=20 >> But why? Who is the culprit here, Emacs or ncurses? > > See lisp/term/st.el, it's part of the puzzle, I think. > Yeah, it is. Putting the following in my early-init.el make those C- keys work: =2D-8<---------------cut here---------------start------------->8--- (setq term-file-aliases '(("apollo" . "vt100") ("vt102" . "vt100") ("vt125" . "vt100") ("vt201" . "vt200") ("vt220" . "vt200") ("vt240" . "vt200") ("vt300" . "vt200") ("vt320" . "vt200") ("vt400" . "vt200") ("vt420" . "vt200") ("alacritty" . "xterm") ("est" . "st") ("foot" . "xterm"))) =2D-8<---------------cut here---------------end--------------->8--- Thanks, I just found that those keys are defined in xterm-function-map in lisp/term/xterm.el. =2D-=20 Akib Azmain Turja Find me on Mastodon at @akib@hostux.social. This message is signed by me with my GnuPG key. Its fingerprint is: 7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEyVTKmrtL6kNBe3FRVTX89U2IYWsFAmMcdKsACgkQVTX89U2I YWuLOQ/9FhwhYqcFJ67ZbNKi1l49B+BtBs0A9bk3z23KUwRZSAiZJlx8xlVR6D8Q WCOynqHEkZg8gphhzG2FXBe4wvFTDA89j1a5VGzX2qVJl1RuPQJUtd47Mh0OyEu4 Cyh8kRMToAB7hBvizLRMmU7MDz+3x2U/WHXTTk60PJwnaiCRZUFRxuOnIxAZfQM7 fuENUvULw771F9/ZO2Srn17zZMlhGfDcqOQzHlrwi6nArpEWk/OjMK6bAQxyxgOD pSn5RnhTad50bhVCnCXoRiYL09RbfJNIJisqK3EPRIh6gB7xt2QKUtK6xylku5r1 EY8QCvvd9/bY9mvqPg0xX9czf4+6ZlfQp18rTWKwNYhAwt1BvdVfLDnwQ5+sK68p jiWCIT7rQfNXL2pO5C5P7WYPiN6gqNOASl2z4j7OHUfT9pFedQGxbZ0bonaqiZj6 wYSuI0lMC81UIyG6GCPq3gbVoXtf4c1zAJKpdZbs+6VAvEJ3/0cQCpeli3J2LGP3 aEgCdH1bLLnUUHqxh+J4cvJyssUYyg2kL4OTGkp/ohn8Lc8/uBkrb27+lOr5jfJ+ 3jmNvnyDv8xeKLGu+xPCpoJuE5llSrA66tdtHHQIfiAV2rdBx2OWhGOUpwewXATG M+now2AsqVCJ8p9YUFMs49qECFRtkxUsPxHvk2QF44n6Em2q/Fk= =DKJI -----END PGP SIGNATURE----- --=-=-=--