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#56815: 29.0.50; Isearch lazy-highlight highlights too much when truncate-lines is in effect Date: Fri, 29 Jul 2022 19:11:10 +0000 Message-ID: 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> 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="6129"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 56815@debbugs.gnu.org, juri@linkov.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 29 21:12:10 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 1oHVP7-0001Ny-OB for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Jul 2022 21:12:10 +0200 Original-Received: from localhost ([::1]:51082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHVP6-0000m3-8b for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Jul 2022 15:12:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHVP0-0000lu-9Q for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 15:12:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43720) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHVP0-0003uJ-15 for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 15:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oHVOz-0007O0-NS for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 15:12:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Jul 2022 19:12: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.165912187828318 (code B ref 56815); Fri, 29 Jul 2022 19:12:01 +0000 Original-Received: (at 56815) by debbugs.gnu.org; 29 Jul 2022 19:11:18 +0000 Original-Received: from localhost ([127.0.0.1]:33469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHVOH-0007Me-NI for submit@debbugs.gnu.org; Fri, 29 Jul 2022 15:11:17 -0400 Original-Received: from heytings.org ([95.142.160.155]:58118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHVOC-0007MP-Ok for 56815@debbugs.gnu.org; Fri, 29 Jul 2022 15:11:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1659121870; bh=FMC9hjvkdSljByKGKZTySl5pWSAdVgqqVVS/SLn3QmA=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=82Bb4ht4UzgPXDARz7BrqEZK2pJPqNH8VkOuA+WX0MioyLMQZJyNGgLmNe6c5KcuK UaVMlmPbNTBCXIYUU10FmpZcIfF2o+59Ryej0YbUsfJXKQEW4CI+hzhy+v7760YJG9 59Vg+tACi8mfMIm4hIZ/LOGabKyuh6o4ORcJPGUW6lGUmPZpk7/Pus1O6c6AQFTKRm XZd3/pVUgvDFh1exfAw4CKrxLxQ5/R5NEBtyd5jUBLgd9aWUDetmYlynmVEI6vM3CM taUZwntlXXjt2OcABlHJwueNDmIg6Ua6xesls8bEdtAFHkE4NVeNLoH+v6zbH1WRuN 3Q2NSR+Njn5qw== In-Reply-To: <83bkt77nf9.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" Xref: news.gmane.io gmane.emacs.bugs:238213 Archived-At: >> The problem is how "visible" is defined here (by >> pos-visible-in-window-p). With truncated lines, all buffer positions >> between window-start and window-end are "visible", or IOW, all buffer >> positions on the left or right of the actually visible line portion are >> "visible". > > One could use posn-at-point instead. > One could, but... >> Moreover pos-visible-in-window-p is a slow function, so it would be >> terribly slow to call it for each candidate position in a buffer with >> (tens of) thousands of candidate positions. > > I think posn-at-point is much faster, > No, it is slower. On my laptop, with long-line.xml and truncate-lines: (benchmark-run 1000 (pos-visible-in-window-p 310000)) takes 4 seconds (benchmark-run 1000 (numberp (cadr (posn-at-point 310000)))) takes 6 seconds