views:

1301

answers:

7

I would like to to try emacs, and want to give it the best chance possible.

To do this, it seems like having a good .emacs file is important.

I primarily use Mac OS X (so I have looked at Aquamacs), and I mainly do Python programming, so anything specifically for that would be great.

+5  A: 

The most important configuration change that I have found is not one for your .emacs, but for your OS. In the "Keyboard & Mouse" system preferences, in the "Keyboard" tab, click "Modifier Keys..." at the bottom and then change "Caps Lock" to behave like "Control." Then train yourself to use the caps lock key (to the left of the "A") instead of the control key down in the corner. This will make the whole experience both far more productive and far more comfortable.

see: http://stackoverflow.com/questions/162896/emacs-on-mac-os-x-leopard-key-bindings#162907

Glomek
+5  A: 

See these related questions:

Alexander Kojevnikov
+4  A: 

That is a hard question. My theory about Emacs is that you have to give it a real honest try. That means working with it for a few months, not days. It is not for the faint of heart! Ideally emacs would become your one and only text editor, and you do things the emacs way.

Really, to give yourself and emacs the best chance possible, you should learn enough elisp to do your own basic customizations.

In fact, I think your .emacs is probably a read herring with regards to giving emacs the best possible chance. Instead, try out some of the groovier features like flymake with pylint, the inferior python process, python debugging with emacs are all worthwhile. In particular inferior processes are the bomb.

EmacsWiki has some good info on python and emacs.

Jonathan Arkell
A: 

You can look to my emacs configs, located on my site. Aquamacs-specific configuration you can find in separate file

Alex Ott
+1  A: 

I've created a modular emacs config for myself. Feel free to take a look here.

zpinter
+4  A: 

I'd suggest starting with a blank .emacs file. Then go through the tutorials and related blog posts, and grow it as you learn. Using a .emacs file that's borrowed from someone else seems a little like missing the point.

Justin Weiss
+1  A: 

To add on to a few others' comments, I currently am running with the following modifier key set up:

Caps-lock = Control
Control = Option
Option = Inactive
Command = Command

Under Emacs (btw, you mentioned Aquamacs, go with Emacs.app instead) I then specify via the preferences to have Option = Command and Command = Option. This places the two most used keys (C and M) just off the home row and just off the space bar, which I've found to be very comfortable to use.

To go with Emacs.app, just use MacPorts to install it

sudo port install emacs-app

Also, I'm going to put my encouragement in there with everyone else; You have to try this for an extended period of time or you will not stick with it. Go through the tutorial multiple times (C-h t), browse through the Info manual (C-h r), if you don't know how to use Info, go through the Info manual (C-h i h) (it's really an incredible documentation system), and for about 30 of the best tips I've ever heard written in a really concise manner, visit Yegge's old effective Emacs post. Beyond all that, really turn off everything else and just go for it. When you come up against something you don't know how to do, take the opportunity to research it, repeat it a few times, and then move on. You'll slow down a lot at first but afterwards you will be much more efficient at editing any sort of text out there.

Tim Visher