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#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely Date: Wed, 14 Sep 2022 20:43:19 +0300 Message-ID: <83r10d26o8.fsf@gnu.org> References: <87pmfx6h7y.fsf@gnus.org> <8735ct6f6q.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18068"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57804@debbugs.gnu.org, pogonyshev@gmail.com To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 14 19:50:22 2022 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 1oYWWj-0004Rt-A5 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Sep 2022 19:50:21 +0200 Original-Received: from localhost ([::1]:39446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYWWh-0002UJ-Sk for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Sep 2022 13:50:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYWQc-00058g-7Z for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 13:44:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39083) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYWQb-0003Pk-Va for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 13:44:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oYWQb-0000sw-Pj for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 13:44: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: Wed, 14 Sep 2022 17:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57804 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 57804-submit@debbugs.gnu.org id=B57804.16631774173364 (code B ref 57804); Wed, 14 Sep 2022 17:44:01 +0000 Original-Received: (at 57804) by debbugs.gnu.org; 14 Sep 2022 17:43:37 +0000 Original-Received: from localhost ([127.0.0.1]:56015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYWQD-0000sC-7U for submit@debbugs.gnu.org; Wed, 14 Sep 2022 13:43:37 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYWQB-0000rz-4N for 57804@debbugs.gnu.org; Wed, 14 Sep 2022 13:43:35 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53172) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYWQ5-0003Lf-Tb; Wed, 14 Sep 2022 13:43:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=jgRdU9lJ1nCxF3U+nS9LzzrAAvUsVs1R1xpsXx9xU+4=; b=XlsLvAY23tIc OAPM77WjwGIt2xPDO3BSHnNnmLtdGTT/En2XaZ2g23ddyKaZMMBsN39JImocu/9Y0srS89y3jYc6s klBHw2QB7jnODi7wxfzu7x0+85Dixx+ZSbrbs+19jC8PN/RKlZTbmLhEHsfUIoLCTzWev0rJUv1ei cuXgZQIVM4S+crJ8ofcXQl2RVgx/+JVXmf9/a8ZgbCAC+dse1Jf7Uv+hfLAabZXIBMxqdPZNGBFv9 eT21ciyAFjW9SMA7cyCPPyA98PkZddLdVvg7F8+m5J8KQCY3YTeIJsTr2+wbQjvkyu3huEuaqbxaq N/sn0RT4Th8A5wY3BnIUMg==; Original-Received: from [87.69.77.57] (port=1110 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 1oYWQ4-0007Jv-Sp; Wed, 14 Sep 2022 13:43:29 -0400 In-Reply-To: <8735ct6f6q.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed, 14 Sep 2022 19:25:49 +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" Xref: news.gmane.io gmane.emacs.bugs:242500 Archived-At: > Cc: 57804@debbugs.gnu.org > From: Lars Ingebrigtsen > Date: Wed, 14 Sep 2022 19:25:49 +0200 > > Paul Pogonyshev writes: > > >> For instance, if the user hits `C-g' three times (and Emacs doesn't idle > >> in between), then we disable font-lock in that buffer. > > > > That sounds much better. I know that `C-g' is what to press when Emacs > > is stuck. > > A single `C-g' wouldn't be quite the right thing, because the user may > hit `C-g' by accident while font-lock happens to run (and it's not > hanging), which is why I though a special key sequence like `C-g C-g > C-g' might make sense. I frequently find myself hitting C-g several times for reasons unrelated to any infloop. > > If I add `(setf max-redisplay-ticks 100)' right after entering > > `buggy-mode', it seems to have some effect, but not exactly what I'd > > hope on. I suggest you try and see for yourself, hard to describe > > them. > > Doesn't seem to have any effect here... It shouldn't, because an infloop doesn't consume any "redisplay ticks".