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 13:41:02 +0300 Message-ID: <865xujemyp.fsf@gnu.org> References: <43f6ae01-d581-4b88-8914-da9943178c92@medialab.sissa.it> <86a5jvesuk.fsf@gnu.org> 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="12876"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71430-done@debbugs.gnu.org To: gabriele@medialab.sissa.it Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 08 12:44:21 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 1sFtYb-0003Bd-Ah for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Jun 2024 12:44:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFtY4-0002q5-Mn; Sat, 08 Jun 2024 06:43:48 -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 1sFtY3-0002pc-Nd for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2024 06:43:47 -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 1sFtY3-0004az-FS for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2024 06:43:47 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sFtYI-0003E4-Pp for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2024 06:44:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Jun 2024 10:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 71430 X-GNU-PR-Package: emacs Mail-Followup-To: 71430@debbugs.gnu.org, eliz@gnu.org, gabriele@medialab.sissa.it Original-Received: via spool by 71430-done@debbugs.gnu.org id=D71430.171784342212361 (code D ref 71430); Sat, 08 Jun 2024 10:44:02 +0000 Original-Received: (at 71430-done) by debbugs.gnu.org; 8 Jun 2024 10:43:42 +0000 Original-Received: from localhost ([127.0.0.1]:37522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFtXx-0003DJ-Ue for submit@debbugs.gnu.org; Sat, 08 Jun 2024 06:43:42 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFtXs-0003Cz-Vi for 71430-done@debbugs.gnu.org; Sat, 08 Jun 2024 06:43:40 -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 1sFtVR-0004Lv-CA; Sat, 08 Jun 2024 06:41:05 -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=FrCFMI0Wj6xXn3WxUUrq/a/jJIyHIvPNJTDtyiEo3gU=; b=Tfcr3Ws/bF7++sCprw8w SjaFvZ8p2AGdDP5PObPAXrJ1FaY/IV8/7LOL/nwzgBmwogEmPJbW9vgk5hYc/mUKkju5q0cHnuT+F gjjcLhpqlM6pGQEyfQyVCOPYdzp03c60TrhSA3YKIf7oyLhusLpk/LWNi5wVwSrowGOGIipIG1TPl Z9CsgqOO4EHSBKmXCFt73jpAHCVKMJNzaY6sGBW0IWzjXyb2SFHi/gl7twbNMKWQFV1eNP+8+GWmL ZSMCI/amQzr8PAJITRZYl2LJRI/vwWbLTi6R5bieolDSKXcaZRb+uAdo48ZLMyzjJDj581do3gWCc MIlvApgZhZP3wQ==; In-Reply-To: <86a5jvesuk.fsf@gnu.org> (message from Eli Zaretskii on Sat, 08 Jun 2024 11:33:55 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286824 Archived-At: > Date: Sat, 8 Jun 2024 11:05:24 +0200 > From: Gabriele Nicolardi > > Il 08/06/24 10:33, Eli Zaretskii ha scritto: > >> 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. > > > > > > Cc: 71430@debbugs.gnu.org > > > Date: Sat, 08 Jun 2024 11:33:55 +0300 > > > From: Eli Zaretskii > > > > > > > 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. > > Oh, sorry! My Emacs version is 29.3. OK, thanks, so I'm now closing this bug.