Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using XEmacs 23.

I tried to execute a shell command by M-! cmd RET but it did not work.

M-! does not turn up in the microbuffer no matter how many times I press Alt+!.

But if I go to Tools menu and select Shell Command... option then it writes M-! to the microbuffer and everything works fine.

What is the problem here?

NOTE: I am using XMonad window manager. Is it affecting key bindings?

share|improve this question
up vote 2 down vote accepted

You can use either Escape ! or Alt+! to enter M-!. If Escape ! but not Alt+!, it's probably because your window manager has rebound that key combination. Try typing Ctrl+h c Alt+!. If this shows “M-! runs …”, the key combination is bound to the indicated command. If the “Describe key” prompt just sits there, it means the key isn't getting to Emacs at all. Use Escape ! as a workaround or change your window manager binding.

share|improve this answer
    
Thank you very much! :) – Pratik Deoghare Dec 18 '10 at 5:55

Type Ctrl - h f shell-command, it should say something like:

shell-command is an interactive compiled Lisp function.

It is bound to <f10>, M-!, <menu-bar> <tools> <shell>.

[...]

If M-! doesn't appear in that list then it's an issue about XEmacs: try to rebind it in your .emacs.

Otherwise it may be that Alt is used by XMonad as main key, I suggest you to use the Windows (super) key for that.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .