From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.bugs Subject: bug#41441: 26.3; mhtml misbehaving font-lock extend region can cause Emacs to hang Date: Thu, 28 May 2020 10:13:39 -0600 Message-ID: <87mu5sf364.fsf@tromey.com> References: <87pnasro4o.fsf@tromey.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="76277"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 41441@debbugs.gnu.org, Tom Tromey To: Anders Lindgren Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 28 18:14: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 1jeLAd-000Jj5-Ub for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 May 2020 18:14:16 +0200 Original-Received: from localhost ([::1]:42756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeLAb-0005Az-9e for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 May 2020 12:14:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeLAR-00057d-FK for bug-gnu-emacs@gnu.org; Thu, 28 May 2020 12:14:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41354) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jeLAQ-0005Wd-EJ for bug-gnu-emacs@gnu.org; Thu, 28 May 2020 12:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jeLAQ-00058Y-9k for bug-gnu-emacs@gnu.org; Thu, 28 May 2020 12:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tom Tromey Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 May 2020 16:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41441 X-GNU-PR-Package: emacs Original-Received: via spool by 41441-submit@debbugs.gnu.org id=B41441.159068242719717 (code B ref 41441); Thu, 28 May 2020 16:14:02 +0000 Original-Received: (at 41441) by debbugs.gnu.org; 28 May 2020 16:13:47 +0000 Original-Received: from localhost ([127.0.0.1]:52900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeLA7-00057u-5u for submit@debbugs.gnu.org; Thu, 28 May 2020 12:13:46 -0400 Original-Received: from gateway33.websitewelcome.com ([192.185.145.24]:32396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeLA5-00057l-6y for 41441@debbugs.gnu.org; Thu, 28 May 2020 12:13:41 -0400 Original-Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway33.websitewelcome.com (Postfix) with ESMTP id 93186F9E7BE for <41441@debbugs.gnu.org>; Thu, 28 May 2020 11:13:40 -0500 (CDT) Original-Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id eLA4j6W221s2xeLA4jaP0r; Thu, 28 May 2020 11:13:40 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=/+x6cXiL/vwfNoO61dTXvqUwyxiYqxoCiaK/c6OFL4c=; b=OUkFq4HcraRNYoAGFTG8WXI4TO PTaBysF7xsd8Ay43LUc++15v2bwnp3TDidUyxLGDpcF+23zN1NzfLBTdndNHcMZ0MRtejTainaYHA Hz2y8cr6phUa4sn2oP5HpdV/P; Original-Received: from 174-16-104-48.hlrn.qwest.net ([174.16.104.48]:43102 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1jeLA4-000TFW-7V; Thu, 28 May 2020 10:13:40 -0600 X-Attribution: Tom In-Reply-To: (Anders Lindgren's message of "Wed, 27 May 2020 22:40:55 +0200") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 174.16.104.48 X-Source-L: No X-Exim-ID: 1jeLA4-000TFW-7V X-Source-Sender: 174-16-104-48.hlrn.qwest.net (murgatroyd) [174.16.104.48]:43102 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes 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:181148 Archived-At: Anders> Hi!To me it's obviously a bug. First, the name of the Anders> function contains "extend", not "change". Yes, but the manual says: You can enlarge (or even reduce) the region to refontify by setting the following variable: See (info "(elisp) Region to Refontify") Anders> Without having a deep knowledge of this, I don't think this Anders> do the correct thing when font-lock-beg is at the end of a line Anders> (as it is when the line is empty). The problem is that the code Anders> move forward one character (the newline) and then search Anders> backward with line-beginning-position (i.e. the beginning of the Anders> line following the original font-lock-beg) as limit, effectively Anders> shrinking the region. IIRC this weird thing was needed to correctly find the spot where the property change really occurred, without having trouble when starting exactly on the boundary. I don't remember the test case. Not sure if the self-tests cover this; maybe it's archived in a bug somewhere though. Tom