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#56393: Actually fix the long lines display bug Date: Tue, 19 Jul 2022 16:56:39 +0300 Message-ID: <83y1wpmciw.fsf@gnu.org> References: <38c1a31040d2d2bc47ae@heytings.org> <83fsja36an.fsf@gnu.org> <34362AA6-6404-4727-9C60-6B6CA6736DD4@gnus.org> <83v8rvpxx7.fsf@gnu.org> <209e6aa436f84e1f729a@heytings.org> <83sfmzpw4e.fsf@gnu.org> <83h73epq7v.fsf@gnu.org> <83cze2pmtk.fsf@gnu.org> <838roqpkjs.fsf@gnu.org> <831quipdt2.fsf@gnu.org> <83r12intar.fsf@gnu.org> <83lespomnu.fsf@gnu.org> <83fsixnwh3.fsf@gnu.org> <834jzdnsxw.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22030"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, larsi@gnus.org, 56393@debbugs.gnu.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 19 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 1oDnr0-0005Uz-UA for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Jul 2022 16:05:38 +0200 Original-Received: from localhost ([::1]:34544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDnqz-0004OZ-Gi for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Jul 2022 10:05:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDnje-0001PC-4Q for bug-gnu-emacs@gnu.org; Tue, 19 Jul 2022 09:58:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57048) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oDnjd-0003uM-QM for bug-gnu-emacs@gnu.org; Tue, 19 Jul 2022 09:58:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oDnjd-0007wU-Lq for bug-gnu-emacs@gnu.org; Tue, 19 Jul 2022 09:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Jul 2022 13:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56393 X-GNU-PR-Package: emacs Original-Received: via spool by 56393-submit@debbugs.gnu.org id=B56393.165823902830464 (code B ref 56393); Tue, 19 Jul 2022 13:58:01 +0000 Original-Received: (at 56393) by debbugs.gnu.org; 19 Jul 2022 13:57:08 +0000 Original-Received: from localhost ([127.0.0.1]:54807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDnil-0007vH-QY for submit@debbugs.gnu.org; Tue, 19 Jul 2022 09:57:08 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDnia-0007uM-Nk for 56393@debbugs.gnu.org; Tue, 19 Jul 2022 09:57:05 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35670) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDniV-0003d4-5C; Tue, 19 Jul 2022 09:56:51 -0400 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=YmDY/XOVMWw3EMvfLSuzaQuKPNYxAhu0vl48ORQU8WY=; b=ZChDRm3SLPr5 Q3iBSJBbBDIPh5lmDo4qKDP8iS2Uvg9LKnHBsYXwR5eQhO1BeaKGaazH5sEKyN6iICr8o7Sh4lMZi /Yz2+lYA850xvRYpPczviE+uOT13Z02Hq1q1JV3NQN2AM8VAyY2AIvoBaS33GYO5HQs0QB59iibJV RPEzytfO1NH7llajcnsy+rBg9+gbNdxj7Mazd3+m1VZUxLSxArMakfXC/TYgF/ZfmaNfECh0BLYns u9ZfiA1bfSmdrzxvQ6cQ/2N09cjfaydxNNHnEdgADkprT4FjpW5m29/7PfTwfAO2E1PJx/QQ+JBWx YcKfxUStw9Y46QSDuvsigA==; Original-Received: from [87.69.77.57] (port=1038 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 1oDniU-0004Rc-LP; Tue, 19 Jul 2022 09:56:50 -0400 In-Reply-To: (message from Gregory Heytings on Tue, 19 Jul 2022 13:42:26 +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" Xref: news.gmane.io gmane.emacs.bugs:237439 Archived-At: > Date: Tue, 19 Jul 2022 13:42:26 +0000 > From: Gregory Heytings > cc: gerd.moellmann@gmail.com, larsi@gnus.org, 56393@debbugs.gnu.org > > > So you want to call the loop only when the buffer changed by two or more > > characters? Did you try something like > > > > MODIFF > UNCHANGED_MODIFIED + 1 > > > > ? (This could be optimized further to use a margin larger that 1.) > > That doesn't work alas, otherwise I would have used that of course. > After C-u 100000 a, MODIFF - UNCHANGED_MODIFIED == 1 in a buffer without > fontification and == 2 in a buffer with fontification, which does what it > promises: it tells you that the buffer has been changed, but not how much. Why is that a problem? For this feature, we don't need the exact number of modifications in character units. > I pushed an improved version of the heuristic, which uses both MODIFF / > UNCHANGED_MODIFIED (to catch editing operations like M-% C-q C-j RET SPC > RET) and the buffer size to decide whether a new detection should be > performed. Fine by me, but I think this is over-engineered. Also, please add a comment there explaining the heuristics, including the cases we know about where the counters could behave "strangely" or fail to catch changes. Thanks.