Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
The bare essential guide to Emacs (eatingair.com)
48 points by hanszeir on April 9, 2011 | hide | past | favorite | 17 comments


Am I the only one that feels that this article isn't HN worthy? Everything that is said is well documented in the official documentation and it isn't a guide at all.

The information in it will get a beginner nowhere without reading the tutorial and if he reads the tutorial the information in this article becomes meaningless to him.


I was expecting something much better for 40 points and the front page.


A much better (alternative to the C-h t tutorial, which is very good) intro to the bare essentials is the beginner articles from Mastering Emacs:

http://www.masteringemacs.org/articles/category/beginner/


Regardless of your stance in the editor wars, the 'first' key or key chord you need to know about is what it takes to leave the application. How to get in and how to get out first--- everything else second. The chord BTW is ^x^c I suppose you could claim that ^z leaves as well, but it is not quite the same thing. Although many never kill emacs, they just pause and return...


I would observe that modern emacs has menus so the getting started learning curve is no more difficult than Notepad.

http://www.gnu.org/software/emacs/tour/

The command short-cuts are on the menus, so as you get tired of reaching for the mouse you can begin to use them.

A couple of good reasons to use emacs:

1. It runs on most platforms. 2. It's a gateway drug to Lisp. Emacs is really just a big Lisp interpreter.


I'm curious; do you have experience (or know of someone who does) of learning Emacs by using it like Notepad and slowly learning the keyboard shortcuts by looking up things in menus? I'm skeptical that this approach would work; I think there are a lot of basic (non-obvious) things specific to Emacs that you need to know to use it well. If you just use it like Notepad and lookup shortcuts for copying/pasting, then I predict that you would just end up using it like Notepad.


This has pretty much been my process with it. I started using it sometime last year. Fumbled completely for a day or so, but started out just using menus and slowly changing to keyboard commands. That, and googling when I wanted some behavior that wasn't immediately clear to me.

What I need to do now is read a fairly substantial book/site to tell me about the things I don't even know I would want to know. The Rumsfeldian unknown unknowns.


Once you discover a handful of useful commands/features, you'll appreciate it more. These a few of my favorites:

* Unlimited undo/redo - C-_

* Incremental search forwards/backwards - C-s/C-r

* Macros - C-x ( C-x )

* Query-Replace: M-%

* "Hippie" Expand - M-/

* M-x tetris -- Actually has an enjoyable game of Tetris.


Definitely. It was easily three months before I learned about apropos. Otherwise it was menus and C-h k.


Unlike vim, I never use Emacs within a terminal. I use a standalone application, which has all the desktop chrome that comes with that. Including a quit button.


I too use Emacs mostly as a standalone but turn the chrome off. But the chrome is useful for a beginner.


In Emacs docs, <Ctrl> is C and (by default, usually) <Alt> is M (for meta).

  C-x C-c : quit emacs
  C-g C-g C-g : cancel any crazy mess you got yourself into
  C-x C-f : open a file (read a file into the current buffer)
  C-x C-s : save current file (buffer)


Also, the "-" in "C-x" means "Hold down Ctrl and press x". It doesn't mean to press Ctrl and then press x, or to press the "-" key.

You are probably used to that being expressed with a "+", as in "Ctrl+x".


Good catch. I guess I've been using Emacs for too long. :)

One other thing that I missed when I first started using emacs was how to cut/copy/paste:

  C-space : start selecting text to cut/copy (move cursor to select)
  M-w     : copy
  C-w     : cut (kill)
  C-y     : paste (yank)


Is there something better than Viper mode for Vim folks? It just doesn't feel complete... I'm trying to give Emacs a shot as I learn Clojure.


I came to emacs from Vim, and at first i tried Viper mode, but i gave up and just went with learning emacs as it is. It payed of in the long term.


the title is very accurate




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: