Closed ceridwen closed 3 years ago
Depending on the mac system, you have to modify the appropriate variable either:
(setq mac-command-modifier 'meta)
or
(setq ns-command-modifier 'meta)
Unfortunately, I'm not on a mac, so I don't remember what emacsforosx does. I don't remember what the options are either.
For my version of Mac OS X and Emacs.app, (setq mac-command-modifier 'meta)
worked. Is there any chance this could be added to the FAQ or the install instructions?
Looking through the source for Emacs from , I see that mac-command-modifier
is an alias for ns-command-modifier
. Also, looking at , it recommends setting the ns-*
variables.
So what I ended up doing is swapping command
and alt
for emacs with the lines
(setq ns-command-modifier 'meta)
(setq ns-alternate-modifier 'super)
The current docs recommend
(setq ergoemacs-use-mac-command-as-meta nil)
That variable does not exist in the current version of ergoemacs. I will make a patch to fix this.
I'm running https://emacsformacosx.com/ on Mac OS X 10.12.5. This installs Emacs to
/usr/local/Cellar/emacs/25.2/Emacs.app
(or a corresponding location for other Emacs versions) and lets you run Emacs through the GUI. I have ergoemacs installed through melpa and enabled in my .emacs as such:My issue is that the keys listed as using the Apple-Command/Alt keys work using Alt, the key two spaces away from the spacebar, not Apple-Command. Some default Apple key chords still work, Command-X and Command-C for instance because they're Mac OS X defaults that Emacs.app interprets, but this leaves me without easy access to the cut-line command, which I can access as Alt-G but not Command-G like I ought to be able to.