reddit / emacs

Why are my copy/paste commands so messed up?

Surface_plate · 2022-12-31 19:55
I'm new to emacs, I decided to go with doom emacs to get something sort of ready made. But I just don't understand why my copy paste commands are so messed up. And they don't work either. I used F10 to get a visual on what the commands where supposed to be, since C-w, M-w and C-y did nothing. I don't understand what S-delete means, shift-S-delete? Doesn't work. And I note M-w is the normal key binding but it does not work either. If I turn on CUA mode and use C-x / C-c / C-v then it works with key commands, otherwise nothing really works. Incredibly frustrating. I was trying to get used to the normal emacs commands but turns out they where not even there. Might there be some addon in doom emacs causing this? ​ https://preview.redd.it/hi0e572aga9a1.png?width=432&format=png&auto=webp&s=e0916da47821489ac1b56c40069e7cb770f72e77
HM0880 · 2022-12-31 20:45
Little `s` can be "super," which is the "windows logo" key on non-Mac keyboards. https://www.gnu.org/software/emacs/manual/html_node/emacs/Modifier-Keys.html Do you accidentally have caps lock on? That can mess up keybindings.
Surface_plate · 2022-12-31 20:52
No I tested with caps lock on and off. I also tested the windows key but it says that key combo is not bound to anything. I am accessing the emacs machine via RDP, it's a VM running Debian, in turn running on a windows machine.
HM0880 · 2022-12-31 20:55
OK. Good debugging steps. Does `C-w` work with vanilla Emacs (launch with `emacs -q`)?
HM0880 · 2022-12-31 20:56
Also, is the VM or the RD intercepting the keybindings?
Surface_plate · 2022-12-31 22:09
>emacs -q That worked, the normal key bindings returned and they work correctly. So there's something with doom emacs that's messing with the bindings.
Surface_plate · 2022-12-31 22:16
Figured it out, extension called evil did it. Disabled it. Apparently it's meant to make emacs more vi like....
thetemp_ · 2022-12-31 23:12
Glad you figured out it was evil-mode causing the confusion. You should consider going through some of the official Emacs documentation, including the built-in tutorial. That will get you going on some of the basic commands, how to get more information when you need it ("C-h a" etc.) and the peculiarities of Emacs terminology and notation (what "window" means in the context of Emacs, what "C-", "M-", "S-", and "s-" refer to, etc.). You can get to the tutorial by pressing Control and h, releasing them, and then pressing and releasing t. The tutorial will teach you how to additional help. "S-delete" means hold shift, press delete, and then release both keys. That's a shortcut for the "cut" command, which actually isn't specific to Emacs. There's also S-insert for paste, and C-insert for copy, but they aren't as convenient as the regular Emacs keybindings. The Emacs menu will show those alternative keybindings when the regular ones are disabled, such as when Evil-mode is enabled.