command-log-mode icon indicating copy to clipboard operation
command-log-mode copied to clipboard

default key bind `C-c o` does not follow a keybind convention

Open Inc0n opened this issue 3 years ago • 3 comments

The default value command-log-mode-key-binding-open-log is "C-c o", however, this conflicts some of my personal setup and also the key bind convention is:

Don’t define C-c letter as a key in Lisp programs. Sequences consisting of C-c and a letter (either upper or lower case; ASCII or non-ASCII) are reserved for users; they are the only sequences reserved for users, so do not block them.

Inc0n avatar Sep 26 '22 13:09 Inc0n

Just a random user here: I agree that this is an issue. What would you recommend? Not bind it at all, allowing users to set their own bindings?

WorldsEndless avatar Sep 26 '22 15:09 WorldsEndless

I am quite happy for someone willing to discuss this matter with me, as it stands the latest commit for this repo is around 7 years ago...

I have written quite a mouthful, so TL;DR: define a minor mode map of its own.

IMO, in this context. There is only one key that should be binded, therefore, the most direct way was to defined it into C-c prefix map. Only that there is perhaps a not widely known convention, which some users follow (such as me), this resulted in overriden my personal setup.

The solution to this is to define a minor mode map of its own, that would solve much of the problem. For example, if you wish to let Users defined their own bindings, command-log-mode-key-binding-open-log, the one key that should be bind is not neede until CLM (command log mode) is active. And after that, it doesn't matter as greatly had it defined the key into global key maps.

Inc0n avatar Sep 27 '22 09:09 Inc0n

Yeah, it is pretty common for packages I enjoy these days to not provide any bindings in the package -- but to tell in their readme some example keybinds, in this case command-log-mode-key-binding-open-log.

WorldsEndless avatar Sep 28 '22 17:09 WorldsEndless