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 14:34:26 +0300 Message-ID: <0076a5f8-7a60-a045-6b7e-338e1da36866@gutov.dev> References: <83fs4f36wi.fsf@gnu.org> <1b963d24-51b3-8128-ad14-e4af2c9f0c43@gutov.dev> <8408fa63-af93-ab36-8524-fa12de7918ea@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="26700"; 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: "Alfred M. Szmidt" , monnier@iro.umontreal.ca, eliz@gnu.org, philipk@posteo.net, emacs-devel@gnu.org To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 26 13:35:01 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 1ql6LD-0006aj-M1 for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Sep 2023 13:34:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ql6Ko-0003pN-SI; Tue, 26 Sep 2023 07:34:34 -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 1ql6Kn-0003mW-BC for emacs-devel@gnu.org; Tue, 26 Sep 2023 07:34:33 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ql6Kl-0007OB-Fg; Tue, 26 Sep 2023 07:34:33 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 0740A5C26D9; Tue, 26 Sep 2023 07:34:30 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 26 Sep 2023 07:34:30 -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= 1695728070; x=1695814470; bh=MK4YzLmwdaLc/MzXN0S8rTbkIDPQiit0RJT ccflqX6E=; b=pg1w7ItzPk+rHL1zH4vnEPA//ArVOyYudQ4fKdcEUuTSjYyv47D WDE7UagUSOuaePCrK2gIFgEQA4aMRFjd6slq6JBdiFPHsUtqB4m6ODPiVUtEHoLO b+DVAFQ2mr4QJdXjbRk8LOJjpsGZFER9DYxRQjvPq/xA82YsITCykx2lR74CZdYS 0mNLDP646vsKgPoi7vTc6uU0aSwj5Pk+BzeC4bXDPZpfk/759hQfUJUR92CVDRHL GMXixMg53hOxBsqWtfpBh46JhiTRPCBrk5ePlSlSN1FdK5NgTOiyDYyqq6w9yVdN l0kPBZtQiJ4RVr+gyBhas+CNkwO8nKkH2Cw== 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= 1695728070; x=1695814470; bh=MK4YzLmwdaLc/MzXN0S8rTbkIDPQiit0RJT ccflqX6E=; b=Wogfr0IYMKqStwmND19+ur+gQK5j8opIUWEfJd3/yknLacRBFbN vzFggimYpLb9CvLmsVXV/AcgmQcSmWBuzrPS8Caej8LrnSO34ZySWHZGmv0fDmMK BNXfKk/aCFGAWvBFOX2JSjN3PIG+02JUwfpHB7fLxVrFgLPzwle44RER/BtPbFRN 3Qbn4xYJfjy4yVSo5yvTBXbOwCdIQLiR+uBnx0g8MxEOgEc+CrClYtMRk7lWR5YK 4S0J6vLNTPO+SswKABFQDj/mRYE67zq1i4WUC181cGvPdmcQYT2slayXfijmydc5 7oVJz7OM4C2AFPY4Kae4zD10uCPDrwHAyTg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvjedrtddtgddufecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthekredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpefhffehleejffegffeugefhkeektdffgfehjedvgeejtedtudehueffgffgfeej heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 26 Sep 2023 07:34:28 -0400 (EDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=66.111.4.29; envelope-from=dmitry@gutov.dev; helo=out5-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, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, 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:311058 Archived-At: On 26/09/2023 14:24, João Távora wrote: > 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. Is that better than typing 'k'? Or being able to use hunk navigation with n/p? > Opening regular files of a special type read-only mode would be a > spectacular failure in the basic ergonomics of an editor. Like you said: you edit both kinds of diff buffers (vc and files on disk) in the same way. But we assign them different read-only status.