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: Sun, 19 Feb 2023 12:08:48 +0000

Eli Zaretskii <eliz@gnu.org> writes:

>> or within text-properties
>
> Only if really needed.  Adding a text property for this will
> complicate the display code which handles this, so I'd rather we
> didn't unless we have a _very_ good reason.  And I don't see such a
> reason, since we are talking about characters that cannot be displayed
> by any available font, something that is unlikely to be limited to
> just a small region of text.

The replacement may only make sense in particular context. For example,
mode line indicator for newlines can be ?: or ?\ or ?/. If we want to
display a more intuitive Unicode char like ?⏎ or ?‸, it does not make
sense to replace all the ?⏎ in buffer with ?:.

Of course, even just having (2) will be an improvement.

>> 2. Making (set-char-table-range glyphless-char-display ?A ?B) work on
>>    GUI as well, not just in terminals
>
> You mean (set-char-table-range glyphless-char-display ?A "B"), I
> presume (the value cannot be a character, only a string).

Yes.

>> 3. Making the rules recursive.
>
> What for?  It's a very significant complication, and I cannot see the
> purpose.  The string value _must_ use only ASCII characters, precisely
> _because_ we want to be sure no recursion will be needed.

Makes sense. I was thinking about multiple alternatives from more fancy
to less fancy down to fallback ASCII. This feature is of minor
importance.

BTW, if we need the replacement of character sequences, is
`composition-function-table' supposed to be used? It is not
well-described in the manual and I only know it from
https://www.masteringemacs.org/article/unicode-ligatures-color-emoji

-- 
Ihor Radchenko // yantar92,
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]