From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: describe-char on emoji sequences Date: Wed, 27 Oct 2021 10:30:18 -0700 Message-ID: References: <87cznths5j.fsf@gnus.org> <83v91kzydh.fsf@gnu.org> <87tuh4holf.fsf@gnus.org> <822aec9d01909cecfc6c@heytings.org> <87a6iwhltf.fsf@gnus.org> <83tuh4zfg5.fsf@gnu.org> <87y26gfobr.fsf@gnus.org> <87tuh4f1ie.fsf@gnus.org> <87lf2fg44h.fsf@gnus.org> <87h7d3g2uu.fsf@gnus.org> <83bl3bybm3.fsf@gnu.org> <878ryfr9w0.fsf@gmail.com> <878ryfg07k.fsf@gnus.org> <874k93r869.fsf@gmail.com> <87r1c7d28k.fsf_-_@gnus.org> <83zgqvwpq2.fsf@gnu.org> <87mtmvd13h.fsf@gnus.org> <83a6iuwox1.fsf@gnu.org> <874k92a6j6.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=gb18030 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4545"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 27 19:37:02 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mfmrF-0000vT-57 for ged-emacs-devel@m.gmane-mx.org; Wed, 27 Oct 2021 19:37:01 +0200 Original-Received: from localhost ([::1]:46376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mfmrD-0005HK-Ml for ged-emacs-devel@m.gmane-mx.org; Wed, 27 Oct 2021 13:36:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41386) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfmkt-00060i-Lr for emacs-devel@gnu.org; Wed, 27 Oct 2021 13:30:29 -0400 Original-Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:46811) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mfmkr-00060T-CQ for emacs-devel@gnu.org; Wed, 27 Oct 2021 13:30:27 -0400 Original-Received: by mail-pj1-x102d.google.com with SMTP id lx5-20020a17090b4b0500b001a262880e99so2596448pjb.5 for ; Wed, 27 Oct 2021 10:30:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=W7EScuy2TjWKy6EClPagmW8lLj0GGd45cduCLeeOhnE=; b=MyDT6iSDt3F7+XJfmOOqyPUeq0N+/FlNQzwg9Hml5x5KIKYfNTTiZnHKLiqFfA+13r 062+NSCOxsea8U1ofazi+K4LxwjoAimYhCNJUz8Bkcu9lLz1EPZm+ihm/mCeACc7EDxA YVy0OrFb0uH8ST7jJA495y1EY0UJJbMFMjlA6OUAfGpYcbWcn7xDaS1Gvf25Og5WWrXB X1r1X2/HBVCaMDJIhGqifEdwbgUQ+wg0HmToigQ7QSGh/xxBJ9wrvFKfZRroBwdmj3hP tQ8dqvvYY3DT6aH3pnzYg+1nVy6oNYQ26z6CocqzsM1XCZL8DoSYGeCitu1rlfoQzICk TwRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=W7EScuy2TjWKy6EClPagmW8lLj0GGd45cduCLeeOhnE=; b=E0tSbnavbKaWVlmPHLm6Uh5laTRdSpOMf/Q+i9WEmOqiAXIrd6W6LGS32vYFF3E/3L hqFQktdQXcnrt767LuioFMDgLA7XexsAquKalEOZ6hRAYozv4N0aB3fk1MmYdPJyEvC0 NikBa67dI59iAS3Icm4AFVWpGcCzDR7se7I3f27CPDC9QtW3XEFH75Ge4zRhVE7m+BX5 2T6OEG4phSmBdbVRHUAXGDyE9iK7Lj+5Tz6GALDiqG+P8G2WFmh46o32zg+iQURCeaS/ /vo22V3SP9cyltlNvY9/m6dwDxeIWcwn+szAdcySCMiCUv4x3nW0GCxjoO0kGQTTI1N3 WkaA== X-Gm-Message-State: AOAM530iqSJGY1TN7AncvxSTHqGW0jHncXg9PJZgEpeQ3edh2n84g39K fBTwIUqf5kTqSYBbFoqEireX0AIwv6UjMAHS X-Google-Smtp-Source: ABdhPJwh4k8chlB73Ul9CsRhk4+4dFP9MZi+7yYPPvk+i84h+B584SQeDgsbxzOhUacVwsM6jMJ9Fg== X-Received: by 2002:a17:90a:7d11:: with SMTP id g17mr7383000pjl.150.1635355821277; Wed, 27 Oct 2021 10:30:21 -0700 (PDT) Original-Received: from raman-glaptop (c-24-4-174-65.hsd1.ca.comcast.net. [24.4.174.65]) by smtp.gmail.com with ESMTPSA id i13sm361162pgf.77.2021.10.27.10.30.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 10:30:20 -0700 (PDT) In-Reply-To: <874k92a6j6.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 27 Oct 2021 16:25:49 +0200") Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=raman@google.com; helo=mail-pj1-x102d.google.com X-Spam_score_int: -151 X-Spam_score: -15.2 X-Spam_bar: --------------- X-Spam_report: (-15.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, MIME_CHARSET_FARAWAY=2.45, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:278021 Archived-At: Lars Ingebrigtsen 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 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 =817=B21=841=841: > > 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-ema= cs) > display: composed to form "=817=B21=841=841" (see below) > > Composed with the following character(s) "=841=841" using this font: > ftcrhb:-GOOG-Noto Color Emoji-medium-normal-normal-*-19-*-*-*-m-0-iso10= 646-1 > by these glyphs: > [0 1 9888 112 24 0 24 18 5 nil] > with these character(s): > =841=841 (#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: > > =817=B21=841=841 > > So=20 > > 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.=20 > >> 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 =949=D3= 8=949=C89=816=A48=817=BC5=841=841, > it'd be nice if Emacs could tell you that it's a "man pilot". --=20 Thanks, --Raman(I Search, I Find, I Misplace, I Research) =817=A94 Id: kg:/m/0285kf1 =950=DC8