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 16:17:06 +0800 Message-ID: <87edwjy77h.fsf@localhost> References: <87v8pw1xyo.fsf@localhost> <83a678d5w6.fsf@gnu.org> <878rmr25tk.fsf@localhost> <83czc3bvbg.fsf@gnu.org> <87y1urybt6.fsf@localhost> <837d2bbr2s.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="27997"; 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 10:17:32 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 1oWvgC-00074Z-8M for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Sep 2022 10:17:32 +0200 Original-Received: from localhost ([::1]:51528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWvgA-0004XO-Vv for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Sep 2022 04:17:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWvfj-0004WW-3Q for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 04:17:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47842) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWvfi-0003U8-9M for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 04:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oWvfh-0003k0-Qs for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 04:17: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 08:17: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.166279778314328 (code B ref 57693); Sat, 10 Sep 2022 08:17:01 +0000 Original-Received: (at 57693) by debbugs.gnu.org; 10 Sep 2022 08:16:23 +0000 Original-Received: from localhost ([127.0.0.1]:36541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWvf4-0003j1-Uf for submit@debbugs.gnu.org; Sat, 10 Sep 2022 04:16:23 -0400 Original-Received: from mail-pg1-f172.google.com ([209.85.215.172]:38667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWvf0-0003in-Ps for 57693@debbugs.gnu.org; Sat, 10 Sep 2022 04:16:21 -0400 Original-Received: by mail-pg1-f172.google.com with SMTP id t70so3632419pgc.5 for <57693@debbugs.gnu.org>; Sat, 10 Sep 2022 01:16:18 -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=HQGOQ+bM/XUbA2XnYl3qYSEGa8KGWSeoIYzbTbPkCWk=; b=GdNbvvAJBEIhWMZVDueLfhqH4pANlDiEcialCwddMk8dRRNjicw9froPQ+cJV9KRzh 3QyfzxZa3jN5bE4CbOva6riFCEsImP5OUZU6K9AuQiowvi5AxGnP/JsL6UIfwW4v+p/J /XOuKiRrIj9W0LynpEPMw5rCm2wqd/jG1EU0NlFcOSRTxvJ/xTOux4pi+EtG1U7jW2Lo rYMJjHy00mAxYoBzNRHzI3RjfURKJyqXdMNvNB2Fmio7nbLOSITmbvZtetez0tLXtOsm RpcH9OhW2pOlkzTVPJFEpukLbJzKrfxVh1+CUnheEJLwElh2wCwcsEcT9QL89q5lxDp+ MJaQ== 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=HQGOQ+bM/XUbA2XnYl3qYSEGa8KGWSeoIYzbTbPkCWk=; b=TZWVil6TMQdueMeHMN5npbK1of9s4UMVLui3xHRp/b99Zo/yd9bM38r3HJi8KeFceQ 8IVk8myqhin7pwg8rbB4SeqG/d+MCanAfgvxtUp8MI6zkFyzw7uyp/KSlt2zrC8xfCP0 3Dv51ETwawyB0xtUE4cx+BHaz/JbspeDuLwfrd9DzIBC1PHOyuqs+hszCLGJwFtZ+o0f pCS0lPSLYXo6jEQPL2Znd4UIgEGfsBeKPsG5Q3whKfcSjRcfkXylEbOTc52wsG6/K8Dv V005UzN4dIUbze5GG8YNyqsCADrPCZoK1KqnmfUXbxV1bye10xCaGxEMvLrcYWwiLLl9 qk7A== X-Gm-Message-State: ACgBeo0Lblf/Dwtm+0uD13oESp3uvnMCt+3LOndFuOCCzOPS7H8YeqX3 7cl/6D4mIEbfXRsO0JrPfgPcPP1GjZdIoQ== X-Google-Smtp-Source: AA6agR6mfJS2UX3fADDEWauVxZ89Rbo0jF9o0zZJhPP9jU+b8b8kwbXM1//WiYkn/IjOyK/mpioOBw== X-Received: by 2002:aa7:9d9a:0:b0:53e:8bc5:afb7 with SMTP id f26-20020aa79d9a000000b0053e8bc5afb7mr15562656pfq.54.1662797772855; Sat, 10 Sep 2022 01:16:12 -0700 (PDT) Original-Received: from localhost ([1.83.154.15]) by smtp.gmail.com with ESMTPSA id d8-20020a17090a6a4800b001fd7e56da4csm1539683pjm.39.2022.09.10.01.16.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Sep 2022 01:16:12 -0700 (PDT) In-Reply-To: <837d2bbr2s.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:242088 Archived-At: Eli Zaretskii writes: >> 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. Yup. And I am asking if there is such test exposed to Elisp. Display code certainly knows when some character cannot be displayed and must be replaced by its hex code. > 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. This is not great. I am really hoping that we can make nicer defaults when possible and only fallback to something robust when fancy version cannot be used. I was hoping that Org can do the following: 1. Allow org-agenda-current-time-string to be a list of ("fancy string" "fallback") 2. When actually inserting org-agenda-current-time-string to buffer, test if "fancy string" can be displayed and if not insert the "fallback". The only question is how to test whether all the chars in the inserted string are displayed. -- 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