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: Fri, 02 Dec 2022 10:04:37 +0200 Message-ID: <83359ygrje.fsf@gnu.org> References: <97049541-f5b4-ed3b-b8de-7c0bdc86f0f5@yandex.ru> <6e305c9b-7702-133a-3347-f64db05ade3f@yandex.ru> <83mt89kt10.fsf@gnu.org> <834juglesn.fsf@gnu.org> <83r0xkjw5s.fsf@gnu.org> <83pmd3ioxx.fsf@gnu.org> <47153506021498df087c@heytings.org> <83bkomhlmn.fsf@gnu.org> <4715350602cf2ec6860b@heytings.org> <83a646hkat.fsf@gnu.org> <47153506028bbb3bc8b3@heytings.org> <47153506021115866615@heytings.org> <20f32a53dc3f5fbc5b65@heytings.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11785"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, gregory@heytings.org, dgutov@yandex.ru To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 02 09:06:31 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 1p1142-0002qt-Nc for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 02 Dec 2022 09:06:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p113t-00074R-Us; Fri, 02 Dec 2022 03:06:23 -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 1p113e-00070S-Cu for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2022 03:06:06 -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 1p113a-0002zE-7y for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2022 03:06:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p113a-0003SH-3i for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2022 03:06: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: Fri, 02 Dec 2022 08:06: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.166996831513269 (code B ref 56682); Fri, 02 Dec 2022 08:06:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 2 Dec 2022 08:05:15 +0000 Original-Received: from localhost ([127.0.0.1]:45176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p112p-0003Rx-0U for submit@debbugs.gnu.org; Fri, 02 Dec 2022 03:05:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p112n-0003Rn-BQ for 56682@debbugs.gnu.org; Fri, 02 Dec 2022 03:05:13 -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 1p112e-0000fn-Jd; Fri, 02 Dec 2022 03:05:06 -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=qSRyagv2i+xcgZveExSaAC69t6Obzk9eRNaCug83Ag4=; b=r752Jv4QDe3P +ercZxaiyh0NArvhstMrJ/NV4q/5GfH4duSZb8/jJ63ndj00H9+f3eF3ZzhlcMvyUth86yKkSMx3D 1PkzFDPBLtWV8UAE6ERQ32HNoh6jftzVH6HEBJiyL35ff9tsHELBtR/vz556ScafTNNhMGLvZQiPQ qcN3flfYT3SyFeCTloH7j3YGZXidHUv2xs4pHCgGJADWK4hsgCdYaY29o1VjxQQRareD+40WwqjWV DVBwHo9LspVNC1Wvh4DiwwDt3ULOGo+EL4K493ai3aZbgPZ1hAXxzbJsFlBLtb3pF2z+Cejolahxp 6RJ9gn5DgqqF82zKiQA5qQ==; 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 1p112d-0001ja-7d; Fri, 02 Dec 2022 03:05:04 -0500 In-Reply-To: (message from Stefan Monnier on Thu, 01 Dec 2022 21:52:03 -0500) 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:249715 Archived-At: > From: Stefan Monnier > Cc: 56682@debbugs.gnu.org, Eli Zaretskii , dgutov@yandex.ru > Date: Thu, 01 Dec 2022 21:52:03 -0500 > > My suggestion was to have as "steady state" that "everything is scanned > except for a region between BEG...END and no line was found to be larger > than MAX_SEEN_LINE_LENGTH". So it requires keeping track of a BEG..END > (BEG can be an integer but END would likely be an (insert-before) > marker) plus an integer keeping track of MAX_SEEN_LINE_LENGTH. > Initially BEG is 1 and END is Z. I don't understand how you keep track of BEG and END, in general. E.g., deletion of a single character can in some cases reset BEG to 1 and END to Z, right? > I can't think of a good way to detect when MAX_SEEN_LINE_LENGTH can be > made smaller, tho, so we might still need to rescan the whole buffer > every once in a blue moon. That, too, is a complication. Once again, there's absolutely no reason to scan more than a limited region around point where redisplay is likely to look. Scanning the entire buffer is a waste, and can potentially degrade performance in very large buffers without any long lines.