Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
**Getting started with Emacs? Empty your cup.**
I often hear from people who are interested in learning Emacs but who are frustrated by the learning curve. They're struggling to find equivalents for things they used to do in their previous editor, or they've copied various bits of code from other people's config and now other things don't work.
If you're learning a new programming language or framework at the same time, you might find it easier to learn with either your old editor or with whatever tool most developers (especially ones near you) use for that language. Avdi Grimm has a good post on this: [Let's stop telling programming newbies to learn Vim (or Emacs)](
Learning Emacs is not a good fit for everyone. In the beginning, you can expect it to be unfamiliar–almost alien. You will have the continuous challenge of balancing out-of-date information and bleeding-edge changes. You will be faced with too many choices without reasonable defaults. You will have to content yourself with knowing only a tiny fraction of what your editor can do.
[2015-01-12 When is Emacs a good fit – index card #emacs #beginner](
But maybe something in it appeals to you, and you want to learn Emacs anyway. Maybe you want to learn it for work. Maybe you want to learn it because you've heard good things about Org Mode, ESS, or other tools. Maybe you're just curious about all the fuss.
Here's something I've realized. To learn Emacs well, you need to empty your cup. This is the story as told on the [C2 wiki](
<blockquote>A master was trying to explain something to a student. Now this student was not a brand new student, but a senior student who had learned many things. He had knowledge and experience aplenty to draw upon. But each time the master tried to explain something new to the student, the student kept trying to hold it up against his own notions of the way the world is and how it ought be, and he was unable to see the lessons in what the master was trying to teach him.
Finally, the master poured a full serving of tea into his own cup, and into the cup of the student. Then he told the student he wanted to give to him some of the tea from his own cup. He began pouring tea from his cup into the student's cup, but the student's cup was already full, and all the tea from the master's cup spilled out over the cup onto the surface below.
The student said, "Master, you can't pour anything into my cup until I empty it to make room for what you are trying to give me.", and the master replied "Yes I know." "And I can't give you any new thoughts or ideas or perspectives on life's lessons until you clear out some thoughts that are already teeming in your mind to make room for what I have to teach you." Then the master paused for a brief moment, meeting the student's eyes with his own knowing look and calmly but sternly said: " If you truly seek understanding, then first, empty your cup!"
The student pondered for a moment with a look of absolute bewilderment. Then a look of enlightenment came over him, followed by a smile, and a look of receptiveness. The master started to explain again, and this time the student saw what the master was trying to say.</blockquote>
<img class="alignnone size-medium wp-image-27827" src="" alt="2015-01-13 Emacs and the beginner's mind -- index card #emacs #beginner" width="640" height="381" />
<a href="">2015-01-13 Emacs and the beginner's mind – index card #emacs #beginner</a>
Emacs beginners often grumble about the strange keyboard shortcuts and terminology. "Why can't I use Ctrl-X to cut? Why is it called 'killing text'? What's all this about buffers?"
Some of those differences seem easy to fix with code you can get on the Net. For example, <code>cua-mode</code> gives you the standard <code>Ctrl-X, Ctrl-C, Ctrl-V</code> shortcuts for cutting, copying, and pasting. If you're coming from Vi, <code>evil-mode</code> will give you a familiar interface.
But if you do that – if you give in to your initial discomfort – you will find yourself fighting more and more of Emacs as you go along, without the skills to properly integrate your changes.
It's better, I think, to approach Emacs as a beginner. Pretend this is your first editor. Go through the tutorial. Start with the basics. Try doing things the Emacs way.
This includes letting go of, say, the habit of opening up your editor each time you want to edit a file, and then closing it right after. The Emacs way is to keep the same editor open. Use <code>emacsclient</code> if you really need to "start" new editors from the command line.
<img class="alignnone size-medium wp-image-27829" src="" alt="2015-01-13 Other Emacs mindset tips -- index card #emacs #beginner" width="640" height="384" />
<a href="">2015-01-13 Other Emacs mindset tips – index card #emacs #beginner</a>
In the beginning, you might feel agonizingly slow. So you may need to do this in your discretionary time instead of when everyone is counting on you to deliver a time-sensitive project. It's okay to open up Vim so that you can get something done, while you keep learning Emacs in the background.
As you become familiar with the system, you begin to learn how to work within it. Slowly configure things, like your indentation style. You might changing the package list to include MELPA Stable so that you can install a package or two beyond the initial list included in Emacs. Get used to the changes before you introduce more.
Look around for inspiration: <a href="">Planet Emacsen</a> is a constant stream of ideas. Ask questions in communities like <a href="">Emacs StackExchange</a> and the #emacs channel on, or the relevant mailing lists or newsgroups.
Eventually, you might find yourself understanding the configuration snippets that other people have posted. <a href="">Reading Emacs Lisp</a> is the first step to being able to <b>modify</b> Emacs Lisp, and from there you can learn how to <b>write</b> Emacs Lisp. But you don't have to start knowing that right away; many people use Emacs for years before moving to that point, and many people use it without customizing it.
But if you start learning Emacs by getting frustrated with it and trying to force it to be what you want, you might never get to the point where you can enjoy it and work with it. Be a beginner. Give yourself time and space to learn, even if you feel you're learning slowly. Then, as you improve your understanding and skills, you'll learn how to coax Emacs to fit you even better.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment