Learning Emacs, part 1
A few things I've learned since part 0:
- Carbon Emacs does support Mac-style keybindings like ⌘Q, they just need to be activated. See Help -> Carbon Emacs Package -> Mac-Style Key Bindings.
- I am now mapping Meta to Alt, as suggested (and demonstrated) in this comment. (Thanks Ozzi.)
- I can set the Mac font using (set-default-font "-apple-monaco-medium-r-normal--13-140-72-72-m-140-mac-roman"). ^_^ Getting a list of available fonts is done using M-x set-default-font RET TAB TAB.
- Good luck trying to look for ".emacs" in Google or any other search engine. Fortunately there's such a thing as the dotemacs site, which offers a ton of example .emacs files.
- The Carbon Emacs Google group also seems helpful.
Open issues:
- I'm still trying to figure out how to resize the window automatically. Right now, when Emacs opens, the window is a little too big, and the bottom hides behind the dock.
Update: Solved with (add-to-list 'default-frame-alist '(height . 39)).
- I'm still debating whether I should use the semi-default Mac-style key bindings, or define my own. I like ⌘O to map to C-x C-f, for example, but Carbon Emacs shows a dialog box. It appears I can either use the predefined key bindings, *or* map Super to ⌘ and define its key bindings myself, but not both.
- I would like to select text by moving around with the cursor while pressing Shift... not sure if that can be done in Emacs.
creidiki said,
February 18, 2008 @ 6:39 am
Shift-Arrow select can be done - Its part of the CUA-mode (customization group: CUA) package, but can be enabled separately from C-c copy C-v paste and the rest.
You can also set the font without X11 fontspecs using default-frame-alist (at least in emacs 23):
(add-to-list 'default-frame-alist '(font . "DejaVuSansMono-12"))
I only found this out yesterday, I'll admit :)