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: sbaugh
Subject: Re: Adding refactoring capabilities to Emacs
Date: Sun, 20 Aug 2023 09:00:39 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:
> I originally wrote the below in a discussion of a bug report, but it
> really belongs here.  So here's a repost:
>
>   > Okay, I'm convinced.  I'll defer this functionality to the future
>   > refactoring support in Emacs, built with project.el and eglot no doubt.
>
>   Eglot can serve as the back-end, and it isn't the only one that comes
>   to mind (I sincerely hope that at least some of the simpler
>   refactoring jobs will not require an LSP, but could be done using
>   built-in capabilities).
>
>   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.
>
>   Would someone please step forward and work on adding refactoring to
>   Emacs?
>
> The main point of this is that it's high time Emacs had sophisticated
> and flexible support for code refactoring.  Let's start working on
> this!

I thought the UI in
https://www.masteringemacs.org/article/combobulate-editing-searching-new-query-builder
was quite interesting.

Something heavily based on tree-sitter is interesting because such
queries could easily be stored and used programmatically outside Emacs,
you simply need to link against the tree-sitter library.  That's
somewhat more convenient than running Emacs as a subprocess to do bulk
automated refactoring, e.g. across 100k files or on every new file
that's committed.




reply via email to

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