I’m not an Emacs Lisp programmer. In the best case scenario a wanna-be Emacs Lisp hacker. A few months ago I decided to have an introduction to this world full of parenthesis to solve a few problems I was having with Emacs default settings.
When I first started using Emacs I had a hard time dealing with tabs and spaces. Thanks jwz. In my day job tabs are the norm but I like my personal toy projects to have spaces instead. Problem solved. Now each project has its own preferences in my .emacs file. Life is great.
I went to the public library here in Sunnyvale and while skimming through computer titles I found Writing GNU Emacs Extensions by Bob Glickstein. Now, I have a few books to finish reading and of course, tons of code to write/read/edit, but I couldn’t resist and borrowed the book.
The book was printed in 1997 and mainly refers to Emacs version 19.34 but so far the concepts still apply (I’m running version 23).
I think the next step is to learn some form of Lisp…
I can only hear the sound of tapping while I type on my stupid keyboard. No scales, chords or notes. Even so, I treat the keyboard as a musical instrument.
To improve typing or playing one should avoid unnecessary motion. If your hands stand still while only your fingers move you save energy, time and visual distractions.
Emacs key bindings are a great deal to move around text or code. You don’t need the arrow keys. You don’t even need page down, page up, home, end, delete or backspace keys.
There is a learning curve though. You should memorize key combinations, I mean, chords. It is a small price to pay for what you get in return. After you master it you will feel pain to type in a word processor without key bindings.
The good news is that Emacs key bindings are available not only inside Emacs but also in your favorite applications. I use the same key bindings at the terminal, Firefox and even in Gnome. That is a lot of fun.
I finally decided to devote some time to learning elisp and get rid of the shame I have every time I copy and paste code into my .emacs file. I’m now reading Programming in Emacs Lisp (Second Edition) by Robert J. Chassell. It is really good reading. Not only to learn elisp but also because the author is a great writer and I have the feeling he is interested in the history of words. Etymology is a fascinating field.
The text mentions, for example, where the word buffer comes from:
The word `buffer’, by the way, comes from the meaning of the word as a cushion that deadens the force of a collision. In early computers, a buffer cushioned the interaction between files and the computer’s central processing unit. The drums or tapes that held a file and the central processing unit were pieces of equipment that were very different from each other, working at their own speeds, in spurts. The buffer made it possible for them to work together effectively. Eventually, the buffer grew from being an intermediary, a temporary holding place, to being the place where work is done.