If you had a 10 minute hands-on session to teach someone Emacs, what would you show them?
Start emacs: emacs ... Quit emacs: C-x C-c
What else would you have them do between starting and quitting Emacs, while you stood behind them?
If you had a 10 minute hands-on session to teach someone Emacs, what would you show them?
Start emacs: emacs ... Quit emacs: C-x C-c
What else would you have them do between starting and quitting Emacs, while you stood behind them?
i think you show him how
And tell him about M-x . Tell him he write those steps down somewhere. I think basic navigation can be done using arrow keys. Now this is all he needs.
If he knows about M-x
, he can easily find search, replace and other stuff.
When I start XEmacas, until I press a key it alternates between two screens. One of them has the following:
XEmacs 21.4 (patch 21) "Educational Television" (cygwin, Mule) of Tue Dec 4 2007 on vzell-de
`C-' means the control key,`M-' means the meta key
Information, on-line help:
XEmacs comes with plenty of documentation...
M-? F: read the XEmacs FAQ (a capital F!)
M-? t: read the XEmacs tutorial (also available through the Help menu)
f1: get help on using XEmacs (also available through the Help menu)
M-? i: read the on-line documentation
M-x describe-project: read about the GNU project
M-x about-xemacs: see who's developing XEmacs
I would ask that someone to read it out aloud, make sure they understand what it says and then give them, to use in case of emergency, my cell-phone number and a first-aid kit.
I would show the shortcuts for the most common operations such as:
And copy/cut and paste:
If I had only 10 minutes, I would not teach them any shortcuts at all. All the common shortcuts are available next to the corresponding commands in the menus; those the users can discover for themselves.
The most important things to teach are those that will enable the users to discover/learn by themselves:
That one can quit Emacs with C-x C-c
, or File->Quit. When stuck, one should type C-g
, and, if that doesn't work, ESC ESC ESC
. [This is probably the single most useful advice to prevent total frustration with Emacs, trust me.]
The tutorial: Help->Emacs Tutorial, or C-h t
. [This is not a terribly useful shortcut to remember; given how few times one reads the tutorial over the course of one's life...]
The concept that every keystroke in Emacs is bound to a function, and all that Emacs does is execute functions one after another. That there are more functions than can possibly be bound to keys, and functions without a keystroke can be invoked with M-x function-name
.
That one can discover what function a particular key invokes with C-h k [keystroke]
. Make the user walk through a few of those (including the amusing fact that typing a letter is not special and just invokes self-insert-command
, so if one wanted, one could bind the letter 'z' to send email instead :D)
That one can search for possibly useful functions with C-h a
(or M-x apropos-command
), e.g. C-h a paragraph
shows all the commands to do with paragraphs, including what shortcuts will take one to the end/beginning of a paragraph. And that C-h w command-name
will tell you if the command is bound to some keystroke or not. [Make them walk through this to discover what the key for undo is -- usually they'll try C-z and it does something annoying :)]
That you can read detailed documentation about what a function does with M-x describe-function
(C-h f
). That Emacs has great documentation about most things; and M-x apropos-documentation
(C-h d
) is a great way of discovering stuff.
That one's settings are stored in .emacs, and that one can glean some things by looking at that file even if one don't understand Emacs Lisp.
That one can usually find all keystrokes that "complete" a particular set of keys by typing C-h
after it, e.g. 'C-x C-h' will show all the shortcuts starting with C-x; C-h C-h
is particularly useful; C-c C-h
is useful for mode-specific commands such as when in java-mode or c++-mode or LaTeX-mode, etc. (Hmm, "modes"...)
That when stuck, one can search on http://www.emacswiki.org/. (Or ask a question in the #emacs IRC channel on Freenode, or post to gnu.emacs.help.)
This should fit in 10 minutes, and it's the most important stuff, I think. I wouldn't overload with too many shortcuts to remember; that's pointless anyway -- if the users know how to discover shortcuts, they'll find out shortcuts for whatever they use most frequently. Do have them write down the names of these commands, though, and also about Emacswiki etc.
The important thing is to show them how powerful Emacs is and how universal its model is (all those jokes about it being an operating system are not just jokes). If you just show a bunch of arcane shortcuts to do things they can already do in other editors, Emacs won't seem worth all the trouble. In the same spirit, I also wholly support Anton Nazarov's answer of showing them what Emacs can do (AucTeX if they use LaTeX, etc.) for their specific purposes. Then they can judge for themselves whether Emacs is worth learning, and learn using all the above.
I'd show the most important for that novice user mode. For example, when I show Emacs to my friends at the faculty of physics, I show them AucTeX with preview-latex and RefTeX. Also iMaxima is great. If I have to show Emacs to software developers I show them something like JDEE or Python mode with Ropemacs. Tetris, tramp and w3m can be used to give the idea that Emacs can do everything :) Then I'd show how to start the tutorial and give link to EmacsWiki.org
When giving emacs examples it's never enough to only give the key binding since that can and does vary. C-x M-c is undefined on my system.