Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

C-c x remap is F'd #96

Open
milkypostman opened this issue Oct 1, 2011 · 3 comments
Open

C-c x remap is F'd #96

milkypostman opened this issue Oct 1, 2011 · 3 comments

Comments

@milkypostman
Copy link
Contributor

[23:40:53] <technomancy> milkpost: in 2.0.2 it is. maybe C-h c M-x to check?
[23:41:01] <milkpost> yeah, it's messed up, i am fixing now
[23:41:14] <milkpost> i use C-x C-m for M-x
[23:41:45] <milkpost> technomancy: just found a bug: you have   (global-set-key (kbd "C-c x") 'execute-extended-command)
[23:41:54] <milkpost> which means C-c x is not getting mapped to smex
[23:42:59] <milkpost> technomancy: probably what you want is: (define-key key-translation-map (kbd "C-x c") (kbd "M-x"))
[23:43:35] <johnw> ooh, I never knew about the key-translation-map!!
[23:43:43] <technomancy> milkpost: oh, nice.
[23:43:48] <technomancy> can you open an issue?
[23:43:54] <milkpost> sure
[23:43:56] <technomancy> johnw: did you byte-compile smex?
[23:44:04] <milkpost> can I just copy and paste in this conversation? :)

I think you're looking to do (define-key key-translation-map (kbd "C-x c") (kbd "M-x"))

@milkypostman
Copy link
Contributor Author

I don't think my previous suggestion is right. It'd probably work, but what you probably do want is,

(global-set-key (kbd "C-c x") (kbd "M-x")) 

I had similar problems and this was the way to go. By changing the key-translation-map you change the key everywhere which is not want you want. Because in some modes you want C-x c mapped completely different. It's not so much a problem here but I rebind things like C-h and the previous suggestion was bad news bears.

@technomancy
Copy link
Owner

Hm; I tried this and it turns C-c x into a no-op. This is on 24 from around the time of the first pretest.

@milkypostman
Copy link
Contributor Author

I tried the previous suggestion of (define-key key-translation-map (kbd "C-x c") (kbd "M-x"))

It seems to work. Not sure why the latter doesn't. I have this in my init.el and it works,

(global-set-key (kbd "C-w") (kbd "M-<backspace>"))
(global-set-key (kbd "C-h") (kbd "<backspace>"))

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants