unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: "Daniel Martín" <mardani29@yahoo.es>, "Juri Linkov" <juri@linkov.net>
Cc: 60285@debbugs.gnu.org
Subject: bug#60285: xref-query-replace-in-results could show an arrow pointing to the current item being replaced
Date: Thu, 5 Jan 2023 01:48:21 +0200	[thread overview]
Message-ID: <d9d1833a-070e-f03f-6ef8-1a3900b68d6a@yandex.ru> (raw)
In-Reply-To: <m1tu1a33dg.fsf@yahoo.es>

On 01/01/2023 13:23, Daniel Martín wrote:
> Dmitry Gutov<dgutov@yandex.ru>  writes:
> 
>> On 23/12/2022 21:16, Daniel Martín via Bug reports for GNU Emacs, the
>> Swiss army knife of text editors wrote:
>>> Severity: wishlist
>>> When you use xref-query-replace-in-results to replace some
>>> references,
>>> it'd be great if the xref buffer showed an overlay arrow (see
>>> xref--set-arrow) pointing to the reference being edited.  That'd give
>>> better context about the reference that is being edited and the global
>>> progress of the query replace operation.
>> SGTM.
>>
>> Here's a patch which seems to work. It's a little tricky, though, and
>> I'm at a loss with better variable names in some places.
>>
>> Wish we had some unit tests here.
> Thanks.  It works well, but there are some corner cases.

Thanks for testing.

> For example,
> as you can undo or go to the previous match during the query replace,
> the arrow should point to the previous result, if possible.

Hmm, I'm not sure how to implement that. Some new hook inside 
perform-replace?

Maybe Juri has some ideas.





  reply	other threads:[~2023-01-04 23:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m15ye2j5h3.fsf.ref@yahoo.es>
2022-12-23 19:16 ` bug#60285: xref-query-replace-in-results could show an arrow pointing to the current item being replaced Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-24 17:45   ` Dmitry Gutov
2023-01-01 11:23     ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-04 23:48       ` Dmitry Gutov [this message]
2023-01-05 17:55         ` Juri Linkov
2023-01-16  1:41           ` Dmitry Gutov
2023-01-16 17:39             ` Juri Linkov

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=d9d1833a-070e-f03f-6ef8-1a3900b68d6a@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=60285@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=mardani29@yahoo.es \
    /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).