From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#56815: 29.0.50; Isearch lazy-highlight highlights too much when truncate-lines is in effect Date: Mon, 01 Aug 2022 21:09:05 +0300 Organization: LINKOV.NET Message-ID: <86y1w7bzum.fsf@mail.linkov.net> 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> <837d3v7kr9.fsf@gnu.org> <86fsih5bch.fsf@mail.linkov.net> <83wnbs2nc3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11287"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 56815@debbugs.gnu.org, gregory@heytings.org, larsi@gnus.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 01 20:23:16 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 1oIa4R-0002ln-O0 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 20:23:15 +0200 Original-Received: from localhost ([::1]:48216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIa4Q-0002un-7o for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 14:23:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIZzP-0000nb-2N for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 14:18:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51863) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIZzO-0000WV-Q8 for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 14:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oIZzO-000277-Mo for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 14:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Aug 2022 18:18:02 +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.16593778528039 (code B ref 56815); Mon, 01 Aug 2022 18:18:02 +0000 Original-Received: (at 56815) by debbugs.gnu.org; 1 Aug 2022 18:17:32 +0000 Original-Received: from localhost ([127.0.0.1]:41605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIZyu-00025Z-A9 for submit@debbugs.gnu.org; Mon, 01 Aug 2022 14:17:32 -0400 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:58479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIZys-000257-TT for 56815@debbugs.gnu.org; Mon, 01 Aug 2022 14:17:31 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 15029100006; Mon, 1 Aug 2022 18:17:20 +0000 (UTC) In-Reply-To: <83wnbs2nc3.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 01 Aug 2022 14:51:56 +0300") 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:238459 Archived-At: > So if no good ideas arise that are simple enough to implement, I'm > okay with simply disabling isearch-lazy-highlight in such buffers, as > I wrote in the original bug report. (Doing that will probably require > exposing the "long-lines" flag to Lisp, but that's fine by me.) Exposing the "long-lines" flag to Lisp is exactly what is needed. So when lazy-highlight will detect a special value of a new buffer-local variable when narrowing is in effect due to long lines, then lazy-highlight can switch to a different algorithm like you described earlier. Currently isearch-lazy-highlight-new-loop checks for window-group-start and window-group-end. But when the "long-lines" flag is set, it should also check for window-hscroll because narrowed lazy-highlighting should be updated on hscrolling. This "long-lines" flag will be also useful for pre-command-hook and post-command-hook to convey the information about narrowing to hooks.