From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#56682: locked narrowing Date: Fri, 02 Dec 2022 09:13:46 -0500 Message-ID: References: <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> <20f32a53dcb449dbd509@heytings.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20476"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 56682@debbugs.gnu.org, Eli Zaretskii , dgutov@yandex.ru To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 02 15:14:08 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 1p16nn-000598-Np for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 02 Dec 2022 15:14:07 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p16nj-0001iC-J4; Fri, 02 Dec 2022 09:14: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 1p16ni-0001hA-M8 for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2022 09:14: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 1p16ni-000425-EA for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2022 09:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p16ni-0005vx-9E for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2022 09:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Dec 2022 14:14: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.166999043622796 (code B ref 56682); Fri, 02 Dec 2022 14:14:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 2 Dec 2022 14:13:56 +0000 Original-Received: from localhost ([127.0.0.1]:46972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p16nb-0005vc-QV for submit@debbugs.gnu.org; Fri, 02 Dec 2022 09:13:56 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:17358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p16nZ-0005vW-JI for 56682@debbugs.gnu.org; Fri, 02 Dec 2022 09:13:54 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 4FF8C100129; Fri, 2 Dec 2022 09:13:48 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id D6D4D10010B; Fri, 2 Dec 2022 09:13:46 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1669990426; bh=jmq9H38Evlmc8AnlGG9FGxyB6/8ABQO78slZnagM7xc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=LFFCyz4OZGGOwF/rIOPKWzNHotO4PKZCSnO9591kTVrLo/aqIipke7MPXg/N+7FzL OJVFt9NzU+sqwFxS5HyJ9qfOFVagW1og3SsY0UtAex1KtinkMwghvKQ2S6xw0ZVe3Q Fr2YuhaR5vA1OcZ0aWpaCFN4LmGHSfgO/gdt8ZQLQENr1GLSpZKzOVIU0iAR0MoCX/ jPKdVYXrWSgrd6uxoRz2X3yqPaOsamQP/0gNKTFqGftnc38XyBD5O2kVh269f93XU7 9SFvvbW7zexDNNeieK6CMcvgSUnfY7NK98nqP0AbbJ2eHGW9Q8CoBsxN4SC4Y5OjQt LAIFgBFSxffUg== Original-Received: from pastel (unknown [45.72.193.52]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 988E4122AC2; Fri, 2 Dec 2022 09:13:46 -0500 (EST) In-Reply-To: <20f32a53dcb449dbd509@heytings.org> (Gregory Heytings's message of "Fri, 02 Dec 2022 08:54:31 +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:249749 Archived-At: > I'm not sure I understand how that would work, concretely. After the > initial scan, we would have beg=BEG / end=Z. No, after the initial the BEG..END region would be empty (since BEG..END represents the part of the buffer *not yet* scanned). > Now the buffer is modified, > say 1000 characters are added at position 1000 and 10000 characters are > added at position 10000. What would be the values of beg and end after > these two operations? BEG=1000 and END=20000. > The two portions of the buffer that did not change are BEG .. 1000 and > 20000 .. Z, so it seems to me that it's better to keep track of the > portion of the buffer that did change, in this case 1000 .. 20000. That's exactly what I'm suggesting. Stefan