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: Fri, 02 Dec 2022 09:16:08 +0000 Message-ID: <20f32a53dc5c649a6207@heytings.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> <834juegs87.fsf@gnu.org> <20f32a53dc3b247b0b00@heytings.org> <83r0xifaij.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4638"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, monnier@iro.umontreal.ca, dgutov@yandex.ru To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 02 10:17:32 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 1p12Al-0000zn-Oq for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 02 Dec 2022 10:17:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p12Af-0001gR-CG; Fri, 02 Dec 2022 04:17:25 -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 1p12AT-0001dG-Rr for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2022 04:17:14 -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 1p12AI-0000Im-8b for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2022 04:17:12 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p12AI-0004Tn-4I for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2022 04:17:02 -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, 02 Dec 2022 09:17: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.166997257017198 (code B ref 56682); Fri, 02 Dec 2022 09:17:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 2 Dec 2022 09:16:10 +0000 Original-Received: from localhost ([127.0.0.1]:45528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p129S-0004TK-Ia for submit@debbugs.gnu.org; Fri, 02 Dec 2022 04:16:10 -0500 Original-Received: from heytings.org ([95.142.160.155]:40552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p129Q-0004TE-W2 for 56682@debbugs.gnu.org; Fri, 02 Dec 2022 04:16:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1669972568; bh=CXxaOPV36Oi5Fn7b5wMLAH0xfLd3/yAf0ifu3M6K+0s=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=nxPSxBF9Zxlng4PuenUBijGbsNvo/pTbXjWToYMny7+JnQy2PbuNh7pNyPOeFl1dV cG3kKZCu6xJ3FqnmfM+N/qaMb4bBhGqsxzmySYCqVowtc48/R/pVbd22Rx4tL10SIg mZrMubXQfLNUhVPbex1YdL1Z2K/LI0vRrAbwkZAhCdkSRPIWjqBRi6Id1pyDDmF2X0 SdVr5NP7gwLtAaLcid6H3NQzzt1MBB8C+Gh+rTVWgHjrl4CuN4+2YqzGxoCP0Zjk3C pYY2KtTef65WvTBB72Yc3+5d/CC63NlOPoEd3uLP8A6sIXq1sLgeCj+Jey1Jad8bU7 EQ79wL14KiOKw== In-Reply-To: <83r0xifaij.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:249727 Archived-At: >> Consider this other scenario. A buffer is buried, and modified in the >> background by some process. That process adds a long line in that >> buffer, followed by enough non-long lines, with point after these >> non-long lines. Now the user asks for that buffer to be displayed >> again. With your proposed approach, we would search around point if >> there are long lines. There aren't, so we do not activate long line >> optimizations. Now the user scrolls the buffer. The buffer has not >> changed in any way, so the detection is not triggered, and we reach the >> long line. Kaboom! > > No "Kaboom!": when the user scrolls the buffer, point moves, so we can > detect that and trigger rescanning. > In which case we are back to the alternative solution, which is to trigger rescanning on each redisplay cycle. Which might, after all, be the simplest and safest solution.