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 02:11:49 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 08/09/2023 19:20, João Távora wrote:
On Fri, Sep 8, 2023 at 5:05 PM João Távora<joaotavora@gmail.com>  wrote:
On Fri, Sep 8, 2023 at 4:42 PM Stefan Monnier<monnier@iro.umontreal.ca>  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.



reply via email to

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