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#56815: 29.0.50; Isearch lazy-highlight highlights too much when truncate-lines is in effect Date: Fri, 29 Jul 2022 22:59:38 +0300 Message-ID: <837d3v7kr9.fsf@gnu.org> References: <83mtct87ti.fsf@gnu.org> <865yjhc85k.fsf@mail.linkov.net> <83fsik8o39.fsf@gnu.org> <87r124kul6.fsf@gnus.org> <86mtcrpyzs.fsf@mail.linkov.net> <83bkt77nf9.fsf@gnu.org> <83a68r7m2d.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38020"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 56815@debbugs.gnu.org, juri@linkov.net To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 29 22:00:27 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 1oHW9q-0009ho-Rx for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Jul 2022 22:00:27 +0200 Original-Received: from localhost ([::1]:45172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHW9o-0001cg-MQ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Jul 2022 16:00:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHW9S-0001ap-Oe for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 16:00:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43772) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHW9S-0006Rd-F3 for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 16:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oHW9R-0000I5-UX for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 16:00: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: Fri, 29 Jul 2022 20:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56815 X-GNU-PR-Package: emacs Original-Received: via spool by 56815-submit@debbugs.gnu.org id=B56815.16591247751056 (code B ref 56815); Fri, 29 Jul 2022 20:00:01 +0000 Original-Received: (at 56815) by debbugs.gnu.org; 29 Jul 2022 19:59:35 +0000 Original-Received: from localhost ([127.0.0.1]:33521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHW91-0000Gx-Fg for submit@debbugs.gnu.org; Fri, 29 Jul 2022 15:59:35 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHW8x-0000Gg-Hp for 56815@debbugs.gnu.org; Fri, 29 Jul 2022 15:59:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47636) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHW8s-0006Lu-3k; Fri, 29 Jul 2022 15:59:26 -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=FbbamkogBNWd863Ks30LYQwidSLL6vV2Ruslc2JxtfA=; b=eK6l3nV+gCNX +/BSSuqi8DRqgsbTJmkHWFJOjK2kV96vFnxc8oM6v9Mv3H2Jg4C28AU+L2Tic3/qrnS3Zuxqlh/mP ykW5UzMIKh9o+lBWjvgY05WIruh07zX8E3aOieinoDwfLcEkn2zFGQZHEzIXED8bHsHW9g3Ij9Djt XBQPZX+pApbd2zugphT6HUD8fkxcFWMGjIIry1Ro+GZnMZ44IRmv0EOq+w6wyNMYpOzQ1C8f+Mg4R xBGNLSo6PhwJuPbodnkWb39cOW2WfG/N+r+b3114KWBPmk7Xl8vqXGGvnhSOoNPbVmXoE9YsaxKax u6TMecR8+oseEMNfxGI7gA==; Original-Received: from [87.69.77.57] (port=4493 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 1oHW8r-0000C0-IB; Fri, 29 Jul 2022 15:59:25 -0400 In-Reply-To: (message from Gregory Heytings on Fri, 29 Jul 2022 19:52:08 +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:238220 Archived-At: > Date: Fri, 29 Jul 2022 19:52:08 +0000 > From: Gregory Heytings > cc: juri@linkov.net, larsi@gnus.org, 56815@debbugs.gnu.org > > > Moreover, isearch.el could use some special-purpose algorithm for > > looking for visible matches in this case. For example, as soon as > > posn-at-point tells us a match is to the right of the window's right > > edge, isearch.el could go to the beginning of the next line and continue > > from there, instead of checking all the subsequent matches on the same > > line (with a result that is known in advance). This way, we will > > probably have even fewer matches, and the search will be faster, except > > for very large values of hscroll. > > And you really think it's TRT to add such a special-purpose algorithm for > that very specific "long-and-truncated lines" case everywhere in Emacs? > Because isearch is just one example, there are many other places where you > will similarly need to reduce the portion of the buffer that will be > considered by the command to the portion of the buffer that is actually > visible on screen. Which other places? In this bug we are talking specifically about isearch.el adding thousands of overlays to a buffer, 99.99% of which are not visible. If there are other features that do something similar, please name them. And yes, if we want truncate-lines to work reasonably well, we need to fix any features which behave silly in that display mode. We will not remove truncate-lines from Emacs, and we will not make it dysfunctional. But let's begin by discovering those features, so that this discussion could be less academical.