From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Adding refactoring capabilities to Emacs Date: Sat, 09 Sep 2023 00:17:23 +0100 Message-ID: <87v8ckjlvg.fsf@gmail.com> References: <83fs4f36wi.fsf@gnu.org> <5ddf5fe1-e5c9-2105-5cb8-a96bc8cecc86@gutov.dev> <858c929d-61c3-633e-ae9a-de8c5e5c40d1@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="533"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , "Philip K." , Stefan Monnier , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 09 01:15:55 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qekhf-000ASj-9E for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Sep 2023 01:15:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qekgc-0002ML-CS; Fri, 08 Sep 2023 19:14:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qekgb-0002KS-AK for emacs-devel@gnu.org; Fri, 08 Sep 2023 19:14:49 -0400 Original-Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qekgY-0005JO-N4; Fri, 08 Sep 2023 19:14:49 -0400 Original-Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4013454fa93so29444725e9.0; Fri, 08 Sep 2023 16:14:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694214883; x=1694819683; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=mj9fAF6sQf/xUaNfQrEo8qoOc3PXZFNFa773SG2fm8I=; b=E6EyTm/b7VyIEbI5jgtG71HmNPAFccGzskRrwE/YgM4HSp4Ywoi7+fBCzhK1IpkM3X scTzEc5752ZFCHMXnOXF8Xkv1ECIOWX2quacrKgJx/SaW+mKry1LuTyc78qjSHA8Hjhu 2pcqeixsHxevp6AIjZuiVFn8E1jbH5RVdm5/u/+gT/NdqMOuC98WDnAm53AwdKuNjfa1 TvuLU6B+qnB8f7ucsHxuChcrfq/C2mySVYtxPyaEqRzBZuoJNNE6Htz8ineCeP5TATA0 U8GsnttyBc7zpZumgPF64FMdbXROK1JsDPM+47i5WQYPWh4GtjBsgrHGwF5X/vBR3C1d fJpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694214883; x=1694819683; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mj9fAF6sQf/xUaNfQrEo8qoOc3PXZFNFa773SG2fm8I=; b=Cuq651KTsAjn25RY9fe/t5dnixaT5rBBYHMykwkVYQUZmkijXm6RvPHezbMOYalTG6 b11NkbdCZETVEOe2CDu1umIiO9BFjH7ElE9PoEAGrM2Hl9KRQSS5jRfpm1/uFwjcuZs5 dvU6mGoe6XHjri5CYJttH2HeNoeZeRAUBHLbysu0HReNCTYuOOFvn3a8hW7W0l2N4opH iNP01ZPriEQkXEEreTel6aVekHWebV9xhMr4CylLT4W3Z8tmglDbW0kpeUtOzqURFXZZ F5+rbus0JXIV86v8BWEnAMJmQuijFpEJct9PZCmrYZTN1My6lP9XBU7P7wK6++mPoxKd Pcag== X-Gm-Message-State: AOJu0Yzh5Fsz97rx9wgjwaVoWQ1p3SfgVoPLDOWY9M7uh+NvpnKFs6vF ZilV+dJNtGioMyRBPv9XBHhq/v8m80MSqg== X-Google-Smtp-Source: AGHT+IFxivGgdLDuTKw6Mio4OxFbPyrKKbcgZ2bx/B7G8BLla3fx82H2/66hxJZVy++JEXECXDxLeA== X-Received: by 2002:a05:600c:2483:b0:401:38dc:8918 with SMTP id 3-20020a05600c248300b0040138dc8918mr3267798wms.24.1694214882468; Fri, 08 Sep 2023 16:14:42 -0700 (PDT) Original-Received: from krug ([87.196.72.223]) by smtp.gmail.com with ESMTPSA id c25-20020a05600c0ad900b003fee567235bsm6326432wmr.1.2023.09.08.16.14.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Sep 2023 16:14:41 -0700 (PDT) In-Reply-To: <858c929d-61c3-633e-ae9a-de8c5e5c40d1@gutov.dev> (Dmitry Gutov's message of "Sat, 9 Sep 2023 01:35:35 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:310372 Archived-At: Dmitry Gutov writes: > Although the impact somewhat depends on whether the current > performance is proportional to the number of files, or the number of > edits. I think it depends on both, but a large number of edits is relatively slow anyway. That's probably because you have to make lots of arrangements to get correct undo behaviour and call the self-admittedly "very slow" replace-buffer-contents C functions. Anyway, I never looked at performance because noone ever complained until you (and it didn't and still doesn't bother me). But maybe there's some low-hanging fruit there. > You skipped over the remainder of my email where I explained why I > liked to start with step 4. Probably didn't have anything useful to add. You can focus on whatever you part you like, of course. > We can still want to be able to tweak it during Emacs 30's > development, of course, and maybe even later, but it's impossible not > to discuss and document if we want customizable/swappable UIs for > confirmation anyway. I think everyone already agreed we want that. > Anyway, I guess we'll implicitly decide that both "rename" and > "organize imports" are always available and create commands with > dedicated bindings for them? At least for "rename". For the others, not so sure yet. > Why the latter, BTW? Or are there more commands like that? From what > I'm reading, "organize imports" is not a part of the official LSP > protocol, though there are extensions. It's a common code for an LSP action. Other common names: "source.organizeImports" "refactor.extract" "refactor.inline" "refactor.rewrite" "quickfix" >>> Not sure why the cutoff is there: and not for example "if all the >>> changes are in the current file", or "are all visible on the >>> screen". Seemed reasonable and easy to implement, so I did it. Noone complained and I quite like it. Your ideas are also quite good, so other cutoff criteria welcome (even if just to Eglot right now) if you want to keep shaving this interface yak :-)