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#71430: Persistent Highlighting Issue with query-replace using "act-and-show" Option Date: Sat, 08 Jun 2024 11:33:55 +0300 Message-ID: <86a5jvesuk.fsf@gnu.org> References: <43f6ae01-d581-4b88-8914-da9943178c92@medialab.sissa.it> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5439"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71430@debbugs.gnu.org To: Gabriele Nicolardi Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 08 11:11:17 2024 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 1sFs6X-0001GH-EL for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Jun 2024 11:11:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFs66-0005e8-4z; Sat, 08 Jun 2024 05:10:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sFs63-0005d3-PR for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2024 05:10:48 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sFs63-0005w7-HN for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2024 05:10:47 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sFs6J-0007nI-3P for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2024 05:11:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Jun 2024 09:11:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71430 X-GNU-PR-Package: emacs Original-Received: via spool by 71430-submit@debbugs.gnu.org id=B71430.171783782529863 (code B ref 71430); Sat, 08 Jun 2024 09:11:03 +0000 Original-Received: (at 71430) by debbugs.gnu.org; 8 Jun 2024 09:10:25 +0000 Original-Received: from localhost ([127.0.0.1]:60904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFs5g-0007lZ-P0 for submit@debbugs.gnu.org; Sat, 08 Jun 2024 05:10:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFrrH-00070A-Ck for 71430@debbugs.gnu.org; Sat, 08 Jun 2024 04:55:32 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sFrWQ-0008D7-8V; Sat, 08 Jun 2024 04:33:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=evk1yPxfXdnOH9xx3afhvMQwnb1vi2PsyZnq9ebCP7A=; b=Igwmf0yXiRou3+PAiHCF 1UgL89k6CuQbIs6BhmOSHQhH2HUmC/Nn7ESo+wP1k2AFJriAMbLgspjeBarr7d9hrzX95BKjtZNW3 ErlzhRL+BIVQEYaKGyccc+65+QCSRpAgDMbVw/AntufUodbZXkANJGAcpIph7TwXYMHl0b+2g4+fe 04nkYvXaSa46Q/nkdjV5NfwX2CrodNDpFq9kt3Uc28mNVOxF/JPDUQ5+htHml29TVWsw5tKhUNfIl p1zcRuZtQioXmpbRHM7Z+NvS6MtHYVbhbBR+VpbIS/pY4I7U1iUvCtFWIqWJ6LNFOq6J8R3DeAoE1 ka6Kol5Fmfru6w==; In-Reply-To: <43f6ae01-d581-4b88-8914-da9943178c92@medialab.sissa.it> (message from Gabriele Nicolardi on Sat, 8 Jun 2024 09:29:41 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286819 Archived-At: > Date: Sat, 8 Jun 2024 09:29:41 +0200 > From: Gabriele Nicolardi > > I’ve encountered a potential bug in Emacs when using the |query-replace| > (via |perform-replace|) functions. When performing text replacements > across a buffer and choosing to replace but not immediately move the > point (using the |,| |act-and-show| option), the function does replace > the text as expected but fails to update the highlighting to the region > containing the replacement. > > *Steps to Reproduce:* > > 1. > > Open a buffer with the following content: > > |String to be replaced. Another string. String to be replaced. > Another string. End | > > 2. > > Run the following command: > > |(query-replace "String to be replaced." "Replacement." nil > (point-min) (point-max)) | > > 3. > > When prompted to replace a match, use the |,| (|act-and-show|) > option to replace the text but pause moving to the next match. > > *Expected Behavior:* > After a replacement is made and before moving to the next match, the > highlighted region of the replaced text should be “updated” to fit the > replaced text. > > *Actual Behavior:* > The highlighting remains on the matched region. This issue can be > visually confirmed in the following animation: You don't say in what version of Emacs you see the problematic behavior. I can reproduce the behavior you report in Emacs 29, but not in Emacs 30 (on the master branch of the Emacs Git repository). So I think this bug was already solved on the master branch, which will become Emacs 30.