emacs-devel
[Top][All Lists]
Advanced

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

Re: [semi off topic] grep-based refactoring [was: Adding refactoring cap


From: Dmitry Gutov
Subject: Re: [semi off topic] grep-based refactoring [was: Adding refactoring capabilities to Emacs]
Date: Fri, 8 Sep 2023 21:24:12 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 08/09/2023 20:53, João Távora wrote:
On Fri, Sep 8, 2023 at 2:31 PM<tomas@tuxteam.de>  wrote:
On Fri, Sep 08, 2023 at 01:52:53PM +0100, João Távora wrote:

[...]

Great.  Precise project-wide analysis (as opposed to more-or-less dumb
grep-based) is exactly the main thing we should be targeting IMO.
  Is "rename" the only thing it does or can you, say, extract subexpressions
to variables, organize imports, etc?
As someone who has done quite a bit of "grep based refactoring", one
observation: of course, this can only me made semi-manually. But then,
the process has found things for me a syntax based refactoring tool
wouldn't ever have,
Not sure about that.  Clangd mentions this limitation specifically
in their web page, so they acknowledge it and possibly are looking
to fix it.  It's not too wild to think that an LSP server might
to suggest additional edits beyond what it has from syntactic
analysis, who knows maybe even using language models or by using
a parser that understands doxygen or common types of documentation
systems using comments.

As long as the identifiers are referred to in the docstrings using the proper markup. And they could also mention the same term in the free-form text which one might want to see renamed.

So the only thing we know for sure is that grep-based isn't enough.

Good thing we'll have access to both anyway.



reply via email to

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