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: Dmitry Gutov
Subject: Re: Adding refactoring capabilities to Emacs
Date: Sun, 20 Aug 2023 04:19:46 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

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.

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.



reply via email to

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