徐继哲

徐继哲的分享

他的个人主页  他的分享

Learn Emacs in Ten Years

徐继哲   2009年10月26日 星期一 10:55 | 3条评论

by Edward O’Connor on 13 July 2009
 
 Somebody emailed me the other day, asking about how to go about learning Emacs. This is my (edited and rearranged) reply.
 
 I know you’re something of an emacs wizard, so I thought I might as well ask you: how should I learn emacs? … I’ve used emacs for several years now but have not added very much emacs skill to my repertoire.
 
 Well, the short answer is, you should learn Emacs by using it for about a decade. That’s a pretty lame non-answer, so let me try to elaborate.
 
 I started using Emacs in the fall of 1997, as a freshman in college. For at least the first year or so of using Emacs, my Emacs repertoire probably consisted of tens of key bindings (not counting the myriad bindings of self-insert-command, of course), and only a handfull of major modes (c-mode, java-mode, makefile-mode, that might be about it). So basically, for at least a year, my use of Emacs didn’t differ substantially from the average user of, say, Notepad.
 
 I distinctly remember a moment during my sophomore year, while in a professor’s office talking about some assignment or some such, being amazed by some crazy magic he worked in an Emacs buffer, making seemingly very complex edits in a dizzyingly short amount of time. I remember asking what the hell he had just done. He had a good laugh—at this point, I was known among other students as “the Emacs guy,” and yet I didn’t even know how to record or use keyboard macros. This was pretty embarrassing.
 
 I’ve continued to use Emacs this whole time, and it turns out that I’ve learned a lot about it since then. I continue to learn about it every day. The thing is, this isn’t even about Emacs specifically. It takes about ten years of such practice to learn anything well. From Norvig (emphasis his):
 
  Researchers (Bloom (1985), Bryan & Harter (1899), Hayes (1989), Simmon & Chase (1973)) have shown it takes about ten years to develop expertise in any of a wide variety of areas, including chess playing, music composition, telegraph operation, painting, piano playing, swimming, tennis, and research in neuropsychology and topology. The key is deliberative practice: not just doing it again and again, but challenging yourself with a task that is just beyond your current ability, trying it, analyzing your performance while and after doing it, and correcting any mistakes. Then repeat. And repeat again. There appear to be no real shortcuts: even Mozart, who was a musical prodigy at age 4, took 13 more years before he began to produce world-class music. In another genre, the Beatles seemed to burst onto the scene with a string of #1 hits and an appearance on the Ed Sullivan show in 1964. But they had been playing small clubs in Liverpool and Hamburg since 1957, and while they had mass appeal early on, their first great critical success, Sgt. Peppers, was released in 1967.
 
 So how do you get from where you are to using Emacs so much you spend your spare time hacking on various Emacs libraries for fun? Mostly by making a point of using Emacs for all of your editing needs, and allowing Emacs to slowly take over your other computings tasks as well.
 
 For instance, the big application that people typically expand their Emacs-fu with is using Emacs to read mail (see also Zawinski’s Law of Software Envelopment). I recommend trying Gnus. The several weeks you waste trying to figure out how to point Gnus at your mail server more than pays for itself by the amount you learn while driving yourself mad.
 
 Emacs is called “the extensible, customizable, self-documenting real-time display editor.” I want to draw your attention to the self-documenting part. Perhaps the most critical Emacs skills to develop early on is how to navigate and interrogate Emacs’ help features, which are extensive. Type C-h C-h to get started down that path.
 
 (related: what is the best tutorial/book on emacs lisp?)
 
 IIRC I learned elisp via a combination of bumbling, Usenet, and Glickstein  but, honestly, I think the elisp manual & tutorial (combined with the Emacs manual itself) are much better than muddling through like I did. (Though, if you’d like, you can borrow my ancient and increasingly-inaccurate copy of Glickstein.)
 
 * You can get to the elisp tutorial within emacs by typing the following: C-h i d m emacs lisp intro RET
 
 * You can get to the elisp manual within Emacs by typing the following: C-h i d m elisp RET
 
 * You can get to the Emacs manual within Emacs by typing the following: C-h i d m emacs RET
 
 Here’s a breakdown of the above commands so you know what each part is about:
 
 C-h i
 
 brings up the Emacs interface to Info, the GNU documentation system
 
 d
 
 goes to the Info root menu (in case you were already somewhere else in Info)
 
 m emacs RET
 
 opens the Info menu item named emacs
 
 For real-time help from friendly experts, try the #emacs IRC channel on Freenode. Eventually, you might try IRCing from within Emacs; there are several IRC clients, including two which ship with Emacs itself.

评论

我的评论:

发表评论

请 登录 后发表评论。还没有在Zeuux哲思注册吗?现在 注册 !
孙铭阳

回复 孙铭阳  2009年10月26日 星期一 20:29

嗯… 我已经 1/3 了^^

2条回复

  • 徐继哲

    回复 徐继哲  2009年10月27日 星期二 00:54

    加油。

    不过晚饭的时候我和RMS以及另外一位香港科技大学的教授提到了这个文章,他们一致认为不需要10年,呵呵

    1条回复

暂时没有评论

Zeuux © 2024

京ICP备05028076号