serras / emacs-haskell-tutorial

Tutorial on setting up Emacs to do Haskell programming
690 stars 100 forks source link

On Mac OS X 10.9.2 M stands for alt not command #34

Closed l-monnier closed 9 years ago

l-monnier commented 9 years ago

Hello, On my mac (Mac OS X 10.9.2), M stands for alt rather than command... Very simple, but took me a small while to find out! It could be worth mentioning this.

zilvinasu commented 9 years ago

@momomimachli are you using Emacs from Terminal?

l-monnier commented 9 years ago

It looks like, and the tutorial actually works like a charm with alt instead of cmd! (I guarantee that I didn't tweak my Mac in any special way and that I am using the version downloaded from the link you provided!).

zilvinasu commented 9 years ago

Well from what I understand, it's very natural for Emacs users to bind M to CMD. I even have Caps Lock bound to CTRL to make it even easier for commands that require C.

l-monnier commented 9 years ago

This is should indeed be the default. Searching a bit, there's indeed the following in the manual: http://ftp.gnu.org/old-gnu/Manuals/emacs-21.2/html_chapter/emacs_36.html

"On the Mac, Emacs can use either the option key or the command key as the META key. If the value of the variable mac-command-key-is-meta is non-nil (its default value), Emacs uses the command key as the META key. Otherwise it uses the option key as the META key."

However, for some reasons, it's not the case for me. To use command as META I had to add the following code to the buffer:

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

To see if it worth mentioning in the tutorial. In any cases, thanks a lot for having looked into it!

serras commented 9 years ago

I have added a reference to the Emacs documentation you mention. Thanks for spotting this! :)

l-monnier commented 8 years ago

Thank you for the correction and even more for this wonderful tutorial which made me start using emacs for all my coding :-)