Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.