Definitive guide for Emacs learners [duplicate] - emacs

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am about to learn Emacs, have been through the tutorial and borrowed the O'Reilly book on Emacs. But the question still is - how do you learn good Emacs workflow? I guess, you don't use Emacs as you'd use, for example, Vim.
This question seems revelant to mine:
- Where can I find a video of a professional using Emacs?

I can't believe nobody has mentioned this, but reading the info pages bundled with Emacs is a great way to learn about obscure features. Whenever you need a break from coding, hit M-x info and pick a random page to read. Your emacs ability will improve incredibly quickly.
It is also important to realize how emacs' self-documenting-ness helps you work. Say, for example, you are wondering how you can scale the font size. Instead of interrupting your flow and asking here, or on IRC, or Google, you can ask emacs! Just hit C-h a (M-x command-apropos) and type a search term, in our case scale. If there are matching functions, their names, keybindings, and documentation will appear. There are, and now you've just discovered text-scale-increase and text-scale-decrease.
There are other self-documentation functions that are good to learn C-h m will tell you what keybindings and commands are available in the current major and minor modes. This is a great way to discover features you didn't know existed.
Another way to "learn by osmosis" is to M-x customize-group for the modes you use regularly. (customize is the interactive configuration editor that almost all modes support.)
The final thing to do is to learn Emacs Lisp. It is nice to use existing tools, but sometimes you will need your own. If you try to avoid learning Lisp, you will always be stuck with things not quite working right, and that's a shame.
Emacs is a great environment for customizing itself. Emacs includes two Lisp manuals that are viewable via M-x info. It is self-documenting, so you can say C-h f or M-x describe-function to get the documentation for any function. You can even press TAB ENT to jump to the source code of that function, to see how it's implemented. This is great when you think "I wish I had something that worked like foo, but just slightly different." You can read how foo is implemented, make your change in the *scratch* buffer, and then see if you like the change. There is no edit/compile/test cycle. You press a key and your emacs session immediately has the feature you just wrote.
The more effort you put into learning emacs, the more emacs will do to make your work easier.

Once you mastered the basics (opening/closing files, navigating, basic editing) just use it. As with a lot of other tools, practise makes perfect...
I would, however, set some time aside to work on improving how you use the editor currently, but as part of your normal workflow as opposed to just going off on a tangent and learning things for the sake of it.
I find some useful resources are the EmacsWiki and the Planet Emacsen blog. I use both, mainly by using Planet Emacsen for "inspiration" and then wandering over to EmacsWiki and having a trawl on there for a specific topic. I found that unless you're having at least a vague idea what you're looking for, the available information is just going to swamp you instead of it actually being helpful.
Not to mention that there are a few very useful resources here on StackOverflow, for example this question here. Emacs is a very powerful tool that tends to be able to do a lot more than a single person needs, but in the end that allows you to pick and choose exactly those parts that you need.

My suggestion is just stop using anything but Emacs, when you come across a problem see if you can solve it in Emacs, and then fall back (if you don't have the time or it just won't work). As for work flow, it is pretty much the same as you would normally work. i.e. for a normal ide session you would open/edit a file as normal, then commit (in C-x v v) just as normal.

I agree with the other posters here, you just have to use it! Here's how I did it:
Once I got the very basics (can get between buffers, open/save files, etc), I printed out a reference card and kept it handy. This is a good one. Review it just so you know what is on it, then whenever you find yourself doing something repeatedly that is on the card, start using the shortcut! Before you know it you'll have memorized quite an arsenal of commands. But remember, probably no one uses everything that emacs can do.
When you eventually find yourself doing something repeatedly that doesn't have a shortcut, that's a good time to learn keyboard macros. Once you get them, you'll find uses for them everywhere! From there it's a short jump to writing elisp (if you're a programmer).
The great thing about emacs is that you don't need an "emacs workflow", emacs works around your workflow!

You don't need to learn emacs workflow. Once you complete the tutorial and master the essentials, you'll have to adopt some degree of monogamy and use nothing but Emacs. Eventually you will think of functionality that you really wished existed; most of the time somebody else will have as well and the solution is just one search away! Over time you just can't help but learn and eventually you'll pick up enough that you'll develop your own personal workflow.
If you're looking to accelerate the process, the Emacs wiki has a variety of tips but really the best way is just to do stuff with Emacs.

You could have a look at Bram Molenaar's talk about efficient textediting, http://video.google.com/videoplay?docid=2538831956647446078&ei=EqiGSau8KZ-QiQLi-Nn8Cg&q=bram+molenaar+editing
Although he's a vim guy (he wrote it), you might get some ideas about how best to go about becoming more proficient with your text editor that'll apply to emacs.

To be honest, all I do is learn the keybindings I need. I don't use emacs to its full potential, because I don't need its full potential. My suggestion is to just learn what you need, and don't worry about what you don't. Learn a new key binding everyday, and in about 300 years will you know them all ;)

I am using the emacs since the old Amiga days on all platforms i am currently working on.
The best way to use emacs is curiosity. I still use often apropos (C-h a) and M-x (for a long functionname instead of key-binding) to find a functionality.
a key-concept to "proper use" Emacs is, to learn the very easy elisp (a simple derivate of lisp) and write your own little helpers (own commenting style, underlining, templates) and to know where to look to change values (tab-size, compiler, email)
And the third thing: everything is in emacs: I use the dired (directory editor) for navigating through files. I use a lot of buffers for all textual files (with proper modes for each type of file (c, ruby, list, sql, latex, ...)) which are stored when quitting emacs and recovered when invoking. I start the compiler from emacs and use the jump-to-error-functionality.
Macros are a daily routine (scimming throu code and changing it on the way).
I like the picture-mode, which allows to type downward with replacing, which makes it easy to renumber block of constants (good old c #defines))
There is a hugh mountain to climb, but if you have reached the top, you can see the whole world down your feet, and never want to miss this experience again. I know, there are many good editors around (i work myself thru Eclipse)

As previously stated, the best advice is to use nothing but Emacs for the next year. Once you develop your finger memory, things get to be much easier.

How do you learn a "good workflow" for anything? By using it, getting to know it, making it yours. There is no "proper" use of Emacs.
As for getting to know it: ask Emacs -- use its help system. This can help too: http://www.emacswiki.org/emacs/EmacsNewbieWithIcicles

That's the power of Emacs, you use it the way you like. You just have to configure it before for your liking.

Related

IDE typing mode, emacs or vim [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
First of all, this is not a question on emacs vs vim. I use eclipse IDE for programming and I intend to continue using it. Having read many advantages of emacs and vim, especially the ability to do almost anything without using the mouse, I want to use a similar typing/editing scheme in my eclipse IDE; I'm aware that there are plugins available for eclipse to change the editing style to emacs or vim (emacs+, vrapper to name a few..).
Since I plan to continue using eclipse, the various advantages of vim and emacs like small memory foot print, vim/elisp scripting, availability on different platforms, configurablity etc are all lost. I want to import only the text editing scheme to eclipse and master it while keeping all of eclipse's features.
So, I would like to have an objective comparison of the benefits/disadvantages of only the text editing styles of emacs and vim.
EDIT: the reason I cannot move away from eclipse is because my company uses a customized version of eclipse which has specific plugins and dsls to interact with our product(hardware)
I cannot move away from eclipse because my company uses a customized version of eclipse
Please note that Vim is not an IDE (a search will bring up various discussions of this topic), therefore this dichotomy does not exist. You can very well use both Vim (for text editing) and a real IDE (for debugging, source code browsing, etc.), in parallel. A simple "launch current file in Vim" integration is quickly done, and you've already noted that there are several plugins that bring the basic key bindings (but not the huge customizability) into the IDE.
Also, it strikes me as odd that you have no preconception of Vim vs. Emacs yet. Most people breathe and live their key bindings so much that they desire them in their IDE, too; you just seem to "have heard" about those advantages, but haven't experienced them yet.
My advice: Use your IDE for work (as you have to, anyway), and try out Vim (as well as Emacs) in parallel, maybe for recreational tasks, a little scripting, blogging, whatever. You can then see for yourself whether you'll "get hooked" on one of them, or maybe the IDE will just work out fine for you. Also, time will tell whether a simple integration is sufficient, or whether you want something tight and deep like the Eclim project.
I can only tell something about vim, I have used emacs once in a while, but it doesn't seem to be compatible with me. Although I really like scheme which is a lisp dialect. Vimscript is a horror to program in, but it is possible.
The main feature vim offers is that it adds structure to text beyond the syntax of your language. You can manoeuvre, edit and transform your text with vim's movements. These are at the heart of vim and have to be learned well. This in combination of modes, makes vim a powerful tool for text editing.
On the other hand, for code editing, vim needs some modifications to be useful. You will a considerable amount of configuration. Most people keep their vim configuration in a fire and bullet-proof safe, so they will not lose their painfully built stack of options, plugins and other configurational paraphernalia. That is including me. A vimrc is quite personal. Emacs is easier to configure. I could pick it up much faster.
You have to learn a tremendous amount of knowledge to even be able to use it. Emacs is much easier, you can use it at once. My first encounter with vim was being not be able to leave the damn program, whatever I did. My second encounter, was carefully hitting i and the type some text and quickly hit :wq. But somewhere later I suddenly wanted to tame it.
Vim has macro's, which make a lot of text transforming tasks fun. E.g. this removes al spaces at the end of a line, something I sometimes run to stop the nagging of pylint about spaces:
qs:g/ $/s///g<CR>#sq
You should read this as: record a macro in register s, replace globally all spaces at the end with nothing, apply macro in register s, stop recording. When hitting:
#s
This macro will run endlessly, until you are satisfied. I still want to find one, which stops after he hunted the last space. This makes vim fun, it is a little language with one letter commands. You can combine letters together:
4f,d$
This means find he 4th comma (,) and delete (d) the line from there till the end ($). That makes it quite attractive.
I would personally go for vim, but you have to try the editors out. They have different philosophies and one of those will bite you and the other will seem reasonable. I don't believe you will find many people, who uses both and mastered both. They are both usable as code editor.
I still have emacs on my wishlist, maybe I will swap.
I would suggest reading these answers as they contain a good amount of differences between the two (although a lot of the benefits mentioned don't matter for you). I strongly suggest just trying them out.
A big difference that you will notice is that Vim uses modes, which makes it have a high initial learning curve, while Emacs is modeless, and you can use it like a normal text editor (notepad), but with added functionality. And his is where your style/preference matters. I personally don't like holding control down to move around in Emacs, where in Vim, you escape to normal mode and use hjkl to move around.
This might be of interest:
https://github.com/senny/emacs-eclim
It's a frontend to eclipse, providing Emacs features alongside with Eclipse, not just to mimic Emacs-keys only.
Some screenshots here:
http://www.skybert.net/emacs/java/

What guide should I read to start learning Emacs? [duplicate]

This question already has answers here:
How do you learn proper Emacs? [closed]
(11 answers)
Closed 9 years ago.
I don't really know if this is a decent question or not, but I am fairly new to programming and looking for a good text editor to use. I have read this question on Unix.SE and this question on SO which have convinced me that Emacs is the way to go. But I can't really find any good documentation that is aimed at people who have no idea what "M-x-foobar" means. Once again, this is probably too subjective for SO, but I thought I would try anyway.
If you're just starting programming, you've probably got enough on your plate without dealing with a crazy moon editor! gedit (Linux), Notepad++ (Win) or TextWrangler (OS X) are all free and may be more familiar to you.
Still, Emacs is great if you're game. I learned from a couple of resources:
O'Reilly's Learning GNU Emacs
Emacs' built-in tutorial - press Ctrl-h and then t.
These got me up-and-running quickly.
After you've learned the very basics, you'll want customize Emacs to make it more confortable. Download someone's Emacs configuration off GitHub and tweak that. The Emacs Prelude is very good.
From then on, it's all about building muscle-memory:
Try to use Emacs for all the random mundane typing and editing you normally do
Use the Emacs movement keys wherever you can, such as in your terminal program
If you use OS X, most of the emacs movement keys work in text fields. Use those instead of the arrow keys to move around.
Emacs has a reputation for being hard on your hands - the key combos were designed for older keyboards from a more civilized age. If your pinky starts to hurt while you're learning, it's a good idea to remap your Caps-Lock key as Ctrl.
According to my experience, Emacs is a huge topic to cover. I'd suggest you to start with its tutorial by selecting the first entry in the "Help" menu (or pressing Ctrl+h, then pressing t, which is denoted C-h t in Emacs style).
Then just follow your needs by reading specialized articles or documentation. A bunch of useful information you may find in an Emacs Info, which can be called by C-h i (Ctrl+h, then i).
Knowing at least a bit of Emacs Lisp would be very useful as it's used to configure the editor and sometimes helps understanding how some things work. For that you may find useful An Introduction to Programming in Emacs Lisp (but you may find it in Emacs Info as well).

Is there a .emacs file available to make its keybindings behave like any modern IDE?

I learned programming with GUI editors such as Notepad++, Gedit, Netbeans and so on, so I'm used to some keybindings common in almost all of these programs (and some others like LO Writer, etc).
Is there any place where I can find a .emacs file that makes it work like that, so I can have all its power without spending half of my life in learning its keybindings or configuring it?
You might try ErgoMacs which was built to modernize Emacs. I haven't tried it since when I found it I already had too many of my own keybindings to switch, but if I were starting over, I'm pretty sure I would use it.
cua-mode remaps emacs to use the key bindings that most other programs use. It is built in to emacs and you can enable it in your .emacs with:
(cua-mode t)
It depends a bit on what you mean. There are ways to make Emacs use keyboard shortcuts that are standard in Windows, as e.g. pointed out by ataylor. However, when you say you want it to behave more like an IDE, it seems that you're not only interested in text editing keybindings (such as, moving the point, copy and paste, marking a region, etc.), but specifically for the functionality offered by IDEs: compiling, management of code projects, deployment, code refactoring, etc.
But Emacs is not an IDE. It's a text editor. Okay, it really is a lisp interpreter based around a visual model of text buffers.
As such it can do many tasks that IDEs do, but out of the box, IDEs do many of the tasks mentioned above better because they are made for these tasks. Since Emacs is just a lisp interpreter, a lot of people have written extensions to its core functionality, in form of so called "modes". So, yes, by installing the right modes on top of a vanilla Emacs you can make it a pretty powerful tool that can compete with IDEs.
But that doesn't go without spending half of my life in learning its keybindings or configuring it. Well, half your life is a bit of a stretch. Emacs has a steep learning curve, that's true, but it's worth it -- because it is not an IDE. It's more than that.
If you're not willing to learn new stuff, than maybe you might want to take a moment and reconsider whether programming really is for you. Because the IT landscape changes very quickly all the time. Maybe in five years, Java is dead and no-one uses Eclipse any more. But you can be pretty sure of one thing: Emacs will still be around.
Okay, the last paragraph was total FUD, so ignore it. But seriously, learning new keybindings is not as hard as you think. And it doesn't take thaaat long either. You could re-configure and re-assign completely to your own liking in Emacs, but why not give the standard keybindings a chance?

How do you learn proper Emacs? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am about to learn Emacs, have been through the tutorial and borrowed the O'Reilly book on Emacs. But the question still is - how do you learn good Emacs workflow? I guess, you don't use Emacs as you'd use, for example, Vim.
This question seems revelant to mine:
- Where can I find a video of a professional using Emacs?
I can't believe nobody has mentioned this, but reading the info pages bundled with Emacs is a great way to learn about obscure features. Whenever you need a break from coding, hit M-x info and pick a random page to read. Your emacs ability will improve incredibly quickly.
It is also important to realize how emacs' self-documenting-ness helps you work. Say, for example, you are wondering how you can scale the font size. Instead of interrupting your flow and asking here, or on IRC, or Google, you can ask emacs! Just hit C-h a (M-x command-apropos) and type a search term, in our case scale. If there are matching functions, their names, keybindings, and documentation will appear. There are, and now you've just discovered text-scale-increase and text-scale-decrease.
There are other self-documentation functions that are good to learn C-h m will tell you what keybindings and commands are available in the current major and minor modes. This is a great way to discover features you didn't know existed.
Another way to "learn by osmosis" is to M-x customize-group for the modes you use regularly. (customize is the interactive configuration editor that almost all modes support.)
The final thing to do is to learn Emacs Lisp. It is nice to use existing tools, but sometimes you will need your own. If you try to avoid learning Lisp, you will always be stuck with things not quite working right, and that's a shame.
Emacs is a great environment for customizing itself. Emacs includes two Lisp manuals that are viewable via M-x info. It is self-documenting, so you can say C-h f or M-x describe-function to get the documentation for any function. You can even press TAB ENT to jump to the source code of that function, to see how it's implemented. This is great when you think "I wish I had something that worked like foo, but just slightly different." You can read how foo is implemented, make your change in the *scratch* buffer, and then see if you like the change. There is no edit/compile/test cycle. You press a key and your emacs session immediately has the feature you just wrote.
The more effort you put into learning emacs, the more emacs will do to make your work easier.
Once you mastered the basics (opening/closing files, navigating, basic editing) just use it. As with a lot of other tools, practise makes perfect...
I would, however, set some time aside to work on improving how you use the editor currently, but as part of your normal workflow as opposed to just going off on a tangent and learning things for the sake of it.
I find some useful resources are the EmacsWiki and the Planet Emacsen blog. I use both, mainly by using Planet Emacsen for "inspiration" and then wandering over to EmacsWiki and having a trawl on there for a specific topic. I found that unless you're having at least a vague idea what you're looking for, the available information is just going to swamp you instead of it actually being helpful.
Not to mention that there are a few very useful resources here on StackOverflow, for example this question here. Emacs is a very powerful tool that tends to be able to do a lot more than a single person needs, but in the end that allows you to pick and choose exactly those parts that you need.
My suggestion is just stop using anything but Emacs, when you come across a problem see if you can solve it in Emacs, and then fall back (if you don't have the time or it just won't work). As for work flow, it is pretty much the same as you would normally work. i.e. for a normal ide session you would open/edit a file as normal, then commit (in C-x v v) just as normal.
I agree with the other posters here, you just have to use it! Here's how I did it:
Once I got the very basics (can get between buffers, open/save files, etc), I printed out a reference card and kept it handy. This is a good one. Review it just so you know what is on it, then whenever you find yourself doing something repeatedly that is on the card, start using the shortcut! Before you know it you'll have memorized quite an arsenal of commands. But remember, probably no one uses everything that emacs can do.
When you eventually find yourself doing something repeatedly that doesn't have a shortcut, that's a good time to learn keyboard macros. Once you get them, you'll find uses for them everywhere! From there it's a short jump to writing elisp (if you're a programmer).
The great thing about emacs is that you don't need an "emacs workflow", emacs works around your workflow!
You don't need to learn emacs workflow. Once you complete the tutorial and master the essentials, you'll have to adopt some degree of monogamy and use nothing but Emacs. Eventually you will think of functionality that you really wished existed; most of the time somebody else will have as well and the solution is just one search away! Over time you just can't help but learn and eventually you'll pick up enough that you'll develop your own personal workflow.
If you're looking to accelerate the process, the Emacs wiki has a variety of tips but really the best way is just to do stuff with Emacs.
You could have a look at Bram Molenaar's talk about efficient textediting, http://video.google.com/videoplay?docid=2538831956647446078&ei=EqiGSau8KZ-QiQLi-Nn8Cg&q=bram+molenaar+editing
Although he's a vim guy (he wrote it), you might get some ideas about how best to go about becoming more proficient with your text editor that'll apply to emacs.
To be honest, all I do is learn the keybindings I need. I don't use emacs to its full potential, because I don't need its full potential. My suggestion is to just learn what you need, and don't worry about what you don't. Learn a new key binding everyday, and in about 300 years will you know them all ;)
I am using the emacs since the old Amiga days on all platforms i am currently working on.
The best way to use emacs is curiosity. I still use often apropos (C-h a) and M-x (for a long functionname instead of key-binding) to find a functionality.
a key-concept to "proper use" Emacs is, to learn the very easy elisp (a simple derivate of lisp) and write your own little helpers (own commenting style, underlining, templates) and to know where to look to change values (tab-size, compiler, email)
And the third thing: everything is in emacs: I use the dired (directory editor) for navigating through files. I use a lot of buffers for all textual files (with proper modes for each type of file (c, ruby, list, sql, latex, ...)) which are stored when quitting emacs and recovered when invoking. I start the compiler from emacs and use the jump-to-error-functionality.
Macros are a daily routine (scimming throu code and changing it on the way).
I like the picture-mode, which allows to type downward with replacing, which makes it easy to renumber block of constants (good old c #defines))
There is a hugh mountain to climb, but if you have reached the top, you can see the whole world down your feet, and never want to miss this experience again. I know, there are many good editors around (i work myself thru Eclipse)
As previously stated, the best advice is to use nothing but Emacs for the next year. Once you develop your finger memory, things get to be much easier.
How do you learn a "good workflow" for anything? By using it, getting to know it, making it yours. There is no "proper" use of Emacs.
As for getting to know it: ask Emacs -- use its help system. This can help too: http://www.emacswiki.org/emacs/EmacsNewbieWithIcicles
That's the power of Emacs, you use it the way you like. You just have to configure it before for your liking.

How to quickly get started at using and learning Emacs [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
There are all sorts of advantages to using Emacs, but for someone comfortable with the usual Win32 applications it comes with a wall-like learning curve. With most other editors it’s possible to just start using them and then learn about their other features and enhancements as you go along.
How to just get on with using Emacs straight away, with the aim of reaching that point where you actually prefer to use Emacs over other editors or applications?
Edit - To try and clarify the question: I’ve done the tutorial, read some docs, etc. then soon after when I’ve wanted to quickly edit some text it’s been easier to just use another editor, that I already know. What do I need to do so that not only I don’t just go for another easier editor, but that I actually prefer to use Emacs, and how to get here as quickly as possible? What if any are the training wheels for Emacs?
The biggest thing about learning how to use Emacs is ... (drumroll please) learning how to use Emacs.
Okay, okay, okay. It's a silly answer, and it's a tautology, but it's true. If you start up Emacs, and think to yourself "How could I find every instance of the word 'foobar' in my source tree?" the worst thing you could do is hit Alt + Tab and visit Google.
Seriously.
Learning the help system and how it works is the best thing you can do. It's so nice to just hit C-h a find, and suddenly get all the information you need, right at your fingertips.
The next best thing you could do is install a wonderful little package called Icicles which has some seriously groovy completion functions. After you get it installed, just know that anytime the minibuffer is asking for some kind of input, you can now use regular expressions.
How would this apply to finding every file in your source tree? Well, you'd hit M-x, and then type "find". After that, you could hit (for instance) Shift + Tab and Icicles would kick in, finding every command that prefixes with "find". Alternatively, you could do M-x .find. and it would give you any command with find in it.
Build a cheat sheet. Just keep a saved buffer somewhere that has all of the keyboard shortcuts you use frequently in it. Remove the ones that you know off by heart, and pick up new ones. In most cases when you do a M-x command, the message buffer will tell you what the keyboard shortcut was for that command (if there was one).
Learn. Keyboard. Macros.
Learn. Emacs. Lisp.
Steven Huwig's idea of using some killer applications is a good one. Emacs is easier to use when you want to use it. For me, it was Planner Mode. (I've just moved to Org-mode, and it's even better.)
spend 20 minutes running the tutorial
ctrl-h t
That will get you to the point where you can be productive (and that "meta" key that you will read about is probably either Escape or alt).
I think it is easiest to find a "killer app" or two that just works best in Emacs. For me, it was the SQL editing and interaction mode for Oracle. Once you're already using Emacs for this killer app, then it will be more attractive to just open up other documents in Emacs rather than another editor.
Potential killer apps:
SQL editing and interaction modes
nxml-mode
AUCTeX
CPerl mode (best Perl mode there is)
PCL-CVS
SLIME
js2-mode (Javascript)
Learning to use Emacs effectively is inherently a slow process, but it's worth it.
Set up a .emacs file right away. You'll want to customize it quite a bit. It sounds silly, but having some kind of source control on that file will help, too.
To make it easier to find out about Emacs' innards, add to your .emacs:
(defalias 'ap 'apropos)
Then when you want to see if there's a command to do "something", type "[Alt-x] ap [enter] something [enter]". Emacs has its own name for stuff, so it can be hard to find things sometimes ("yank"? Seriously? Call it "cut" like everyone else!)
"[Ctrl-h f] function-name [enter]" looks up the help for that function.
"[Ctrl-h m]" shows you details about the current mode, like the keybindings specific to that mode.
Learn to use Ctrl-s and Ctrl-r for incremental search. All text editors need to come with this feature.
Add keybindings to your .emacs like:
(define-key global-map (kbd "M-z") 'redo)
(define-key global-map (kbd "C-z") 'undo)
Get the redo.el package to make Emacs' redo suck less.
iswitchb-mode is invaluable. It lets you have dozens of buffers open at once and switch between them in a blink of an eye. Set up iswitchb and add to your .emacs:
(iswitchb-mode)
(define-key global-map (kbd "M-RET") 'iswitchb-buffer)
To evaluate an emacs-lisp expression, type the expression into a buffer, put the cursor just after it, and type "[Ctrl-x Ctrl-e]". This lets you experiment with different customizations easily.
Remember, you don't have to let go of ctrl when typing a sequence like that.
See where a string occurs in a buffer with the "occur" function. Here are some handy functions and keybindings for that:
(defun word-at-point ()
(thing-at-point 'word)
)
(defun word-at-point-or-selection ()
(if mark-active
(regexp-quote (buffer-substring (mark) (point)))
(concat "\\")
)
)
(defun find-word-at-point ()
(interactive)
(occur (word-at-point-or-selection))
)
(define-key global-map (kbd "C-o") 'find-word-at-point)
(define-key isearch-mode-map (kbd "C-o")
(lambda ()
(interactive)
(let ((case-fold-search isearch-case-fold-search))
(occur (if isearch-regexp isearch-string
(regexp-quote isearch-string))))))
My ideas on how to come up to speed faster:
Find another Emacs user and watch them a few minutes every day
Have the Emacs user watch you (and provide feedback)
Find more Emacs users and repeat steps 1&2
Subscribe to the planet emacsen feed to see what other Emacs folks are learning
Follow the emacs tip of the day twitter
Try to answer folks Emacs questions on SO
I've been using Emacs for 15+ years and I learn a new thing every day by doing the things above.
Like #Claudiu said, just use it. Just bumble through and let your needs drive your learning curve.
Eventually you will get to a point where you "know enough to be dangerous", while not really mastering the environment. That's OK. Because at this point you'll likely be quite productive. You'll have the basic skills and tools.
In time, you'll run in to things that you do every day that you're simply sick enough of to try and take the time to find a "better way". Normally, your base skill set is enough to get by, enough that the (potentially unknown) time invested in to some alternate path isn't worth the cost, especially for something rare.
But, you may have free time, or the task might be big enough to justify looking deeper.
At these points you'll become more of an expert Emacs person than a journeyman user.
While I personally no longer use Emacs (instead relying on an IDE), I will say that while Emacs is quite complex, you need only know a small subset to make it useful and fun. I will also say that I've never "screamed at Emacs", whereas I scream at my IDE all the time. Yes, Emacs was doing less than what my IDE was doing, but I am seriously getting to the point that it might be worth my time to go back to it, and stop the screaming.
I just get this sense that Emacs is more "deterministic" than my IDE which likes to go traipsing off in to lala land every now and then, or require a restart, or whatever.
I've never personally crashed Emacs (which some will say means I'm not using it hard enough...)
Basic text editing with emacs is no more complicated than doing the same with Notepad. Just use it like it's notepad, but as you explore the menus, take note of the keyboard shortucts. Slowly you'll start to pick up things. When you want to do something and you don't know how, there's help available as a pulldown from menus, just like with other editors.
I guess the only "trick" I'd suggest is that after you open up a file for editing, try ctrl-h m to pull up a list of the keyboard bindings that work in that buffer's mode.
My advice is:
Learn the very basics (how to type, save a document, turn on syntax highlighting, maybe copy and paste). You can look up how to do these online (google "emacs tutorial" maybe)
Start using it.
Whenever you wish you knew how to do something, then look up how to do it. You might have to look the same thing up 3-4 times before you get it, but then you will learn it.
Keep doing this. It'll be annoying at first, but then you'll get used to it, and then you might even enjoy using it!
(DISCLAIMER: Personally I just use another editor).
Turn on icomplete-mode and you will often see functions that look useful when poking around.
(icomplete-mode t)
In your .emacs file.
C-h f will let you look up the docstring for a function, and C-h v will do the same for a variable. With icomplete, this is great for exploring.
As you learn basics like key commands, make your own cheat sheet. Of course find and plunder existing cheat sheets, but be sure to make your own and categorise the shortcuts / key bindings to groups that make sense to you. This will help you learn the basics and retain the memory.
Aim to customize Emacs into the editor you want, this is the single biggest advantage to using Emacs, and it will help you learn about all it's features and how it's extended.
Be glad that, relatively speaking, learning Emacs is much easier thanks to the community here on SO and other places like EmacsWiki. :)
Work from this point onward... a) Key bindings and customize. b) Macros and the macro editor. c) Elisp and your own custom libraries.
It's also worth noting that setting Emacs up to work like a more modern App, can be painful, you will need to do things like run the emacs server, and use the emacs client.
Thankfully (re: 3) there is a lot of help available on the net, but if you have direct access to a seasoned Emacs user, consider yourself lucky.