I'm a newbie running emacs 26.3 (9.0) on OSX in the graphical mode (i.e. not in the terminal) and am writing a document with Devanagari (sanskrit text).

Some of the letters in the inbuilt devanagari keyboard can only be input with a combination of the meta key and another letter. For e.g. META i prints

However, emacs interprets the META + <somekey> and claims that it is an invalid command. Is there a way to disable the meta-key feature of emacs, even temporarily, so as to input the characters that I want? If this isn't possible, how can I input characters that require the META key?

Error displayed in emacs

  • 1
    Depending on which emacs for mac you're using you may have ns-option-modifier and ns-right-option-modifier (or mac-option-modifier, mac-right-option-modifier) variables you can modify. If you set one of these to 'none it should let you enter the Denanagari text. I have my option modifier set normally but right-option set to none so that I can use the right option key for those characters. Try M-x customize-group ns and look for "Alternate Modifier". – amitp Jul 21 '20 at 19:36
  • 1
    There's a 'devanagari' emacs input method as well, that would be independent from any OS-level input method. – rpluim Jul 21 '20 at 19:38
  • Thanks for your replies. I added a macro to my .emacs file such that the left alt/option key is ignored by emacs and the alt/option key on the right continues to work. – linuxfan Jul 23 '20 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.