6

Problem: How to make Meta-x work in emacs?

Hi I am a newcomer to linux using Ubuntu 10.04LTS and emacs23.1.1. I used the Alt key as Meta, but it stopped working when I upgraded ubuntu. I changed meta to right ctrl (using ubuntu keyboybard preference). Right controll works fine in accesing third level characters in emacs when using Norwegian layout. However typing Meta-x only result in the message "Mismatched parantheses" in emacs and the character '»' in the buffer. Switching to US layout nothing happens when typing meta-x.

I want meta-x to work so I can insert commands again in emacs.

Remedies I have tried:

Changing meta key with ubuntu keyboard preference -> Doesn't work

I looked for the file file .Xdefaults with locate. Since it didn't exist I created it in home\"username". And wrote the line "Xterm*metaSendEscape: true" in the file. (I am not sure what it does. Maybe this is a fix is ment for another problem, I found it at http://www.emacswiki.org/emacs/EmacsChannelFaq#toc17) -> Doesn't work

MPelletier
  • 16,256
  • 15
  • 86
  • 137
Qyvind
  • 65
  • 1
  • 4
  • 1
    I don't know if this will help, but the program `xev` will tell you exactly what keysyms the X server is receiving when you press keys on your keyboard. – Ken Feb 24 '11 at 15:14
  • 1
    It seems like your alt key was remapped by the OS upgrade. Do any OS shortcuts with ALT work? For example: Alt+F2 or Alt+Tab? – stderr Feb 24 '11 at 15:28

1 Answers1

11

Normally you could also use the ESC-Key for M-. So M-x would be ESC-x

Ocaso Protal
  • 19,362
  • 8
  • 76
  • 83
  • 7
    To be clear, ESC acts as a prefix, not a shift key. In other words, you type `ESC` then `x`; you don't type `x` whie holding down `ESC`. – Keith Thompson Sep 07 '11 at 16:23
  • I would keep looking for the source of the problem, however. `ESC` is a great safety-net, but a lousy replacement meta key. – phils Jun 22 '12 at 02:50
  • @phils To be honest: I nearly always use ESC as META. I work with a german keyboard layout and some combinations (e.g. M-{) are quite messy to type with such a layout. But you are correct: It's better to search the source of the problem. – Ocaso Protal Jun 22 '12 at 05:51