Hacker News new | past | comments | ask | show | jobs | submit login
Ask YC: Why is emacs a great editor?
50 points by mixmax on Sept 24, 2008 | hide | past | favorite | 81 comments
I recently installed emacs since a lot of people (yes - yc users) seem to think it is the best code editor around. I read that it has a steep learning curve, but that it would be worth the effort. I accepted that and started using it as my primary editor to get my hands dirty. After 2 weeks of use I'm still not productive in it. I can think of the following reasons for this:

- I use my mouse a lot, and it seems that emacs is made primarily for keyboard input. I don't use keyboard shortcuts much.

- A nice looking GUI and well designed intuitive interfaces matter to me. Emacs is extremely lacking in this respect.

- I simply haven't spent enough time with it - the learning curve is steeper than initially expected.

What do you think? Am I missing something obvious, should I carry on in the belief that this is a divine tool that just takes time to master, or is emacs simply not for me?




Have you read O'Reilly's Learning Emacs? I strongly recommend it. It's a useful tour guide.

Failing that, have you read the tutorial?

Have you read Steve Yegge's "Effective Emacs"?

If none of that can help or inspire you then I probably don't have much chance. But I'll offer you some coaching anyway. Imagine Vince Lombardi reading this to you:

Stop using the mouse. If you're using emacs and you're touching the mouse, you're doing it wrong.

Stop fretting about the GUI. Why does your editor need a GUI? Emacs is a text editor, a program that is all about text. It's text all the way down. If it had more chrome, that would be wasting pixels that could be devoted to text. (Seriously: As Yegge will tell you, the true emacs user turns off the pull-down menus to make more room for text.)

Stop worrying about "intuitive". Yes, until you get to know the moves, emacs is nonintuitive, kind of like the piano. No matter how expensive and well-designed a piano I buy, I won't be able to just sit down and play some Chopin. (Well, technically you can buy player pianos that will do just that, but what would a concert pianist call such an instrument? A toy.) You're learning an open-source text editor that's quite possibly older than you. You will live with this software for months, years, or decades. You don't need features that make it easy to learn emacs in five minutes. You need the features that make it worthwhile to use emacs after thirty years.

And, yes, you haven't spent enough time. In particular, it's not just a matter of plugging away in emacs for weeks or months; it's unlike any other software you've ever used, and until you're oriented you won't find it easy to pick up things just by playing with it. You have to study it a little. Try some of the references. Try the Emacs Wiki.


I just read Steve Yegge's "Effective Emacs", thanks for the link. It was very enlightening on many levels and told me several things that were written between the lines, namely:

- Initial user experience is (very) secondary to long-term efficiency

- if you aren't in this for the long term don't bother - the article actually suggestes swapping the caps lock key and the ctrl key to have it better positioned for emacs use...

- unplug your mouse, the keyboard is faster once you learn how to do it well.

It seems to me that Emacs is a friend for life, but only if you have the patience for a year or two of courting and learning its tweaks and quirks.

I'll buy O'Reillys book and see how it goes.


Many are a fan of using the Caps Lock key as Control. While better than the insane standard positioning, it's still not optimal: it's not symmetrical between your hands (you're not going to remap Return as another Control) and it still makes for a lot of awkward pinky use. (Imagine playing a piano piece all with your 3rd, 4th and 5th fingers.)

The optimal solution I've come up with is to use the two keys adjacent to the space bar (typically Alt, but actually Command on the Apple keyboard I generally use) as Control, since that's easily the most important modifier key, so it should be the easiest to access. This makes C-w, C-s, C-r, C-a, C-e, C-p, C-o, C-j, C-l and so on very, very comfortable compared to the corner positioning. As far as I know, this is the way many keyboards were before the extended IBM PC keyboard came up with its insane control key positioning. (My comfort with these keys may also be linked to my use of Macs and ubiquitous command-key shortcuts before I switched to Ubuntu. Ironically, Emacs is much more comfortable now in Ubuntu than it ever was on my Mac, because I can use the most readily accessible modifier key as God intended, rather than the third-tier relegated modifier that Control is on the Mac.)

The two keys adjacent to the new Control keys (ie. 2 away from the spacebar) then become the Alt keys. Whatever is left over (the original ctrl keys, plus Caps Lock and any silly Windows keys left over) can be bound to Super, which is useful for window manager shortcuts so that they don't clobber emacs/bash/screen bindings.

These changes are trivially easy to put in a simple .Xmodmap file to load whenever you log in, and copy to all the other computers you have to use regularly. If you're using Windows, I guess you may have to fiddle with the registry, but it would be worth it.


Another solution is to keep the Ctrl keys where they are (note the plural), but hit them with the side of your hands: you just need to roll you hand a little bit to the outside. It takes a little practice to do this reliably, but it cures pinky pain (at least for me).

Use the hand that is not hitting the key: for C-s use your right hand for the Ctrl, and left for s. C-n the other way round. For Meta, make sure that both alt keys work, and use your thumbs: M-x right thumb and left fourth finger.

- You can't do this for C-M combinations, but they are few and far between.

- You have to have a keyboard where the keys "stick out" a little. So it does not work on laptops.

The only real issue I had was that moving around is a little slow and awkward: When going back and forth from C-f/b to C-p/n your hands are moving a lot. So I remapped C-f to C-; and C-b to C-j (and similarly for M-f & M-b) and now I can press Ctrl/Meta with my left hand and move around with my right one: bliss.


I can see that this might work with some keyboards, but I think the Apple one is too low-profile.

Also, if you're not using C-M-... shortcuts, you're missing out:

C-M-{s,r} isearch-{forward/backward}-regexp (indispensable)

C-M-% query-replace-regexp (indispensable)

C-M-\ indent-region (indispensable for when M-q would mess up your line breaks)

C-M-x eval-defun (for running changes to your .emacs without restarting)

C-M-q indent-pp-sexp (pretty-print and reindent sexp at point)

C-M-{f,b,u,d,a,e,k,t} forward/back/up/down/beginning/end/kill/transpose sexps

C-M-{n,p} {forward/backward}-list

C-M-v scroll-other-window

And so on. C-h k (describe-key) is your friend.


My solution is to not stick pedantically to the home row but wherever and however my hands and wrists feel comfortable. When my hands are at rest but on top of the keyboard, that works out to about AEFV N[IK]L'. It's a position not dissimilar to what you get on a split keyboard, but with the advantage that you can actually type this way. The middle columns of keys (TGB and YHN) are typable with both hands. Alt is left thumb only (I use the other Alt as an AltGr key; right thumb only). Control is left pinky only, but pressed with the first knuckle, not the tip of the finger.


this is one of the first things I do when i get on a new machine. It is also the first time i've seen anyone else do it. My thumbs are much stronger than my pinkys and are much easier to be using lots.


That´s interesting. I wonder if a new USB keyboard with the Knight or Space Cadet lay-outs would sell on ThinkGeek.

I would be the first one to buy.


or if you're on a mac you can just use your .emacs file:

(custom-set-variables '(mac-command-modifier (quote control)) '(mac-option-modifier (quote meta)) )

And now your command key is a control and your option key is a meta.


Sounds like the best thing to do for a mac (although it wouldn't fix the problem in tty mode). On other operating systems, it's nice to make the change globally, since all other programs seem to use control pretty regularly too.


the article actually suggestes swapping the caps lock key and the ctrl key to have it better positioned for emacs use...

UNIX/Linux users have considered this mandatory forever, regardless of editor choice. PC keyboards are simply wrong.


No kidding. The Caps Lock key should never have existed on PC keyboards and the Tab key should be altered so that it is a "Cmd" key which switches fields in web-browsers, word completes as needed, indents code, and does everything it does now except for inserting an actual ascii tab character.


It isn't as bad as all that. A few weeks will suffice once you have proper guidance.

But there's certainly years of material left after that, if you want it. After eight years off and on I still haven't touched a sizeable number of emacs features.


> But there's certainly years of material left after that, if you want it. After eight years off and on I still haven't touched a sizeable number of emacs features.

Precisely. You can get productive with emacs after a relatively short period of time, but you will have a lifetime of learning afterwards. After 10 years, I'm still discovering new things.


> the article actually suggestes swapping the caps lock key and the ctrl key to have it better positioned for emacs use...

I'd argue that this is ergonmically essential for long-term emacs use, otherwise you run the risk of 'emacs claw'.

Took me less than a week to get used to it. If you regularly use other people's machines then it's not a good idea (but then, neither is emacs unless you are carrying around your .emacs file, since you'll miss all your personal keybindings).


I have plenty of nonstandard keybindings (a bad idea, but I didn't know it it 10-11 years ago when I decided upon them, and now I'm too accustomed to them), but what I'd miss more is the various functions I've written that save so manual effort.


I agree with what you said about about intuitive UIs. Intuitive just means familiar. After enough time, emacs (or vi, or any text edit) will be come familiar, i.e. you won't have to consciously think about using the editor. At that point it becomes intuitive.


Agreed. Emacs is intuitive in a different way than those flashy GUI apps.

One thing I really love in Emacs is that every text is basically displayed in a buffer, regardless of it being editing text, external program output, file listing, menu items or completion candidates. It means you can use common editing commands (incremental search, region selection, copy&paste, etc) uniformly to navigate those information. It's all text, so you should be able to do so. Then I turn to a supposedly intuitive GUI app that shows a menu with 100 items and I'm just lost since I cannot regexp-search through those items.


Just a nitpick: The O'Reilly book title is actually _Learning GNU Emacs_. (http://oreilly.com/catalog/9780596006488/)


YOU know what would be really useful?

To have an expert Emacs user do a screencast of himself doing standard programming stuff.

I think that would make it really obvious how these types of editors are.


I learned a lot from this screencast when I was first starting to use emacs. It is geared specifically towards lisp programming with SLIME, but you do get a good look at an emacs expert doing some programming, as well as a look at his .emacs file which is always very helpful. http://bc.tech.coop/blog/050728.html

There's another film by the same person about using UncommonWeb (a lisp web framework) that has more emacs goodness. Note the UCW tutorial is probably somewhat out of date as the framework has changed a bit since then. http://bc.tech.coop/blog/050727.html


Well, you'd need to have some way to do quick keyboard tracking with the screencast. Just seeing all of the text get highlighted and re-indented wouldn't do a lot. I'm not sure how much more it would help if you could see that "[ctrl-x], [ctrl-h], [esc], x, indent-region" was typed...


There's actually an extension by Michael Weber that might be helpfull for recording screecasts:

http://www.foldr.org/~michaelw/emacs/


Watching the screencast for SLIME (a common lisp mode) was what convinced me to switch to Emacs. (It may very well convince you to avoid it, but it'll be an honest impression of what Emacs looks like with a power user.)

Link in the comments from here: http://news.ycombinator.com/item?id=230990


I thought the exact same thing. Would be really interesting to see how emacs is used by someone skillful.

Anyone with a webcam up for the job ?

:-)


I spent a couple hours every day doing the basics (first learning buffers, then file stuff, then on and on...) within a week I had decided to switch from VIM. (I used only emacs while on vacation for any editing I needed to do)

My suggestion - stop reading all the tutorials and just do it.

Keep a list next to your computer with 5 things you need to know how to do - with the key strokes next to them.

Once you become comfortable create a new list that is what you need to learn now. Don't over extend (ooh, git integration, org-mode, ...) - you'll get there (and probably within a few weeks) - but focus on the basics first. Once those become muscle memory you can figure out the advanced stuff.


Also, first things first, Control-H followed by t brings up a tutorial. Work through that, it covers all the basics.


And after than (as jrockway noted elsewhere), press Control-H i to get to the Info pages menu, which is the hypertext documentation inside Emacs. What you're looking for is almost certainly in the main Emacs section or the Emacs FAQ.

Info has its own manual, but most of what you need to know to start is that Enter visits a hyperlink (which are probably purple and/or bold), 'u' goes up one level, 'n' and 'p' go forward/backwards one node, and 's' searches. (To get a more detailed keyboard shortcut list, type "Control-h m" inside of the info buffer.)


> A nice looking GUI and

You're editing text. What "graphical"s are you expecting? (You should be seeing syntax and selection highlighting.)

> well designed intuitive interfaces matter to me.

What's the difference between "intuitive" and "familiar"?

Yes, the keyboard commands are not what you're used to. If you want the keyboard commands that you're used to, you can program them. That's generally a bad idea, but emacs is full of rope.


If you want the keyboard commands that you're used to, you can program them. That's generally a bad idea...

Let me underline this sentence. Some people (particularly the ones who think that copy and paste were invented by God on the eighth day of creation) get it into their heads that they should redesign the emacs interface on their first day. This is particularly tempting because the ability to remap keys all over the place is one of emacs' best features.

Resist the temptation to do this at first. The emacs ecosystem actually makes a great deal of sense once you settle into its way of thinking. It's sometimes hard to believe, but very smart programmers have spent decades working out where to put things in emacs. If you insist on ignoring their efforts, and instead try to pretend that emacs is a lot like the Mac OS, you will never even learn the basics, like the glories of the kill ring and the mark ring, or the important distinctions between a file and a buffer.


A couple reasons to not try to immediately make the keyboard shortcuts match the editor you're used to:

* You'll probably overwrite some other really useful keyboard shortcuts unintentionally. C-v (Paste, on Windows) is page-down in Emacs. C-c is the prefix for mode-specific commands; C-c C-c sends email, compiles the function under the cursor, etc., depending on what file / buffer type you're working in.

* Emacs has its own ways to do some of those operations. Copying and pasting under Emacs is fundamentally different because of the "kill ring". Instead of having a clipboard, it has a stack (which loops once you hit the end, hence, "ring").


> C-v (Paste, on Windows) is page-down in Emacs

I've tried to start using Emacs a few times now, and I just can't get this. My keyboard already has page up/down and arrow keys that are accessible without using a modifier. Why would I want to use a two key combo when a single key will suffice? Page jumping especially is something that you're not going to be in a rush to insert text afterwards.

The other thing I don't get is the ridiculous hand-mangling you've got to do for the M-combos. (I'd already remapped caps lock to control)

I understand that many of its standard key combinations precede the keycaps and de-facto standards of today, but I'd hardly consider it a loss for the bindings to fit in better with the rest of a modern system.

I'm about to try Emacs for the third time. Are there any common sets of alternative bindings?


I find Emacs much easier to use with the Dvorak keyboard layout, but that's its own big argument waiting to happen.

Under Qwerty, most of the common prefix keys (e.g. C-x, C-c, M-x) are scrunched together on the left hand. If you're also using your left hand to press Ctrl (whether on CapsLock or at the bottom left of the keyboard), you're mangling your hand. That's why there's also a right Ctrl key.

FWIW, I sometimes use Page Up/Down and the arrow keys while just reading, but tend to use the Emacs-style navigation shortcuts while actively editing. C-v never made sense to me, either; I'm guessing it's just historical.


I generally agree with you about trying to redesign the interface. However, if you exercise some discipline, it can be a worthwhile way to sequence a gradual adoption of Emacs.

This is especially true for users of other programming-style text editors, such as Vi(m). Using Viper or similar can be a good way to ease into Emacs. It's even structured that way -- you can progress through the levels to gradually transition from Vim's way of doing things to the Emacs way. I did this myself.

As I said, it does require the discipline to periodically learn more and more features to progress. Aquamacs offers a similar transition for Mac OS X users.


Two other reasons to avoid unnecessary customization are (1) your fingers will learn it and (2) other people's fingers won't know it.

Occasionally you'll want to use emacs on someone else's system, usually in their current session. You'd like to be able to do that without customizing their system. Similarly, you want them to be able to use your system/session without undoing your customizations.


The learning curve is no joke. 2 weeks is nothing.

Don't get ambitious and treat it like your favorite editor just yet. Decide on a small task with complexity (and hence requires you to jump back and forth and rename stuff), like a 20-line script. Make plenty of use of the basic keystrokes (C-f forward, C-b backward, C-p prev line, C-n next line, C-s search, C-r reverse search). That's 6 combinations, and it's enough to witness the kind of speed you have in navigating the text.

Then use it for a real editing job. Shouldn't take long before it becomes second nature. Then, it shouldn't take long before you wished that every text entry window used the same keystrokes.

Oh yeah, type return to complete the search.


All of the things that you list here are what Emacs is not. Above all, Emacs is an investment -- not a two week investment, but one that you'll need a year before it's really an extension of the way you code.

Here are some other additional notes:

- You can get it on every platform. I personally use XEmacs (though I'd recommend GNU Emacs for people starting now) and it's exactly the same on Mac, Windows and Linux.

- Many of the old Emacs die-hards learned Emacs in a time when Emacs had just as good a GUI as anything else. So a lot of our rhetoric comes from an era when everything was driven by keyboard shortcuts. I do, however, believe that learning how to use your editor from the keyboard alone does improve long-term efficiency.


In a word, emacs is responsive -- you realize this as you slowly become familiar with the basic components: buffers and files, the point and region, keymaps, ediff, ffap, running shells inside emacs, tramp, etc. and then, yes, finally emacs lisp. Using these basic tools, you can mix, match and customize until it does what you need for today's project, no matter what language or OS,however many files, script languages, build tools, etc.

At some point it becomes clear that emacs is actually a programming environment for text editing with emacs lisp in the position of universal configuration, scripting and compute language. If you can think of something you want to do with text,files or code (albeit limited to an ascii interface) you can either find it in the extension community or you can quickly bend emacs to do what you want.

My learning curve was approximately two years to feel very competent, five or so to feel like a power user, and then 8 or so to feel make it do most anything.


I think you are looking for an editor which feels modern but has the power of emacs,vim or textmate. If you are on Windows, you can try http://www.e-texteditor.com/. If on OSX, http://macromates.com/ Even i used to go round this question. I tried emacs, then vim , then textmate, then e-texteditor. Finally i felt Vim to be comfortable for me. You need to try all of those before settling on one.


I remember when, having coded in emacs for a few years, I used it for the first time to do a 3-way merge on thousands of lines of code. The amount of time and effort I saved astounded me. The point here is twofold:

1) emacs is very well integrated with extremely powerful tools (in this case diff, merge)

2) emacs is deep; even as an advanced user you can keep improving your efficiency (albeit at a lower rate)

Having said that, I have a question: once I had become fairly comfortable with emacs I switched back to vi. I felt there was a positive correlation between learning new keystrokes/tricks while coding and the quality of code I produce. Has anyone else observed that? If yes, why do you think this is so?


I am no coder, I use Emacs as my 'DTP package. But I can relate something rom graphic design. Why a graphician should be able to draw stuff with pen and paper rather than only work at the computer? Because the connection between thought and hand is faster with pen and paper. Hence, broadband output and feedback loop. Not just faster but enhaced quality: so fast that feedback loop becomes subconscious, direct, flow. Maybe in programming with vi /emacs the same thing occurs.


Yes, particularly with good development modes (e.g. SLIME for common lisp, Tuareg for OCaml), the feedback loop between the language runtime and the editor is immediate.


At this point I've spent about ten years learning Emacs. I'm sure there's still plenty I could learn that would make me even more productive - Emacs is big.

When I was in my early twenties, I decided enough of my heroes at the time raved about Emacs that I should just trust them and not care how long it took to learn or how hard it was. This turned out to be a good decision.


This is pretty much the reason I decided to give it more than the normal five minutes of attention that shareware gets before a decision is made. A great number of people that are way smarter than me think it's the best thing since sliced bread. And by definition they can't be all that stupid :-)


I am a die hard vim user who has been learning Clojure recently and I have learned a little Emacs along the way because everyone in the Lisp community bangs on about it.

The funny thing is, every time I go to write some Clojure code - I want to open a Vim session, but I am always strangely drawn to Emacs for some reason.

Recently, I decided to figure out what it was about Emacs that made me want to use it so much over Vim. I soon realised it was all about being able to load a REPL process in a window and interact with it on the fly.

I can run Emacs, open a Clojure source file, write a function then hit C-M-x to send the function to the REPL to be evaluated. Also relevant is that Clojure support in Emacs was available shortly after Clojure's release to the public late in 200.

This is a very specific case (lisp-style interactive development) but it's why I personally think Emacs is great and for me it has nothing to do with Emacs text editing features! I will always prefer Vim for pure text editing power.


I installed Emacs to install SLIME so I could play around with Lisp. The REPL-in-a-buffer is so phenomenally powerful that I immediately missed it in TextMate when coding in Ruby. Thus began my descent into Emacs madness, and my new favorite function, ruby-send-region-and-go

I was a vi guy for a very long time, and I mocked the Emacs guys for "eight megs and constantly swapping" and "Emacs claw" ... until I switched to TextMate on the Mac, and realized how Emacs-inspired it is. It was actually very easy to go from TextMate to Emacs.

Along the way, I got more productive in my shell. Did you know that M-left moves back a word on the command line? I didn't, and I've been using bash for 10 years. Oh, and it works in all readline-enabled apps.


Did you know you can run a shell inside Emacs?

I get frustrated when running a shell in a regular terminal. They all implement some subset of emacs editing keystrokes, but never all of them, and the subsets are different. It's wonderful having all editing, searching, etc. functionality of emacs available when typing in your shell.

I wrote some Emacs Lisp to jump to the line of a javac syntax error, or stack trace line with a single keystroke. Combining that with the ability to run a shell and browse log files comes in very handy. I also have a macro that searches for the Java symbol under the cursor. It misses a bunch of edge cases, but still very useful. All of this in just 55 lines of elisp. How many lines does it take to write "Hello, World!" as an Eclipse plug in?


Hm, so the functionality you describe is not possible with vim? I was planning to switch to vim in the future. I have used Emacs before, but I never became really good at it. However, the functionality you describe really seems quite important.


I know of various attempts to get this sort of functionality in Vim but I've never been able to get it to work very well. The bottom line IMO is that Vim is not designed for this sort of thing while Emacs is.


Isn't it possible to use a repl in VIM?


Not really.


I would say that someone who is effective at Emacs works just the opposite way:

- No mouse; - No GUI; most people hide even the menu bar; - They have spent and do continue to spend a lot of time in Emacs.

Someone suggested a video recording of an Emacs session. That sounds like a good idea!


If you are trying to program in lisp, then Emacs is probably the best option, since it follows the lisp way of doing things. For normal editing tasks, however, I prefer vim.


I don't think emacs has a steep learning curve for being a really efficient editor, the way (say) vi does. If you can get through the day in emacs without touching the mouse, you're basically there, and the rest is just discovering all the features and ways to customize it.

Force yourself to move the insertion point with the arrow keys, for starters. Then learn a few shortcuts so you don't go insane. C-a for beginning of line, C-e for end. M-f and M-b for forward/backwards by a whole word. C-v and M-v will scroll you up and down through the document and move the insertion point so that it stays on the screen.

Emacs doesn't need a lot of UI. It isn't an IDE, for one thing (though it can be used as one). Customization is done by putting incantations in your .emacs file. Managing buffers and panes only requires a handful of commands; learn the keys for them, or re-assign them if they're awkward.


If you prefer to use the mouse, rather than keyboard shortcuts, you might be happier with something like Acme/Wily (http://www.cse.yorku.ca/~oz/wily/). It's not available for all platforms, though.

Emacs is intrinsically a keyboard-driven editor, and mostly just tries to keep the GUI out of the way. Your experience is more meaningful than anybody's dogma about whether keyboard-centric or mouse-centric development is more productive for you, but mostly using the mouse will make it hard to take advantage of what makes Emacs special.

(If you, or other readers, want to really learn Emacs, you should probably give it at least a month. Once you're comfortable with the basics, gradually learning elisp will greatly increase how useful it is for you.)


I've been using for months. It took a while, and the O'Reilly book, Yegge's post, and EmacsWiki were all extremely helpful (in that chronological order). You might also consider just reading the manual too (although you might want to hold off until you have more experience).

Another resource that will be really helpful somewhere in there is to just type C-h C-h. You'll see a listing of various kinds of help. I use these a lot, especially to explore something new:

C-h k (type any keyboard shortcut) "what does this shortcut do?"

C-h b "list all keyboard shortcuts from all modes in the current buffer"

C-h f (type a function name) "what does this function/command do?"

C-h v (type a variable name) "what does this variable do, and what is its value?"

C-h a (type a regexp) "list all commands matching the regexp"

M-x apropos (type a regexp) "list commands, functions, variables, etc. matching the regexp"


As a followup question, what is the best resource to most efficiently learn the basics of Emacs?


In Emacs, press Control-h, let go of Control, and press t. That starts the tutorial, which will probably take about half an hour.

After working through that, some combination of reading the Emacs Wiki (http://www.emacswiki.org/cgi-bin/wiki) and a recent edition of _Learning Gnu Emacs_ will get you off to a good start.

Getting really effective with Emacs takes a while (probably at least a month), but it is very deliberately designed to be keep growing with you. If you come to prefer it for editing, you can bundle together your config files and extensions and run Emacs on all the major OSs. It becomes its own extensible environment, much like Firefox with its extensions. (This is why the time spent learning it pays off.)


In Emacs, press Control-h, let go of Control, and press t. That starts the tutorial, which will probably take about half an hour.

IMHO, the tutorial is useless. It spends too much time on C-p and C-n and not enough time on anything useful.

I recommend reading the Info documentation. It is very well written and very complete. You should also read the Elisp reference manual; having an understanding of the internals is helpful even if you don't intend to program emacs.


I definitely agree about the Info documentation (I forgot to include that), but I think the tutorial is still worth doing: it covers the extreme basics using Emacs's terminology. It's hard to figure out how to do some things in Emacs via the info pages (or apropos, emacswiki, etc.) without knowing that, for example, each pane inside the Emacs window is called a "window" (Emacs calls the main window(s) "frames").

Also, it covers some conceptual things upfront, like how C-f is forward-char but M-f is forward-word, and that M-somekey is often a more abstract version of C-somekey. (Also, how to read the "C-x M-c butterfly" style keyboard shortcuts in the first place.) A lot of the things it covers ("C-x C-s is save") are pretty basic, but it tries to introduce some of Emacs's cultural/design quirks, which are probably what really trip up a lot of people.


The emacs tutorial included with the editor is good enough to wean you off the mouse, for the most part. You can be productive after that, and you don't even need to open to another window. The startup page might show the hotkey combination for loading the tutorial, depending on the version of emacs.

There's other documentation included with emacs beyond that, e.g. the info pages. Anything that can be read from within emacs has the added advantage of helping you get used to scrolling and moving around inside buffers (again, hopefully without the mouse).


A swift kick to the head.

After that, mapping CAPS-LOCK to be CONTROL.

After that, the previously mentioned O'Reilly book.


This is the second time I've read this:

> mapping CAPS-LOCK to be CONTROL.

Why? At least in my laptop CAPS-LOCK is easier me to press than CONTROL if I want CAPS, maybe there is another reason for it?


That's exactly the point.

What's the purpose of caps lock? If you're SHOUTING you should be HOLDING DOWN THE SHIFT KEY AS HARD AS YOU CAN SO THAT YOUR FEELING IS GENUINE!


If you keep stretching your pinky to the left Control key (which is used a lot in Emacs), you can actually damage your hand especially with heavy Emacs love. Mapping the Caps Lock to Control is useful because it removes the stretching and, besides, Caps Lock is used infrequently enough to not warrant its being on the home row.

(It also makes Ctrl shortcuts in other applications easier.)


That makes sense if you're using Emacs on a laptop.

However, when you're at your desk, the most awesome Emacs upgrade is to buy a Kinesis Ergo "Contoured" keyboard (http://www.kinesis-ergo.com/). It moves all of the control/alt/Apple/Meta keys from all of the random locations to your thumbs and so once you get used to it, it's way, way better than anything else.

The only downside is that it only comes in one size so if you have large hands / long fingers it might be too cramped.

For the skeptics, once you get used to it, it's actually quite easy to go back and forth between the laptop keyboard and the Kinesis. I.e., very little mental dissonance.


There has been some discussion on the importance of a good chair. I find the keyboard a very important component, perhaps as much as good office furniture.

I use to half joke that my disdain for Microsoft is not as extensive as it may appear from one reading what I post (I got a -8 mod a couple days back for saying no real programmer would accept programming under Windows). In fact, I love several Microsoft products and, for me, the three best products they do today are the natural keyboards, the mice and SQL Server. In that order.

I loved the Z-80 softcard too. Would place it above SQL Server if it were still in production.


MSFT does not get enough credit for its peripherals. The keyboards aren't pretty, but they are some of the most comfortable I've ever worked on.


It's because they decided to focus on their more profitable software business, where they are marginally competent, while their core competency, the one they are unanimously praised for, is hardware gizmos.


That puts control on the home row. You'll be pressing / holding down control quite often in Emacs. (Frequently typed characters should be on the home row for efficiency. That's why Qwerty has semicolon on the home row.)


"Frequently typed characters should be on the home row for efficiency."

Only if you miniscule hands and recordbreakingly narrow shoulders.


Not a fan of touch-typing, eh?


I'd recommend reading "Writing Gnus Emacs Extensions" why is it the best, obviously because it's one if not the most extensible piece of software ever made. And it chose one of the best languages to implement it's extensibility.


How about Easymacs? I dislike the standard shortcuts not because they are difficult to remember, but because they cause me pain in my hands and I've never had anything of this sort before. I've tried remapping the caps lock key, but it didn't help much. Now I find that using Emacs is much more enjoyable. I don't think torturing yourself is justified. I can spot only one drawback: you have to take your fingers of the home row (learn touch typing, my rodent-using friends) a bit more.


> Why is emacs a great editor?

It isn't--don't believe the hype. On the other hand, I couldn't write a line of code without IntelliSense.

Does anybody know anything about Emacs.Net that Microsoft is working on?

http://www.knowing.net/PermaLink,guid,31fdc849-db2a-4f7d-bf9...


In Emacs, etags plus dabbrev-expand plus tags-apropos equals Intellisense (or close enough for shooting). A lot of Emacs' power comes from this Unixy ability to string together tools to create something unexpected...


Server Error in '/' Application.

Nope.


I'd suggest using your mouse less - you can increase your speed more with the keyboard than you can with the mouse.

There are a number of looks that emacs can have, from emacs -nw (runs in your terminal emulator) to emacs with GTK. And there are colour themes within each. M-x color-theme-select


People love emacs because you can customize it to your liking. That's why it's touted as such a divine tool, and that's why it's worth it to keep trying to learn it.



Emacs has an intuitive interface - the keyboard shortcuts. Discover them.




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

Search: