[OS X Emacs] Aquamacs Pipe Symbol, Danish Keyboard

Christian Lynbech christian at defun.dk
Mon Sep 24 15:56:22 EDT 2012


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),
while 

        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
function

        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 manual.
                                        - petonic at hal.com (Michael A. Petonic)




More information about the MacOSX-Emacs mailing list