From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Evan Moses Newsgroups: gmane.emacs.bugs Subject: bug#42522: Emacs 27: 100% CPU when setting mode-name with ligatures Date: Sat, 25 Jul 2020 14:13:17 -0700 Message-ID: References: <834kpwdscw.fsf@gnu.org> Mime-Version: 1.0 (1.0) Content-Type: multipart/alternative; boundary=Apple-Mail-82CAFE99-FF95-4323-BCE7-402044CC9121 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12892"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42522@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 26 00:01:17 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 1jzSEH-0003Fv-3a for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Jul 2020 00:01:17 +0200 Original-Received: from localhost ([::1]:58142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jzSEG-0002YW-6I for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Jul 2020 18:01:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jzSE2-0002YO-Dw for bug-gnu-emacs@gnu.org; Sat, 25 Jul 2020 18:01:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39746) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jzSE2-0003fb-3i for bug-gnu-emacs@gnu.org; Sat, 25 Jul 2020 18:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jzSE2-0004yZ-2S for bug-gnu-emacs@gnu.org; Sat, 25 Jul 2020 18:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Evan Moses Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jul 2020 22:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42522 X-GNU-PR-Package: emacs Original-Received: via spool by 42522-submit@debbugs.gnu.org id=B42522.159571440618993 (code B ref 42522); Sat, 25 Jul 2020 22:01:02 +0000 Original-Received: (at 42522) by debbugs.gnu.org; 25 Jul 2020 22:00:06 +0000 Original-Received: from localhost ([127.0.0.1]:51292 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzSD7-0004wF-As for submit@debbugs.gnu.org; Sat, 25 Jul 2020 18:00:06 -0400 Original-Received: from mail-pj1-f42.google.com ([209.85.216.42]:36629) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzRTy-0003qp-FX for 42522@debbugs.gnu.org; Sat, 25 Jul 2020 17:13:26 -0400 Original-Received: by mail-pj1-f42.google.com with SMTP id md7so7244916pjb.1 for <42522@debbugs.gnu.org>; Sat, 25 Jul 2020 14:13:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=Y5lLLQFK7KCJJLt1I3DrnXuy63uiin21hzWYWM1Fv1o=; b=Q+u6FkKGuIITyGGd7snln3oLY/4Wk9NTdqvbSdl8CFm/JEc52kUl1gOmDpdc6IdSIn H3QWmcj08n49Nv2I1YlhvIK6dfcPjOPOnnT/pWM0OLqBkIcV8fTG986N1dnWiTDyq2j4 kgsnQYCVDCnSx3dFtPVW/fnzqulspmT64+/eskFdcgVOVJbkmhpc6ZNUPjRlURO15EVk jcLsljNSkFode+wR14jo+VYuB/kvrTs6x2ACXTHTiMkvJKp8n4l+AmJNfALLtlei2K+R f6w//RI4WovI/cLOcpAwWI5MBATz+ZWgkV9bq+V1UIaTvbJb9zpj3iOKogTXS2vNxgPD 5GDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=Y5lLLQFK7KCJJLt1I3DrnXuy63uiin21hzWYWM1Fv1o=; b=ABWJEBvMNGbf6e3Vu+h4Najbt48BDAzvgDaryf0Q6UpKEW1SoJStZPphEPMX1y7L+I GX6grCkKNHuHKkBkd7hXDQjJvJlwAy9FzwqE3nQ0DvXyktLkCt50gkZWb9crNlHesQ7p 2qdPY3FUx1860hvGAPHtBIF8qZA783czT01sXJTm3bg61NjBcA3ZfakyDUok9sIGNLUt eiHXWbm7+SjbqGOtPiH1LUxgM8aVCZ4uGpEiwxHx63LBAOupQzzXXpkuXyPz51gXjI5H vcq5gLPO/Ai6jw0rOS7Xl60r7cxCVY3AdcWvQ7zMlbHz15puERpE4lmHN/2yCJXKDQhK ynsQ== X-Gm-Message-State: AOAM530rBnwhSLVoD2YyE3i3QUOOknEeHcMVd/S6N5I6WkxNKc5CV2BL bHtxjtHnXjAHvZvzsxlmICg= X-Google-Smtp-Source: ABdhPJy2yOQxY6A7RN/sNvBbQD57oebxm4NAT+CnPNbxoF64VIMMCYxGu0aUPGST2dITINJzPUnO2w== X-Received: by 2002:a17:902:d391:: with SMTP id e17mr12943581pld.219.1595711600177; Sat, 25 Jul 2020 14:13:20 -0700 (PDT) Original-Received: from [192.168.42.27] (75-101-100-168.dsl.static.fusionbroadband.com. [75.101.100.168]) by smtp.gmail.com with ESMTPSA id h1sm10063995pgn.41.2020.07.25.14.13.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 Jul 2020 14:13:19 -0700 (PDT) In-Reply-To: <834kpwdscw.fsf@gnu.org> X-Mailer: iPhone Mail (17F80) X-Mailman-Approved-At: Sat, 25 Jul 2020 18:00:04 -0400 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:183558 Archived-At: --Apple-Mail-82CAFE99-FF95-4323-BCE7-402044CC9121 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable FYI I was following the instructions here: https://github.com/tonsky/FiraCod= e/wiki/Emacs-instructions#using-composition-char-table to get Fira Code liga= tures globally. It so happens that C-modes will add =E2=80=9C//=E2=80=9C to t= he mode name in certain configurations; I just pared this down to a minimal r= epro case.=20 -- Evan Moses emoses@gmail.com > On Jul 24, 2020, at 11:25 PM, Eli Zaretskii wrote: >=20 > =EF=BB=BF >>=20 >> From: Evan Moses >> Date: Fri, 24 Jul 2020 14:35:50 -0700 >>=20 >> To reproduce, evaluate this >>=20 >> (set-char-table-range composition-function-table 47 '([".\\(?:\\(?:\\*\\*= \\|//\\|=3D=3D\\)\\|[*/=3D>]\\)" 0 >> font-shape-gstring])) >>=20 >> And then evaluate=20 >>=20 >> (setq mode-name "test//") >>=20 >> Emacs will become unresponsive and consume 100% CPU. >=20 > It doesn't hang here. Could this be macOS-specific? Or maybe the > problem happens only with some fonts? Does it happen in "emacs -Q"? >=20 > In any case, did you really mean for Emacs to produce ligatures on the > mode line? More generally, what kind of ligatures are you trying to > produce with this setup? --Apple-Mail-82CAFE99-FF95-4323-BCE7-402044CC9121 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable FYI I was following the instructions here:&= nbsp;https://github.com/tonsky/FiraCode/wiki/Emacs-i= nstructions#using-composition-char-table to get Fira Code ligatures= globally. It so happens that C-modes will add =E2=80=9C//=E2=80=9C to the m= ode name in certain configurations; I just pared this down to a minimal repr= o case. 

--
Evan Moses
emoses@gma= il.com


On Jul 24, 2020, at 11:25 PM, Eli Zar= etskii <eliz@gnu.org> wrote:

=EF=BB=BF
From: E= van Moses <emoses@gmail.com>
Date: Fri, 24 Jul 2020 14:35:50 -0700

To reproduce, evaluate this

(se= t-char-table-range composition-function-table 47 '([".\\(?:\\(?:\\*\\*\\|//\= \|=3D=3D\\)\\|[*/=3D>]\\)" 0
font-shape-gstring]))

And then= evaluate
(setq mode-name "test//")

<= blockquote type=3D"cite">Emacs will become unresponsive and consume 10= 0% CPU.

It doesn't hang here. &= nbsp;Could this be macOS-specific?  Or maybe the
proble= m happens only with some fonts?  Does it happen in "emacs -Q"?
In any case, did you really mean for Emacs to produ= ce ligatures on the
mode line?  More generally, what ki= nd of ligatures are you trying to
produce with this setup?
= --Apple-Mail-82CAFE99-FF95-4323-BCE7-402044CC9121--