1

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.

Evgeny
  • 133
  • 7
  • Some comments [here](https://emacs.stackexchange.com/questions/50920/ctrl-c-ctrl-v-copy-paste-in-multi-term) indicate "this is not Emacs problem, look how to configure your shell" – Evgeny Aug 14 '21 at 15:05
  • Here is a [solution for Windows Terminal](https://www.emacswiki.org/emacs/Emacs_and_the_Windows_Subsystem_for_Linux) – Evgeny Aug 14 '21 at 15:34
  • I recommend running the native Windows version of Emacs rather than running Emacs inside of a terminal. – db48x Aug 14 '21 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 '21 at 21:24
  • Perhaps cmder can be configured to use ctrl-shift-c/v for copy/paste, should resolve key binding conflict: https://conemu.github.io/en/SettingsHotkeys.html – Evgeny Aug 14 '21 at 21:30

1 Answers1

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.

db48x
  • 15,741
  • 1
  • 19
  • 23
  • 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 '21 at 14:05