3

I just started using GNU Emacs on my Mac OS X Lion and I am trying to ease up my hand movement through various key bindings. Specifically, I want to be able to use the right command key for meta. The following code in my .emacs file does the trick for the standalone application (Emacs.app)

;;; cmd key for meta (setq mac-option-key-is-meta nil mac-command-key-is-meta t mac-command-modifier 'meta mac-option-modifier 'none) 

(Snippet taken from this Superuser answer)

but does not work with emacs run in terminal mode. The meta there is still the alt/option key which I set from the Terminal.app preferences. When I disable this option key, I lose the meta key capability all together.

Any ideas?

2 Answers 2

2

i'm not aware of terminal providing you with the ability to deal with the left/right command key mappings. iterm2 provides the means to accomplish what you're looking for there. albeit at a global basis for iterm2.

Sign up to request clarification or add additional context in comments.

Comments

1

There appears to be keyremap4macbook that may save you some time if you must use emacs in terminal. I can take no credit for this, but this guy can

7 Comments

One question though, does keyremap4macbook differentiate between left and right command?
Nevermind, I just checked the documentation and it looks like I can. This way I will map the right command to meta and keep the left command for copy/pasting and co. Thank you.
I thought it said something in that website, but I don't know. On terminal it's what, emacs 22.1.1. I prefer 24 and since I'm on OS X I use 24.
Can i ask why you use emacs in terminal? I've aliased mine so that it opens the file in a real window with the emacs gui version (i.e., 24) on the old Lion machine. Can link if you care.
I use that version too, just run it with a -nw.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.