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:56:39 +0800 Message-ID: <8735cz25fc.fsf@localhost> References: <87v8pw1xyo.fsf@localhost> <87sfl07j9b.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1024"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Robert Pluim , 57693@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 10 06:56:15 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 1oWsXN-00006F-Ot for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Sep 2022 06:56:13 +0200 Original-Received: from localhost ([::1]:54696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWsXM-0006Lr-OR for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Sep 2022 00:56:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWsXD-0006LU-0P for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 00:56:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47449) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWsXC-0000gX-No for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 00:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oWsXC-00048H-Jg for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 00:56:02 -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:56:02 +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.166278575315869 (code B ref 57693); Sat, 10 Sep 2022 04:56:02 +0000 Original-Received: (at 57693) by debbugs.gnu.org; 10 Sep 2022 04:55:53 +0000 Original-Received: from localhost ([127.0.0.1]:36148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWsX2-00047t-KP for submit@debbugs.gnu.org; Sat, 10 Sep 2022 00:55:52 -0400 Original-Received: from mail-pg1-f174.google.com ([209.85.215.174]:35696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWsX0-00047f-Qx for 57693@debbugs.gnu.org; Sat, 10 Sep 2022 00:55:51 -0400 Original-Received: by mail-pg1-f174.google.com with SMTP id t65so3383927pgt.2 for <57693@debbugs.gnu.org>; Fri, 09 Sep 2022 21:55:50 -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=coc8qd43KTPPyc7r5nbYmdUBd3oSiG0pUjYlYWQm88Q=; b=B3YzJjnFlPGA2RGQ9NKwOUHcQOljU66oQafWH5YUZ6xBLgnWdUtL0Jq1968O9ZQEQu 7Abth1rHsyj8nHx3o/pXAce/WHSJvRA8L52ILjLrb9sL2moHBIXW5ECL2K/daIIeHlhs qc1vtqzerEbRIHYb18OC0oBfVBiaxyPsjr9PcVWnJcBz8gmawSccrq2YjQuSWqsRlYLz LW9N3VgNxbP9gIvlTmoz0J5XDQerxbvAFs8k+8Jw+S+YNanCQlbYU/rQe5BLkWQZXIFI rJoHxWJrZ3MlCJsRfactb1Kl0f9Rng8wgaemO+8lTTZXJCQozlP9izvmgHby3+LQaxfV EwUw== 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=coc8qd43KTPPyc7r5nbYmdUBd3oSiG0pUjYlYWQm88Q=; b=ciIc413Bm28iIE5aysBVSy8Vk2oFVd8A6AHqPP212lSmAkP85fHVqJfIq6LGC4571R Ca31i7GnALsdqsTkYSevtEX43HmODu3dPSbEK5fcd9j16mS6ud4ccLtnkmlt3NPecYOO 4Hqhd1MXE5aI2exdiUmjd6wZu3/K+xjeQAtVpMxmZt6AzBqgtn8MHynzbTUErzNN8/qL ZFgVbAkptiN+IBZvOlGaMn0DHnm7aETVdyCfvllJmcI2t9wMysvnU7LDjUrWvDMbZhl2 a/96Jdq4zPYq4kmBGufInLOBW340h895tE/36SAjI+6IilNyClnIrNcKaNAk3cgfc1NH 8xPA== X-Gm-Message-State: ACgBeo0nB6G+PtqThWzWOSi5sT/qHIPyk8Rr7EPiRwDg3kV5QHp1k89l HmbNGicBJdgUKOyKSb5eVi8= X-Google-Smtp-Source: AA6agR7t4d4wBvemiXV1c4PYMmiLY+E7MGgKVGYQWEed3vl6FoQt/4Qb9o6v1ma45170ieuSuZvKSw== X-Received: by 2002:a05:6a00:1312:b0:536:fefd:e64a with SMTP id j18-20020a056a00131200b00536fefde64amr17171773pfu.26.1662785745092; Fri, 09 Sep 2022 21:55:45 -0700 (PDT) Original-Received: from localhost ([1.83.154.15]) by smtp.gmail.com with ESMTPSA id h15-20020a170902f54f00b00172f1d0825esm1333284plf.113.2022.09.09.21.55.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Sep 2022 21:55:44 -0700 (PDT) In-Reply-To: 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:242059 Archived-At: Stefan Kangas writes: > I know very little about this area of Emacs, but is there any reason why > we couldn't just (try to) make `char-displayable-p' more accurate? > > I'm not asking for a perfect solution, but even just making it a bit > better might be a step forward. >From the docstring: >> On a multi-font display, the test is only whether there is an >> appropriate font from the selected frame's fontset to display >> CHAR's charset in general. Since fonts may be specified on a >> per-character basis, this may not be accurate. The actual font used to display char in specific buffer at specific position may depend on various buffer-local settings, property inheritance, and fontification (possibly modified by user). As Eli pointed, the most accurate way to check if character can be displayed involves trying to insert it first, letting the display engine do its job, and checking what is the result. -- 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