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: Fri, 09 Sep 2022 21:25:35 +0800 Message-ID: <87v8pw1xyo.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4849"; mail-complaints-to="usenet@ciao.gmane.io" To: 57693@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 09 15:26:03 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 1oWe1D-00013j-GO for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 09 Sep 2022 15:26:03 +0200 Original-Received: from localhost ([::1]:38834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWe1C-0005St-BM for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 09 Sep 2022 09:26:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWe0F-0005IH-Pu for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2022 09:25:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44170) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWe0E-0007bK-IJ for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2022 09:25:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oWe0E-0008KU-5R for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2022 09:25: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: Fri, 09 Sep 2022 13:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57693 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166272989231993 (code B ref -1); Fri, 09 Sep 2022 13:25:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Sep 2022 13:24:52 +0000 Original-Received: from localhost ([127.0.0.1]:32869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWe03-0008Jx-TG for submit@debbugs.gnu.org; Fri, 09 Sep 2022 09:24:52 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:43092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWdzx-0008Jk-Il for submit@debbugs.gnu.org; Fri, 09 Sep 2022 09:24:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWdzx-00051j-Dx for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2022 09:24:45 -0400 Original-Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]:42909) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWdzv-0007Ya-OK for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2022 09:24:45 -0400 Original-Received: by mail-pj1-x102c.google.com with SMTP id n65-20020a17090a5ac700b001fbb4fad865so1559163pji.1 for ; Fri, 09 Sep 2022 06:24:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date; bh=20Bh+GPwoUKlzh3LutQF1eRi+xnHUhiUSLDfBd2XS+Y=; b=VQ7DUlb6UXWS0QDULy3S9CG3whDcjIKnp0ByNyz/MOuHBOFb01mgQS0jjegriTbAEk zVXzdmFZouGA/MI230Kuq7wtPOXfexzwO+NQGZ13oB2EsN1niegw+Gwj5GH37F+lbn/c b6og8Zm6WH+eGyDVYBStKwUx/a/b+0EZ3py0i42NGoLoLSZfAM3mttfPMuLs5vyn09/n 1D5m9GwFE6s4IHJ1sB281UDxSkskYgvnaBsLNnfo/2mSz3+R9k2cEol2aZXGLDtbgAuO AwVmEl7xn5ODcCDVITFQnjYHmWw72v+ucn3juD5f9QQOw6MNaz3vvGgSUiAh+cspEZga GIDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date; bh=20Bh+GPwoUKlzh3LutQF1eRi+xnHUhiUSLDfBd2XS+Y=; b=2PWjoHa2GQ0/6ZeUy0Tof67oDwZvtNSaZOUrIrRORyq8444Y7l9Wn5yNhrPiID2zep L84qHK1aF1vl5f9seraOUoBf7fjrzELGTMUXTEqAO7ZfFQkb7Fw0EddYdy1w7LZtk1Vo 4jt4NCdYeywWx5l/zHfEbMO7Ma9dd4BanIP+P45JhNsCs1PrORRwRcJj6rnBSyejIZT3 rTdQOngaHWVkft6KX7/wDoLxpmXZXN1uGJCnqL36r6HXeD1k5Ku/XFkU8834eIt9qbxF n2i0wcLuTLoRuhBzIMeAOS8ADBvC7vkVL0VZgNqIT/o4fmU2J48JwlO2kCVkuwvWfYEj pZYA== X-Gm-Message-State: ACgBeo3PLFMTEmlZYFqQYUZAN7IspgV9UUcRVPDVnTxBC0RGKGRG6wNz AA31A5HVU86Mdzw0516+zBrkVu0rktw= X-Google-Smtp-Source: AA6agR6etUl5p3sbwM2CVYAuGHJlDsHZOlQi7X/vNE7BJq/v0eo+u3r0oqR7MSO35qN9YDFNhkISgw== X-Received: by 2002:a17:902:e312:b0:176:9348:1f6e with SMTP id q18-20020a170902e31200b0017693481f6emr13911316plc.14.1662729882098; Fri, 09 Sep 2022 06:24:42 -0700 (PDT) Original-Received: from localhost ([2409:8a70:2b2:5800:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id x1-20020aa79561000000b0053e22fc5b4fsm578361pfq.0.2022.09.09.06.24.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Sep 2022 06:24:41 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102c.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:241973 Archived-At: Hello, In Org, we have recently had a need to check if a Unicode character can be displayed in buffer. We used the following: (... (if (and (display-graphic-p) (char-displayable-p ?=E2=AD=A0) (char-displayable-p ?=E2=94=80)) "=E2=AD=A0 now =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80" "now - - - - - - - - - - - - - - - - - - - - - - - - -") ...) However, char-displayable-p returned false-positive for one user: https://list.orgmode.org/orgmode/87mtddhprr.fsf@localhost/=20 False-positives are indeed not unexpected in char-displayable-p; just as its docstring warns. However, I am now wondering if there is some more accurate way to know if a character can be actually displayed on buffer or not. --=20 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