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#56682: locked narrowing Date: Wed, 30 Nov 2022 16:04:08 +0200 Message-ID: <834juglesn.fsf@gnu.org> References: <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> <83mt89kt10.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6760"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, monnier@iro.umontreal.ca, dgutov@yandex.ru To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 30 15:05:33 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 1p0NiO-0001UX-KJ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Nov 2022 15:05:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0Ni7-0001y2-Hx; Wed, 30 Nov 2022 09:05:16 -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 1p0Nhu-0001wo-Ld for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2022 09:05: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 1p0Nhu-0005zZ-BJ for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2022 09:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p0Nhu-0005an-6p for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2022 09:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Nov 2022 14:05:02 +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.166981709221488 (code B ref 56682); Wed, 30 Nov 2022 14:05:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 30 Nov 2022 14:04:52 +0000 Original-Received: from localhost ([127.0.0.1]:32982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0Nhk-0005aW-91 for submit@debbugs.gnu.org; Wed, 30 Nov 2022 09:04:52 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0Nhg-0005aQ-KU for 56682@debbugs.gnu.org; Wed, 30 Nov 2022 09:04:50 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0NhY-0005sN-8Z; Wed, 30 Nov 2022 09:04:40 -0500 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=1iDFH5bw8yJtHxahBXa+QEYjgNR55f0kp39lV9oWZdQ=; b=GPkyiF9Jy7/9 V2XI7XMj95PvG1lB3IChAxfmyGTrTE9bG5MjDEnqUGJthltU20Ur6GGYj60Zc2wBhRrZRO0BH6NJm fZvmO7x7NWmd5rVOaRSq/e6Z6RwGGnlh3kCO/dD+ExaedyXUG4r+0LOTzH7ZOBtdPSwJz2R18TTbV e2y5W92QqSQB2iS+gxrN/qhzcVpWKkLzx/7I0+xBl54/9CVmih6ThYHURDaUl6XV8cND1a4L6bGfs ZLsMICNLoDMLrsnMtu6RZZEa9oxzY8KiddavR5EG6vXgoV9s4mCkfSChowmNEo3ePUXdHhwkBZko0 wCp/CDI/ZMzi+EQ7BRi+Xw==; Original-Received: from [87.69.77.57] (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 1p0NhW-0008Nv-Qp; Wed, 30 Nov 2022 09:04:39 -0500 In-Reply-To: (message from Gregory Heytings on Wed, 30 Nov 2022 10:11:17 +0000) 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:249500 Archived-At: > Date: Wed, 30 Nov 2022 10:11:17 +0000 > From: Gregory Heytings > cc: 56682@debbugs.gnu.org, monnier@iro.umontreal.ca, dgutov@yandex.ru > > > There's no need to search the whole buffer, that will cause delays in > > very large buffers for no good reason. > > > > We've talked about this a few months ago, and you said fixing this was > > part of your todo. I think now is the time. > > > > Yes, it was and still is part of my todo. At that point of time I was not > at all expecting that Emacs 29 would be released three months later. > What I had and still have in mind is too large a change for Emacs 29, so > at first glance I think for now we'll have to live with the current > solution. I don't think I understand why it should be problematic or unsafe to limit the same loop we have to a smaller region of the buffer. > Note that, apart from Dmitry, nobody reported a problem with that > detection mechanism, and Dmitry's recipe with which he spotted that > problem does not reflect actual usage. And note that with the patch I > just sent even Dmitry's recipe is fixed. It should be clear that triggering such long searches should not be too hard. The search itself should scale better, similar to the general idea of narrowing the display code, whose scaling is excellent, precisely because the region doesn't grow with the buffer size. > I'll see if I can design something smaller which would be suitable for > Emacs 29, however. Well, I think what I proposed is safe enough already. But maybe I'm missing something.