I checked the option key as meta in terminal preference. Now the option key works as meta in terminal.

Once I open Emacs through terminal option key doesn't work as meta anymore. If i type Option-v The result comes out as a check mark.

I've added the next line to my init file but still doesn't work.

(setq ns-option-modifier 'meta)

Now I can only use ESC as meta.

Any idea why the keybinding doesn't change in Emacs?

  • try M-x customize-group RET ns RET, do not forget to apply customization.
    – Muihlinn
    Commented Apr 12, 2020 at 13:03
  • Thanks. In my custimize-group when I type ns, nsm group comes out instead. Any idea why? I am using macport-emacs. I uninstalled my spacemacs now the meta key is set to command for some reason. @Muihlinn Commented Apr 12, 2020 at 19:06
  • Sadly no, I gave up with OSX long ago, but looks like you don't have that group. Back then I used to use the X11 Emacs, and IIRC there were options to avoid keys interferring between the system and X11 apps. To make things even difficult there it was system Emacs (very outdated, IIRC without X) and whatever you installed. You need someone with an up-to-date OSX knowledge to dig this further. My main point was that a defcustom may not be properly set up with setq in your init file, thus ignored.
    – Muihlinn
    Commented Apr 12, 2020 at 19:27
  • 1
    macports Emacs can be compiled/installed with variants, yous should check if yours was configured with --with-ns (nextstep-cocoa windows system) evaluating (featurep 'ns)
    – Muihlinn
    Commented Apr 12, 2020 at 20:14

1 Answer 1


Try the following config

(when (eq system-type 'darwin)
  (setq mac-option-modifier 'meta))
  • 1
    Note that the test is not necessary, because the variable has simply no effect on other systems.
    – Stefan
    Commented Apr 13, 2020 at 14:43

Your Answer

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

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