bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57693: 29.0.50; Is there a more reliable version of `char-displayabl


From: Ihor Radchenko
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

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 ?⭠)
           (char-displayable-p ?─))
      "⭠ now ───────────────────────────────────────────────"
    "now - - - - - - - - - - - - - - - - - - - - - - - - -")
...)

However, char-displayable-p returned false-positive for one user:
https://list.orgmode.org/orgmode/87mtddhprr.fsf@localhost/ 

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.

-- 
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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]