4 ms·
The problem is designing coherent usable keybindings is a large undertaking. Plus things like C-c C-f and similar working throughout many different elisp packa
by ParetoOptimal 3y ago
The problem is designing coherent usable keybindings is a large undertaking.
Plus things like C-c C-f and similar working throughout many different elisp packages in a predictable useful way is super valuable.
- taeric 3y agoYeah, I'm confused on what the complaint is? Is the desire that it is always explicitly coded in a config file? You could probably dump the keymap to a file on initial load? You could extend that so that if default is different from the last time it was loaded, you could let the user know, and then replace with any user defined one. (Letting user know is mainly so they can decide if new commands need mapping.) That said, I'd hazard this is not that useful?
- db48x 3y agoYea, that doesn’t make much sense to me either. Maybe they should go to whatever Emacs buffer they have open and type `C-h B` to dump out the entire list of keybindings available in that buffer. That will probably disabuse them of the notion that the user has to personally invent all of them. Mine is 2.4k lines long! And that’s just for the modes that I happen to be using for that particular JSON file; many of the key bindings in a C++ or Rust file would be similar, but so many would be completely different.
- thomastjeffery 3y ago> Mine is 2.4k lines long! Are you telling me you actually use 2,400 key bindings? If you do, then would it really be that hard to invent them yourself? If you don't, then what good are all of these keymaps actually doing you? I'm not advocating that you should have to reinvent your keymap. I'm advocating that you should be able to. Emacs is the very best case available: it's technically possible! Nearly everything else demands we learn its own opinion, instead of implementing our own.
- db48x 3y agoI don’t know them all, no. But it would be absolutely ridiculous to force a new user to try to design a set of key bindings for even the hundreds that I do use. Nobody can predict ahead of time which ones the user will learn over the years that they use an editor, or even which combinations of features they will enable.
- thomastjeffery 3y agoSo don't force them to. And don't force them not to, either.
- thomastjeffery 3y agoLike I said, yes, in emacs it is technically possible. But you still have to redo the keymaps defined in every package you use; and you have to know what they are in the first place. You can replace single bindings one at a time easily enough. You can't change them all without a two-step effort. We could eliminate step one for anyone, like me, who's is interested. There's a reason that evil-mode took so much effort to put together, and it still has serious edge cases. I want to make my own original modal editing keymap. I have tried many times, and given up. It's too much work to both see what to change in the first place, and to remove the default; and that's what it takes to just get started! Picture this: you are learning to use Emacs for the very first time. What are you learning? Today, the answer is C-n, C-x C-s, etc. My alternative is to learn the functions instead. If you don't have an opinion about what key should be bound, then use someone else's config. This way you can actually comprehend your entire configuration! It doesn't need to be mandatory, but I would love the opportunity.
- taeric 3y agoWhat I'm saying is you can automate a fair bit of this. When a new keymap is loaded, dump it and let the user know of it. Things are super complicated with this general idea, though, as don't forget that the standard letters are also basic keybindings. People can and do take advantage of that fact. Right? I'm assuming you would not want those to be special cased here?
- thomastjeffery 3y agoYou can in Emacs, though you must first learn how. Last time I tried, I gave up. Emacs is, by far, the best case. Even if I did get Emacs to behave exactly how I wanted, I can't apply that to any of the other software I use.
- taeric 3y agoAh, my apologies. I took your initial post to mean that even emacs doesn't get what you wanted. You mean largely that it is not the advertised path, even in emacs where it is technically possible. Makes sense. The level of introspection you can do in emacs is something I wish all programs had. Being able to ask the program, "what were the last commands you saw?" and "what would you do if I did {something}" are huge.
- tetris11 3y agoits a huge problem. Firefox for example could not agree on what the binding for PiP should be on non US/UK keyboards, and had an impossible binding of Ctrl-Shift-] (where "]" requires an Alt on some keyboards). https://bugzilla.mozilla.org/show_bug.cgi?id=1611154 https://bugzilla.mozilla.org/show_bug.cgi?id=1611154