[OS X Emacs] Aquamacs Pipe Symbol, Danish Keyboard

Søren Haagerup soren at artofweb.dk
Wed Sep 26 09:58:43 EDT 2012

Thanks a lot for the detailed answer.

Based on your pointers, I now managed to get things working the way I want
it, which is possibly a bit different from your configuration.

I ended up just adding
(setq-default ns-right-alternate-modifier nil)
To my .emacs-file. Results in the right Alt-button working as usual
Mac-style, and left Alt-button as Meta, like default in Aquamacs. I like
to stay with the defaults as much as possible, since this lets me use fx.
Cmd+S for saving, Cmd+V for pasting etc.

Best regards

On 9/24/12 9:56 PM, "Christian Lynbech" <christian at defun.dk> wrote:

>I am not currently using Aquamacs, but here is a few tips.
>First of all, find out if the Alt key is behaving like emacs alt or
>emacs meta. Type (for instance) C-h c Alt-x and if it says M-x
>something, your alt is giving you meta. Repeat the check with the apple
>key, preferably they should at least not give the same (one should be A-
>and the other M-).
>In my .emacs, I have this to configure which is which:
>        (setq mac-command-modifier 'meta
>              mac-option-modifier 'alt)
>But I cannot say for sure if that is emacs24 specific or not.
>Once you have a working Alt key, one option is to simply add the missing
>keybindings within emacs by adding stuff like this to your .emacs:
>        (if (not (keymapp key-translation-map))
>            (setq key-translation-map (make-sparse-keymap)))
>        (define-key key-translation-map [?\A-7] "{")
>        (define-key key-translation-map [?\A-8] "[")
>        (define-key key-translation-map [?\A-9] "]")
>        (define-key key-translation-map [?\A-0] "}")
>You may also want to look out for hooks which Aquamacs has set up. One
>of the reason why I switched back to emacs24 was that Aquamacs tries too
>hard to be mac-like for my tastes, given that I spend a lot of time on
>Linux and Windows as well. For instance, I have at one point added this
>to my .emacs:
>        (remove-hook 'minibuffer-setup-hook 'mac-change-language-to-us)
>You can use the apropos command to search for functions and
>variables. If you type
>        M-x apropos -hook$
>you will get a list of all hook variables (which admittedly is a lot),
>        M-x apropos ^mac-
>will list all variables and functions starting with "mac-". If you find
>a suspicious function, you can see if it has been added to some variable
>by doing something like this:
>        M-x apropos-value mac-change-language-to-us
>It can also sometimes be usefull to pull up the documentation for a
>        C-h f mac-change-language-to-us
>and click on the filename in which it has been defined. Even if one does
>not know a lot of elisp, it can sometimes help flesh out relevant
>variables or helpfull comments.
>Finally, I should also mention that another is to set up you own
>keyboard layout. Since I do not use the euro sign very much, I have
>rebound my keyboard laypout such that I have dollar on Shift-4 like on
>PC keyboards. I use the Ukulele application for setting that up and it
>has the advantage that it will work in all applications, not just emacs.
>Christian Lynbech       | christian #\@ defun #\. dk
>Hit the philistines three times over the head with the Elisp reference
>                                        - petonic at hal.com (Michael A.
>MacOSX-Emacs mailing list
>MacOSX-Emacs at email.esm.psu.edu
>List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx

More information about the MacOSX-Emacs mailing list