Here is my setting of using Emacs as my major editor across OS X and Linux platform. You can refer my configuration from here.

It’s a fun experience that plays with Emacs, knowing all the shortcuts and packages. And we must also face the truth: it’s powerful, but it’s an editor. I rarely use Emacs to develop my entire project. There are better solution given by IDEs (especially for OS X, iOS applications).

Setup MELPA

MELPA (Milkypostman’s Emacs Lisp Package Archive) is an archive of Emacs packages. It’s stable and easy to use. You can setup MELPA as:

1(require 'package)
2(add-to-list 'package-archives
3             '("melpa" . "http://melpa.org/packages/") t)
4(package-initialize)

Setup for Shell Support (OS X only)

Emacs does not adapt .profile automatically, then when you wish to call your shell an run some commands, there may some issues (I’m using Anaconda for my Python support, and I noticed this when I tried and failed to plot somethings). You can use exec-path-from-shell to resolve this problem, the code is here. The package is also available in MELPA.

1; add to list if you install manually
2(add-to-list 'load-path "~/.emacs.d/site-lisp/exec-path-from-shell")
3
4; you only enable the mode when it's running on OS X
5(require 'exec-path-from-shell)
6(when (memq window-system '(mac ns))
7  (exec-path-from-shell-initialize))

Start Full Screen, Turn Off Scroll Bar and Menu Bar

Scroll bar is a pain for the most of time and menu bar will take many spaces when you are working on a laptop. I prefer to turn off them. Furthermore, the usual way of maximizing Emacs window is not working perfectly with OS X. It always leave a slide of space on the top. So you need another way of settling this:

1(tool-bar-mode -1)
2(scroll-bar-mode -1)
3(setq frame-resize-pixelwise t)

Simplify Yes-and-No

I would rather use y-and-n instead of typing entire yes or no, would you?

1(defalias 'yes-or-no-p 'y-or-n-p)

Configure Fonts

There are some difference between Ubuntu’s font and OS X’s font. I then configure them differently

1(if (eq system-type 'gnu/linux)
2    (add-to-list 'default-frame-alist '(font .  "Courier 10 Pitch-15" ))
3)
4
5(if (eq system-type 'darwin)
6    (add-to-list 'default-frame-alist '(font .  "Courier-15" ))
7)

Setup AUCTeX

Setup aspell through MacPorts (OS X only)