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#43702: Emacs master: Incorrect highlighting in regexp isearch. Date: Wed, 30 Sep 2020 22:16:19 +0300 Organization: LINKOV.NET Message-ID: <87y2krdqsk.fsf@mail.linkov.net> References: <20200929121317.GA27007@ACM> <83wo0ck5ig.fsf@gnu.org> <20200929153355.GB27007@ACM> <87y2ks819k.fsf@gnus.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="20727"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Alan Mackenzie , 43702@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 30 21:21:06 2020 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 1kNhf0-0005HZ-Hw for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Sep 2020 21:21:06 +0200 Original-Received: from localhost ([::1]:60432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNhez-0003pj-IN for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Sep 2020 15:21:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNhe0-0002tc-51 for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2020 15:20:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49860) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kNhdz-000474-R5 for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2020 15:20:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kNhdz-0003Ay-NW for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2020 15:20:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Sep 2020 19:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43702 X-GNU-PR-Package: emacs Original-Received: via spool by 43702-submit@debbugs.gnu.org id=B43702.160149358512155 (code B ref 43702); Wed, 30 Sep 2020 19:20:03 +0000 Original-Received: (at 43702) by debbugs.gnu.org; 30 Sep 2020 19:19:45 +0000 Original-Received: from localhost ([127.0.0.1]:33170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNhdh-00039u-8z for submit@debbugs.gnu.org; Wed, 30 Sep 2020 15:19:45 -0400 Original-Received: from relay10.mail.gandi.net ([217.70.178.230]:58603) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNhdY-000397-6t for 43702@debbugs.gnu.org; Wed, 30 Sep 2020 15:19:36 -0400 Original-Received: from mail.gandi.net (m91-129-108-13.cust.tele2.ee [91.129.108.13]) (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 79747240003; Wed, 30 Sep 2020 19:19:28 +0000 (UTC) In-Reply-To: <87y2ks819k.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 30 Sep 2020 04:08:23 +0200") 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:189425 Archived-At: >> 16. The problem was that the submatch highlight was light magenta on >> dark magenta, which I just didn't see. Maybe the colours used for >> isearch-group-1 on a 16 colour terminal are suboptimal. They certainly >> don't work well on my Linux virtual tty. > > I've now changed the face specs to inherit from the isearch face if > there's fewer than 88 colours. There is another problem: currently isearch-group-3 is indistinguishable visually from the default isearch face (on X with more than 88 colours). Also I don't understand why users would need so many faces (9!) Maybe better to do what Drew proposed: to distinguish the odd groups from the even groups, i.e. to have only 2 additional faces (a brighter face like the current isearch-group-1 for the odd groups, and a darker face for the even groups). >> However, on pressing backspace to go back to previous matches, this new >> highlighting is no longer there. >> >> So, perhaps there is/are (a) bug(s) here after all, just not the one I >> thought I'd found. > > Yup; I can reproduce that bug. The problem is that isearch-delete-char doesn't run the search again that would set match-data. It just restores an old position (isearch-other-end and point) that isearch-highlight uses. One solution is to call isearch-search in isearch-delete-char before isearch-update. But I can't predict all dire consequences. So a better solution is maybe to save match-data on the isearch stack and restore in isearch-pop-state (called by isearch-delete-char). I could try to do this.