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



Notes: this is an advanced tutorial!
And it is very incomplete at the moment!




1. Introduction

These sections of the main tutorial explain what anchors are, and explain two simple ways of creating index/section anchor pairs: (find-eev-quick-intro "8. Anchors") (find-eev-quick-intro "8.1. Introduction: `to'") (find-eev-quick-intro "8.3. Creating index/section anchor pairs") (find-eev-quick-intro "8.3. Creating index/section anchor pairs" "`M-A'") (find-eev-quick-intro "8.4. Creating e-script blocks") (find-eev-quick-intro "8.4. Creating e-script blocks" "`M-B'") and these other sections explain briefly how hyperlinks to anchors in other files work, (find-eev-quick-intro "8.5. Hyperlinks to anchors in other files") (find-eev-quick-intro "9.2. Extra arguments to `code-c-d'") (find-eev-quick-intro "9.2. Extra arguments to `code-c-d'" ":anchor)") (find-eev-quick-intro "9.2. Extra arguments to `code-c-d'" "makes (find-eev") but they stop right before explaining how to use them in a practical way, i.e., with few keystrokes. This intro is about this.

2. Shrinking

We saw in (find-eev-quick-intro "9.2. Extra arguments to `code-c-d'" "makes (find-eev") that these two hyperlinks are equivalent: (find-eevfile "eev-blinks.el" "«find-wottb»") (find-eev "eev-blinks.el" "find-wottb") The first one searches for a string in "eev-blinks.el" in the normal way; the second one treats the "find-wottb" as a tag, wraps it in `«»'s, and then searches for the anchor "«find-wottb»" in the file "eev-blinks.el". We will refer to the operation that converts the hyperlink (find-eevfile "eev-blinks.el") to (find-eev "eev-blinks.el") as _shrinking_ the hyperlink. Eev has a key sequence that does that, and for simplicity its behavor is just this: it looks at first element of the sexp at eol (the "head" of the sexp), and if it is a symbol that ends with "file" then rewrite the sexp replacing the head symbol by it minus its suffix "file". That key sequence is `M-h M--' (`ee-shrink-hyperlink-at-eol'), and its source code is here: (find-eev "eev-edit.el" "ee-shrink-hyperlink-at-eol") Try it on the two lines below: (find-eevfile "eev-edit.el" "ee-shrink-hyperlink-at-eol") (find-eev "eev-edit.el" "ee-shrink-hyperlink-at-eol")

3. The preceding tag

The key sequence `M-h M-w' copies the current line to the kill ring, highlights it for a fraction of a second, and shows the message "Copied the current line to the kill ring - use C-y to paste" in the echo area. Here are links to its source code and to a section of a tutorial that mentions it: (find-eev "eev-edit.el" "ee-copy-this-line-to-kill-ring") (find-refining-intro "3. Three buffers" "M-h M-w") When we run `M-h M-w' with a numeric argument - for example, as `M-1 M-h M-w' - it highlights and copies to the kill ring the "preceding tag" instead of the current line; the "preceding tag" is the string between `«»'s in the anchor closest to the point if we search backwards. As an exercise, type `M-1 M-h M-w' at some point below, and then use `M-h M-y' (`ee-yank-pos-spec') to add it to the hyperlink with `find-anchors-intro' below the anchors. «first-anchor» «second-anchor» «third-anchor» (find-anchors-intro) [TO DO: write the other sections!]