emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Patch] Add project.el command to replace symbol at point throughout


From: Eli Zaretskii
Subject: Re: [Patch] Add project.el command to replace symbol at point throughout project
Date: Thu, 13 Jan 2022 10:25:18 +0200

> Cc: eskinjp@gmail.com, emacs-devel@gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Thu, 13 Jan 2022 03:19:12 +0200
> 
> The conceptual problem with that is we have a number of commands which 
> produce a list of matches in an Xref buffer:
> 
> xref-find-references,
> xref-find-apropos,
> project-find-regexp,
> project-or-external-find-regexp
> 
> They're all fairly, so I won't think there's a change of implementing 
> any meaningful automatic switching based on context.
> 
> Do we create the -and-replace counterpart only for xref-find-references?

Yes, that's what I wanted to propose.

> There's also dired-do-find-regexp for which we have added said 
> counterpart already (dired-do-find-regexp-and-replace), but that was 
> primarily for backward compatibility of the UI.

Right.

> >> Or you can do a search with M-? and then press 'r'. Have you tried that?
> > 
> > At some point.  But I think someone who wants refactoring might have
> > trouble discovering that, and a separate command will make that
> > easier.
> 
> I rather remember the old recommendation to 'M-x find-grep-dired' 
> followed by '% m RET .*' and 'M-x dired-do-query-replace-regexp', when 
> one wanted to replace across the project. I think we're rather spoiled 
> these days by comparison.
> 
> Anyway, if you're sure adding xref-find-references-and-replace will 
> help, I've got no problem with that.

I think it will be a good addition to what we already have in that
department.  And given that we document it in the user manual, it
should become known to users soon enough.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]