Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Forcing myself to master Emacs

Tags:

emacs

macos

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.

like image 507
fogus Avatar asked Dec 30 '09 03:12

fogus


4 Answers

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.

like image 91
Brian Campbell Avatar answered Nov 01 '22 22:11

Brian Campbell


  • 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.
like image 29
Steven Huwig Avatar answered Nov 02 '22 00:11

Steven Huwig


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!

like image 6
rfunduk Avatar answered Nov 02 '22 00:11

rfunduk


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!

like image 2
Chip Uni Avatar answered Nov 02 '22 00:11

Chip Uni