From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#56682: locked narrowing Date: Wed, 30 Nov 2022 00:15:39 +0000 Message-ID: References: <83edxfds7s.fsf@gnu.org> <83r11fc80o.fsf@gnu.org> <83o7wjc6o2.fsf@gnu.org> <83lernc5gu.fsf@gnu.org> <83k076dd7d.fsf@gnu.org> <83czcyd8jf.fsf@gnu.org> <83a682d66r.fsf@gnu.org> <837d36ceno.fsf@gnu.org> <37dd2827f54f8bbda5e3@heytings.org> <735c1d5b-0d64-a8e1-3aaa-91fc0248abd3@yandex.ru> <97049541-f5b4-ed3b-b8de-7c0bdc86f0f5@yandex.ru> <6e305c9b-7702-133a-3347-f64db05ade3f@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24198"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, Eli Zaretskii , Stefan Monnier To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 30 01:16:26 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 1p0Am2-00066d-1K for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Nov 2022 01:16:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0Alp-0002kF-8i; Tue, 29 Nov 2022 19:16:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0Ale-0002jm-Om for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 19:16:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p0Ald-0006Zs-S5 for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 19:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p0Ald-00052z-Nh for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 19:16:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Nov 2022 00:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56682 X-GNU-PR-Package: emacs Original-Received: via spool by 56682-submit@debbugs.gnu.org id=B56682.166976734319393 (code B ref 56682); Wed, 30 Nov 2022 00:16:01 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 30 Nov 2022 00:15:43 +0000 Original-Received: from localhost ([127.0.0.1]:57351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0AlL-00052j-7M for submit@debbugs.gnu.org; Tue, 29 Nov 2022 19:15:43 -0500 Original-Received: from heytings.org ([95.142.160.155]:36998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0AlJ-00052b-69 for 56682@debbugs.gnu.org; Tue, 29 Nov 2022 19:15:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1669767340; bh=PQfe9Ztt89+pWiFLDOIRAH6m5B3GINuzoNdMG3WcAYQ=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=E7nnjbr+7gkYfrOTAhs03DxsJo5kViUvwIR8JRjgaQiRThMX0arUnjnwuTD/HcsB3 0KwY1ba2gvZlTKwioNP7ZQ8puW9Wgr0cE8+oQvkD23d3XY0Uz3ia/Cu03rt5UtWGqD jLABFuH2z6bGipq3qVA9Jc3kSCihhNH00wREL+m28sF2sCqkEjnAZPNrUAOiBvHSTw /8hXbk6FqlctN2mdQMyPg6C9iiv8TP7Li6bVcpJ76HwDMSiXvIswD7H4FMiuPyurhG L2p3cJOxA8hsUfKHYIgtAqF4rFsRGUz6oihTv8SI59wNY5b6y/gCvcm6FQhA3H0xRy akkcWavZ4I+RA== In-Reply-To: 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:249459 Archived-At: >> The result will be that the benchmark will report ~30ms both near BOB >> and near EOB. So the long-lines-threshold thingy adds a regression >> here. > > It's not a regression, it's the price we agreed to pay to detect whether > the buffer contains long lines. That detection happens dynamically, to > catch cases when long lines are inserted in a buffer. > After looking at this closely, it turns out that the change in 1c837c42c2 doesn't do what it was meant to do. Sigh... Dmitry, can you confirm that the following change fixes this? diff --git a/src/xdisp.c b/src/xdisp.c index b09aa6ec96..cdd6a7f5fe 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -19535,7 +19535,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) /* Check whether the buffer to be displayed contains long lines. */ if (!NILP (Vlong_line_threshold) && !current_buffer->long_line_optimizations_p - && CHARS_MODIFF - CHARS_UNCHANGED_MODIFIED > 8) + && CHARS_MODIFF - UNCHANGED_MODIFIED > 8) { ptrdiff_t cur, next, found, max = 0, threshold; threshold = XFIXNUM (Vlong_line_threshold);