8

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?

  • Possibly related: Problems with keybindings when using terminal. – Dan Feb 8 '15 at 13:56
  • 1
    I don't recognise those variables and can't find documentation for them. Have you tried `set-keyboard-coding-system' ? – Andrew Swann Feb 8 '15 at 14:02
  • 2
    I believe that's the "problem" with the terminal. You need to open its keyboard settings and check the corresponding option. I don't remember off the top of my head what it's called, but it's not difficult to find either. – wvxvw Feb 8 '15 at 15:54
  • 1
    @wvxvw it is what you say: in terminal > preference > keyboard > there is the option 'use option as meta-key'. It works! thank you – simona Feb 8 '15 at 21:21
13

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."

6

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

  • 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

Your Answer

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

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