From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#39799: 28.0.50; Most emoji sequences =?UTF-8?Q?don=E2=80=99t?= render correctly Date: Fri, 28 Feb 2020 18:19:10 +0200 Message-ID: <83h7zafzwh.fsf@gnu.org> References: <83lfongp4p.fsf@gnu.org> <835zfrglu5.fsf@gnu.org> <83wo86g8pg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="39573"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 39799@debbugs.gnu.org, mfabian@redhat.com To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 28 17:20:15 2020 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 1j7iN5-000ADL-93 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 Feb 2020 17:20:15 +0100 Original-Received: from localhost ([::1]:49620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7iN4-0004bl-Bi for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 Feb 2020 11:20:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53759) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7iMt-0004be-Qi for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2020 11:20:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7iMs-0003Z6-On for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2020 11:20:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55964) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j7iMs-0003Z0-LA for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2020 11:20:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j7iMs-0001Dq-GP for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2020 11:20:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Feb 2020 16:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39799 X-GNU-PR-Package: emacs Original-Received: via spool by 39799-submit@debbugs.gnu.org id=B39799.15829067734633 (code B ref 39799); Fri, 28 Feb 2020 16:20:02 +0000 Original-Received: (at 39799) by debbugs.gnu.org; 28 Feb 2020 16:19:33 +0000 Original-Received: from localhost ([127.0.0.1]:33704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7iMO-0001Ce-MR for submit@debbugs.gnu.org; Fri, 28 Feb 2020 11:19:32 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7iMN-0001CQ-10 for 39799@debbugs.gnu.org; Fri, 28 Feb 2020 11:19:31 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j7iMH-0002dQ-Ti; Fri, 28 Feb 2020 11:19:25 -0500 Original-Received: from [176.228.60.248] (port=4332 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j7iMG-0002yZ-JG; Fri, 28 Feb 2020 11:19:25 -0500 In-reply-to: (message from Robert Pluim on Fri, 28 Feb 2020 15:14:01 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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" Xref: news.gmane.io gmane.emacs.bugs:176591 Archived-At: > From: Robert Pluim > Cc: Glenn Morris , mfabian@redhat.com, 39799@debbugs.gnu.org > Date: Fri, 28 Feb 2020 15:14:01 +0100 > > >> It matches forward off the first char, so the > >> composition-function-table entries all have '0' as the number of chars > >> to match. Would it be better to match backwards? > > Eli> I don't think matching backwards is better in general. Did you have a > Eli> reason for thinking it was? > > I thought I saw a comment in composite.c that says matching is done > backward, but I see that itʼs done forwards as well. Btw, it sometimes _can_ be beneficial to use backward matching: if it makes the size of composition-function-table smaller. Since composition-function-table is a char-table, and char-tables allocate sub-tables only if needed, you can conserve memory (and thus make Emacs's memory footprint smaller) and faster (because 'aref' will llok up values in a char-table faster) by setting a smaller number of slots. For example, if the 2nd character of an Emoji sequence was always one specific character, or a small set of characters, you could set only the slots of those few characters, which would make the char-table smaller. OTOH, if that would yield many different composition rules in the list of rules for those few characters, redisplay could become slower, because it generally examines the rules one by one until it finds an appropriate one. So the winning setup of composition-function-table is the one that sets the smallest number of slots, but still keeps the lists of rules for those slots short. And note that setting the same rule for a range of codepoints generally uses up only one slot in the char-table, so rules that can be generalized to cover many characters are preferable.