Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
 Tcl: set tcl_prefix ""

proc comment {args} {}
comment {
#*
  # (find-angg ".zshrc" "demo")
  cp -v ~/EEG/emacs1.eeg3 $EEG
  rm -v ~/tmp/foo ~/tmp/otherfoo
  eeg3 screen emacs -nw ~/tmp/foo
#*
  cp -v ~/EEG/emacs1.eeg3 $EEG
  rm -v ~/tmp/foo ~/tmp/otherfoo
  eeg3 -c 'showactions; exit' cat 
#*
}
# (find-angg "EXPECT/eeg3")

proc kmsg {args} { msg "next keys: $args"; eval k $args }
proc rmhelp {} { k C-x k; k ret }
proc kstr {str} { append_action [list sendstr $str] }

in_screen

# allow_captures
# setwait 0

msg {
Emacs is always editing several "buffers" at the same time.
Some of these buffers are associated to files.
This demo has invoked Emacs with the command "emacs -nw ~/tmp/foo",
and so now the screen is taken by a single "window", that is editing
the file ~/tmp/foo.
The line in reverse video at the bottom of the screen is called the
"mode line", and among other things it is displaying the name of this
buffer -- "foo", that was derived from the name of the file.
Now we will type some text, and you will notice that the "--"s at the
start of the mode line will change to "**", to indicate that the
contents of the buffer have changed.
}

k  s o m e  spc  t e x t

msg {
After saving the buffer with C-x C-s (i.e., control-x control-s) the
"**"s will become "--"s again.  Doing another C-x C-s gives the
message "(No changes need to be saved)".
}

kmsg C-x C-s
kmsg C-x C-s

# setwait 1

msg {
The screen can be split into several windows, and two windows can even
edit the same buffer.
}

# You don't need to remember which keys we are using to do that

k C-x 4 C-f
k o t h e r f o o
k ret

l {other text}
k C-x 2
k C-x o
l {(changed a bit)}
k C-x 3
k C-x o
l {argh}

# setwait 1

msg {
Few people like to edit in split-screen mode, but sometimes Emacs will
split the screen to display a message, and you'll need to get rid of
the extra window...  The key sequences C-x 0 and C-x 1 can do that.
}

msg "\nC-x 0 (delete-window)\n"
k C-x 0

msg "\nC-x 1 (delete-other-windows)\n"
k C-x 1

msg {
Emacs has several key sequences to display information about keys: for
example C-h k, that corresponds to the command "describe-key".
We'll type C-h k C-x 1 now.
}

k C-h k
k C-x 1

rmhelp

# setwait 1

msg {
The most interesting thing about Emacs is that is written in Lisp --
and Lisp is perfect for a text editor because expressions in Lisp
(called "S-expressions", or "sexps") are delimited by parentheses, and
so an editor doesn't have much trouble to walk forward or past exactly
one Lisp expression...  and so it also makes pretty much sense to
"execute the sexp before the cursor", and Emacs has a key for that:
C-x C-e, "eval-last-sexp".  Watch the line below the mode line: the
result of evaluating the expression is always displayed there.
}

kstr "\r(+ (+ 1 2) (+ 3 4))"
k left
k C-M-b
k left
k C-x C-e
k C-M-f
k C-x C-e
k right
k C-x C-e

# (find-enode "List Commands")

msg {
Every key sequence that does something corresponds to a Lisp function;
and you can get essentially the same effect of typing the key sequence
by calling the Lisp function directly. For example:}

k down
kstr "(describe-function 'eval-last-sexp)"
k C-e
k C-x C-e

rmhelp

# setwait 1

msg {
so you can put "hyperlinks" to the documentation for an Emacs function
(like the "describe-function" above) inside any text file; to "follow"
these hyperlinks, type C-x C-e (eval-last-sexp).

Of course you won't put that kind of things inside ANY text file; but
you are probably taking notes of what you learn somewhere -- maybe in
real notebook (made of paper), maybe in a file that you edit with a
text editor.  Well, if you are going to use Emacs to edit that file,
then you can put some of those "Emacs Lisp hyperlinks" there; they may
look ugly when you print the file, but at least they won't be very
hard to understand -- you are probably going to be the main person to
read those notes, anyway -- and they will be extremely practical if
you are going to use Emacs to read and edit those notes.}

msg {
You can use several other functions as hyperlinks: find-file, for
example...}

k ret
kstr "(find-file \"~/.bashrc\")"
k C-x C-e
k C-x k ret

msg {
Some people may argue that it can be dangerous to use hyperlinks like
that one to point to system files -- you will be using an editor to
read the files, and may change them accidentally, and break things.
Well, you can write the link using "find-file-read-only" instead of
"find-file", but I recommend using just "find-file", because Emacs is
very well-designed in this respect: the "**" in the mode line will
indicate whether a file had been changed, and Emacs will give you a
huge warning if you try to kill a buffer containing a changed file
(and thus lose the changes),}

k C-x b
k ret
k C-x k
k ret
k n o
k ret

msg {
...and there's the "undo" key: C-_.

+==============================================================+
|                                                              |
|  THE "UNDO" KEY: THE MOST IMPORTANT EDITING COMMAND IN EMACS |
|                                                              |
+==============================================================+

An example:}

# setwait 1

k C-x C-s
k M-u
k up up
k C-spc
k C-e
k spc spc spc
k down
k C-x r k
k down down down spc
k C-x r y
k del
kstr blah

ks C-_ C-_ C-_ C-_ C-_ C-_ C-_ C-_ C-_ C-_

msg {
Oops! Undid too much... but if we "do" something and then start
undoing again, then first this last something will be undone, and then
the "undo"s of the previous sequence of "undo"s will be undone, one by
one...}

ks ? C-_ C-_ C-_

setwait 1

msg {
The Emacs manual describes VERY well how undoing works, (...) but
before showing how to make a hyperlink to a page of the Emacs manual
(...)}

k down
kstr {(find-fline "~/eev.el" "defun find-fline")}
k C-x C-e
k C-x k
k ret

k down
kstr {(find-enode "Undo")}

msg {
Note that now the mode line says "(Fundamental)" -- which means that
this buffer is in "fundamental mode".  After executing the
"find-enode" hyperlink that will change to "(Info Narrow)", meaning
that we will be in the "info" mode, and in addition we'll be also in
the "minor mode" "narrow".  The mode of a buffer controls several
variables of that buffer, and thus much of how Emacs will behave when
it is editing that buffer.}

k C-h k
k n
rmhelp

k C-x C-e
k C-h k
k n
rmhelp
k n
k p
k C-h m
rmhelp
k q

msg {bye!}
k C-x C-c y y





# (setq sentence-end-double-space t) 
# (text-mode)
# (tcl-mode)

#
#  Local Variables:
#  mode:		 tcl
#  coding:               no-conversion
#  ee-anchor-format:     "«%s»"
#  ee-charset-indicator: "Ñ"
#  End: