tags:

views:

550

answers:

6

Assuming a superficial knowledge exists, how might one go about forcing a mastery of Emacs?

Assume also that said person currently uses Aquamacs but falls back on Mac OS X-isms far too often. This person is serious (this time for sure), and needs some advice.

+5  A: 

I found the only way to master anything is to do it daily (practice, practice, practice).

As far as Mac OS X-isms... I'm not sure that's a problem per-say. Personally, in my quest to master Vim, I ditched Mac OS X entirely and have been happily living in GNU/Linux-land since.

Good luck!

thenduks
+14  A: 

C-h t

Take the tutorial, and actually follow it all the way through.

Then, learn some of the more useful time-saving functionality, like C-x ( to start recording a macro, C-x ) to finish, and C-x e to execute the last macro. Read the manual (C-h i m emacs RET) for more details. Try learning to browse through the documentation within info mode in Emacs, rather than resorting to the web, to get more used to how navigation works in Emacs.

Oh, and try using an Emacs that doesn't have the Aquamacs key bindings. There is a command line version of Emacs included on Mac OS X, though using the Meta key is a pain there (you have to either set your Terminal preferences to use Option as meta, or always use Esc). You can also use MacPorts to install an X11 version of Emacs, which won't have the Mac style keybindings.

Also, try using Emacs keybindings in other Cocoa text editing views. It's not something that a lot of people know, but a few common Emacs keybindings also work in the standard Cocoa text controls, such as C-a to go to the beginning of a line, C-e to go to the end, C-k to kill to the end of the line, C-y to yank from the kill buffer (which is different than the pasteboard). C-t transposes two characters, and I'm sure there are more that I can't think of at the moment. Using these on a regular basis will get your fingers used to Emacs keybindings (many of these also generally work in most shells, and in programs that use GNU Readline for being able to accept editable input).

For any technology you use on a regular basis, seek out the best Emacs mode you can for that technology, and learn it inside and out. For instance, if you're a Git user, I find Magit indispensable. If you program JavaScript, make sure you use Steve Yegge's js2-mode. If you use Common Lisp, learn SLIME, if you use Erlang learn distel. Sometimes, the best Emacs mode won't be the best tool you can find for a job, but for many, many things it's pretty good, and great to have it all integrated in to the same editor and environment.

Keep practicing everything you learn, over and over. I find that I frequently learn a new Emacs keybinding, and then promptly forget it because I don't use it for another 6 months. You can alleviate this problem by looking for any excuse you can to use a new keybinding after you first learn it, to help get it ingrained in your memory.

Brian Campbell
The emacs tutorial _is_ quite good.
thenduks
FYI js2-mode is deprecated in favor of espresso. See http://lists.gnu.org/archive/html/emacs-devel/2009-08/msg00395.html and particularly Steve Yegge's comments at http://lists.gnu.org/archive/html/emacs-devel/2009-08/msg00619.html
Steven Huwig
+6  A: 
  • Don't use Mail.app, Gmail, or whatever -- use Gnus.
  • Don't use a web browser for programming information, use Info pages where possible.
  • Don't use Terminal, use M-x shell.
  • Make sure you have a right and a left control key. I have a MacBook and have mapped the right option key to control.
  • Swap left control and capslock.
  • Read Steve Yegge's advice.
  • Find a killer app.
  • Always, always, always read the Emacs manual and use M-x apropos when you want to do something but don't quite know how. Emacs probably has the best online help of any program, ever.
Steven Huwig
Ah, yes, this is good advice (though it's a bit farther than I would go; I don't use Gnus, for instance, and I find that M-x shell isn't as good as Terminal). Some people may not know how to swap caps-lock and control; it's actually pretty simple, you can just go into System Preferences, go to Keyboard, and click Modifier Keys, to remap your modifiers. I actually just have both keys mapped to control, since I almost never need caps-lock and it makes it less confusing for other people who need to use my keyboard.
Brian Campbell
I don't use Gnus anymore either (if my work e-mail supported IMAP/SMTP/POP, I would.) But it really got me to learn the text editing features quickly. :)
Steven Huwig
+2  A: 

Practice.

Try to answer questions here that are tagged Emacs.

Practice more.

Visit the Emacs Wiki and try ideas from it.

Practice even more.

Good luck!

Chip Uni
A: 

Switch to Carbon Emacs which doesn't have all the Mac bindings. It's a lot closer to the Unix Emacs experience but doesn't require X11 installed. The only real downside to Carbon Emacs is that Apple has no 64 bit Carbon and is probably phasing Carbon out, so Carbon Emacs might not have a long life ahead of it.

Charlie
Or just use the text mode GNU emacs already available on mac os!
Chetan Sastry
+1  A: 

Step 1: Notice you are doing something complicated.

Step 2: Read the manual to see if there's an easier way.

Step 3: Undo your changes.

Step 4: Do things the "new way".

Step 5: You've just learned one more new feature. Go to Step 1.

jrockway