all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: Yuri Khan <yuri.v.khan@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: Adding refactoring capabilities to Emacs
Date: Mon, 21 Aug 2023 01:51:44 +0300	[thread overview]
Message-ID: <61621120-8f6d-5884-e7c8-33581b8e0ca4@gutov.dev> (raw)
In-Reply-To: <CAP_d_8XKrW0+HFoT+N6PCFKTVpt34KDubX8+GzrAxBtVuASo9g@mail.gmail.com>

On 20/08/2023 11:44, Yuri Khan wrote:
> On Sun, 20 Aug 2023 at 08:20, Dmitry Gutov<dmitry@gutov.dev>  wrote:
> 
>> 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).
> Renaming is already possible in Eglot, with the following UI: You
> stand on a symbol and invoke eglot-rename. It asks you for the new
> name, then does the right thing.

Indeed: we do have access to a bunch of refactorings already through 
Eglot. Some general, and some language-specific ones.

What we don't have is any advanced UI coming with that. Traditional IDEs 
(and apparently even VS Code now: 
https://bobbyhadz.com/images/blog/rename-variable-vscode/refactor-preview.webp) 
have been featuring the "preview changes" feature for years. One where 
you could see which files will be affected, and even opt out from some 
of the changes.

It seems like the LSP protocol provides enough information for this to 
work (the response to the "rename" action is a list of changes to be 
performed on the client), so the UI can definitely be extended there.



  reply	other threads:[~2023-08-20 22:51 UTC|newest]

Thread overview: 147+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-19  6:03 Adding refactoring capabilities to Emacs Eli Zaretskii
2023-08-19 10:58 ` Eshel Yaron
2023-08-19 11:18   ` Eli Zaretskii
2023-08-20  1:19 ` Dmitry Gutov
2023-08-20  6:39   ` Eli Zaretskii
2023-08-20  6:42     ` Ihor Radchenko
2023-08-20  8:44   ` Yuri Khan
2023-08-20 22:51     ` Dmitry Gutov [this message]
2023-08-29 10:53       ` João Távora
2023-08-29 11:35         ` Dr. Arne Babenhauserheide
2023-08-30  0:52         ` Dmitry Gutov
2023-08-30 18:46           ` Stefan Kangas
2023-08-30 19:59             ` Dmitry Gutov
2023-08-30 20:37           ` João Távora
2023-08-30 21:49             ` Dmitry Gutov
2023-08-30 22:01               ` Stefan Kangas
2023-08-30 22:04                 ` Dmitry Gutov
2023-09-04  6:03                 ` Rudolf Schlatte
2023-09-04 11:04                   ` João Távora
2023-09-04 12:18                     ` Rudolf Schlatte
2023-08-31  5:03               ` Eli Zaretskii
2023-08-31  8:02                 ` João Távora
2023-09-04 15:45                   ` Dmitry Gutov
2023-09-04 23:34                     ` Dmitry Gutov
2023-09-04 17:23               ` Juri Linkov
2023-09-04 17:53                 ` Alfred M. Szmidt
2023-09-05  6:38                   ` Juri Linkov
2023-09-05  7:46                     ` Alfred M. Szmidt
2023-09-04 18:04                 ` Dmitry Gutov
2023-09-05  6:43                   ` Juri Linkov
2023-09-04 20:49                 ` Philip Kaludercic
2023-09-04 17:15   ` Juri Linkov
2023-09-04 18:02     ` Dmitry Gutov
2023-09-05 13:56       ` Alexander Adolf
2023-09-05 14:00         ` Dmitry Gutov
2023-09-06 13:25           ` Alexander Adolf
2023-08-20 13:00 ` sbaugh
2023-09-07 14:39 ` João Távora
2023-09-07 16:20   ` Stefan Monnier
2023-09-07 16:49     ` João Távora
2023-09-07 17:06       ` Stefan Monnier
2023-09-07 17:24         ` João Távora
2023-09-07 17:54           ` Stefan Monnier
2023-09-07 18:12             ` João Távora
2023-09-07 21:56               ` Stefan Monnier
2023-09-07 23:46         ` Lynn Winebarger
2023-09-07 20:41     ` Dmitry Gutov
2023-09-07 22:03       ` Stefan Monnier
2023-09-07 22:43         ` Dmitry Gutov
2023-09-07 22:18     ` João Távora
2023-09-07 22:39       ` Dmitry Gutov
2023-09-08  6:18         ` Eli Zaretskii
2023-09-08 18:25           ` Dmitry Gutov
2023-09-08 18:35             ` João Távora
2023-09-08 18:38               ` Dmitry Gutov
2023-09-08 18:44                 ` João Távora
2023-09-08 19:29                   ` Dmitry Gutov
2023-09-08 18:57               ` Eli Zaretskii
2023-09-08 19:01                 ` João Távora
2023-09-08  6:55         ` João Távora
2023-09-08 15:42           ` Stefan Monnier
2023-09-08 16:05             ` João Távora
2023-09-08 16:20               ` João Távora
2023-09-25 23:11                 ` Dmitry Gutov
2023-09-25 23:32                   ` Dmitry Gutov
2023-09-26  5:36                   ` Alfred M. Szmidt
2023-09-26  8:06                     ` João Távora
2023-09-26 10:57                       ` Dmitry Gutov
2023-09-26 11:24                         ` João Távora
2023-09-26 11:33                           ` Alfred M. Szmidt
2023-09-26 11:34                           ` Dmitry Gutov
2023-09-26 12:57                             ` João Távora
2023-09-26 13:09                               ` Alfred M. Szmidt
2023-09-26 13:52                                 ` Dmitry Gutov
2023-09-26 13:38                           ` Philip Kaludercic
2023-09-26 14:06                             ` João Távora
2023-09-26 14:31                               ` Dmitry Gutov
2023-09-26 14:51                                 ` João Távora
2023-09-26 14:54                                   ` Dmitry Gutov
2023-09-26 15:17                                     ` João Távora
2023-09-26 15:35                                       ` Alfred M. Szmidt
2023-09-26 15:38                                         ` Dmitry Gutov
2023-09-26 15:47                                           ` Alfred M. Szmidt
2023-09-26 16:01                                             ` Dmitry Gutov
2023-09-26 16:10                                               ` Alfred M. Szmidt
2023-09-29 10:55                                                 ` Eli Zaretskii
2023-09-29 12:36                                                   ` Alfred M. Szmidt
2023-09-29 15:32                                                     ` Eli Zaretskii
2023-09-26 16:31                                               ` Yuri Khan
2023-09-26 17:28                                                 ` Dmitry Gutov
2023-09-29 11:10                                                 ` Eli Zaretskii
2023-09-29 10:49                                             ` Eli Zaretskii
2023-09-29 12:36                                               ` Alfred M. Szmidt
2023-09-26 15:01                                 ` [External] : " Drew Adams
2023-09-26 15:22                                   ` Alfred M. Szmidt
2023-09-29 10:36                                     ` Eli Zaretskii
2023-09-29 12:30                                       ` Robert Pluim
2023-09-29 13:11                                         ` Stefan Monnier
2023-09-29 13:13                                           ` Alfred M. Szmidt
2023-09-29 13:16                                           ` João Távora
2023-09-29 13:19                                             ` João Távora
2023-09-29 15:20                                               ` Stefan Monnier
2023-10-01 12:07                                                 ` Stefan Kangas
2023-10-01 18:43                                                   ` Howard Melman
2023-09-29 15:47                                           ` Drew Adams
2023-09-29 15:30                                         ` Eli Zaretskii
2023-09-26 15:27                                   ` Alfred M. Szmidt
2023-09-29 10:40                                     ` Eli Zaretskii
2023-09-29 12:36                                       ` Alfred M. Szmidt
2023-09-29 15:34                                         ` Eli Zaretskii
2023-09-29 15:40                                           ` Alfred M. Szmidt
2023-09-29 16:22                                             ` Eli Zaretskii
2023-09-29 16:32                                               ` Alfred M. Szmidt
2023-09-29 16:51                                                 ` Eli Zaretskii
2023-09-29 17:32                                                   ` Alfred M. Szmidt
2023-09-29 17:56                                                     ` Eli Zaretskii
2023-09-29 18:02                                                   ` Stefan Monnier
2023-09-26 10:55                     ` Dmitry Gutov
2023-09-26 12:03                       ` Alfred M. Szmidt
2023-09-26 12:11                         ` Dmitry Gutov
2023-09-26 12:20                           ` Alfred M. Szmidt
2023-09-29  6:52                           ` Eli Zaretskii
2023-09-29 10:21                             ` Dmitry Gutov
2023-09-29 15:20                               ` Eli Zaretskii
2023-09-29 17:20                                 ` Dmitry Gutov
2023-09-29 17:36                                   ` Eli Zaretskii
2023-09-29 17:44                                     ` Dmitry Gutov
2023-09-08 18:35               ` Dmitry Gutov
     [not found]                 ` <CALDnm52Wtat24JFu=o6m_eJVamub+1H1BxNd5eELQ2j--7OetA@mail.gmail.com>
     [not found]                   ` <da4cb294-39eb-c4a1-a625-da5ee183170c@gutov.dev>
2023-09-08 18:57                     ` João Távora
2023-09-07 19:06   ` Felician Nemeth
2023-09-07 19:19     ` João Távora
2023-09-07 19:25     ` Ihor Radchenko
2023-09-07 19:28       ` Ihor Radchenko
2023-09-07 22:14         ` João Távora
2023-09-07 20:43     ` Dmitry Gutov
2023-09-07 22:39   ` Dmitry Gutov
2023-09-08 11:10     ` João Távora
2023-09-08 22:35       ` Dmitry Gutov
2023-09-08 23:17         ` João Távora
2023-09-08 12:46   ` Eshel Yaron
2023-09-08 12:52     ` João Távora
2023-09-08 13:18       ` Eshel Yaron
2023-10-01 15:07         ` Extract to new definition (was: Adding refactoring capabilities to Emacs) Eshel Yaron
2023-09-08 13:30       ` [semi off topic] grep-based refactoring [was: Adding refactoring capabilities to Emacs] tomas
2023-09-08 17:53         ` João Távora
2023-09-08 18:24           ` Dmitry Gutov
2023-09-08 18:51             ` tomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=61621120-8f6d-5884-e7c8-33581b8e0ca4@gutov.dev \
    --to=dmitry@gutov.dev \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=yuri.v.khan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.