I'm using iTerm2, and I would like to remap some of the meta keys. In my .emacs I have
(global-set-key (kbd "M-g") 'goto-line)
And in my iTerm2 settings I have both "option" keys set to send +Esc. I can use any of the default key bindings like normal, but M-g, (or others I've remapped) still send the default command. I've tried changing iTerm2 to send meta, but it instead injects non-printable ascii characters.
What's the best workaround to get these key bindings to work under iTerm2? Is there a clearer solution than to have my .emacs check if I'm using a Mac, and if so then use
g) does it invoke
goto-line(I think this is emacs default)?