From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#51012: 29.0.50; Problems with emojis and vertical-motion Date: Mon, 04 Oct 2021 18:43:53 +0200 Message-ID: <87h7dwzqnq.fsf@gmail.com> References: <87czokde8t.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12351"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51012@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 04 18:48:10 2021 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 1mXR8K-000328-8T for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Oct 2021 18:48:08 +0200 Original-Received: from localhost ([::1]:55304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXR8I-0003Wa-TD for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Oct 2021 12:48:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57654) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXR5K-00016Z-9A for bug-gnu-emacs@gnu.org; Mon, 04 Oct 2021 12:45:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54897) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mXR5J-0004sR-Vv for bug-gnu-emacs@gnu.org; Mon, 04 Oct 2021 12:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mXR5J-00036J-Rg for bug-gnu-emacs@gnu.org; Mon, 04 Oct 2021 12:45:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Oct 2021 16:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51012 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.163336585011843 (code B ref -1); Mon, 04 Oct 2021 16:45:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Oct 2021 16:44:10 +0000 Original-Received: from localhost ([127.0.0.1]:38210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXR4T-00034w-R6 for submit@debbugs.gnu.org; Mon, 04 Oct 2021 12:44:10 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:55168) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXR4S-00034p-6o for submit@debbugs.gnu.org; Mon, 04 Oct 2021 12:44:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXR4R-0000u4-Vz for bug-gnu-emacs@gnu.org; Mon, 04 Oct 2021 12:44:08 -0400 Original-Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:43626) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mXR4Q-00047D-Hn for bug-gnu-emacs@gnu.org; Mon, 04 Oct 2021 12:44:07 -0400 Original-Received: by mail-wm1-x32d.google.com with SMTP id a131-20020a1c7f89000000b0030d4c90fa87so489334wmd.2 for ; Mon, 04 Oct 2021 09:44:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=loJPMqlErWWzwaKbDQAd3B8UVgw72oF8sB6c/VwidzU=; b=QJIyZcIWmXhwcCDETbawVLTipHk4VSYtBXeffHIr0bTBXYNqBz9SjE+JudSc9BxCtg BoqPI+F7fgd/yqlfUirnl7K6OEET6k8XH8qQj36IB/+kUCSAzrlkAnfYPg5l08MbMQ6g wapGcWg2K6SY5d/HoKVPhRYqxDyPUx1oJgEiODKCttko+tWN6bxQRWQAa0svszOUT46H R33XFuUio462tuN4TMmVUwpynYkOjwC86vAh81QD00LRzOvogm0+1I63EjXAXG31oP1L RqZrsQ4sH5eKfLrXeZaYaHG5SxQcz5CVv4xxVzJcPerypSjPrn5s39JYmZAty/uue6+P Eouw== 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:mime-version:content-transfer-encoding; bh=loJPMqlErWWzwaKbDQAd3B8UVgw72oF8sB6c/VwidzU=; b=esnOdYn/PIiuTwn1TNabUDLXapl+hump1495HsfSBQYJmu4WWAtMRms/mgqbqvdXVb btj3ME6zSSyW1m17NNGMfnQHA2zMOiBKJoqw6gadzGOQFG6deHWBMEJtzRPkwRJbyH9C AafW8nyQWuAUiQ5MfmXGLxnb8xN17upQlhVtiFv3XhjhR0VFP7ThQdrCAx68zrhZcS1/ 6cwGg8U9YK6CMSM13B+rsrA5sJw1YTH20NwK1ARLTLA9Dr/MN+4zTAM0P8rV2tg2H88p jGAd9X+/zRZ08wUHhZri49qfRmjsuPqCW8X9jdg/UzoeNWQ5FO7KlrDlUoYuta/cVf1I bU8Q== X-Gm-Message-State: AOAM532tpmtMEPYUiYrnAO8tnHJM/qS9Dqmi//iQnYwcRwX0RDtFX/Eb bvMwtdlYehPz502zjcKj9bsAR0GhBKM= X-Google-Smtp-Source: ABdhPJz0ulzG4ZIYWsyM+NMC8k2LjfES8g0JFgVNtGycNi9Jya7OGGRVjFCsU9PPn81/ELNyD/L+zg== X-Received: by 2002:a1c:a9d3:: with SMTP id s202mr10873054wme.128.1633365844415; Mon, 04 Oct 2021 09:44:04 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id u2sm14723713wrr.35.2021.10.04.09.44.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Oct 2021 09:44:03 -0700 (PDT) In-Reply-To: <87czokde8t.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 04 Oct 2021 17:02:58 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=rpluim@gmail.com; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:216369 Archived-At: >>>>> On Mon, 04 Oct 2021 17:02:58 +0200, Lars Ingebrigtsen said: Lars> The following signals an error: Lars> (with-temp-buffer Lars> (insert "=F0=9F=8F=B3=EF=B8=8F=E2=80=8D=F0=9F=8C=88") Lars> (vertical-motion 1)) Lars> Args out of range: 0 Lars> In some circumstances (when edebug is in action or it's running f= rom an Lars> async callback), it'll freeze Emacs altogether, so it's not total= ly safe Lars> to eval. Lars> I'm assuming it has something to do with the new emoji stuff, but= I Lars> haven't tried to debug. Gaah. What are the three most important problems in computer science today? 1. Dependencies in code, especially when moving it 2. Off by one errors This fixes it for me: diff --git a/src/font.c b/src/font.c index 82a1dffc01..83f0f8296a 100644 --- a/src/font.c +++ b/src/font.c @@ -3918,7 +3918,7 @@ font_range (ptrdiff_t pos, ptrdiff_t pos_byte, ptrdif= f_t *limit, val =3D XCAR (val); else if (VECTORP (val)) val =3D AREF (val, 0); - font_object =3D font_for_char (face, XFIXNAT (val), pos - 1, string); + font_object =3D font_for_char (face, XFIXNAT (val), pos, string); } } =20