* `vc-revert' keybinding
@ 2024-11-04 17:00 Manuel Giraud via Emacs development discussions.
2024-11-04 17:16 ` Alfred M. Szmidt
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Manuel Giraud via Emacs development discussions. @ 2024-11-04 17:00 UTC (permalink / raw)
To: emacs-devel
Hi,
Maybe it was already discussed, but I wonder why the default shortcut
for `vc-revert' is 'C-x v u': this prevents from having 'u' as a
shortcut in a VC Directory mode because it is already used for
unmarking.
Why not make it 'C-x v k' ("kill" these modifications) by default and
use 'k' as shortcut in VC Directory mode? Or maybe, keep 'C-x v u' and
add 'C-x v k' and 'k' in VC Directory mode?
--
Manuel Giraud
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: `vc-revert' keybinding
2024-11-04 17:00 `vc-revert' keybinding Manuel Giraud via Emacs development discussions.
@ 2024-11-04 17:16 ` Alfred M. Szmidt
2024-11-05 8:10 ` Manuel Giraud via Emacs development discussions.
2024-11-06 9:42 ` Sean Whitton
2024-11-04 18:16 ` Sebastián Monía
2024-11-06 4:44 ` Richard Stallman
2 siblings, 2 replies; 13+ messages in thread
From: Alfred M. Szmidt @ 2024-11-04 17:16 UTC (permalink / raw)
To: Manuel Giraud; +Cc: emacs-devel
Hi,
Maybe it was already discussed, but I wonder why the default shortcut
for `vc-revert' is 'C-x v u': this prevents from having 'u' as a
shortcut in a VC Directory mode because it is already used for
unmarking.
C-x u is undo, C-x v u makes a logical choice for "revert" (or undo
the file to the state it is in VC). Why is 'u' prevented from being
"unmark" in vc dir? "Works for me"?
Why not make it 'C-x v k' ("kill" these modifications) by default and
use 'k' as shortcut in VC Directory mode? Or maybe, keep 'C-x v u' and
add 'C-x v k' and 'k' in VC Directory mode?
Kill would put something onto a kill ring, which would mean that one
should be able to "redo" something -- how that would work in VC is an
interesting question. Does it kill the commit? C-x v u reverts the
current file to whatever is in the repository (so .. undo?).
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: `vc-revert' keybinding
2024-11-04 17:00 `vc-revert' keybinding Manuel Giraud via Emacs development discussions.
2024-11-04 17:16 ` Alfred M. Szmidt
@ 2024-11-04 18:16 ` Sebastián Monía
2024-11-06 4:44 ` Richard Stallman
2 siblings, 0 replies; 13+ messages in thread
From: Sebastián Monía @ 2024-11-04 18:16 UTC (permalink / raw)
To: Manuel Giraud via Emacs development discussions.; +Cc: Manuel Giraud
Manuel Giraud via "Emacs development discussions." <emacs-devel@gnu.org>
writes:
> Hi,
>
> Maybe it was already discussed, but I wonder why the default shortcut
> for `vc-revert' is 'C-x v u': this prevents from having 'u' as a
> shortcut in a VC Directory mode because it is already used for
> unmarking.
>
> Why not make it 'C-x v k' ("kill" these modifications) by default and
> use 'k' as shortcut in VC Directory mode? Or maybe, keep 'C-x v u' and
> add 'C-x v k' and 'k' in VC Directory mode?
Curiously, I added "k" to revert in both vc-dir-mode-map and
vc-prefix-map in my configuration.
I was trying to remember why, I _think_ it is because that's the key
used for reverting in Magit.
I do agree with the next reply that "kill" means something completely
different in the Emacs context. That said, vc-prefix-map uses "g" for
vc-annotate, so there's precedent that not all bindings are mnemonic :)
--
Sebastián Monía
https://site.sebasmonia.com/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: `vc-revert' keybinding
2024-11-04 17:16 ` Alfred M. Szmidt
@ 2024-11-05 8:10 ` Manuel Giraud via Emacs development discussions.
2024-11-05 8:56 ` Alfred M. Szmidt
2024-11-06 9:42 ` Sean Whitton
1 sibling, 1 reply; 13+ messages in thread
From: Manuel Giraud via Emacs development discussions. @ 2024-11-05 8:10 UTC (permalink / raw)
To: Alfred M. Szmidt; +Cc: emacs-devel
"Alfred M. Szmidt" <ams@gnu.org> writes:
[...]
> C-x u is undo, C-x v u makes a logical choice for "revert" (or undo
> the file to the state it is in VC).
Yes that make sense, of course.
> Why is 'u' prevented from being "unmark" in vc dir? "Works for me"?
I haven't made myself clear. As 'u' is already used for "unmark", it
cannot be used as a VC dir shortcut for 'C-x v u' (vc-revert) without
causing much confusion to the user.
That is why I thought that we could have another character for this that
would be the same for the 'C-x v' form, i.e.:
- C-x v <somechar> (globally)
- <somechar> (in VC dir mode)
One can always use 'C-x v u' for both, but it seems strange that emacs
does not have a VC dir shortcut for such a basic task.
> Why not make it 'C-x v k' ("kill" these modifications) by default and
> use 'k' as shortcut in VC Directory mode? Or maybe, keep 'C-x v u' and
> add 'C-x v k' and 'k' in VC Directory mode?
>
> Kill would put something onto a kill ring, which would mean that one
> should be able to "redo" something -- how that would work in VC is an
> interesting question. Does it kill the commit? C-x v u reverts the
> current file to whatever is in the repository (so .. undo?).
Yes, you're right.
--
Manuel Giraud
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: `vc-revert' keybinding
2024-11-05 8:10 ` Manuel Giraud via Emacs development discussions.
@ 2024-11-05 8:56 ` Alfred M. Szmidt
2024-11-05 17:38 ` Juri Linkov
2024-11-05 17:39 ` chad
0 siblings, 2 replies; 13+ messages in thread
From: Alfred M. Szmidt @ 2024-11-05 8:56 UTC (permalink / raw)
To: Manuel Giraud; +Cc: emacs-devel
> Why is 'u' prevented from being "unmark" in vc dir? "Works for me"?
I haven't made myself clear. As 'u' is already used for "unmark", it
cannot be used as a VC dir shortcut for 'C-x v u' (vc-revert) without
causing much confusion to the user.
That is why I thought that we could have another character for this that
would be the same for the 'C-x v' form, i.e.:
- C-x v <somechar> (globally)
- <somechar> (in VC dir mode)
One can always use 'C-x v u' for both, but it seems strange that emacs
does not have a VC dir shortcut for such a basic task.
It is becasue VC dired is a dired, and dired has different purpose in
general.
(What would be nice is dired supported C-x v keybindings though
... and we could get rid of vc-dired :-)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: `vc-revert' keybinding
2024-11-05 8:56 ` Alfred M. Szmidt
@ 2024-11-05 17:38 ` Juri Linkov
2024-11-05 17:44 ` Alfred M. Szmidt
2024-11-05 17:39 ` chad
1 sibling, 1 reply; 13+ messages in thread
From: Juri Linkov @ 2024-11-05 17:38 UTC (permalink / raw)
To: Alfred M. Szmidt; +Cc: Manuel Giraud, emacs-devel
> (What would be nice is dired supported C-x v keybindings though
> ... and we could get rid of vc-dired :-)
Dired already supports C-x v keybindings.
Still we can't get rid of vc-dired, because
it helps to see a list of modified files
compactly - that Dired can't do.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: `vc-revert' keybinding
2024-11-05 8:56 ` Alfred M. Szmidt
2024-11-05 17:38 ` Juri Linkov
@ 2024-11-05 17:39 ` chad
1 sibling, 0 replies; 13+ messages in thread
From: chad @ 2024-11-05 17:39 UTC (permalink / raw)
To: Alfred M. Szmidt; +Cc: Manuel Giraud, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 652 bytes --]
On Tue, Nov 5, 2024 at 3:57 AM Alfred M. Szmidt <ams@gnu.org> wrote:
> [...]
> It is becasue VC dired is a dired, and dired has different purpose in
> general.
>
> (What would be nice is dired supported C-x v keybindings though
> ... and we could get rid of vc-dired :-)
>
What is it you're looking for that doesn't already exist? Is it just
built-in integration, or something deeper?
Apologies in advance if this is obvious; since I switched professions away
from programming, I ended up with very low frequent VC use. I have been
noodling on emacs interfaces lately, and your message caught my eye.
Thanks in advance,
~Chad
[-- Attachment #2: Type: text/html, Size: 1056 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: `vc-revert' keybinding
2024-11-05 17:38 ` Juri Linkov
@ 2024-11-05 17:44 ` Alfred M. Szmidt
2024-11-06 3:25 ` Sebastián Monía
2024-11-06 10:24 ` Manuel Giraud via Emacs development discussions.
0 siblings, 2 replies; 13+ messages in thread
From: Alfred M. Szmidt @ 2024-11-05 17:44 UTC (permalink / raw)
To: Juri Linkov; +Cc: manuel, emacs-devel
> (What would be nice is dired supported C-x v keybindings though
> ... and we could get rid of vc-dired :-)
Dired already supports C-x v keybindings.
I .. did not know that ... thank you!
Still we can't get rid of vc-dired, because
it helps to see a list of modified files
compactly - that Dired can't do.
There is nothing that really stops Dired from doing that though, it
could show it in the fringe or some otherway.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: `vc-revert' keybinding
2024-11-05 17:44 ` Alfred M. Szmidt
@ 2024-11-06 3:25 ` Sebastián Monía
2024-11-06 5:56 ` Alfred M. Szmidt
2024-11-06 10:24 ` Manuel Giraud via Emacs development discussions.
1 sibling, 1 reply; 13+ messages in thread
From: Sebastián Monía @ 2024-11-06 3:25 UTC (permalink / raw)
To: Alfred M. Szmidt; +Cc: Juri Linkov, manuel, emacs-devel
"Alfred M. Szmidt" <ams@gnu.org> writes:
> Still we can't get rid of vc-dired, because
> it helps to see a list of modified files
> compactly - that Dired can't do.
>
> There is nothing that really stops Dired from doing that though, it
> could show it in the fringe or some otherway.
It will be harder to read, and adding *even more* features to Dired
probably isn't ideal.
I really like vc-dir, why are you trying to take it away from me :)
Cheers,
Seb
--
Sebastián Monía
https://site.sebasmonia.com/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: `vc-revert' keybinding
2024-11-04 17:00 `vc-revert' keybinding Manuel Giraud via Emacs development discussions.
2024-11-04 17:16 ` Alfred M. Szmidt
2024-11-04 18:16 ` Sebastián Monía
@ 2024-11-06 4:44 ` Richard Stallman
2 siblings, 0 replies; 13+ messages in thread
From: Richard Stallman @ 2024-11-06 4:44 UTC (permalink / raw)
To: Manuel Giraud; +Cc: emacs-devel
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> Maybe it was already discussed, but I wonder why the default shortcut
> for `vc-revert' is 'C-x v u': this prevents from having 'u' as a
> shortcut in a VC Directory mode because it is already used for
> unmarking.
ISTR that vc-dir was developed some years after the original vc package
that operated on individual files' buffers.
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: `vc-revert' keybinding
2024-11-06 3:25 ` Sebastián Monía
@ 2024-11-06 5:56 ` Alfred M. Szmidt
0 siblings, 0 replies; 13+ messages in thread
From: Alfred M. Szmidt @ 2024-11-06 5:56 UTC (permalink / raw)
Cc: juri, manuel, emacs-devel
> Still we can't get rid of vc-dired, because
> it helps to see a list of modified files
> compactly - that Dired can't do.
>
> There is nothing that really stops Dired from doing that though, it
> could show it in the fringe or some otherway.
It will be harder to read, and adding *even more* features to Dired
probably isn't ideal.
Not if done right.
I really like vc-dir, why are you trying to take it away from me :)
Mostly cause dired has more features than vc-dired that are useful to
use on version controlled files. :-)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: `vc-revert' keybinding
2024-11-04 17:16 ` Alfred M. Szmidt
2024-11-05 8:10 ` Manuel Giraud via Emacs development discussions.
@ 2024-11-06 9:42 ` Sean Whitton
1 sibling, 0 replies; 13+ messages in thread
From: Sean Whitton @ 2024-11-06 9:42 UTC (permalink / raw)
To: Alfred M. Szmidt; +Cc: Manuel Giraud, emacs-devel
Hello,
I agree it's not an ideal default binding, but I think this is something
that it is too late to change.
--
Sean Whitton
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: `vc-revert' keybinding
2024-11-05 17:44 ` Alfred M. Szmidt
2024-11-06 3:25 ` Sebastián Monía
@ 2024-11-06 10:24 ` Manuel Giraud via Emacs development discussions.
1 sibling, 0 replies; 13+ messages in thread
From: Manuel Giraud via Emacs development discussions. @ 2024-11-06 10:24 UTC (permalink / raw)
To: Alfred M. Szmidt; +Cc: Juri Linkov, emacs-devel
"Alfred M. Szmidt" <ams@gnu.org> writes:
> > (What would be nice is dired supported C-x v keybindings though
> > ... and we could get rid of vc-dired :-)
>
> Dired already supports C-x v keybindings.
>
> I .. did not know that ... thank you!
>
> Still we can't get rid of vc-dired, because
> it helps to see a list of modified files
> compactly - that Dired can't do.
>
> There is nothing that really stops Dired from doing that though, it
> could show it in the fringe or some otherway.
Interesting idea. But I also understand Sebastián Monía that it would
be harder to read: in VC dir, whenever I have some unregistered (and not
yet ignored) files this feels like noise to me.
--
Manuel Giraud
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-11-06 10:24 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-04 17:00 `vc-revert' keybinding Manuel Giraud via Emacs development discussions.
2024-11-04 17:16 ` Alfred M. Szmidt
2024-11-05 8:10 ` Manuel Giraud via Emacs development discussions.
2024-11-05 8:56 ` Alfred M. Szmidt
2024-11-05 17:38 ` Juri Linkov
2024-11-05 17:44 ` Alfred M. Szmidt
2024-11-06 3:25 ` Sebastián Monía
2024-11-06 5:56 ` Alfred M. Szmidt
2024-11-06 10:24 ` Manuel Giraud via Emacs development discussions.
2024-11-05 17:39 ` chad
2024-11-06 9:42 ` Sean Whitton
2024-11-04 18:16 ` Sebastián Monía
2024-11-06 4:44 ` Richard Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.