From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Alfred M. Szmidt" Newsgroups: gmane.emacs.devel Subject: Re: Adding refactoring capabilities to Emacs Date: Tue, 26 Sep 2023 07:33:37 -0400 Message-ID: References: <83fs4f36wi.fsf@gnu.org> <1b963d24-51b3-8128-ad14-e4af2c9f0c43@gutov.dev> <8408fa63-af93-ab36-8524-fa12de7918ea@gutov.dev> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23524"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dmitry@gutov.dev, monnier@iro.umontreal.ca, eliz@gnu.org, philipk@posteo.net, emacs-devel@gnu.org To: =?UTF-8?Q?To=3A_Jo=C3=83=C2=A3o_T=C3=83=C2=A1vora_=3Cjoaotavora=40gmail?= =?UTF-8?Q?=2Ecom=3E=0A?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 26 13:34:35 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 1ql6Kp-0005qw-7Q for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Sep 2023 13:34:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ql6K4-0003D4-C9; Tue, 26 Sep 2023 07:33:48 -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 1ql6K3-0003Cj-A9 for emacs-devel@gnu.org; Tue, 26 Sep 2023 07:33:47 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ql6K1-0007HI-OM; Tue, 26 Sep 2023 07:33:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=YaX3QM4rRPW1JszEssLvGET2PvfBGw6eHf7Ge3tgKhY=; b=eRoNLWC6xFRj NCRcqKBO/kjmJ8h2iFM9YbwqR1l7onDohWpL9KEZayAGgNap/Werd3yehqVS6upHJHhbwHFWMLof7 555vkhgPLNngiUg8o4myKxr0emYn6RUWLD8AyuyQizS6LouLrnX+mNNAqVNG1GZs8LZ79/s5VbqNt MfWaJQNIs0D9du0LJY+0mWdoPJqH9p0Pj4yQ8N13ootfCYJnIKRF6uOQgynGzzxloldmguh8H9OPx Dc8SIzj8UuwBYo0ub+3/uEsktOShhyAaGxYfmW5xWtwn3ig4/Be3nVZW6ekNeRGVe/+HXRuga3vb+ KIDES9Dmz7a/0YNKOy3BWA==; Original-Received: from ams by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1ql6Jt-0007BA-US; Tue, 26 Sep 2023 07:33:45 -0400 In-Reply-To: =?UTF-8?Q?In-Reply-To=3A_=09=3CCALDnm511f0yxXoVzHcgoasY=3D6QEbqTd3yguzucO?= =?UTF-8?Q?baJmoB1L3hQ=40mail=2Egmail=2Ecom=3E=0A=09=28message_from_Jo?= =?UTF-8?Q?=C3=83=C2=A3o_T=C3=83=C2=A1vora_on_Tue=2C_26_Sep_2023_12=3A24?= =?UTF-8?Q?=3A01_+0100=29=0A?= 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:311057 Archived-At: On Tue, Sep 26, 2023 at 11:57 AM Dmitry Gutov wrote: > > On 26/09/2023 11:06, João Távora wrote: > > On Tue, Sep 26, 2023 at 6:36 AM Alfred M. Szmidt wrote: > > > >> If you have a diff on file, you are most probobly going to apply it, > >> and also probobly going to remove a hunk or two or edit the diff in > >> some manner. (That this is "relatively rare" I disagree from my own > >> usage and experience). Not to mention that visiting a file on disk, > >> that is read-write, and Emacs making it read-only would be very > >> strange. > > I completely agree with these two points. Even non-file diff-mode > > buffers, such as the ones provided by piping git diff into Emacs > > (yes, I can do that 😄 ) are generally better left read-write, > > since I frequently edit them to kill hunks I'm not interested in. > > 'k' (or M-k), 'C-c C-s' and 'C-_' all work fine in a read-only diff-mode > buffer. 'C-x C-s' also works, of course. I think it's very inconsistent to have specialized commands to modify a buffers contents and not allow all the other regular commands that modify a buffer do their work. I don't have unlimited brain address space for keybindings and I think C-SPC C-n a few times C-w does the job just fine. Or fixing a typo, or renaming a variable, or some such ... Opening regular files of a special type read-only mode would be a spectacular failure in the basic ergonomics of an editor. 1+