bug#46459: 28.0.50; Shared keymap for Git VC dir "Branch" header?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#46459: 28.0.50; Shared keymap for Git VC dir "Branch" header?

Protesilaos Stavrou
Dear maintainers,

In vc-git.el the header for vc-dir stashes is propertized with its own
keymap.  This means that while point is over the value of the "Stash:"
header, the specified keymap comes into effect, instead of the main one
for vc-dir.  The latter takes effect when point is anywhere but that
header's value.

Should this principle be applied to the value of the "Branch" header as
well?  The attached patch is a proof-of-concept to that end.

If you believe this is worth doing, what else do you think should go
into such a patch from a usability standpoint?

All the best,
Protesilaos

--
Protesilaos Stavrou
protesilaos.com

0001-Add-shared-keymap-to-Git-VC-dir-Branch-header.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#46459: 28.0.50; Shared keymap for Git VC dir "Branch" header?

Robert Pluim
>>>>> On Fri, 12 Feb 2021 08:54:13 +0200, Protesilaos Stavrou <[hidden email]> said:

    Protesilaos> Dear maintainers,
    Protesilaos> In vc-git.el the header for vc-dir stashes is propertized with its own
    Protesilaos> keymap.  This means that while point is over the value of the "Stash:"
    Protesilaos> header, the specified keymap comes into effect, instead of the main one
    Protesilaos> for vc-dir.  The latter takes effect when point is anywhere but that
    Protesilaos> header's value.

    Protesilaos> Should this principle be applied to the value of the "Branch" header as
    Protesilaos> well?  The attached patch is a proof-of-concept to that end.

    Protesilaos> If you believe this is worth doing, what else do you think should go
    Protesilaos> into such a patch from a usability standpoint?

Looks good to me, although Iʼve just noticed the vc and vc-dir have
confusingly different bindings for vc-retrieve-tag and vc-create-tag
Maybe put vc-create-tag on C-x v c as well?

Robert



Reply | Threaded
Open this post in threaded view
|

bug#46459: 28.0.50; Shared keymap for Git VC dir "Branch" header?

Dmitry Gutov
On 12.02.2021 11:55, Robert Pluim wrote:
> Looks good to me, although Iʼve just noticed the vc and vc-dir have
> confusingly different bindings for vc-retrieve-tag and vc-create-tag
> Maybe put vc-create-tag on C-x v c as well?

The key binding space is limited, though. Perhaps we should decide on a
key and use it in both cases.



Reply | Threaded
Open this post in threaded view
|

bug#46459: 28.0.50; Shared keymap for Git VC dir "Branch" header?

Juri Linkov-2
In reply to this post by Robert Pluim
> Looks good to me, although Iʼve just noticed the vc and vc-dir have
> confusingly different bindings for vc-retrieve-tag and vc-create-tag
> Maybe put vc-create-tag on C-x v c as well?

Then the freed key C-x v s could be bound to vc-log-search
(mnemonically more suitable for s = search):

  C-x v c - vc-create-tag
  C-x v s - vc-log-search



Reply | Threaded
Open this post in threaded view
|

bug#46459: 28.0.50; Shared keymap for Git VC dir "Branch" header?

Dmitry Gutov
On 13.02.2021 20:20, Juri Linkov wrote:
> Then the freed key C-x v s could be bound to vc-log-search
> (mnemonically more suitable for s = search):
>
>    C-x v c - vc-create-tag
>    C-x v s - vc-log-search

Good idea, I like that.



Reply | Threaded
Open this post in threaded view
|

bug#46459: 28.0.50; Shared keymap for Git VC dir "Branch" header?

Robert Pluim
>>>>> On Sat, 13 Feb 2021 22:05:52 +0200, Dmitry Gutov <[hidden email]> said:

    Dmitry> On 13.02.2021 20:20, Juri Linkov wrote:
    >> Then the freed key C-x v s could be bound to vc-log-search
    >> (mnemonically more suitable for s = search):
    >> C-x v c - vc-create-tag
    >> C-x v s - vc-log-search

    Dmitry> Good idea, I like that.

Works for me, but Iʼve used up my "change default behaviour" commit
bit for the week :-)

Although what do we do with vc-retrieve-tag in vc-dir (itʼs on B s)?
Move it to B r to mirror C-x v r?

Robert