Stefan Reichör <[EMAIL PROTECTED]> writes:
> Stephen Leake <[EMAIL PROTECTED]> writes:
>
>> In dvc-ui.el, dvc-key-remove is defined as a prefix. Yet I don't see
>> any actual keybindings that use it. Instead, dvc-remove-files is bound
>> to (dvc-prefix-file ?D).
>
> dvc-key-remove is meant as prefix key. It should provide the opposite
> operation than dvc-key-add. However, this is not used/implemented yet.
Hmm. In dvc-ui.el, there is a comment on dvc-key-add saying it is a
prefix. But later in dvc-ui.el, dvc-keyvec-add uses it as a key, not a
prefix. Then in dvc-diff.el, dvc-keyvec-add is bound to dvc-add-files.
> ?D is used in dvc-remove-files since ?D is also used in dired to
> delete files.
That makes sense as a duplicate binding, although perhaps it should be
optional, for users who want that sort of thing.
>> Would it be ok to change dvc-key-remove to the simple key ?r,
>> and bind it to dvc-remove-files in dvc-status-mode-map and other
>> appropriate keymaps?
>
> We use ?d to delete files in dvc-diff and dvc-status buffers.
Right, as a literal ?d instead of a variable from dvc-ui.el.
> Any idea how we could unify this situation?
dvc-ui.el also defines dvc-keyvec-remove as dvc-key-remove, with no
prefix. It only has a prefix in dvc-global-keymap.
So I think the simplest fix is to add a binding
(define-key map dvc-keyvec-remove 'dvc-remove-files)
in dvc-diff and dvc-status.
We can leave the global binding as (dvc-prefix-file ?D), or change it
to be consistent. If we change it, we should change the binding for
revert as well.
The global keymap needs a lot of cleaning up; as the comment says, it
still has a lot of tla specific stuff. So messing with that can wait
until later.
--
-- Stephe
_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev