On Saturday, August 16, 2003, at 03:55  AM, Brian Candler wrote:
> Sure, the editing commands have prefixes, but they're Wordstar-like and
> consistent: for programming you will get away with knowing just
>
>    ^K X     exit and save
>    ^K Q     exit without save (or just ^C)

In Emacs

Ctrl-X Ctrl-C (it will prompt you about whether to save or not)

>    ^K B     start of block

Ctrl-Space

>    ^K K     end of block

Just move the point (cursor).

>    ^K C     copy block

Meta-W

>    ^K M     move block

Paste (Yank)
Ctrl-Y

>    ^K L     jump to line number

In XEmacs at least:
Meta-G

>    ^K F     find or find and replace  (^L = find again)

In Emacs, incremental search is Ctrl-S,

Interactive search and replace is a bit more complex:
Ctrl-Meta-%

>    ^Y       delete line
Ctrl-K

>    ^A       start of line
Emacs is the same

>    ^E       end of line
Ditto

>    ^_       undo
Ditto

>    ^K R     insert file at cursor point
Hmm, not sure if this is bound by default

>    ^K W     write block to file
Ctrl-X Ctrl-W to write to a file in emacs, write a block to a file?  
Hrm...

>    ^T       toggle modes (e.g. insert/overwrite, line wrap)
Modes in Emacs are a bit more complex.


In modern versions of the GUI Emacsen you can use the menu and mouse 
for most of these, and the shortcut keys are listed in the menu.  In 
addition, if you hit Meta-X, you can enter any command name, and if you 
hit "tab" while you're starting to type a command name, you can see the 
various potential commands.

Unless you use the menus, Emacs can be difficult at first, but 
considering how many hours a day I spend using an editor, I don't mind 
a bit of extra time learning in exchange for an editor as flexible as 
Emacs.

> I occasionally use the multi-file capability to move chunks of code 
> between
> files, and macros to do the same operation repeatedly, but that's 
> about all
> I need. The majority of my brain is engaged in productive things, not
> working out how to drive the damned editor.

Within a short time I got used to Emacs and my brain was busy thinking 
while my fingers did their thing.  The cool thing with Emacs is that 
although I learned enough to use it as a simple editor within a few 
days, years later there are still things I'm learning that speed up my 
productivity.  For example, just recently I figured out how to properly 
do regular-expression-search-and-replace.

> Actually that's the other thing about emacs - would I be right in 
> saying the
> documentation is in 'GNU info' format? The world did *not* need HTML
> reinventing, nor a browser with yet another set of keystrokes to learn!

Yeah, info format sucks.  I just use the online HTML manual.

Btw, most Apple OS X applications have the basic Emacs key bindings, so 
if you ever use OS X, you can kill 2 birds with one stone.

Ben