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+