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: Sat, 10 Sep 2022 16:17:06 +0800

Eli Zaretskii <eliz@gnu.org> 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





reply via email to

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