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: Emacs doesn't use only terminfo database to identify a terminal Date: Sat, 10 Sep 2022 13:34:27 +0300 Message-ID: <83zgf7a570.fsf@gnu.org> References: <87pmg38ro8.fsf@disroot.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26455"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Akib Azmain Turja Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 10 12:37:15 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 1oWxrO-0006fa-IY for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Sep 2022 12:37:14 +0200 Original-Received: from localhost ([::1]:51458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWxrN-0001uW-9S for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Sep 2022 06:37:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWxp3-00015q-U8 for emacs-devel@gnu.org; Sat, 10 Sep 2022 06:34:50 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60026) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWxp3-0004hd-LL; Sat, 10 Sep 2022 06:34:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=tkBojE5DLLgAz+7tdpUpNIvAy9bPuySSpIZJkluhEGc=; b=dAyfznfuO4S6 v4UpMeu5CKpohVG9ZEgwSI2QPFK4omRQoDW88/IaPtEUMv4HtxbINVEwOOV8qak1Bk2BlfC7vtiSI 1xoF+s2xPfkrI+trVcVNJVwB1Nl0NM3kw1o+KWhisoBnsi0yET852yQQfr0KhQsEWjjUZ1dKUkBHB TG+zvJygy2dL1Z3VkzVUeq7rtXpSf3yUj5MRtY4KtxquyHpNTZKyjaQhwo3Y4w5uu+wqo/kA1mU/l nWtumgc7peGhN5K3SUsGCazoud8kTHe4Ho1NOxGVNTnZ6Tb/kEpXcmsqkpy85BNn/YqkF/CCOuuVd grWFbvX9wwsfEZ5wiIZvrg==; Original-Received: from [87.69.77.57] (port=2790 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWxp2-00072L-Rh; Sat, 10 Sep 2022 06:34:49 -0400 In-Reply-To: <87pmg38ro8.fsf@disroot.org> (message from Akib Azmain Turja on Sat, 10 Sep 2022 16:11:51 +0600) 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:295117 Archived-At: > From: Akib Azmain Turja > Date: Sat, 10 Sep 2022 16:11:51 +0600 > > 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. > > But why? Who is the culprit here, Emacs or ncurses? See lisp/term/st.el, it's part of the puzzle, I think.