Hi! My name is Eduardo Ochs, and this is
another very short video that I'm
recording for the workshop that is going
to happen in a few hours.
The title of this video is
`find-extra-file-links'.
In this video I'm going to suppose that
people have
followed all the instructions and
exercises and ideas in these
sections of the main tutorial here - this
one and this one,
and also that they've understood
what `find-extra-file-links' does
by reading this section here.
And by the way,
the key that's associated to
`find-extra-file-links' is this one,
`M-h M-e' - `e' for "extra".
The diagram of this exercise is going to
be this one, where [D] is a dired buffer...
remember that a dired buffer is
something like this...
and here I say "do this twice",
but let me first explain what people
have to do in the first time.
We have to
open this thing here in a dired buffer...
note that this link opens a subdirectory
of Emacs, and it finds a certain
subdirectory,
and a file in that subdirectory...
so that link goes to that directory,
called "play/",
and locates the first occurrence of
this string there...
and we are going to create links to that
file, but let me follow
the instructions here...
the instructions say that we start
in a situation in which we only have
this buffer here,
*(find-eev-exercises-intro)*,
then we go to the dired buffer...
this thing takes us to dired...
and then we are going to type `M-h M-e'
to go to a buffer with elisp hyperlinks
and then this thing here to show
our notes at the right...
and I'm going to use the same trick
as always, which is that i'm going to
copy this thing to my notes...
that's it - let me go back...
so I'll have to reproduce all these
first commands here by memory,
until we get to this situation here,
in which our notes appear.
So... i have to follow this thing,
and then type `M-h M-e',
and then type `M-2 M-1 M-j'...
and here are the notes. So I have a
buffer with elisp hyperlinks here at
the left, generated by
`find-extra-file-links'...
and my notes buffer here at the right.
And this thing here explains
very briefly that we have to run
`M-w'... it doesn't say what
is the selected region, but `M-w'
copies the selected region to the top of
the kill ring, and `C-y' copies
the contents of the top of the
kill ring to the current buffer.
So these instructions are to copy
something from the left to the right,
and the novelty here is...
well, there are several. First one is
that I want to create a way
to create short links to files in this
directory...
so I'm going to use a string here -
"eplay", for "emacs play"...
I'm going to execute this line again...
the tutorials explain what this means...
and now I'm going to cherry pick the
lines that I think that are important...
and the lines that I want are...
this one... let me see -
ok, all these ones -
no, these ones -
and now I have to copy them to my
notes. And note that
if I just execute this expression here
it yields an error, because
`find-eplayfile' has not been defined,
but if I run this expression here
this thing becomes defined.
No, I'm not going to explain.... No, I'm
going to explain very briefly what
this thing does. If we add a "find-" to
the the beginning of this `code-c-d' and
we execute this we see the code that the
`code-c-d' would execute.
Let's go back.
so
now we have to do something here to go
back to... to the exercises...
and let's reread the instructions. The
instructions say that in the first time
we should create elisp hyperlinks
pointing to this directory, and to this
file... and let's see. Here
we have a link that points to that
directory, here we have two links
that point to that file in that
directory... this one opens
that directory and searches for the
first occurrence of this string,
and the second one opens that file...
and these links here
are short hyperlinks to that directory,
and I'm going to modify this one here...
ah, no, I'm going to do this: I'm going
to open this directory again,
open this, and now I'm going to type
`M-h M-h', and choose this thing here
and copy it to my notes...
but I'm not going to explain exactly
what this means, people will have to
figure out. =)
So, let's go back to the exercises...
the exercise says that in the second
time "you should create
elisp hyperlinks to a directory
and a file that you find interesting".
Let me choose something in my directory
of things that I've compiled from the
source code... uh, say, here...
no, this one is too weird.
agda-categories/ here,
then src/Categories/Comonad.agda,
I want a link to this file here...
sorry for the weirdness -
so here I have to type... sorry -
here I'm in dired mode,
and I want links to this file here...
and the trick is that I have to type
`M-h M-e' to get to
this temporary buffer with the
"extra file links"...
and this is the part that
that I want to copy to my notes, but I
want to choose a shorthand
for this directory...
and let me choose "agdac", for
"agda categories"...
So I'll execute this again, the buffer
is going to be regenerated with this
"{c}"s between curly braces being
replaced by something else...
and now I'm going to copy this thing
to my notes.
Here are my notes...
and here are all the links that I want,
that I've created right now...
a link to the to this file in this
directory, a link that opens that file,
a link to the directory...
and this thing here, that creates an
abbreviation to that directory, that lets
me create short links to files
in that directory, and this link here
to... to... to this.
Uh, and by the way that let me do
something that I'm not going to
explain in all detail, people will
have to think about it...
I'm going to open this, and now type
`M-h M-h', and now I'm going to use
this link, that uses the short name...
and I'll copy it to my notes.
So this link opens this file...
this is a short link to a file in a
certain directory... and that's it -
now the instructions say that I need
to type `C-x 1', and then a series
of `M-K's...
a series of `M-K's until we get
to the buffer with the exercises, which
is this one. So: that's it!