From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko 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 12:48:07 +0800 Message-ID: <878rmr25tk.fsf@localhost> References: <87v8pw1xyo.fsf@localhost> <83a678d5w6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6387"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57693@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 10 06:48:13 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 1oWsPd-0001V2-0L for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Sep 2022 06:48:13 +0200 Original-Received: from localhost ([::1]:40440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWsPb-0004RS-Vd for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Sep 2022 00:48:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWsPS-0004RI-JE for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 00:48:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47419) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWsPR-00086v-Nx for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 00:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oWsPR-0003tt-IG for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 00:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Sep 2022 04:48: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.166278524414842 (code B ref 57693); Sat, 10 Sep 2022 04:48:01 +0000 Original-Received: (at 57693) by debbugs.gnu.org; 10 Sep 2022 04:47:24 +0000 Original-Received: from localhost ([127.0.0.1]:36118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWsOq-0003rK-En for submit@debbugs.gnu.org; Sat, 10 Sep 2022 00:47:24 -0400 Original-Received: from mail-pf1-f182.google.com ([209.85.210.182]:40534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWsOl-0003r3-LN for 57693@debbugs.gnu.org; Sat, 10 Sep 2022 00:47:23 -0400 Original-Received: by mail-pf1-f182.google.com with SMTP id b144so3485159pfb.7 for <57693@debbugs.gnu.org>; Fri, 09 Sep 2022 21:47:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date; bh=HK0Dkd6QtOjloEDy5r/VBnvF79GWYsUXoHhV5odnllg=; b=ZT0rgjmDTDLxP2Kc9u5UB3NcSTuzaWV25/h+BQk9wbIH3YKBWCMeR90qQVgcKrmaed FmRuEsN92ABx9wtNViDAUa4izXA1WV19dkzB54OuWCxBVo5XaK/agb+djc6e3QA9BNMm mK88ihLmOdwQq8GaXEzQ8UgsuxU+7leFoTEyoJGwQL84XC7esKJNJraJBVvBdbpytrHM Dxelw/EEa5Z9ZEcjLnvAeYrXoubFoCkYtyJ54/YdEfKuovR613hziy9h9rmpLccBgQUI fTwecE2E28kCkuUUUOaLKrpLu3TCEUJ573S1xst379ejlBzS6Sz4KhjxqrtgVKy0kpP1 2kVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=HK0Dkd6QtOjloEDy5r/VBnvF79GWYsUXoHhV5odnllg=; b=mILvnkx8zdJgoOKOM7x5cRKIil73G03aOowT91qB3Q0TxOHWfGM6MpiO8F7fl8nO9Y BSptvrr+axijYFKq3db27Xo3TvmHDqIdVMR1vc7gfiFUrL4taVU10zoEzifzyIrJZjGL wAyanXNfJmj4NhyXE51YP/Lfzb5fhsS7T6OEfnTqBKLcod7OIfm82wLM5OR8ls16BmVe w2yUexe1n/3rABo9dSRR09R6YeyeOdhGuN8qnyJSCWViQ08zBaYw6bdawoYfFT8oKnHE vNIjRzG1wpMq9guyqsw34zSMbesDxzLSmcSUxCkDmH7No0cqvn4ccRYWbDv+qSXNYFNG JRLw== X-Gm-Message-State: ACgBeo2HbvwMVlRfDkcB0qe1NoJxmRJKbJCKD5ROP8xgLsRK1Kecd5Ch /AqK1tS0ZCfcXKmH5LXPnQA= X-Google-Smtp-Source: AA6agR66MQ5SK9q+lwlXqMe9RZINIaps8+A1w+kzOpcLzBQ31JLTbPp/bGu6u2re/Gz4Qj1/yVzfbA== X-Received: by 2002:a05:6a02:309:b0:434:efcb:ccf4 with SMTP id bn9-20020a056a02030900b00434efcbccf4mr13074688pgb.304.1662785233663; Fri, 09 Sep 2022 21:47:13 -0700 (PDT) Original-Received: from localhost ([1.83.154.15]) by smtp.gmail.com with ESMTPSA id y14-20020a1709029b8e00b001745919b197sm1263047plp.243.2022.09.09.21.47.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Sep 2022 21:47:13 -0700 (PDT) In-Reply-To: <83a678d5w6.fsf@gnu.org> 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:242055 Archived-At: Eli Zaretskii writes: > Also, what exactly does the test above intend to test? Are you > interested in whether this character can be displayed at all, > regardless of which font is to be used, or do you want it to be > displayed with the default face's font? > > To answer your question: the most accurate way is to actually try > displaying the character and see if that works. Not sure if it helps > you, though especially since that code is in a defcustom, AFAIU. Makes sense. Trying to determine if a character can be displayed a-priori in defcustom was just the "easy" approach. It makes sense that we must try to insert the character first in order to know if it can be displayed. At least, individual buffers may have buffer-local face-remapping-alist that may completely change the display. However, it is not very clear for me how to determine programmatically if given character is displayable in buffer. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92