emacs-devel
[Top][All Lists]
Advanced

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

Re: Adding refactoring capabilities to Emacs


From: Eli Zaretskii
Subject: Re: Adding refactoring capabilities to Emacs
Date: Sun, 20 Aug 2023 09:39:29 +0300

> Date: Sun, 20 Aug 2023 04:19:46 +0300
> From: Dmitry Gutov <dmitry@gutov.dev>
> 
> On 19/08/2023 09:03, Eli Zaretskii wrote:
> >    But back-end is just one part of this.  We should IMO begin by our own
> >    research into the UI parts of this: how does the user specify the
> >    requested refactoring?  Several alternatives are possible, and we
> >    should study them and decide what is best for Emacs.
> 
> If we had a better UI for renaming than query-replace, we could plug it 
> into project-find-regexp and xref-find-references' output buffers.

I indeed think that these capabilities will need a better, novel UI,
and that developing it should be part of such an effort.

> Where you currently can hit 'r' to switch to renaming action, it could 
> instead show the proposed operation (in some fashion) and how the text 
> will look "after". That would cover the regexp-replace and the 
> rename-symbol refactorings. Just the basics, but still. Those could also 
> be combined into separate commands (such as 
> xref-find-references-and-replace).
> 
> LSP clients, with their more sophisticated operations, could use the UI 
> as well, as long as it's possible to agree on the input instructions format.
> 
> And there could be some language-specific refactorings implemented in 
> Lisp as well.
 
Yup.



reply via email to

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