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: Display of undisplayable characters: \U01F3A8 instead of diamond Date: Fri, 02 Sep 2022 19:26:39 +0300 Message-ID: <83y1v1oi80.fsf@gnu.org> References: <83y1v7w6eu.fsf@gnu.org> <2f302d1c3966849477b3@heytings.org> <83mtbiovzr.fsf@gnu.org> <83a67hq3l7.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29054"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gregory@heytings.org, rms@gnu.org, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 02 18:27:55 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 1oU9WN-0007Qq-3l for ged-emacs-devel@m.gmane-mx.org; Fri, 02 Sep 2022 18:27:55 +0200 Original-Received: from localhost ([::1]:55216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oU9WL-0004KX-F9 for ged-emacs-devel@m.gmane-mx.org; Fri, 02 Sep 2022 12:27:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oU9VM-0003c3-6X for emacs-devel@gnu.org; Fri, 02 Sep 2022 12:26:52 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33466) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oU9VL-0002bP-Bf; Fri, 02 Sep 2022 12:26:51 -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=fkhppPkiO1Bc+Ee7sASThm9f0eiuUUHNC8Pus6uRDTQ=; b=o31DlPTXSVfm E8L+omLRQV2qFLvrNoEgEpP3e+6V53es39rdRwp0dB6hPM+uA/CtYRI4wm6SlvDHu32cuKtvQkYKq 5j6yrP6au/nXKHt5m7V8/fMTNCIwdOyMEsz2VbsnzM0axSe4yRndB5URSvtE5G6G0aRwRrzCw9WE4 DAB6+F5t+Ws62cEDFnhppdMYE3OPOYgVEa2f3mk6qfpYbYfj2MVc6gBtjOz7dw5K7ImW93S6ijb3E vP7iuO2sYescguM9sMlARZjkqQASdgRrN0nV/Tsngk7TiIFcqfSAgTLNeBuVIPKKQgjPtFQr/wB8W ejne1fOsQ+hHI07tkqUneA==; Original-Received: from [87.69.77.57] (port=3051 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 1oU9VH-0008Tq-7S; Fri, 02 Sep 2022 12:26:47 -0400 In-Reply-To: (message from Alan Mackenzie on Fri, 2 Sep 2022 16:12:12 +0000) 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:294575 Archived-At: > Date: Fri, 2 Sep 2022 16:12:12 +0000 > Cc: gregory@heytings.org, rms@gnu.org, emacs-devel@gnu.org > From: Alan Mackenzie > > > It involves writing some Lisp code and running it on your system, > > yes. How is that a problem? > > It's not a problem for me, but might well be for other Linux console > users. I'm not sure there are other users. > It really needs documenting somewhere, which might well be more > work than just supplying an option. The display-tables are documented already. And we use them in quite a few situations already, including in latin1-disp.el. > > How can Emacs know which characters does your Linux console actually > > support, out of all the Unicode range? > > The console supports ALL characters in the Unicode range. Most of them > it displays with the replacement character glyph That's not what we call "support". > > And how can Emacs know which ones of those you want to see as their > > ASCII "emulations" (per latin1-disp.el) and which you want to see as > > U+FFFD replacements? > > It could examine the currently loaded font, if needed. I'd welcome patches to do that, TIA. > But I was more thinking about allowing the console itself to do the > replacement with \ufffd. There's no need to do that, since Emacs is capable of emitting that character by itself. > > So yes, this requires you, the user, to tell Emacs which ones you want > > to see in what manner. There are a lot of Unicode characters, so it > > could be a large job, if the characters actually supported by the > > console are all in distinct Unicode blocks. (But if you only want to > > see Latin-1 characters, I've shown in this thread a one-liner to do > > that. I guess you will reject that as well.) > > Some of the characters in my font lie outside the Latin-1 range. Doing > this job properly requires writing some sort of script to examine the > loaded font. I don't know how easy that would be. It's just a loop calling char-displayable-p, that's all. What's left is for you to examine the results. > > Including, amazingly enough, a way to actually produce the same > > "diamond" glyphs on display under the same circumstances. Since when > > do veteran Emacs hackers such as you and Richard consider some Lisp > > coding a problem so grave as to justify flatly rejecting it? > > It doesn't scale. Without some sort of script, such as I suggested > above, it has to be hacked individually for each setup. Just once. So its scaling is O(1). Literally. > > You _should_ expect problems. And when solutions are pointed out that > > are just a few lines of Lisp away, I'd expect you to embrace them, not > > flatly reject them. > > I would prefer a solution that would work for all Linux console users, > including those who can't or don't want to hack Lisp. For that, someone will have to figure out how to do that and submit patches. I don't know what else to suggest, since nothing seems to be good enough.