From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Will Bush Newsgroups: gmane.emacs.bugs Subject: bug#40733: 28.0.50; Emacs locks up on paste (yank) of unicode characters Date: Tue, 21 Apr 2020 07:19:56 -0500 Message-ID: References: <87mu756aen.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000046563a05a3cc0912" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="45735"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "Basil L. Contovounesios" , 40733@debbugs.gnu.org To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 21 14:36:32 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 1jQs8b-000BkZ-QZ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Apr 2020 14:36:29 +0200 Original-Received: from localhost ([::1]:57330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQs8a-0001XJ-RH for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Apr 2020 08:36:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60030) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQrtf-0003ng-15 for bug-gnu-emacs@gnu.org; Tue, 21 Apr 2020 08:21:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jQrte-0002Ej-99 for bug-gnu-emacs@gnu.org; Tue, 21 Apr 2020 08:21:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37568) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jQrtd-0002E9-SI for bug-gnu-emacs@gnu.org; Tue, 21 Apr 2020 08:21:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jQrtd-0008Vd-LU for bug-gnu-emacs@gnu.org; Tue, 21 Apr 2020 08:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Will Bush Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Apr 2020 12:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40733 X-GNU-PR-Package: emacs Original-Received: via spool by 40733-submit@debbugs.gnu.org id=B40733.158747162832653 (code B ref 40733); Tue, 21 Apr 2020 12:21:01 +0000 Original-Received: (at 40733) by debbugs.gnu.org; 21 Apr 2020 12:20:28 +0000 Original-Received: from localhost ([127.0.0.1]:49114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQrst-0008UM-JG for submit@debbugs.gnu.org; Tue, 21 Apr 2020 08:20:28 -0400 Original-Received: from mail-lj1-f194.google.com ([209.85.208.194]:39281) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQrss-0008UA-5v for 40733@debbugs.gnu.org; Tue, 21 Apr 2020 08:20:15 -0400 Original-Received: by mail-lj1-f194.google.com with SMTP id u6so13754942ljl.6 for <40733@debbugs.gnu.org>; Tue, 21 Apr 2020 05:20:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hMjo7CD6iEPJB13DozGtNjMDMGuQih09gTK+tv1MYgs=; b=ohVfvcxKylJzJHZ4VZkk34zbl8uh7uy3lPXQ++IG0P765G9Z4dsc/s2Owddr8meo3Y DTj0h+lD77a0/v/e5seEgrB3rKIu33pt5Zp7MfH39XgzH1VZnktKEcBAk2H0mFbgtGB3 LRe8vu8sH/+vKt0hz56taUKdflSlN7gUHfAmrV1ykO6ziKMDhnuyFQLk2ulSQjf30Kb4 QjLCk7Pl4eQSVDn0wMcWy7GFo4cOy8PMnWmekc9qQ7y19D1RaofSitBDc4q9PEZzJn2G 3cIU0GGW75zrEy4+2Ekiw0AD0to/fQGSfs49MFeIzMLt3/KVFsRNCcAlXVFijngWPUYJ 3XCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hMjo7CD6iEPJB13DozGtNjMDMGuQih09gTK+tv1MYgs=; b=HvWaYiVjfMBq8qe6ibpBwyg5sxtyF/gvgye0fBeuDkMqIx1MhDRnU2jLCd4ARDaOK+ rnOeyckQU2OuQttY1vMmbFp+8stt6lY3A4fAVOYSgxQQs9009O1zHff/jKQvZdRvpfRu bppJc2OFrZjwDgEISXwtyZ5KOXO1V8ostNlzDZQWLSyi+YxBKpdh0lUMdEy6R62QXy+/ +gt0qVOuNEhNxOlijS2sv5YlTRn2TOQb6xaLAK2behKxMUS9Py5GxrqF4aZQjmXSgAQ5 ZQffuHw46h3TbHFINBjiyKeR5lPo5Y9Kqq5ndZdMS2X+yggLsD+lDxKIIn+CEzex2JYY 62YQ== X-Gm-Message-State: AGi0PuYPcydYJFyDuwEsDxPy8TKCasd2s0LeSl1X+cCvdvPYZ2xq+yAr mtH2wbUN522LziEXhwgP8nj8JTOXJHD0k7ZTo4Q= X-Google-Smtp-Source: APiQypLhCZZsbbW/qqOwbmHvihmjSj2Xh1mlaz4dg2myDWw9iwm8FIM6/tjmg2LZKHqw7zfAxyrNaCuHiw+q/DuRec0= X-Received: by 2002:a2e:9b42:: with SMTP id o2mr10099551ljj.255.1587471607812; Tue, 21 Apr 2020 05:20:07 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:178746 Archived-At: --00000000000046563a05a3cc0912 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ok I've made some progress on this issue. I was playing around with my fonts: https://github.com/willbush/system/blob/085e4c547f0bd84729f12f82b920d867d05= e1591/nixos/fonts.nix#L7 I was curious how many fonts I would have (using `fc-list | wc -l`) if I removed them all from that list. After removing them all, I checked my email in Gmail using Firefox and noticed the `=EF=B8=B5` was rendering properly. Then I tr= ied pasting it into Emacs and lo and behold no lag issue! So I did a binary search through my font list commenting / uncommenting them and applying the changes with `sudo nixos rebuild switch` (as one does in NixOS), and found google-fonts is causing the issue. I verified it several times. When I remove google-fonts, Firefox renders th= e character fine and Emacs yanks it without issue. When I add google-fonts back Firefox doesn't render the character and Emacs yanking it lags like crazy. The google-fonts Nix expression is here: https://github.com/NixOS/nixpkgs/blob/master/pkgs/data/fonts/google-fonts/d= efault.nix I tried Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.17) (A version that just happens to be in nixpkgs) again to see what it would do when yanking that character with and without google-fonts installed. With google-fonts installed it doesn't have latency issues, but it inserts an empty whitespace looking character (wider than a normal space). Without google-fonts installed, it renders the character fine with no latency. So I suspect even if there is an issue with google-fonts, there's still a regression in Emacs since 26.3. I'll try newer versions of Emacs later to try to narrow the version gap between 26.3 and 28.0.50. Perhaps someone can try to reproduce the issue by installing google-fonts (note the git rev used in default.nix above is f113126dc4b9b1473d9354a86129c9d7b837aa1a for https://github.com/google/fonts). On Tue, Apr 21, 2020 at 5:01 AM Robert Pluim wrote: > >>>>> On Mon, 20 Apr 2020 23:48:48 +0100, "Basil L. Contovounesios" < > contovob@tcd.ie> said: > > Basil> Will Bush writes: > >> Configured using: > >> 'configure > >> > --prefix=3D/nix/store/2142cl219v49czkkrrddh3jy3415nax0-emacs-git-20200420= .0 > >> --disable-build-details --with-modules --with-x-toolkit=3Dgtk3 > --with-xft > Basil> > ^^^^^^^^^^ > > Basil> I know next to nothing about fonts, and I'm sure others will > correct me, > Basil> but etc/NEWS has the following to say: > > Basil> ** 'configure' now warns about building with libXft support. > Basil> libXft is unmaintained, and causes a number of problems with > modern > Basil> fonts including but not limited to crashes; support for it > may be > Basil> removed in a future version of Emacs. Please consider using > Basil> Cairo + HarfBuzz instead. > > Basil> I don't know if it's related (and the 'C-u C-x =3D' output in > your other > Basil> message shows the ftcrhb backend in use), but perhaps you can > try > Basil> building --without-xft to see if it makes any difference. > > If it does that=CA=BCs a bug, since we implicitly do '--with-cairo' now. > > Robert > --00000000000046563a05a3cc0912 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ok I've made some progress on this is= sue.

I was playing around with my fonts:

https://github.com/willbush/system/blob/085e4c547f0bd84729= f12f82b920d867d05e1591/nixos/fonts.nix#L7

I was curious how many= fonts I would have (using `fc-list | wc -l`) if I removed
them all from= that list. After removing them all, I checked my email in Gmail
using F= irefox and noticed the `=EF=B8=B5` was rendering properly. Then I tried pas= ting it
into Emacs and lo and behold no lag issue!

So I did a bin= ary search through my font list commenting / uncommenting them and
apply= ing the changes with `sudo nixos rebuild switch` (as one does in NixOS),and found google-fonts is causing the issue.

I verified it several = times. When I remove google-fonts, Firefox renders the
character fine an= d Emacs yanks it without issue. When I add google-fonts back
Firefox doe= sn't render the character and Emacs yanking it lags like crazy.

= The google-fonts Nix expression is here:
https://= github.com/NixOS/nixpkgs/blob/master/pkgs/data/fonts/google-fonts/default.n= ix

I tried Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Versio= n 3.24.17) (A
version that just happens to be in nixpkgs) again to see w= hat it would do when
yanking that character with and without google-font= s installed.

With google-fonts installed it doesn't have latency= issues, but it inserts an
empty whitespace looking character (wider tha= n a normal space). Without
google-fonts installed, it renders the charac= ter fine with no latency.

So I suspect even if there is an issue wit= h google-fonts, there's still a
regression in Emacs since 26.3. I= 9;ll try newer versions of Emacs later to try to
narrow the version gap = between 26.3 and 28.0.50.

Perhaps someone can try to reproduce the i= ssue by installing google-fonts (note
the git rev used in default.nix ab= ove is f113126dc4b9b1473= d9354a86129c9d7b837aa1a for htt= ps://github.com/google/fonts).
=

= On Tue, Apr 21, 2020 at 5:01 AM Robert Pluim <rpluim@gmail.com> wrote:
>>>>> On Mon, 20 Apr 2020 23:48:48= +0100, "Basil L. Contovounesios" <contovob@tcd.ie> said:

=C2=A0 =C2=A0 Basil> Will Bush <will.g.bush@gmail.com> writes:
=C2=A0 =C2=A0 >> Configured using:
=C2=A0 =C2=A0 >> 'configure
=C2=A0 =C2=A0 >> --prefix=3D/nix/store/2142cl219v49czkkrrddh3jy3415na= x0-emacs-git-20200420.0
=C2=A0 =C2=A0 >> --disable-build-details --with-modules --with-x-tool= kit=3Dgtk3 --with-xft
=C2=A0 =C2=A0 Basil>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^^^^^^^^^^

=C2=A0 =C2=A0 Basil> I know next to nothing about fonts, and I'm sur= e others will correct me,
=C2=A0 =C2=A0 Basil> but etc/NEWS has the following to say:

=C2=A0 =C2=A0 Basil>=C2=A0 =C2=A0** 'configure' now warns about = building with libXft support.
=C2=A0 =C2=A0 Basil>=C2=A0 =C2=A0libXft is unmaintained, and causes a nu= mber of problems with modern
=C2=A0 =C2=A0 Basil>=C2=A0 =C2=A0fonts including but not limited to cras= hes; support for it may be
=C2=A0 =C2=A0 Basil>=C2=A0 =C2=A0removed in a future version of Emacs.= =C2=A0 Please consider using
=C2=A0 =C2=A0 Basil>=C2=A0 =C2=A0Cairo + HarfBuzz instead.

=C2=A0 =C2=A0 Basil> I don't know if it's related (and the '= C-u C-x =3D' output in your other
=C2=A0 =C2=A0 Basil> message shows the ftcrhb backend in use), but perha= ps you can try
=C2=A0 =C2=A0 Basil> building --without-xft to see if it makes any diffe= rence.

If it does that=CA=BCs a bug, since we implicitly do '--with-cairo'= now.

Robert
--00000000000046563a05a3cc0912--