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: Fri, 8 Sep 2023 19:57:16 +0100 Message-ID: References: <83fs4f36wi.fsf@gnu.org> <1b963d24-51b3-8128-ad14-e4af2c9f0c43@gutov.dev> <3585e59b-2685-fb54-913f-2ad51641c553@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21283"; mail-complaints-to="usenet@ciao.gmane.io" To: Dmitry Gutov , emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 08 20:57:56 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 1qegfy-0005Lt-QY for ged-emacs-devel@m.gmane-mx.org; Fri, 08 Sep 2023 20:57:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qegfi-0003VI-Rz; Fri, 08 Sep 2023 14:57:38 -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 1qegfe-0003J2-EF for emacs-devel@gnu.org; Fri, 08 Sep 2023 14:57:35 -0400 Original-Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qegfb-0006PW-38 for emacs-devel@gnu.org; Fri, 08 Sep 2023 14:57:34 -0400 Original-Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2bce552508fso40119081fa.1 for ; Fri, 08 Sep 2023 11:57:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694199449; x=1694804249; darn=gnu.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=A9asPKuWvx6+BLG73noy7w+S+lq/zSioGQtSWNIi+hM=; b=Rt5Wch3r5+lTANWd9LhIBOLSE7tmtd5rLwolkCG8Fv+YE4Qm1trWkq2cSSX6x+bVn6 R8/4PxND5cfg9WB6DrhJdeVJzn+mqg3VECBRec9WOGHbqRRfTj5Nz8vlaQFUV1BHKeX9 ZYvRUjoAJUM4nd+YAKy0hllGUhtSsFhOAvOqiRG/bh3f83mIgZrvmeVqUiBE6PkKLKwB RCpbevcFe7f0XFyaESEz8RA9mrWZRRJ3gYBA4GSWBaWT3qg77asjy8KjJDoMPEu42BkK cnBfO5dBZ4aCYfMaEqnbwfnb8v4Bi/vNPvFck0d/q8xHEHuwFCV2Fw6SBuBs6D0yO9DS iXSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694199449; x=1694804249; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A9asPKuWvx6+BLG73noy7w+S+lq/zSioGQtSWNIi+hM=; b=e7nSh0X8Hvia12e4/6LmqVAsTqdTAmjWavlmOy6EwSUIP5JTq4Aco27QQX0Ky4jink Mt2FB8pcz3+zsAI99ACaLKSss3dnw5f57Rn/lioWEIui7y2D3vioYlRW8nM6O/BIyUIp C3mmJ8EwC2Mrpslru1hKo0Y4Y3gOtXsbGdnySV9cYZeSqMLHZ+aBE09mG9RE7qxeLfUK IeGEF9lrdqwLSoP+qqujzB4Hln7lf3FfwlfK6inlguxjPTotGTYeAhZ1puMDJXuFWCeQ TFg2x0nLpinmzzRKIySrktarIdxglLJTuTxaCKYMl9ucLqdNuLHX7P0PMNhpGCuCUDmS HLjQ== X-Gm-Message-State: AOJu0Yzldh+D+muEN9tyeV4K19/Oku0REW34n0BeonEiMKK3Km+FGGN0 FWMXXi+/yEucPu4EWvtyTzVq0mhWot7Y0aMEAMo= X-Google-Smtp-Source: AGHT+IFSC8Hhq2QO7dAlBdQobL6e03Smw2egcUHzZrtBzxJmk3VHH0N6RzURtLnNncypbxTZZRh2Ic3WXARPjZ6mSnQ= X-Received: by 2002:a05:6512:2256:b0:4fd:fedc:2ce5 with SMTP id i22-20020a056512225600b004fdfedc2ce5mr2792028lfu.36.1694199448558; Fri, 08 Sep 2023 11:57:28 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::22a; envelope-from=joaotavora@gmail.com; helo=mail-lj1-x22a.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:310363 Archived-At: On Fri, Sep 8, 2023 at 7:46=E2=80=AFPM Dmitry Gutov wrot= e: > > (This one arrived in private, BTW) Thanks for noticing, hoping it's fine to re-add emacs-devel > On 08/09/2023 21:39, Jo=C3=A3o T=C3=A1vora wrote: > > On Fri, Sep 8, 2023 at 7:35=E2=80=AFPM Dmitry Gutov = wrote: > >> On 08/09/2023 19:05, Jo=C3=A3o T=C3=A1vora wrote: > >>>>>> diff-apply-everything could work with "someone's patches" just as = well. > >>>>>> That's actually a reason to just add it to diff-mode. > >>>>> I never said there wasn't. But don't touch C-c C-c please. > >>>> Maybe we should start by removing that `C-c C-c` binding from > >>>> `diff-mode` (users like you who really like it can re-add it easily)= . > >>> Strongly object to this. Remove a 20yo binding? Aren't there > >>> really other alternatives?? > >> Obviously there are some, but can you suggest a good one? > > Just proposed C-c RET. C-c M-c is also good IMO, so many > > good shortcuts. > > > >> Following the semantics of 'C-c C-c' of others modes can make the new > >> feature easier to use and discover too. > > It's not following any such "semantics", unless you bend them really > > hard. > > When I finish a commit, I press 'C-c C-c'. Seems quite logical to me. > > Especially if we consider the case where the user edits the diff (e.g. > with C-k) first. > > > C-c C-c means "compile current function" for all SLIME users > > (and I suspect CIDER users too). > > But note that this also has the meaning of "I've updated a piece of > work, proceed with it", conveyed to the compiler. Not too far off. I guess, but in effect, nothing's "too far off" if you squint hard enough. > > If it has any semantics at all, > > it's vaguely DWIM. And the longstanding "Meaning" in the DWIM here > > is "goto source for this hunk". > > There's also change-log-mode which does this. And I think that's it. > > Ah, and there's also cc-mode which uses the same binding for > comment-region. *shrug* Yeah, it's a DWIM shortcut with "What I Mean" being determined by historical usage. > >>> Especially in a mode that's read only > >>> much more often than not? > >> When I simply visit a patch (which I might want to apply), it doesn't > >> open in read-only. Still, to visit the source I've always switched to > >> read-only and pressed RET too. > > Wow, that's so much easier than typing C-c C-c which has existed > > forever. > > It's not. But the switch to read-only is a one-time thing and jumping to > different hunks is often done repeatedly anyways. So I'm probably saving > on keys, at least in some cases. OK. I'm not against that workflow, but it's not my workflow.