emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding refactoring capabilities to Emacs


From: Dmitry Gutov
Subject: Re: Adding refactoring capabilities to Emacs
Date: Tue, 26 Sep 2023 14:34:26 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 26/09/2023 14:24, João Távora wrote:
On Tue, Sep 26, 2023 at 11:57 AM Dmitry Gutov<dmitry@gutov.dev>  wrote:
On 26/09/2023 11:06, João Távora wrote:
On Tue, Sep 26, 2023 at 6:36 AM Alfred M. Szmidt<ams@gnu.org>   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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]