22

I am on a mac and I am running emacs 24.4.1, but I have the same problem also with 22.1.1. When I open mac on a terminal on the remote host, it does not recognise option key (alt) like the meta key. I have modified the .emacs in the following way

(setq mac-option-key-is-meta nil
      mac-command-key-is-meta t
      mac-command-modifier 'meta
      mac-option-modifier 'none)

so I have tried to change the meta key to command, but also in this case the meta key doest work . This only work on the X version of emacs (when I open emacs in a new window), both with the option as meta key that as command as meta key. This is a problem I have with emacs in the terminal-only.

Now I don't know how to run commands in emacs! is there any keybinding I can use?

simona
  • 403
  • 2
  • 4
  • 7

3 Answers3

27

This is a setting in Terminal.

In Terminal 2.5.1 the option is set differently than in the above comments:

In the main Terminal menu, choose "Preferences" to open a dialog. Click the "Profiles" icon in the top of the dialog.

In the Profiles section, make sure there is a check in the checkbox called "Use Option as Meta key."

mattsilver
  • 460
  • 4
  • 9
15

I solve the problem with answer of ohruunuruus. Maybe post a snapshot will be more easy to understand. enter image description here

Jason Zhou
  • 151
  • 1
  • 5
  • How does this answer the question? Please explain. Just circling part of a screenshot does not answer the question well. – Drew Feb 20 '18 at 17:51
0

I'm using iTerm2 and find out that setting the Option key to Esc+ helps.

enter image description here