(Re)generate: (find-wrap-intro)
Source code:  (find-eev "eev-intro.el" "find-wrap-intro")
More intros:  (find-eev-quick-intro)
This buffer is _temporary_ and _editable_.
It is meant as both a tutorial and a sandbox.

Note: this intro needs to be rewritten!
Ideally it should _complement_ the material in:
  (find-eev-quick-intro "6.3. Creating eepitch blocks: `M-T'")
  (find-eev-quick-intro "8.3. Creating index/section anchor pairs")
  (find-eev-quick-intro "8.4. Creating e-script blocks")

1. Eepitch and eev

Eepitch defines only two keys - <F8> and <M-T> - and <M-T> is a particular case of something more general: "wrapping commands", that follow these conventions: 1) they are bound to meta-shift-letter keys (M-T, M-F, M-M, ...), 2) they transform the current line and then move down, 3) they produce Lisp code meant to be executed with `M-e' or `F8', 4) they are listed at: (find-efunctiondescr 'eev-mode "M-F") 5) their keybindings are only available when eev-mode is turned on. To understand how they work, please follow the instructions below and try them here. Note that this buffer is a sandbox, and it can be recreated by executing the sexp "(find-wrap-intro)" at the top. Note that the wrapping commands are all bound to key sequences of the form meta-SHIFT-letter - don't forget the shift!!!

2. <M-T>: produce an eepitch block

If you type <M-T> on a line containing just the word "shell" you get three lines, like this: * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) We call a block of three lines like this an "eepitch block", and eepitch blocks can be used to set up interactions with external programs. Try typing <M-T> on the lines that say "shell" and "python" below, and use them to send some lines to bash and to a python interpreter (with <F8>): bash export PS1='$PWD% ' cd /tmp/ function ee () { set -v; . /tmp/ee.sh; set +v; } rm -v /tmp/ee.sh cat > /tmp/ee.sh <<'%%%' echo Hello cd /etc/ %%% cat /tmp/ee.sh bash /tmp/ee.sh ee python square = lambda x: x*x square(5)

3. <M-F>: hyperlink to a file or a directory

If you type <M-F> on the lines below, /etc/ /tmp/ ~/ ~/.emacs you get hyperlinks like these: # (find-fline "/etc/") # (find-fline "/tmp/") # (find-fline "~/") # (find-fline "~/.emacs")

4. <M-S>: hyperlink to the output of a shell command

If you type <M-S> on a line containing a shell command you get a hyperlink that starts with `find-sh', and that when followed opens a temporary buffer with the output of that shell command, like these: # (find-sh "find --help") # (find-sh "find /etc | sort") # (find-sh "find /etc -type d | sort") # (find-sh "find /etc -type d -maxdepth 1 | sort") # (find-sh "find /etc -type d -maxdepth 2 | sort") Try it here: dict smop dict 'minor detail' If you have the packages dict, dictd and dict-jargon installed these hyperlinks will show you the meaning of the expressions "smop" and "minor detail". # (find-sh "dict smop") # (find-sh "dict 'minor detail'")

5. <M-M>: hyperlink to a manpage

Try <M-M> here: 1 tac

6. All wrapping functions

Below is a list of all wrapping functions, with tests and hyperlinks: (eek "2*<down> M-A <down> ;;; Test eewrap-anchor") Source: (find-eev "eev-wrap.el" "eewrap-anchor") ;; <anchor> (eek "2*<down> M-C <down> ;;; Test eewrap-code-c-d") Source: (find-eev "eev-wrap.el" "eewrap-code-c-d") foo /tmp/foobar/ (eek "2*<down> M-D <down> ;;; Test eewrap-debian") Source: (find-eev "eev-wrap.el" "eewrap-debian") bash (eek "2*<down> M-F <down> ;;; Test eewrap-find-fline") Source: (find-eev "eev-wrap.el" "eewrap-find-fline") /tmp/foobar/ (eek "2*<down> M-J <down> ;;; Test eewrap-eejump") Source: (find-eev "eev-wrap.el" "eewrap-eejump") 422 (find-eev-intro "find-wrap-intro") (eek "2*<down> M-J <down> ;;; Test eewrap-eejump") Source: (find-eev "eev-wrap.el" "eewrap-eejump") 42 (eek "2*<down> M-M <down> ;;; Test eewrap-man") Source: (find-eev "eev-wrap.el" "eewrap-man") 1 tac (eek "2*<down> M-P <down> ;;; Test eewrap-pdflike") Source: (find-eev "eev-wrap.el" "eewrap-pdflike") foopdf $S/http/foo.org/bar.pdf (eek "2*<down> M-R <down> ;;; Test eewrap-rm/mkdir/cd") Source: (find-eev "eev-wrap.el" "eewrap-rm/mkdir/cd") /tmp/foo/ (eek "2*<down> M-S <down> ;;; Test eewrap-sh") Source: (find-eev "eev-wrap.el" "eewrap-sh") seq 1 20 (eek "2*<down> M-T <down> ;;; Test eewrap-eepitch") Source: (find-eev "eepitch.el" "eewrap-eepitch") python (eek "2*<down> M-V <down> ;;; Test eewrap-audiovideo") Source: (find-eev "eev-wrap.el" "eewrap-audiovideo") slimetutorial /tmp/slime-tutorial.mp4 (eek "2*<down> M-Z <down> ;;; Test eewrap-zsh") Source: (find-eev "eev-wrap.el" "eewrap-zsh") echo $SHELL (eek "2*<down> <<eewrap-eewrap>> <down> ;;; Test eewrap-eewrap") Source: (find-eev "eev-wrap.el" "eewrap-eewrap") U user-defined a b c

7. Wrapping functions generate hyperlinks

...this is a slogan - a huge idea, in a very shortened form. In its full form, that would be: (Some) wrapping function provide one of the basic ways to produce elisp hyperlinks quickly; the second basic way, which is a bit more complex conceptually, is via Elisp hyperlinks buffers. This, and the whole rationale behind generating and using elisp hyperlinks, is explained here: (find-links-intro "Elisp hyperlinks buffers") The "some" in beginning of the long version of the slogan, above, is because a few of the wrapping commands, for example, <M-T> and <M-R>, are used to produce things that are not hyperlinks - usually other kinds of scripts.