From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63731: [PATCH] Support Emoji Variation Sequence 16 (FE0F) where appropriate Date: Fri, 26 May 2023 15:06:40 +0300 Message-ID: <83v8gfjnzj.fsf@gnu.org> References: <87a5xrzsph.fsf@stebalien.com> <83pm6nlhll.fsf@gnu.org> <87v8gfmqyt.fsf@gmail.com> <83ilcflbua.fsf@gnu.org> <87mt1rmjjg.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24445"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63731@debbugs.gnu.org, steven@stebalien.com To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 26 14:07:30 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1q2WED-00067m-Od for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 May 2023 14:07:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2WDo-0003p2-Vn; Fri, 26 May 2023 08:07:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2WDm-0003oP-HN for bug-gnu-emacs@gnu.org; Fri, 26 May 2023 08:07:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q2WDm-00042V-7Z for bug-gnu-emacs@gnu.org; Fri, 26 May 2023 08:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q2WDl-0003pv-LB for bug-gnu-emacs@gnu.org; Fri, 26 May 2023 08:07:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 May 2023 12:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63731 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 63731-submit@debbugs.gnu.org id=B63731.168510279614707 (code B ref 63731); Fri, 26 May 2023 12:07:01 +0000 Original-Received: (at 63731) by debbugs.gnu.org; 26 May 2023 12:06:36 +0000 Original-Received: from localhost ([127.0.0.1]:49036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2WDM-0003p9-9G for submit@debbugs.gnu.org; Fri, 26 May 2023 08:06:36 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35094) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2WDK-0003ou-OD for 63731@debbugs.gnu.org; Fri, 26 May 2023 08:06:35 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2WDC-0003vs-TG; Fri, 26 May 2023 08:06:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=JIZZWpbltVAUlV31xK/wp7Lv6RPnXfSAoVPrv/VEOkU=; b=TFNqs96Dqv5oXsRExWRj WFzSunwI69vKyONaTsdhXC+kKmvVd6DsaPdy010y72vzNiJ+3jrBEJNjo3MlIIcutUbKiei3mEEna wHZqGG6wPzGJHDE0l+L/9/rlykYS0mAtpGPJ8OaIYs5HFTzA+DSDmIUQBG5fnKiyPeoOXb5MQBKSa SrXgR5u1TcqRuVaJFJmoBcYwpvP4P7bR+YAKAU8QMmy4b5p7Vx9V1aXaLb384VGKtR4h4TE9Oc7kG +o7rvWTMqWXoreD2uL/4TqrNV2vmbz63AHpJwlr9g1CuDUSeoYWVG5YcMvw5ZH7oHB6iwe9oFkduY B50o0i5zb9Zw2A==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2WCw-0005Pg-SA; Fri, 26 May 2023 08:06:26 -0400 In-Reply-To: <87mt1rmjjg.fsf@gmail.com> (message from Robert Pluim on Fri, 26 May 2023 13:14:27 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262432 Archived-At: > From: Robert Pluim > Cc: steven@stebalien.com, 63731@debbugs.gnu.org > Date: Fri, 26 May 2023 13:14:27 +0200 > > >> Although the following is less invasive: > >> > >> diff --git a/lisp/composite.el b/lisp/composite.el > >> index fb8b76114f4..333428f008a 100644 > >> --- a/lisp/composite.el > >> +++ b/lisp/composite.el > >> @@ -762,6 +762,11 @@ compose-gstring-for-dotted-circle > >> (if (memq val '(Mn Mc Me)) > >> (set-char-table-range composition-function-table key elt))) > >> unicode-category-table)) > >> + ;; for Emoji presentation selector > >> + (set-char-table-range > >> + composition-function-table > >> + #xFE0F > >> + `([,(purecopy "\\c.\ufe0f") 1 compose-gstring-for-graphic])) > >> ;; for dotted-circle > >> (aset composition-function-table #x25CC > >> `([,(purecopy ".\\c^") 0 compose-gstring-for-dotted-circle])) > > Eli> Can you please explain why the current setup doesn't work in this > Eli> case, even though "C-u C-x =" says the composition was done? And how > Eli> the above patch fixes that? > > Composition is done for 1f44d+fe0f, but I suspect that with the current > setup, composition is called again for FE0F, which results in the box > glyph. With the second patch we will only do backwards looking composition > for FE0F OK, then I think we should install this on the emacs-29 branch. > Youʼre right, thereʼs no forward looking regexp, only a backwards one > and a no-regexp. But itʼs undeniable that: > > [nil 0 compose-gstring-for-graphic] > > causes the issue. Iʼve never been clear on the semantics of that. It has special support in compose-gstring-for-graphic, see there. The doc string also says a few words about that. We use this, e.g., in describe-char display, where we sometimes need to show a single combining character with no base character to combine it with. I think this is only relevant for accents and other such combining characters, not for VS-n. What does this issue mean for the other VS-n characters, though? Should we perhaps install something similar for them as well? Thanks.