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.bugs Subject: bug#57693: 29.0.50; Is there a more reliable version of `char-displayable-p'? Date: Sat, 10 Sep 2022 10:56:27 +0300 Message-ID: <837d2bbr2s.fsf@gnu.org> References: <87v8pw1xyo.fsf@localhost> <83a678d5w6.fsf@gnu.org> <878rmr25tk.fsf@localhost> <83czc3bvbg.fsf@gnu.org> <87y1urybt6.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14398"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57693@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 10 09:57:25 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1oWvMh-0003ea-5n for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Sep 2022 09:57:23 +0200 Original-Received: from localhost ([::1]:52896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWvMg-0007Tn-70 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Sep 2022 03:57:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWvMM-0007Q4-85 for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 03:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47837) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWvML-0000XO-V5 for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 03:57:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oWvML-0003Fr-RW for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 03:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Sep 2022 07:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57693 X-GNU-PR-Package: emacs Original-Received: via spool by 57693-submit@debbugs.gnu.org id=B57693.166279661612497 (code B ref 57693); Sat, 10 Sep 2022 07:57:01 +0000 Original-Received: (at 57693) by debbugs.gnu.org; 10 Sep 2022 07:56:56 +0000 Original-Received: from localhost ([127.0.0.1]:36536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWvMF-0003FU-Uw for submit@debbugs.gnu.org; Sat, 10 Sep 2022 03:56:56 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWvMD-0003FD-VC for 57693@debbugs.gnu.org; Sat, 10 Sep 2022 03:56:54 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37986) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWvM8-0000WF-LP; Sat, 10 Sep 2022 03:56:48 -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=uFhsHDTosVo6rklz7gHr9ppFrYCCVd83dnVNkoKA6w4=; b=orA9sFeP5JSZ NAnvhHBzZkBjFwrpMvWzd75E90UbiTFCgUIl+KVumMgn5Wl92PqbVoWX3eRqFKWhpv6E4talk2DZt N8cuz4SZBfPy4r6CQpiLcPNIxqSIVdPnxuGBWFI9twgg5l2acDe0W1kS2bV7Qi8wH/EFakHkYnw/B PRzYht2WoSj9L4QKDRG4KXdf1v/8Izu1sAHrgK5UMQJaDhE/mlFH/JnohknYxLBWlvwj+EpMB1CFH q/TZYBEK4AYuMtoyzs8VPCQh4xWUsBLKV8M0JQt0kcARHCRrVUuQP4UNH4OoJoBEili2Z5KZYLkX6 5EYWsOIjFsOOcSTKWU/0Aw==; Original-Received: from [87.69.77.57] (port=4704 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 1oWvM6-0002g8-Oj; Sat, 10 Sep 2022 03:56:48 -0400 In-Reply-To: <87y1urybt6.fsf@localhost> (message from Ihor Radchenko on Sat, 10 Sep 2022 14:37:41 +0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:242087 Archived-At: > From: Ihor Radchenko > Cc: 57693@debbugs.gnu.org > Date: Sat, 10 Sep 2022 14:37:41 +0800 > > Eli Zaretskii writes: > > >> However, it is not very clear for me how to determine programmatically if > >> given character is displayable in buffer. > > > > Make the char-displayable-p test at run time, I guess, i.e. when you > > are actually about to insert it. > > This should indeed be slightly more accurate. However, it will still not > cover scenarios when, for example, an overlay at point has 'face > property that sets a font that is unable to display given char. Or do I > miss something? Or what if the character has a display-table entry that calls for displaying a different codepoint? Such situations would require a very different test to be 100% accurate. For that reason, my suggestion would be to have the defcustom by default specify some safe value, and leave it to users to customize it to more fancy characters if they know it works in their configurations. Or just document that the default value may not produce the expected display in some rare situations, i.e. leave it to the users in such rare situations to customize back to a safe value.