Hi! My name is Eduardo Ochs, and this
is another very short video that I'm
recording for a workshop that I'm going
to give on this saturday.
The short title of this video is
"Material on `M-3 M-e'",
and the long title is: What
does it mean to "save links to everything
that is interesting?"
The main idea behind eev is that eev
lets us "take executable notes of
everything that we do",
and "saving links to everything that is
interesting" is the harder half of
"taking executable notes".
And note that the title of the workshop
is "Workshop on creating and saving
elisp hyperlinks".
The main tutorial of eev is this one,
`find-eev-quick-intro'...
it's about how we can use `M-e' to
execute elisp expressions -
and it has a paragraph that says
that `M-e' accepts several different
numeric prefixes that alter its behavior.
In this tutorial we are only interested
in one of them: "`M-0 M-e'
highlights the sexp for
a fraction of a second instead of
executing it. Try it above."
And if it write this here, above,
`M-0 M-e' highlights the sexps
instead of executing them...
when we execute them
their results are shown here, in the
lower left corner, in the echo area...
the result of this one is 6, the
result of this one is 20, and the result
of this one is 26.
Let me raise some natural questions.
What are these "other prefixes" that
the tutorial does not explain? What do
they do?
Is there a place in the documentation
that lists these prefixes?
Where is the source code? Is it readable
how can we discover all that?
I think that I've said that in several
places, but let me say it again...
my memory is very bad - and
in this video I'm going to pretend that
it's even worse.
So a natural question is: how can I
rediscover what `M-3 M-e' does,
or, more realistically...
the information about `M-3 M-e'
is scattered in the source code and
in the documentation of eev...
so, how can I rediscover all my
material on `M-3 M-e'?
And I'm going to split that
in two parts: how do I find this
material, and how do I save hyperlinks
wo everything interesting that I find
in the way, and I'm going to alternate
between these two things: every time that
I find something interesting I'm going
to save this hyperlink, and so I'm going
to show how I save hyperlinks with very
few keys.
For starting the demo, let me explain
something about the window settings that
I'm going to use in this video.
In most of the workshop we are going to
learn how to use the three-window
setting that I recommend to beginners,
which is: we start in
a situation in which we have a target
buffer, usually in a single window, but
sometimes we have several windows here...
then we run a variant for beginners
of `find-here-links' that, well...
we want to create a link to here,
and the hyperlink to here is going to
appear here, and we have to select the
hyperlink and edit it a bit, and then we
copy it to our notes, that are here...
and then we type `M-h M-1', and we
go back to the original window setting,
that usually is just a single window, but
can be something with more windows too.
What I usually use is a one-window
setting in which I do everything in a
single window...
I start with the target buffer, and I
want to create a hyperlink to here...
then I run `find-here-links', I get
a window setting that still has
just one window the buffer, with
the temporary buffer with elisp
hyperlinks, and then I select
the right hyperlink, edit it a bit,
and then I copy it to my buffer with
notes, and then I go back to the original
situation, which was this one.
In this video I'm going to use a variant
of the one-window setting in which
everything is going to happen in the
window at the left,
and the window at the right is going to
be unchanged for most of the time...
and in the window at the right I'm going
to show a cheat sheet with what I want
to present in the demo - because my
memory is very bad, so I need to cheat a
bit.
...a demo. In this demo I'm going to
show how to reconstruct
these notes here. I mean...
some months ago when I wrote this I
wrote this in just just a few minutes
when I was looking for information on
`M-3 M-e'... and let me show more or
less how I look for this information and
how I save hyperlinks on the way.
I remember that `M-j' has
information on how to go to the main
tutorial, so let me type `M-j'...
I want to create a link to this line
here. So let me start by creating
a link to the effect of typing `M-j',
and let me refine this hyperlink.
I want to link to this string here...
`eek' does not admit refinements,
does not admit pos-spec-lists,
but let me duplicate this, and
put a "find-" here, because
this variant accepts pos-spec-lists...
and let me refine this to make it point
to this string in this temporary
buffer. So now i have a reference
that I can use this
to go to the main tutorial.
I remember that this is the the name of
the main tutorial,
So let me go to the main tutorial, and
the main tutorial has a section about
how to use `M-e'.
Let me start by creating link to that
section, and
in that section I have a paragraph about
numeric prefixes for `M-e', it's this
paragraph here...
and I'm going to create a link to this
string here, that is the most interesting
string in this paragraph.
So this link points exactly to where I
want to, and
I also remember that in this main
tutorial I have
something about the
key sequence that eev uses to generate
hyperlinks about a certain key.
I remember that this key sequence is
`M-h M-k', so let me search for
"M-h M-k"...
I want to link to this position here,
but let me first create a link to this
section...
this link is a copy to of this one
that's above, so I prefer to delete it...
now that I have a link to this section I
want to create a link to this string
here... so now i have a link to
the explanation about `M-h M-k'
in this section, and incidentally this
thing here is a demo of how to use
`M-h M-k', and I can just run this
instead of typing this very long
sequence of keys,
and when I run this I get a temporary
buffer in which
this link is the best way to regenerate
this buffer - the best because it has a
lot of information, it has
the name of the function here at the
right...
So I want something like this, but for
`M-e'. So i'm going to type
`M-h M-k M-e'...
I get this buffer, and I'm going to save
this as a way to generate that
temporary buffer with links about `M-e'...
and I know that the link that I want here
is this one, that points to the
source code of that function...
let me start by doing the same thing
that I did before...
let me refine this hyperlink here
and create a version of it that points
exactly to this line.
Let me test this hyperlink. It goes to
this to the source code of this function...
so let me copy this hyperlink to my
notes... the docstring
of this function explains
what this numeric argument does,
this line here explains what it does
when the numeric argument is 3,
so I want to save a link to this
position...
So here's an explanation in English, but
I want an explanation in code.
The source code of this function is very
short, it's just this... because this
function delegates most of the work to
this other function here, so let me save
a link to this other function...
and what this other function does is
that it takes the numeric argument and
it uses this to produce the name of yet
another function.
So, when the numeric argument is 3, this
function executes this function here,
`ee-eval-last-sexp-3',
so let me search for a function
with this name...
found it.
Let me create a link to this function.
Now let me create a test for `M-3 M-e'.
I know that if I run `M-3 M-e' here
it does this...
it's similar to when the prefix is 2,
and when the prefix is 2 it
evals the sexp and shows the target of
the sexp in another window...
so `M-3 M-e' does the same as 2,
it evals and shows the target of the
sexp another window, but it also
switches to the new window.
So let me try...
let me try it here...
`M-3 M-e' here
opened the target of the link in the
window at the right.
So let me create a demo for that.
The demo is going to do something like
this but two lines...
three lines above, so let me add
this thing...
and let me test it.
Works.
Let me show the cheat sheet here...
ok, now I want to understand more about
this function here...
it shows the target of the sexp before
point in another window and switches to
it... and it seems that this function
uses this to the to do most of
the hard work...
so let me try to understand what this
function does. I'm going to create a link
to its source code.
The link is here. I'm going to copy it
to my notes... that's it...
it's a weird function, but
the comments say that these functions
are explained in this tutorial,
`find-multiwindow-intro'...
so let me start by copying these lines
here to my notes,
and now let me find
more references to this
"multi-window intro"...
I know that this link here is a link to
the index of the main tutorials...
first of all, let me
create a link to this, to remind myself
that I can go here by typing
`M-5 M-0 M-j',
and now let me find the link
to "multiwindow-intro"...
so, it's here...
let me edit this a bit.
So this says that this tutorial is
tutorial number 14 here...
So let me go back to this tutorial...
and I remember vaguely that there are
references to what the 3 does...
and i remember that this thing is
related to the effect of `M-3 M-e',
so let me store a link to this
reference here...
and I also remember vaguely that
in the fake tutorial that
is an index Emacs keys
there's a section about
keys that split and unsplit windows, and
it probably has something about this key
here... so let me try to find that...
the tutorial about keys is this one,
and let me see if it has something about
`C-x 3'... it does, so let me save
a link to this thing here...
but I also want a link to this
section, so let me do this...
let me do something more elegant here...
and this is my
recommended reference about how this key
works...
and I also have this note here to remind
me that "split window horizontally"
means splitting it in a left half
and a right half...
with a bar between them.
So let me also keep a link to this
reference here...
and also let me follow this link here...
and i'm going to keep a link to this...
and also a link to this `C-x 3' here.
So now i have lots of explanations about
`C-x 3', and also in my notes
I have something that
I have prepared several months ago when I
when I was reading my documentation for
this multi-window thing, and I realized
that the demos...
sorry, let me see if I can find
the demo that I want...
Ah, ok. So I don't have a demo here that
creates a very complex windows setting...
so I created these things here
that create some very
complex window settings...
this one creates this window setting
here, and this one creates a variant of
that window setting in which the windows
are resized in some way.
and when I wrote these notes I also kept
links to `find-2a' and `find-2b',
that seem to be related to `C-x 3'...
so let me see if I can find them in
`find-multiwindow-intro'...
here, in "3. High-level words".
So let me create a link to this
section too...
well, let me stop here. I just wanted to
show how we can create lots of hyperlinks
very quickly, so this is how I usually
work... I create hyperlinks to everything
that I find interesting, and you can see
that in just a few minutes i created all
these hyperlinks here...
they may look like garbage to you but
they don't look like garbage to me,
I like them very very much.
So, that's it. End of this video.