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

2
  • 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. Commented Feb 24, 2011 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? Commented Feb 24, 2011 at 15:28

1 Answer 1

11

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

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

3 Comments

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.
I would keep looking for the source of the problem, however. ESC is a great safety-net, but a lousy replacement meta key.
@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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.