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: Tue, 26 Sep 2023 02:11:49 +0300 Message-ID: <8408fa63-af93-ab36-8524-fa12de7918ea@gutov.dev> References: <83fs4f36wi.fsf@gnu.org> <1b963d24-51b3-8128-ad14-e4af2c9f0c43@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7730"; 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: Eli Zaretskii , "Philip K." , emacs-devel@gnu.org To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 26 01:12:29 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 1qkukd-0001mg-2R for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Sep 2023 01:12:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkukI-0008UY-QK; Mon, 25 Sep 2023 19:12:06 -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 1qkukB-0008TL-Bt for emacs-devel@gnu.org; Mon, 25 Sep 2023 19:12:00 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkuk7-0007By-VC; Mon, 25 Sep 2023 19:11:57 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 8AA1E5C0326; Mon, 25 Sep 2023 19:11:52 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 25 Sep 2023 19:11:52 -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=fm1; t= 1695683512; x=1695769912; bh=cw7NL50RZnPSgXfZdVBC8MX9+8HpJ0Nlbrk dgxzrJus=; b=ByIhj+/BuPL+thQKzTzoeefl0ECQFoInwRLF+8N5JtdMpH2y2Nu wIwzJsDcJSnheKO9QY6Il9m1dJX5S52kyon+RZcJGLORrVdmwwuQng0SkD8BqjLQ vs/MC7YCWdXUHi/Dn9iI6ZmCWhcMNjOTmLFnlFY92MpEMXhHXcsscixEqBAQcBKX nds8KFf0XEFdztIXmoXJLSA9ByKE59nuwn/0bf5ACpovnJeWQRoagkOwe9R5aRuS Awn0BBh4F+b/YMMVRea6fVbJstet4ghFGNKjIxk60c3CbfpQe6mBFKmPzorWJHN3 m6VMLsPFgMjZp/sAcKppwMQu+V+FR0NOYgg== 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=fm2; t= 1695683512; x=1695769912; bh=cw7NL50RZnPSgXfZdVBC8MX9+8HpJ0Nlbrk dgxzrJus=; b=VSAbrQUTE6AGBHHQ385EaK5yDS3aXADWUbVLrji98EjzNMPkmFe fh8wZxoTqABgcpah7wJfat74ReEAFNQbFGryFk2cxBgsIH4pGmmjMSP/1BJwmtwt rupZZfumuF/Ld4IjGJHg7aSVq6Bt77eGkDMbNKAMsHxhkY5ANLh8awISFwIHUiZ1 +MdWY9zFvZdVqgPNoBmCtcrXBAVNJtwlEbSfjKaU9hmK3Ut1h19xjkVL2rSXKjpy hITmXRIQ/m0UdrpjKJK16NgV4GZrwmPXEB+d2xoCmyL23k5lwrt828VEGLvuKbTk BAc+K4tzyG3lStIdmAoGmCNvOLV9bqWFGDA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudelhedgudekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhephfffheeljeffgeffueeghfekkedtfffgheejvdegjeettdduheeufffggfef jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Sep 2023 19:11:50 -0400 (EDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=66.111.4.27; envelope-from=dmitry@gutov.dev; helo=out3-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:311043 Archived-At: On 08/09/2023 19:20, João Távora wrote: > On Fri, Sep 8, 2023 at 5:05 PM João Távora wrote: >> On Fri, Sep 8, 2023 at 4:42 PM Stefan Monnier wrote: >>>>>> C-c C-c is "go to place mentioned in this hunk". It must not apply anything, >>>>>> I have it most hardwired in my brain. >>>>> Really? >>>> Yes, really. >>> Curious: I always use RET instead. >>> I'm actually having a hard time >>> remembering/imagining how/why we ended up binding `C-c C-c` to >>> `diff-goto-source` in `diff-mode`. >> Seems some young hotshot added it back in the day > More realistically, the reason may have been that > diff-mode isn't necessarily a read-only mode, and > so you need a command such as this which doesn't > imply modifying the buffer (RET is no good here). > There is also M-o and M-RET but these were (and > most importantly probably still are) harder to hit or > bind on some terminals. (Sorry, for resurrecting this subthread, but...) Should we make diff-mode always start in read-only-mode? It's currently inconsistent: read-only in some cases (vc-diff) and writable in others (visiting a patch file on disk). Whereas, I think, in both cases editing the diff itself is a relatively rare operation. Most of the time, I visit a patch, press some key (such as n or p), curse slightly, press 'undo', turn on read-only-mode, and then continue with the real work.