emacs-devel
[Top][All Lists]
Advanced

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

Re: master 4803fba487 1/2: 'C-x v v' on a diff buffer commits it as a pa


From: Dmitry Gutov
Subject: Re: master 4803fba487 1/2: 'C-x v v' on a diff buffer commits it as a patch (bug#52349)
Date: Tue, 30 Aug 2022 20:10:18 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 30.08.2022 19:37, Eli Zaretskii wrote:
  As long as we fundamentally agree on the behavior.
I think the "C-x v D" step should be part of the command's execution.
It makes little sense to me to ask the user to prepare the diffs in
advance, since conceptually the changes are already on disk.  Starting
from diffs makes sense when you want to apply them first, and only
after that commit.  Which is not the case here.

The user can choose the files first (e.g. choose a directory from VC-Dir), or just pick one file they are currently editing. Then see the diff, and make the choice of making a commit from it.

What you're suggesting could possibly improve discoverability (if the user manages to read the doc and find out about the meaning of C-0 prefix), but WRT flexibility, the effect can be negative. That is, unless we keep the new meaning of 'C-x v v' in diff buffers, the ability to commit an arbitrary diff (not applied yet) will go away. And it's what the author of the top message in this tree was particularly happy about.

And as for the length of key sequences, in VC-Dir, 'D C-x v v' is about the same as 'C-0 C-x v v'.

I understand that typing "C-x v v" in a diffs buffer is used here as
an indication that this particular variant of "committing" is
requested, but that's a weak justification, IMO.  It could even
backfire: the user could be in the diffs by sheer luck (or lack
thereof), and type "C-x v v" without any intention to select parts of
the changes.

If they have no intention of creating a commit from that diff and press 'C-x v v' by accident, they can simply 'C-c C-k' out of the resulting Log-Edit buffer. That will bring them back to the diff, restoring the previous window configuration.



reply via email to

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