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: feature/improved-locked-narrowing 9dee6df39c: Reworked locked narrowing. Date: Fri, 03 Feb 2023 00:20:40 +0000 Message-ID: References: <166939872890.18950.12581667269687468681@vcs2.savannah.gnu.org> <20221125175209.51166C004B6@vcs2.savannah.gnu.org> <6c9d91cffc1bfd801530@heytings.org> <6c9d91cffc394613f58a@heytings.org> <83eds0ksev.fsf@gnu.org> <8aadf0ddd54c85c8144a@heytings.org> <831qnhg3d9.fsf@gnu.org> <9757fbea37611e9c44b9@heytings.org> <83cz6yacxt.fsf@gnu.org> <6943e04e30e5a02a52e6@heytings.org> <838rhk5fy1.fsf@gnu.org> <6943e04e30a40824e107@heytings.org> <83k0143q37.fsf@gnu.org> <94821a0ef100102ac9e0@heytings.org> <83bkmdz04y.fsf@gnu.org> <43562d4dd9dffd81938f@heytings.org> <83357ozhx0.fsf@gnu.org> 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="39758"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 03 01:21:08 2023 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 1pNjpE-000A9W-8J for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Feb 2023 01:21:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNjp9-0001sd-OJ; Thu, 02 Feb 2023 19:21:03 -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 1pNjp8-0001rN-9C for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2023 19:21:02 -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 1pNjp7-0002NL-Pu for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2023 19:21:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pNjp7-0002ay-Hr for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2023 19:21: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: Fri, 03 Feb 2023 00:21: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.16753836439942 (code B ref 56682); Fri, 03 Feb 2023 00:21:01 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 3 Feb 2023 00:20:43 +0000 Original-Received: from localhost ([127.0.0.1]:36176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNjop-0002aI-Cu for submit@debbugs.gnu.org; Thu, 02 Feb 2023 19:20:43 -0500 Original-Received: from heytings.org ([95.142.160.155]:41054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNjon-0002aA-PJ for 56682@debbugs.gnu.org; Thu, 02 Feb 2023 19:20:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1675383641; bh=XHfB4JymLQ8rxRK5Mavt+HfOue2L7kpr+ZJL1JomMUU=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=23i2uWnd+IsVibPPvsDSaIukkso0C0rK6SmfU5tg9QHCQS3N8HPzmom/2j4rtpyfK mvjxzssxxNakzI8ntAER3hI/2bqqgXTDl7lF9d9Ahze7rOXri39mu+LTAw5R9CIuRB 5djWw2nLY111nqBFVdAlmRU13aJ/yxSpGGzodLKlf53hfUfikl4WZS5NSZYjtwM9bk pYEu/QLj5bupujgqwsslrF2FPIUi+8/wugyfSrd55c97K1szYRrvxIbxXLzdUP64yF D8T+aoFFiBC+d/BTMq7YXW+LzU8wiPQIUGmusFbCFQbri2ebTJlc1GxsLZBRw/oxxH mcr5Kr29GAnmA== In-Reply-To: <83357ozhx0.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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:254702 Archived-At: >> Okay, if that's your decision. IMO just going back to what the code >> did earlier is (very) safe, but I cannot do that without your approval. > > It might be safe or it might not be safe. We will not know for sure > without some period of people using that. And I'm unwilling to delay > the pretest by any significant time, sorry. > All the code that deals with long lines is carefully placed inside conditionals. What I'm proposing is strictly equivalent to the following patch: diff --git a/src/keyboard.c b/src/keyboard.c index 6f0f075e54e..888a5d075b2 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1909,7 +1909,7 @@ safe_run_hooks_maybe_narrowed (Lisp_Object hook, struct window *w) specbind (Qinhibit_quit, Qt); - if (current_buffer->long_line_optimizations_p + if (0 /* current_buffer->long_line_optimizations_p */ && long_line_locked_narrowing_region_size > 0) { ptrdiff_t begv = get_locked_narrowing_begv (PT); diff --git a/src/xdisp.c b/src/xdisp.c index d2c91e5847b..4ed9c858cd6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -4393,7 +4393,7 @@ handle_fontified_prop (struct it *it) eassert (it->end_charpos == ZV); - if (current_buffer->long_line_optimizations_p + if (0 /* current_buffer->long_line_optimizations_p */ && long_line_locked_narrowing_region_size > 0) { ptrdiff_t begv = it->locked_narrowing_begv; By definition, this cannot be unsafe for any buffer, except those in which long_line_optimizations_p is set. So the worst that could possibly happen is that Emacs would hang in some buffers in which long_line_optimizations_p is set, which is not a regression: Emacs 28 and earlier would have hanged under the same conditions. > > Then please do. This is one of a small number of issues whose > resolution delays the pretest ATM. Which is why I pinged you several > times over the last month about it. > I know. Unfortunately (or perhaps fortunately?) my time to hack on Emacs is limited.