emacs-devel
[Top][All Lists]
Advanced

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

Re: describe-char on emoji sequences


From: T.V Raman
Subject: Re: describe-char on emoji sequences
Date: Wed, 27 Oct 2021 10:30:18 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:


If we could do that, that would be awesome.

I know I'm a minority use case, but that type of reverse translation
from a sequence of glyphs to meaningful description would potentially
help blind and low-vision users of Emacs better comprehend things on
microblogging sites like twitter where emojis get used heavily.
> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> It's just a sequence of Unicode code points, surely?  (And the help
>>> buffer lists them, but not in the format needed to enter them.)
>>
>> How can Emacs know that there is a special command that can be used to
>> insert this entire sequence of codepoints in one go?
>
> There isn't (well, there is now with emoji-insert), but...
>
> Take ?7?1?1?1:
>
>              to input: type "C-x 8 RET 26a0" or "C-x 8 RET WARNING SIGN"
>           buffer code: #xE2 #x9A #xA0
>             file code: #xE2 #x9A #xA0 (encoded by coding system utf-8-emacs)
>               display: composed to form "?7?1?1?1" (see below)
>
> Composed with the following character(s) "?1?1" using this font:
>   ftcrhb:-GOOG-Noto Color Emoji-medium-normal-normal-*-19-*-*-*-m-0-iso10646-1
> by these glyphs:
>   [0 1 9888 112 24 0 24 18 5 nil]
> with these character(s):
>   ?1?1 (#xfe0f) VARIATION SELECTOR-16
>
> If you insert
>
> C-x 8 RET WARNING SIGN and then C-x 8 RET VARIATION SELECTOR-16 you
> indeed get:
>
> ?7?1?1?1
>
> So 
>
>              to input: type "C-x 8 RET 26a0" or "C-x 8 RET WARNING SIGN"
>
> could just be expanded to include all the code points in the
> decomposition.  Of course, with some of these sequences (with five code
> points), doing this is completely impractical, so perhaps it's not worth
> doing. 
>
>> Because it doesn't necessarily have a name.  This is a general-purpose
>> command, it is capable of describing any result of any character
>> composition, including those which yield more than one glyph and
>> glyphs that have no name.  (Technically, the correct terminology is
>> "grapheme cluster", not "glyph".)
>
> I had a feeling that "glyph" wasn't correct.  :-)
>
>> We could, of course, program describe-char to give special treatment
>> to glyphs produced from the Emoji sequences, but that has to be coded
>> explicitly and specially for Emoji, because I don't see how you can do
>> that for an arbitrary composition.
>
> Yes, that's what I was thinking -- if we had a table that goes from
> grapheme cluster to name (and those would only be filled in for emojis),
> then we could output that name.  (emoji.el creates such a table, but I
> don't think we'd want to load that from this command, so the table
> should perhaps be created in a more central location.)
>
> The point of this is that it's not always clear what an emoji is trying
> to express.  For instance, if somebody writes you a message about 
> ?9?8?9?9?6?8?7?5?1?1,
> it'd be nice if Emacs could tell you that it's a "man pilot".

-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
?7?4 Id: kg:/m/0285kf1  ?0?8



reply via email to

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