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: New feature: displaying ligature characters in the buffer Date: Tue, 25 Jan 2022 08:31:53 +0200 Message-ID: <5344439E-89EC-42C6-A759-510A981E6884@gnu.org> References: <87sftk49ih.fsf@yahoo.com> <837dawt0h4.fsf@gnu.org> <838rv9plyf.fsf@gnu.org> <837dasntoj.fsf@gnu.org> <834k5tl4a9.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="26150"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: K-9 Mail for Android Cc: psainty@orcon.net.nz, luangruo@yahoo.com, emacs-devel@gnu.org To: rms@gnu.org, Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 25 07:34:58 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 1nCFPt-0006fi-Jr for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Jan 2022 07:34:57 +0100 Original-Received: from localhost ([::1]:56898 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nCFPr-0002kt-TV for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Jan 2022 01:34:55 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCFNB-0001rK-6J for emacs-devel@gnu.org; Tue, 25 Jan 2022 01:32:10 -0500 Original-Received: from [2001:470:142:3::e] (port=56952 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCFN5-0003Ty-F5; Tue, 25 Jan 2022 01:32:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Subject:To:From: Date; bh=ahecuVt52Y9MyWqB5DGmP8SgQBw+tUZ+3fusTY0evaA=; b=VwJk1GHcrZf2LoGQHTJd 7+j9gupKN+thpkGGxaJ1WyYBa0vQJjRB4gwc4zx9+KdICNsYNTidkbqdu6Bk7TrW2FgPW7HG4rIbf gO26244EwylJpeV0z4zuO5rij+vmyNJwwMjF/OkKTLZTLZNx/QWRS122A9cIp17Vi2OAt68ZUEoVU bWipOAvq85srMhVz47we+yJvmWolrBd7jADogXHwICbiSzU9/meDmpR1wbdQHdEbWi+s3NmcffJ8Y T+vO+OZYhCPQUXXsNnsC+6q+scKi2lTC1912w4MPlHTrY7S84Dtugx5hG9q6qC9afLoZKys61ylI+ oTPFevJng4xEug==; Original-Received: from [2001:4df7:2:6a8a::1] (port=51430 helo=[IPv6:::1]) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nCFMz-0005FK-1K; Tue, 25 Jan 2022 01:31:57 -0500 In-Reply-To: Autocrypt: addr=eliz@gnu.org; keydata= mQENBF+pf4UBCAC6vjkWLSAsQpe8YIGKLQzNOJx/IjGtCdFF8uzmO5jmME+SD8ROuJN+t5KXVw58 uzu75EFD0vHTY9e+udJ2gkpuy0NnzkFcbumdLLo2ERKCoSctZZRhzKXI5z5cHxCqW0B2ygHRrRLt oNlGID7bAgcgSViT1ptGqTXO7zGVu4Airok7dNzcPtHgns8GlR5YAFX0TvE6oGd0l2VPghNeVJKJ OjrbfhoDxl3ucFpqbqMH8z9HTLDOFpz8UaYYUdJMi3xX6vwTZxI2sM2RRVLUpZyllAkSMI4lln1O OgazM/62DJUs/rKIHKBnF6h3/qsJUjUYXaAHbrXY26mWllAd536lABEBAAG0I0VsaSBaYXJldHNr aWkgKGVsaXopIDxlbGl6QGdudS5vcmc+iQE4BBMBAgAiBQJfqX+FAhsDBgsJCAcDAgYVCAIJCgsE FgIDAQIeAQIXgAAKCRCRwSYvAeuNOYUQB/4/iIKKOG45ijNaRoTvmJJZMvj1S07WQxEm7c5SHEeE QbLOAxB9vESOV7sLueuN3oqEndtzyYt4x1WTSBmHFF7h5fcCMjBs41siOIp5Sj/xD0Bvaa0IKGCR SZ7PAo8Mq3wgajXpTpn9vxE2PmtzA8KdEE0K1+f9pVAfOpUIcCl44rIxLUW352XG0y7iz6c/O6LB 1deOKMiKFctKO7pBti1dJEm1ImewLH3H8uTbwspLOs3EB8xhsESxmTidnze68HX2jt+2EeMgCdki NU+LWbexQZPfIS7+ZmE06ll0v6+Jy7ZdTkCCRypKWTnW7pIFsq/p4kybV8O/kHSV6B4vvQBfuQEN BF 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:285340 Archived-At: On January 25, 2022 6:16:33 AM GMT+02:00, Richard Stallman = wrote: >=20 > When the buffer contains a ligature character, it would be a good thing = for > Emacs to determine that the terminal doesn't support ligatures, and in > that case to arrange to display those ligature characters using two lett= ers=2E > This should happen by default=2E >=20 > Other pre-composed characters could likewise be displayed in two columns > using non-composed characters=2E >=20 > Emacs needs to know which compositions the terminal can display=2E I > expect it will handle a fairly limited set=2E So a new TERMINFO field > could specify which characters work, and Emacs could convert that into > a binary array for quick lookup=2E TERM=3Dlinux could have a TERMINFO > field to say that ligatures don't work=2E >=20 This is supposed to be working already, up to a point, see terminal_glyph_= code in terminal=2Ec=2E I'm guessing that the diamond glyphs you see for s= ome ligatures is the way your terminal "supports" these characters=2E Or m= aybe it lies to Emacs about which characters it supports, or maybe the code= which queries the terminal about supported characters doesn't work in your= case for some other reason=2E I don't think I agree that this must work by default=2E That's certainly = the desire, but the capabilities of the linux terminal and the way they are= reported are a mess, and the use case is quite marginal nowadays=2E Ligat= ures are no different for this purpose from any other non-ASCII character t= hat the console cannot display=2E We have the latin1-display feature that y= ou can turn on if your console doesn't cope well enough with non-ASCII char= acters=2E And if you want to set up display of ASCII equivalents for just = a small set of characters, you can use the latin1-display-char function tod= o that in your =2Eemacs, in a way that suits the capabilities of your parti= cular type and version of the linux console=2E