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: Eli Zaretskii
Subject: bug#57693: 29.0.50; Is there a more reliable version of `char-displayable-p'?
Date: Sat, 10 Sep 2022 10:56:27 +0300

> From: Ihor Radchenko <yantar92@gmail.com>
> Cc: 57693@debbugs.gnu.org
> Date: Sat, 10 Sep 2022 14:37:41 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> However, it is not very clear for me how to determine programmatically if
> >> given character is displayable in buffer.
> >
> > Make the char-displayable-p test at run time, I guess, i.e. when you
> > are actually about to insert it.
> 
> 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.

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.





reply via email to

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