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:02:02 +0300 Message-ID: <83bkt77nf9.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2426"; 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 21:03:20 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 1oHVGZ-0000Qh-JA for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Jul 2022 21:03:19 +0200 Original-Received: from localhost ([::1]:47392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHVGY-0006LM-DR for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Jul 2022 15:03:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHVGI-0006Jo-OD for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 15:03:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43709) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHVGI-0002V1-6p for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 15:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oHVGH-00078G-Rd for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 15:03: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 19:03: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.165912132827349 (code B ref 56815); Fri, 29 Jul 2022 19:03:01 +0000 Original-Received: (at 56815) by debbugs.gnu.org; 29 Jul 2022 19:02:08 +0000 Original-Received: from localhost ([127.0.0.1]:33458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHVFN-000771-Vf for submit@debbugs.gnu.org; Fri, 29 Jul 2022 15:02:08 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHVFI-00076T-HN for 56815@debbugs.gnu.org; Fri, 29 Jul 2022 15:02:04 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46112) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHVFA-0002QJ-V7; Fri, 29 Jul 2022 15:01:53 -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=nU5DqKVpRfg4GWBef51zA8fiesYJQT+KITtheekTvCc=; b=YTihrS/H50Z3 19yzXI/GviFz+NpVZAxeUrRrfL0IFpF2A63IpTZtyezOscTPonOYpWUwwhWuwnoj803/lE6DlanCp xkRNtUZ1MPcFKg9IVpbP+co6B2j7EFosBC/pUYIZInB8ZlZYQHhRXgjmyCqFwOWHnd4qKhMBcZ0U+ 7Ok+wxlHh23A91cUXmCiNsB8u8Zho7Yvi4jnH5bp/+AndGZSHdC2ak66OwtSAfCXQOMQ9MNJFtgTZ tMZnUSQAQ0PU4oDQubAhx8J3puqqHt1KYq/VejVj4X18DNGESp7VpsG/G41t3oiUbxPb+tTplC6n+ bb4GUO67lpyc9WDhBKhg0g==; Original-Received: from [87.69.77.57] (port=4945 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 1oHVF7-00041f-Tz; Fri, 29 Jul 2022 15:01:52 -0400 In-Reply-To: (message from Gregory Heytings on Fri, 29 Jul 2022 18:37:55 +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:238212 Archived-At: > Date: Fri, 29 Jul 2022 18:37:55 +0000 > From: Gregory Heytings > cc: Lars Ingebrigtsen , Eli Zaretskii , > 56815@debbugs.gnu.org > > > Indeed what is worth trying is to add pos-visible-in-window-group-p > > either to isearch-filter-predicate, or directly to > > isearch-lazy-highlight-search. > > That wouldn't work alas. > > 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. > 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, because it never actually looks beyond the right edge of the window (it considers every position beyond the rightmost shown one to be at the edge of the window, either on the right-fringe, if fringes are shown, or at the last_visible_x coordinate).