From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Adding refactoring capabilities to Emacs Date: Fri, 8 Sep 2023 01:43:24 +0300 Message-ID: References: <83fs4f36wi.fsf@gnu.org> <0af2ae2e-3486-e67b-7caa-6ff21f9a41dc@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5651"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , Eli Zaretskii , "Philip K." , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 08 00:44:00 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 1qeNjC-0001Gm-0i for ged-emacs-devel@m.gmane-mx.org; Fri, 08 Sep 2023 00:43:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeNiq-0003L9-PL; Thu, 07 Sep 2023 18:43:36 -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 1qeNip-0003Kt-LY for emacs-devel@gnu.org; Thu, 07 Sep 2023 18:43:35 -0400 Original-Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeNij-0005Tk-OS; Thu, 07 Sep 2023 18:43:35 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id DE65A32002E8; Thu, 7 Sep 2023 18:43:27 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 07 Sep 2023 18:43:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1694126607; x=1694213007; bh=CKCuCLFf6CHzy153DMIwYZ2VTzxXNMEnWXG AT8A8I9M=; b=VsAw8V+b351gOm+0b+LbML2CseXQ5taZtKM8CNQDZb2crS5xyWF 980MXBatVjoe4lOzB7Hw7BSHOpqxypXE1BOKguPFtGgvglq7xIEKOZuuzjwg3FP7 tIUI2/qUxnWH5pWLrAFwndwhPMO15X5T/fmGqCOMUgcqtabmqIXpUk2+syI+td90 9iLVRms1lH8sZXWiOXZebAtyPhgvQR1BDCBchs6qpH5VfvW+b3OJJnPvW3sop9eQ 0UMx+izZcQJaawHVdIAjXiFr48eFkYsxTwhtSuuSVGFmAPWRMlqCdd+EBPmpMJn8 Ps3TwijOnEPlL2syb5Mbu5rwynusjVPfG/A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1694126607; x=1694213007; bh=CKCuCLFf6CHzy153DMIwYZ2VTzxXNMEnWXG AT8A8I9M=; b=mJ2cWUnuWxtQR05putQuwU6byE4Hs5D9/l+9D7KEM6R/gJdAUIm a20E214StIhvLk3O8N26OgyaUN5euvqFb/owu1AQtlCQcDGkmuR+kOiTURXn96M+ H03MUBCf3YQD8IbiuMi+p7uk/q4Qi0c2NKtR4BDdlVu4S7mNBWV0M33A5HNyaAOh KnGscKV94bRCztDtvRhjiABRIjUUSXwMb40h2Zncq5R0b5QRadvtYsZbGKVh82LE +IyAbyXF0/8gI2RPL/iio/SS9EitWaR5UXdq1X64KAyBSgx4GFNI/hICYj/obRD+ 6BfGTEbGdpI9p2Tq3L+t2Mk2r1eE0QL88gg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudehiedgudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 7 Sep 2023 18:43:25 -0400 (EDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=64.147.123.19; envelope-from=dmitry@gutov.dev; helo=wout3-smtp.messagingengine.com X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 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, NICE_REPLY_A=-1.473, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-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:310294 Archived-At: On 08/09/2023 01:03, Stefan Monnier wrote: >>>>> but that's already taken in diff-mode. >>> I don't think the current `C-c C-c` binding in `diff-mode` should get in >>> the way. That command is available via different bindings already, and >> diff-apply-everything is a little destructive, though (there is no 'undo' >> across multiple files), so maybe a warning could help. Or make it an >> initially-disabled command, for example. > But in the context of a refactoring operation, it wouldn't make sense to > disable it. We would if we keep the same major mode. And if we decide that it's dangerous to set off accidentally. >>> this is a specific use of diff-mode where `diff-apply-everything` makes >>> a lot of sense (as opposed to `C-x v =` where the changes are usually >>> already applied anyway so `diff-apply-everything` is rarely what we want). >> So... the binding wouldn't be used in "regular" Diff buffers, > That's indeed a possible option (e.g. use a mode that's derived from > `diff-mode` but with a different `C-c C-c` binding, or activate > a special "refactoring minor mode" to provide that binding). But it would have to look different from diff-mode somehow, I suppose? Or is having a different buffer name good enough? Anyway, the same command would probably be useful when applying patches received from others as well. So perhaps we should just always have it available in diff-mode.