How to Learn Emacs Lisp?
How to Learn Emacs Lisp
many people have asked this:
I've read the basic of elisp, but how do you actually stick to it?
- Here's a suggestion.
- Suppose you code in Ruby (or C, PHP, Perl, Python, …).
- Now, begin by stop using the default major mode.
- Roll your own!
- This is actually easier than it sounds.
- You can begin by writing a very basic mode, that does nothing but syntax coloring of the keywords.
- This is very easy.
- If you know the basic syntax of elisp, you can do this in a hour.
- See: How to Write a Emacs Major Mode for Syntax Coloring.
Once you have that, setup emacs to use your own mode. 〔see Emacs Init: Set Default Major Mode〕
Now, you will start to find problems. For example, keyword completion, function templates, reference lookup, indentation. You can now gradually add features, add commands.
Soon, you'll have learned a ton of elisp. If you keep at it, after a year, you'll end up with your own robust mode. You'll also start to understand all the useful packages you installed. Maybe fixed some bugs or added features. And maybe write something useful that doesn't exist yet.