From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely Date: Thu, 15 Sep 2022 10:17:21 +0800 Message-ID: <87edwdwfda.fsf@localhost> References: <87pmfx6h7y.fsf@gnus.org> <8735ct6f6q.fsf@gnus.org> <83r10d26o8.fsf@gnu.org> <87tu594zpt.fsf@gnus.org> <83o7vh26e5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8129"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 57804@debbugs.gnu.org, pogonyshev@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 15 04:17:11 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 1oYeRC-0001sJ-Bo for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Sep 2022 04:17:10 +0200 Original-Received: from localhost ([::1]:53240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYeRB-0003PY-3k for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Sep 2022 22:17:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYeR4-0003PP-AP for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 22:17:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39707) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYeR4-0000LQ-3F for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 22:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oYeR3-0001z8-Lc for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 22:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Sep 2022 02:17: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.16632081977587 (code B ref 57804); Thu, 15 Sep 2022 02:17:01 +0000 Original-Received: (at 57804) by debbugs.gnu.org; 15 Sep 2022 02:16:37 +0000 Original-Received: from localhost ([127.0.0.1]:56639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYeQf-0001yJ-2C for submit@debbugs.gnu.org; Wed, 14 Sep 2022 22:16:37 -0400 Original-Received: from mail-pl1-f177.google.com ([209.85.214.177]:36641) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYeQc-0001y1-1E for 57804@debbugs.gnu.org; Wed, 14 Sep 2022 22:16:35 -0400 Original-Received: by mail-pl1-f177.google.com with SMTP id c2so16948592plo.3 for <57804@debbugs.gnu.org>; Wed, 14 Sep 2022 19:16:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date; bh=GFy6VuimYkee9VVrMmY11jo8OWKkMXL6K5xMQqubXcg=; b=UHbaf5ojAtjl7wyw7b2jkqxJ39Y8bCeE/bQgEI71Nwye97JceTKfMwyftpfkBW6JCj MRabJzL5GuqGHX7IKbxsJMB3fk26iHYglMolg8lWjmmH8o24/H9UtKqz7waHxDlUuGIZ AU+Y6nQTvUfQhUu78qOF+JSgcGWh/ae9O63eqp8F+RwysPnH6M41wI9nvuCmI0BchNOf 6GbhmIDm3FWPMYDJc3wMZYF5z7KBXhEeUjWvo+o+zJK0aP09M+AgPM7xJp+vrkD6SNHF bl+u7Rfu7ddDfoyIe1tmEHUGdpqcQIdpcJpi7URk6dmypg0lApsaqE/FWjoGcWh1q/pB xG5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=GFy6VuimYkee9VVrMmY11jo8OWKkMXL6K5xMQqubXcg=; b=GWQORAjMdBU3MzNsc3a7s5H6tk+SNp2FmRyKxWu65hPjw6khyLtwOV/lb9/B0DhQXW AB8VxzbqknleiBfensVzBfe9mRdrHv07vlTCEkxkwdCZIy+IS4sameUFGZawBibXtiu1 NYpwTdTe5EwQpcbtoSyKr6/xkgDSF4UXKGG8sK+Le4sBvWDmkzCB/0OZghUCekhJ64g+ SfXzjpvyaK6RVtGK4zYTCry522+uZbhgMprTBL8lJXYP5RQ+Ky5BAxllyrfvqHQZpeIK nLC9PEMlJ+B4OetIhSPo+lAHpsg1HavMoKD2snIl1KWzh2+SnfyVWPfgBWak9f7JEKzK ud4Q== X-Gm-Message-State: ACrzQf05BZt6DAw5z9rSgHCBiSVWNAoA9Xd22PJWOhWorly6a1hrE5RR /2sHIYFtQGWyLRCBWB+ViEc= X-Google-Smtp-Source: AMsMyM7w+qsypf+cD4n+8TcO3Hwqq5kCbyClGiBU7NQOoxth4TVopDOhbIB7Qh1fNlrjOlaQYiV+qw== X-Received: by 2002:a17:90b:3847:b0:203:1ef6:ce1 with SMTP id nl7-20020a17090b384700b002031ef60ce1mr5486977pjb.113.1663208188099; Wed, 14 Sep 2022 19:16:28 -0700 (PDT) Original-Received: from localhost ([2409:8970:a81:48f7:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id gv6-20020a17090b11c600b002002f9eb8c4sm387706pjb.12.2022.09.14.19.16.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Sep 2022 19:16:27 -0700 (PDT) In-Reply-To: <83o7vh26e5.fsf@gnu.org> 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:242549 Archived-At: Eli Zaretskii writes: >> But like I said, three `C-g's without any idle time in between would be >> the magical command to switch off font locking. I think that's hard to >> do accidentally in normal circumstances. > > There's nothing accidental about my typing several C-g in a row. It > just isn't related to any font-lock. Org mode uses a similar method to catch rare edge cases and make users report them. We make the user aware about possible reaction to multiple C-g's using the following message: `org-element--parse-buffer': Suppressed `\\[keyboard-quit]'. Press `\\[keyboard-quit]' %d more times to force interruption. The code goes like (when (and inhibit-quit org-element--cache-interrupt-C-g quit-flag) (when quit-flag (cl-incf org-element--cache-interrupt-C-g-count) (setq quit-flag nil)) (when (>= org-element--cache-interrupt-C-g-count org-element--cache-interrupt-C-g-max-count) (setq quit-flag t) (setq org-element--cache-interrupt-C-g-count 0) (org-element-cache-reset) (error "org-element: Parsing aborted by user. Cache has been cleared. If you observe Emacs hangs frequently, please report this to Org mode mailing list (M-x org-submit-bug-report).")) (message (substitute-command-keys "`org-element--parse-buffer': Suppressed `\\[keyboard-quit]'. Press `\\[keyboard-quit]' %d more times to force interruption.") (- org-element--cache-interrupt-C-g-max-count org-element--cache-interrupt-C-g-count))) -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92