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 17:03:29 +0200 Message-ID: <83tu2gjxha.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> <83h6yglguf.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40531"; 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 16:05:41 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 1p0Oea-000AKe-Jb for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Nov 2022 16:05:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0OeF-000452-4P; Wed, 30 Nov 2022 10:05:19 -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 1p0Ody-0003nb-Qo for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2022 10:05: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 1p0Ody-0000by-Hq for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2022 10:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p0Ody-0006CX-Cy for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2022 10: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 15: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.166982068223807 (code B ref 56682); Wed, 30 Nov 2022 15:05:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 30 Nov 2022 15:04:42 +0000 Original-Received: from localhost ([127.0.0.1]:33307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0Oda-0006Bq-Ss for submit@debbugs.gnu.org; Wed, 30 Nov 2022 10:04:42 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0OdK-0006Bi-Qy for 56682@debbugs.gnu.org; Wed, 30 Nov 2022 10:04:37 -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 1p0OdE-0000Vg-BS; Wed, 30 Nov 2022 10:04:16 -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=hSHj0rZa0LtoOCwoFqBEAh+xWqdd4lpumIyMhgAwm0o=; b=Kry44QImfI8R sw6+kX9purN2bPDR2NS2LUH5R6tkuYkxAIy+pCIr+F084E5yoiR5EMdqWk7+FCvKjU1JI9DOFqVrH yUbPw6F/DnIEzQl3DSbGKjmvf+hnLkhhiYp9qTd+qGbMV5jkBf1hnK3ea50RIejJcKGyowU/aBq16 CitVnPJSpq+n9o496q4UXnMtmfOyjMsyY2h1x3rsqfIji4BBi3g/HYpjufIanzVw8aDmYtNakq2c+ Ff6lkbQ4obUppPLC80C4cn9CT59XfjlouPglKtMoSuxjmUhMo/v++jZgQ6cYSxn+I4CraFS0bFXJM 00A78JPoyIsGIUUmiSIjBQ==; 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 1p0Ocy-0006Gg-2v; Wed, 30 Nov 2022 10:04:15 -0500 In-Reply-To: (message from Gregory Heytings on Wed, 30 Nov 2022 13:52:48 +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:249513 Archived-At: > Date: Wed, 30 Nov 2022 13:52:48 +0000 > From: Gregory Heytings > cc: 56682@debbugs.gnu.org, monnier@iro.umontreal.ca, dgutov@yandex.ru > > No, I'm not reverting, I'm fixing. The condition before 1c837c42c2 was > "MODIFF - UNCHANGED_MODIFIED > 8", with 1c837c42c2 it became "CHARS_MODIFF > - CHARS_UNCHANGED_MODIFIED > 8", which appeared correct at that time but > is not, with the patch it becomes "CHARS_MODIFF - UNCHANGED_MODIFIED > 8". > > > > > How did you reach the conclusion that the change doesn't do what it was > > supposed to? please tell more about what you saw and your conclusions. > > > > The first condition triggered the long line detection too much: it was > triggered when the the only changes in the buffer were fontification > changes. The second condition fixes that problem, but still triggers the > long line detection too much: it is still triggered when the main (but not > _only_) changes in the buffer are fontification changes, IOW, it is > triggered even if a single character is inserted and "enough" > fontification changes are made. The condition in the patch is correct: > the long line detection mechanism is triggered only when many characters > are inserted. Ah, okay. But let's take this opportunity to limit the search region as well, OK? I think it will be a better, more thorough fix, especially for very large buffers without long lines.