unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: gabriele@medialab.sissa.it
Cc: 71430-done@debbugs.gnu.org
Subject: bug#71430: Persistent Highlighting Issue with query-replace using "act-and-show" Option
Date: Sat, 08 Jun 2024 13:41:02 +0300	[thread overview]
Message-ID: <865xujemyp.fsf@gnu.org> (raw)
In-Reply-To: <86a5jvesuk.fsf@gnu.org> (message from Eli Zaretskii on Sat, 08 Jun 2024 11:33:55 +0300)

> Date: Sat, 8 Jun 2024 11:05:24 +0200
> From: Gabriele Nicolardi <gabriele@medialab.sissa.it>
> 
> Il 08/06/24 10:33, Eli Zaretskii ha scritto:
> >> Date: Sat, 8 Jun 2024 09:29:41 +0200
> >> From: Gabriele Nicolardi <gabriele@medialab.sissa.it>
> >>
> >> 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 <eliz@gnu.org>
> > > 
> > > > Date: Sat, 8 Jun 2024 09:29:41 +0200
> > > > From: Gabriele Nicolardi <gabriele@medialab.sissa.it>
> > > > 
> > > > 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.





      reply	other threads:[~2024-06-08 10:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-08  7:29 bug#71430: Persistent Highlighting Issue with query-replace using "act-and-show" Option Gabriele Nicolardi
2024-06-08  8:33 ` Eli Zaretskii
2024-06-08 10:41   ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=865xujemyp.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=71430-done@debbugs.gnu.org \
    --cc=gabriele@medialab.sissa.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).