0

I'm learning Emacs, using WSL-1 in cmder shell on Windows 10.

C-c seems an essential key binding yet on Windows this combination is tied to copy from buffer. Same applies for Ctrl-v - right from the tutorial C-v should move to next screen, yet for the the result of C-v is pasting from buffer on console behalf.

The closest I found from googling was https://ergoemacs.github.io/cua-conflict.html, but not sure if this is general enough.

5
  • Some comments here indicate "this is not Emacs problem, look how to configure your shell"
    – Evgeny
    Aug 14 at 15:05
  • Here is a solution for Windows Terminal
    – Evgeny
    Aug 14 at 15:34
  • I recommend running the native Windows version of Emacs rather than running Emacs inside of a terminal.
    – db48x
    Aug 14 at 19:01
  • The native Windows version screws the cyrillic font spacing without any solution in sight, so a bad option for me.
    – Evgeny
    Aug 14 at 21:24
  • Perhaps cmder can be configured to use ctrl-shift-c/v for copy/paste, should resolve key binding conflict: conemu.github.io/en/SettingsHotkeys.html
    – Evgeny
    Aug 14 at 21:30
1

The answer to your keyboard question is to either configure different keyboard shortcuts in your terminal emulator, use a different terminal emulator, use the Emacs GUI, or in extremis configure keyboard translation in Emacs.

For example, you could translate C-z into C-c, so that typing C-z has the same effect as typing C-c would have had. This should do the trick:

(define-key input-decode-map (kbd "C-z") (kbd "C-c"))

Of course Emacs uses a lot of key combinations, so you might not have a lot of choices left. Also, while the Emacs documentation (including the Emacs and Elisp manuals) is automatically adjusted on the fly to show your current key bindings, I don’t think that key translations will show up there; the documentation will still show C-c and you will have to remember to type C-z instead. Thus I recommend fixing the problem some other way.

Font problems are usually down to font choice. Not every font is perfect, even if it works in most applications.

1
  • 1
    Thank you for the detailed answer - I think fixing conflict on terminal emulator side is a priority. Perhaps if I used some standard WSL Ubuntu terminal, the problem would not even appear. In cmder I found a way to change off Ctrl-C/V to Ctrl-Shift-C/V, so the binding is hopefully free.
    – Evgeny
    Aug 15 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.