Hi! My name is Eduardo Ochs
and this video is about two things...
first, it's about a way to configure
eev - my Emacs package - on M$ Windows,
and second, it's about magic, in a sense
that I'm going to explain soon.
There's a lot of information about eev
in this link here, and a lot of
information about this video in this
other link.
Let me start by explaining what I
mean by configuring eev.
Installing Emacs and eev is very easy
even on Windows,
but for more advanced usage eev needs
to play videos, to display PDFs, and to
download files... and so
to make it all these things work we need
to: download some things, configure some
paths, and put some commands in the
init file of Emacs, that is this one here:
~/.emacs.
Let me explain what is my target
audience in this video
It is mainly for beginners - I mean, for
people who use Windows but they are
not even programmers
they know how to use a few programs but
they don't even know how to
use a terminal... they know how to open a
terminal, but they don't know how to
use it
fluently or in a productive way.
And my second target audience is people
who have been using Emacs for
years and who are interested in
alternatives to the standard way of
configuring things in Emacs, which is
M-x customize.
Let me now explain what is eev.
One second...
This expression here opens the
slides of my presentation in the
EmacsConf 2019.
Let me show you some things there...
the title of my presentation was: How to
record executable notes with eev
and how to play them back,
and I started the presentation by
explaining that I
started using GNU/Linux and Emacs in 1995
and I started using Emacs in a certain way
and I was sure that everybody was
using Emacs in that way, and that way
became eev... so, in a sense eev appeared
by accident.
My current favorite slogan for explaining
what is eev is: eev lets you record
executable notes and lets you play them
back -
but for many people this doesn't make
much sense... let me just enlarge this
emoji - one second -
These people they can understand what
they [this slogan] means
when I show a demo... for example here is a
demo of
me sending commands to an interpreter...
to Maxima, which is a program -
sorry - in this demo I
sent some commands to a program
called Maxima, that is a program for
doing symbolic computations, graphics, and
other things,
and Maxima calls GNUPlot to draw some
graphics and...
so: here are my notes, I mean, the commands
that I send to Maxima... and I just had to
type f8 to make Emacs send this commands
to Maxima.
So: many people can understand how
I do these things, but very few people
use eev fluently enough to record
executable notes of what they do.
My older slogan
was even more puzzling...
I used to say that "eev is a tool for
automating almost everything", and also
very few people
are using eev for automating their tasks -
which is very sad.
Let me explain the connection with
Org Mode - one second -
Org mode can also be used to record
executable notes and to automate almost
everything,
the problem is that org mode is
intuitive to many people and...
to MANY people, let me stress this -
and eev is intuitive to very, very,
very few people, and Org Mode
is "simple" in one certain way... it's
a way that is related to what people
called "user-friendliness" nowadays -
and eev is simple in another, totally
different, way, related to Lisp...
people sometimes say that Lisp is very
simple, and eev is simple in a way that is
similar to how Lisp is simple...
and, by the way, I find Org Mode very
hard... for me eev is simple
in a practical sense, and...
well, I'm going to explain my problems
with Org later, with examples.
So: I decided to
use a trick to make eev more popular
and the trick is that people can use
eev to learn both Emacs and Org Mode -
so in this video eev is going to be
something secondary, that people
can use to learn both Emacs and Org Mode,
and I'm going to show how we can
use a certain series of videos
about Org Mode, and how to index
those videos to learn Org Mode.
That's it - I'm recording this video in
several parts,
so this is the end of the first part. I'm
going to record all the parts and then
glue everything together.
Let me now explain the basic
installation in more details. I'm
not going to show how to install Emacs,
but once you have Emacs installed you just
have to follow these steps here,
and these steps are explained in many
places... for example, this is the link to
the material about eev in my home page...
If you access my home page without this
#eev you get this thing here, and if you
access it with the #eev
you go to this section...
and note that
here it says: "This video
about installation, navigation, etc..."
let me open this page in another tab -
and here we have a list of tutorials,
and let me open the first tutorial in
another tab.
Well,
in Emacs we can access this tutorial by
running this, so this is the tutorial
inside Emacs...
and this is the tutorial in the browser.
Here we have some links,
some instructions, and these things here
are links to that video
the "installation and navigation",
"eevnav" - and these links here
point to positions in the video, but if I
access them by clicking on these links
it takes ages to open this video because
it has to open youtube...
then it shows an ad, that I have to skip,
then sometimes another ad, and then it
plays the video...
but if we have everything configured
we can execute these things here -
these elisp hyperlinks here -
and they play the video in mpv
in one second or two. So
that's it -
and we can also access the
list of videos by typing
M-x find-1stclassvideos...
we get this listing here, and the video
about installation and navigation
is this one.
And one very nice thing is that -
sorry -
when we access this video, here...
we have a lot of information about the
video...
and here we have a link to a kind of
index to the video...
so if I execute this
I go to an index, that is made
of a series of sexps like this
this, and I can execute
one of these sexps by just
typing M-e on it
but of course this is only going to work
if we have the video player configured.
Let me close everything...
And configuring the video player is part
of the "non-basic installation", or the
"configuration" of eev.
In principle what we have to do is to
install mpv - a certain video player -
then we have to configure the paths
to the browser, that by default
is google chrome, and to mpv,
and then we have to download
all these things here, that people
who use windows have never heard about...
And then we have to configure a few
other things, some easier to understand
and some very mysterious...
Anyway, let me show why we need wget,
that is a program that downloads things
from the internet.
Note that if I just execute this
I play a video with mpv -
but I'm going to run a hack here that
hides all the videos
that I have downloaded,
and now if I try to play this video
eev is going to say that...
it's going to show me
all these things here...
If I don't understand them I can
follow these things here
to go to the tutorials
to understand what this other stuff
means...
So, this part here downloads
some local copies of files from
the internet...
this is explained in this tutorial...
note that this link goes to the
section 1 of the tutorial, that is
called "Local copies of files from the
internet"...
and this is also explained
in another tutorial in a way
that is more specific to videos,
and we also have this section
here that explains
that some videos have subtitles -
here -
and explains the functions of eev
that downloads videos with subtitles.
This video in particular, which is a
video for my presentation at the
EmacsConf 2021, it has subtitles.
if I execute these things with - oops,
let me switch to smaller font - if I
execute these things with f8, then
the f8s create a shell buffer here...
a shell running inside Emacs,
inside an Emacs window...
and if I type f8 in these lines here
they are sent to the shell...
the shell executes these things here,
and this wget here downloads
a copy of this file from the internet
and puts it in this directory...
and this other wget downloads the
subtitles for the video...
so: the .mp4 is the video itself,
the .vtt is the subtitles of the video,
and these things here just register
in a certain log file
what we have downloaded.
And now that we have a local copy
of the video, this sexp here
opens this directory and goes to the line
in which this file here is...
this sexp here, that starts with
find-video,
plays the video...
it works as a test -
it plays it from the beginning - and note
that it plays the video with the
subtitles...
and this other sexp is equivalent
to the other one.
And these other two sexps are
higher-level ways of
playing the same video...
this thing here plays
the "first class video" whose
"code" is this "eev2021" -
so: same thing as before,
and this thing is the same thing
as this one,
but in an even shorter form.
And for people who haven't
configured the video player - mpv -
they can still access the video by using
this url here.
Let me do something
even more hackish...
if I change this timestamp here to
2:34 and I execute this sexp again
it regenerates this buffer,
and it changes these timestamps here
to 2:34.
That's it... and note that
this url here has also changed...
and if I open this url in the browser
it plays this video in the browser,
but it takes a long time...
in this case it didn't play an ad
before, but anyway, it takes ages -
but anyway, it works - so if you don't have
the mpv video player configured you can
still play the videos, you can still
start them from the right position,
but it's painful.
So note that I haven't explained
how to do these things...
the thing is that these three steps
here... they can be
replaced by something much more
user-friendlier...
they can be replaced by these two sexps
here - this one just returns the name
of a package that has been loaded,
and this one here
opens a temporary buffer
that shows this.
And this is what we're going to use
to configure eev on Windows
"without magic"...
remember that I'm going to explain
the term "without magic" soon...
but anyway,
"wconfig" is an abbreviation for
"configuration on Microsoft Windows",
or "Windows config"...
And I'm going to refer to this temporary
buffer here - note that its name is here -
as the "main wconfig buffer" -
and these instructions say that
to configure eev on Windows
we have to follow the instructions
in each of these five wconfigs here...
I'm going to refer to these ones as the
"sub-wconfigs".
The first one is this one, that
is used to configure the browser -
I mean, the path to the browser...
by default the path to the browser
in eev is the one that is used
in GNU/Linux, which is this one...
I'm supposing that the default browser
is Google Chrome just because
many people have it installed,
but this is easy to change...
and the thing is that
to set the right path to Google Chrome
we have to run something like this -
this setq here sets a variable,
and note that here we have a line that
says "See: blah blah blah",
and this sexp here opens
one of the tutorials of eev,
that is a tutorial on Emacs Lisp...
Note that this header says:
"This intro is a very quick introduction
to Emacs Lisp. Its intent is not to teach
people how to write Elisp code, only to
teach them how to read Elisp code"...
so it's very basic.
There's a video about it, but I'm not
going to discuss that video now.
And in the first sections of this tutorial
you learn what are S-expressions,
what are numbers, what are functions,
how to call functions,
some basic kinds of elisp objects...
these things also have
links to the Emacs Lisp manual, so if you
execute something like this you have
the standard documentation of what are
the data types of Lisp...
And in the section 5 we learn
how to use variables.
We learn that we can
set the variable a to 2 by running this -
this expression returns the new value of
the variable - 2...
now if we execute this
the value of a is 2,
and if we execute this
the value of a becomes 3...
so the result of this is 30,
and if we run this again we set the
value of a to 2 again, and
this sexp here returns
10 times a, which is in this case is 20...
and of course we can change this line,
we can execute the changed version,
and so on...
so we have to do something like this to
set the variable
ee-googlechrome-program.
This section says that this is the
current value of the variable
ee-googlechrome-program...
and we have to change it
to the the right path on Windows,
that is going to be something
like this, "C:/blah blah blah"...
note that we NEED to replace
all the backslashes by
forward slashes,
and if we configure the path correctly,
I mean, if we execute this sexp here
to set ee-googlechrome-program
to the new value and we execute this,
then Google Chrome is going to open
this url here.
Let me try...
it says that I have configured it
INcorrectly.
I don't have a
"googlechrome" in that address
because i'm on GNU/Linux, so for me
the right path is this one.
If the path is configured correctly -
now I'm using this value -
if execute this, then
Emacs calles Google Chrome, and Google
Chrome opens this this page here.
And after setting
the variable to the right path -
let's suppose that it is this one -
we have to update this page,
in the sense that is explained
in this section of a tutorial...
This page here is generated by
a template -
most of my pages that are generated by
templates follow a convention that says
that "the first line
regenerates the buffer" -
note that if I execute this then this
string here is going to be changed to
the current value of this variable -
note that I can also check the
value of this variable by executing this
expression here with M-e -
and if I regenerate the buffer
then this thing here is replaced
by the current value of this variable.
And now that
that the page has been...
sorry, that the the variable
is set correctly, and that
the page has been updated,
now I need to save my configuration...
and this is explained here -
so at this point people have to to read
the section of the Emacs manual that explains
what is the
init file of Emacs...
and then they have to
check some things here...
one of the most basic keys of ev is M-j
if I type M-j
without any numeric prefixes
it shows
this page here that has a
a user-friendly header and
a user-unfriendly rest
and
it has some links to
to the main tutorial
and some links to this
other tutorial, that is a fake tutorial
that is just an index of the main keys -
and here we have a list of the current
targets - I use many targets in my
default setting -
this target here says that
when we type M-j with the prefix 55
it opens the init file - here -
so let's test...
so this was a very long explanation of
why
M-5 M-5 M-j opens the
init file... this sexp here also opens
the init file -
here is my init file - it is huge, let me
open a blank page here to avoid
confusion -
and now the instructions say that we
have to copy the _updated_ version of the
block below -
the updated version in the sense that
we have to update this page,
and when we update this page
some
places like these
are updated to the
current value of this variable here.
So
this template produced this thing here
that we have to save in our init
file
so we use copy and paste -
in general beginners will have
things like this
at the top - this is called the
"menu bar" and this is called the
"tool bar" and then they can use these
things here to remember the keys for
copy and paste...
anyway let me disable them. So, I have
to copy this to my init file...
Done! Copied...
Now let's go back, we have just
finished the first
sub-wconfig
and we can either run this, or delete
this buffer to return to the main
wconfig
and
this is the list of
the things that we have to
configure...
now we can go to the second one, that
configures wget.
Let me just show something before
running
this subconfig here
it says
in the line 4 of this
main wconfig
we have this link here
that goes to the source code of
eev-wconfig
and it has this introduction here.
The introduction starts with this
explanation, that some parts of eev
call external programs,
and then it has lots of hyperlinks that
show the sections of the tutorials that
explain
how these external programs are used.
So, for example if I execute this I go to
a place in which firefox is mentioned,
if execute this I go to a place in which
Chrome is mentioned -
here - it says...
sorry, remember
that
I ran something that would
split the window in two and would run
another program in the second window...
here's an example in which we run
python in the second window.
In my previous example I was just
running a shell but we can also run
other targets.
And these two lines here discuss why
we need wget.
I've shown that very quickly before
when i showed how to download a video
and its subtitles but the full
explanation is here.
There's a wget here, here is a demo of
how it works...
And here we have a
link that explains the video links...
again, a link to
how subtitles work, and so on.
Ah, sorry!
I was missing something very important.
This should be obvious now...
I said that on *NIX installation
is very easy -
we just need to install these programs
and eev knows how to find them...
but on Windows things are much harder
first eev needs to know the full
paths of the
executables of these programs
we just saw how to configure
the full path of Google Chrome
and also wget and pdftotext
are hard to install - I'm going to show
how to install them very soon -
and also on Windows it's better to
use a browser to open pdfs instead of
using a dedicated pdf viewer
and also - and this is very important - I
don't have access to a machine with
Windows, and I have very little access to
people who use Windows and who can
be convinced to test this,
so I'm testing this on a machine with
GNU/Linux, with some hacks to
try to make it behave like a Windows
machine...
and this is one of the most important
parts - I said that I was going to explain
the term "magic"
eev-wconfig is an attempt to solve the
problem of how to install these things
on Windows both "without magic" and
"with very little magic"
in this sense. Remember this slogan:
"any sufficiently advanced technology is
indistinguishable from magic"
and here in this video
I am going to use the term "magic" as a
shorthand for a
"sufficiently advanced technology" -
that is, something that is complex and
non-obvious, and
"that is
indistinguishable from magic"
in the sense of being almost impossible
to understand.
And i'm also going to use the term
"black box"
as a near-synonym for "magic"
and sometimes the term "black box" is more
convenient -
even though it is longer: it has more
letters - because when I use the term
"black box" it invites us to use the
expressions like "opening the black box".
I'm going to use that expression a lot.
I mentioned Org in the introduction
and I said that I find Org very
difficult -
but i'm a very
atypical person...
and I recorded a video explaining this.
People can access this video either
in this page, or
in this thing here: the index of the
video is here, so I can just, for example,
execute to sexp and play the video
from this position - 3:35 -
Oops! The video is not here -
I don't have a local copy of it, so I need
to run this thing here to
download the local copy.
It was downloaded -
it doesn't have subtitles, it seems...
and if execute this,
now mpv plays the video from this
position.
Anyway, let me go back.
So: in this video I explained why I have
always found Org so hard to learn...
and the thing is that many things in Org
are implemented in ways that i
don't understand,
and practically every time that i try to
learn more more features of org
I get stuck, because I start to ask
questions like:
hey, how is this implemented?
And I get stuck trying to trying to
answer these questions, that are not
typical user questions...
and I get stuck on that instead of
simply learning how to use the features
of Org as a user.
So: I find
Org confusing because my brain is wired
in a weird way...
and, in the language of black boxes what
happens is that when I try to learn Org...
I try to learn a new feature, I see lots
of black boxes,
I try to open these black boxes, and I
fail miserably... and I get frustrated and
exhausted I, do not learn the feature and
I postpone learning the feature
to another day, and in the other day I try
it again, I see other black boxes, I try
to understand them again, and blah blah,
rinse and repeat...
and I also have exactly the same
relationship with M-x customized, that
the standard way in Emacs to configure
certain things
and to customize certain things.
Let me show how customize works
We can either type M-x customize or
run this sexp here, that
simulates what happens when we type
M-x customize.
Customize creates a temporary buffer
like this one...
it has this mysterious field here, it
has parts that are not editable - for
example, if I type a letter here - oops
if I type a letter here
it says "you can't edit this part of the
Custom buffer"... it has buttons,
it has different fonts, different colors,
it has links, and so on...
and if i follow these links in
the right way I
can get to places like this one,
which is a sub menu with sub options,
I can get to a place like this one,
that offers many things
that can be configured, each one with an
explanation...
I can execute things like this one, that
opens this page, in which I can customize
a variable...
and things like this in which I can
customize a face to change its color, to
change its font... and so on -
and for me all these things - all these
buttons, this rectangle here, in which I
can put text
all these things are...
magic - and they are black boxes that I
find very hard to open.
And over the years I have experimented
with several alternatives to
customize that "use less magic"...
I've documented some of my attempts in
this page here,
and
this thing that I'm presenting now -
eev-wconfig.el - this is
the next step: it uses all the ideas in
this page, and a few other new ideas.
And eev-wconfig can be used both
"with no magic",
which is easier to explain, and we're
going to see that first,
and with "some magic", or "with
very little magic"
and both ways create temporary buffers
that have parts that perform
configuration steps
and parts
that "open the black boxes".
How? Because they contain elisp hyperlinks
that go to the documentation, that
perform tests, that show the values of
variables, and so on.
The documentation about usage is
incomplete at the moment, so let me
return.
We just saw that these
things have lots of links in comments
like this one, that goes
to a tutorial, and some
other links go to manuals of Emacs...
it has some tests in comments - remember
remember that we ran this and it tried
to open Google Chrome
to visit this url in Google Chrome,
and it failed, because
the path for Google Chrome is configured
incorrectly.
This is an example of a link that goes to one
of the manuals of Emacs,
this thing here opens the init file, and
so on...
so: we just finished the first sub-wconfig
and now we need to run the second
sub-wconfig
and this wconfig
can only be run after configuring the
browser - otherwise it's going to behave
in weird ways...
and the first step here is to download
wget.exe...
and note that it says: run each of the
uncommented texts below with M-e
the idea is that
this buffer here is
colored as Lisp - everything that
Emacs thinks that are elisp comments
is in brown, and everything that is
not comments is in other colors...
so this is an uncommented part and this
is a commented part.
Note that here we have some sexps that are
longer than one line. For example, this
one takes two lines, and this one also
takes two lines...
and we need to run each one of them.
This one just returns the name of a
package that has been loaded,
this one just returns the name
of a function that has been defined,
and some of these ones return
some trivial value that just says that
everything went right...
for example this one returns nil, this
one returns nil, again and this one is a
bit more problematic because it runs
something that may take a long time like
10 seconds, 20 seconds, i don't know...
Let me try.
Note the messages here now we have to
wait patiently... Ta-da.
It has downloaded wget.exe and saved it
in this file here
and now that wget.exe has been
downloaded we can use it to download
some other files...
but remember that I'm not on windows, so
I have to use some some
mysterious tricks to
make these things behave somewhat like
Windows.
Let me execute this string... so, please
don't pay attention to what i'm doing
now... this is like
"you are not expected to understand this"
anyway,
um -
sorry -
oops -
oh my god i forgot the details, sorry...
that's it -
Ah, yeah, sorry - now I remember:
I had to replace the real wget.exe,
that takes about 5MB, by a
fake wget.exe that calls the
wget that runs on GNU/Linux
so, sorry for the delay, let me go back to
the to the configuration of wget...
now that I have wget working
I can execute this
block here with f8...
Note the instructions here -
this thing points to the
the main tutorial of eev, in the part that
it explains how to run
shell-like programs - programs like the
shell, programs like Python, etc, with f8s...
so we need to run these things with f8.
The first commands are very quick...
and now I call wget to download
many small files...
and this block here contains some tests -
some very basic tests that just
call these programs to
check that they are executable
and to check that they can perform very
basic functions, like just displaying the
help.
This test here
works -
it shows the help of wget - here -
this one does not work because this file
is a file for windows... I have to run my
hacks to to make it executable on
GNU/Linux. so,
again, please don't pay attention to what
i'm going to do...
now these tests
work. So if you are on Windows and if
everything worked
this thing here should show the help of
pdftotext...
and these other lines here should show
the version of these
programs here
so if I execute this I get a message
that is just one line long
same here, same here -
and now I need to run this other block
here, that downloads a pdf file
that is going
to be used in some tests, and a very short
mp4 file... a very short video that is
going to be used in other tests.
so...
wget, wget again...
and now this section 3, here
has tests for one of the functions of
the functions of eev that call wget
we need to run this sexp here to
configure
the path that is used by this function
here
and now we run we need to run the tests
in the second sexp below... so this is a
sexp that is here just for the sake of
completeness, because it points to the
beginning of a section,
and this sexp here points to
a series of tests in that section, and we
need to run these tests to to check
that they really work.
Each of these `find-wget's here call
wgets to download the file from the
internet and it shows the the contents
of this file in a temporary buffer. Let's
try here...
note that the name of this buffer is
wget blah blah blah blah
wget, colon, space, the url...
with asterisks
in the beginning and the end
this is similar, but it also searches for
the first occurrence of this string in
that file...
that's it -
this one is similar, but it searches
for the first occurrence of this
in that file -
it works -
this test here tries to to download a
file that does not exist,
so it says that "wget can't download..."
and these two tests are similar
to the other
ones above but they tell Emacs
that this thing here is elisp code and
should be colorized...
the technical term is "fontified" -
fontified as Lisp, so Emacs colors these
things as comments,
these things as code, and so on...
so, that's it - all these tests work -
note that all these tests are hidden in
this sexp here -
and now
this link here explains the idea of
anchors that I explained very briefly in
the tests above...
so this section of the main tutorial
explains what are anchors
note that
we probably don't have a local copy
of this video here
so eev offers to download the local
copy...
but if we haven't configured
the mpv media player we can use this url
here to play the video starting from the
right position.
Now in section 4 we
configure the
pdf viewer that eev is going to use
to make eev use the browser as our
preferred pdf viewer
and the configuration is just this line
here, the tests are these...
let me go straight to
the one that is most interesting... it's
going to open this local file here, and
it's going to go to page 3 in that
local file - oops,
sorry I need to reconfigure one thing
again... let me cheat -
so please don't pay attention to what
i'm doing now,
please ignore me - um - oh sorry -
that's it. It opened the local file and
it opened it at page 3 - note
that there are two other pages here
and it's opening it at page 3...
so it's working.
People who want the technical details
can run these three links here to
to get more details... some of them are
readable, and some of them are very
technical, but anyway
the explanations are there, and I'm
supposing that people
can read the more readable parts and can
ignore the parts that are too technical.
And we also need to tell
eev to use this program here to
to view pdfs as text...
and this sexp here will open the pdf,
convert it to text and go to page 3...
that's it.
This is page 2, and this is page 1, and
this is a formfeed that separates the
pages...
and i'm going to skip this test.
And now that we have configured all
these things we have to save these
configurations in our init file...
and note that these configurations were
scattered here -
they were interspersed with tests.
We have this setq, this defalias,
and this other setq here,
and in this section here we have these
three lines
in the same place, and also a first line
that is a link to this sub-wconfig
here, the wconfig that configures
wget. The instructions here say that
this is similar to something that we did
before to save some configurations to
the init file...
let me go to my init file -
I've been using it for a long time, ok?
so I remember that the keys to go to
the init file are M-5 M-5 M-j...
and now:
paste! So this is the result of
running these configurations here...
and note that this first line
the line with the "See:"...
go to this sub-wconfig, so we can
run all these configurations and then
forget what we did
and then we can open our init file again
and if we want to understand what we did
we just need to run
this sexp or this sexp
and we go back to the
temporary buffers that were used to
configure all these things.
So, now i've explained
most of the basic ideas of the
configuration... I can go a bit faster now.
Now we have to configure some things
for the shell...
the thing is that on Windows it's
better to use Eshell, that is a shell
that is
written in lisp, than to use the default
shell from Windows...
and we need to run these things,
and we need to run
these things here...
and note that
this line here says that this block
here only needs to be run once -
and the technical details are here - I'm
not going to discuss them now -
and here is a test...
the important part is that
these configs here define
wget - note that it's not "wget.exe",
it's simply "wget"...
it defines wget as an alias that
points to the wget.exe there that
I have downloaded
and we also need to
run these very technical things here
and the explanation is that...
remember that
I've shown how to run
shells in Emacs...
for example this shell here - and I've
shown how we can
use eepitch to control other targets, and
the example that I gave was to
to use it to run Python, in this
window here...
and the thing is that
I don't know how to install Python on
windows - at this moment I don't
have anyone who can test it for me, I
don't know if it works...
so I did my basic tests with Lua, that I
can install by just downloading two
files and we did that when we were
downloading many files with wget.
Oh no, sorry -
I'm talking about something that is only
going to appear in another sub-wconfig -
sorry -
anyway, here the test just checks that
both Eshell and the normal shell
run the same thing here... they both run
Eshell...
we need to run this thing here too...
the explanation is here - I'm not going to
open the tutorial with the
explanation -
now there are some tests that we can do,
but i'm not going to run these tests now...
and then we have to save these things
here in our init file...
Again, there's a line that says
that this is similar to
these instructions here, so the detailed
instructions are
in our first sub-wconfig...
and we need to copy this thing,
and then go to our init file,
and add these things to our init file.
Done. Let me go back to the main wconfig.
Note that we have completed this one,
this one, and this one...
and this thing here just
checks that that we can run Lua from Emacs
it's what I was saying before about
running Python or running Lua...
so this is a basic test that calls Lua
with its full path.
Remember that I had to to run some hacks
here to make things behave as as if we
were on Windows...
so I'm not sure if all these things
are going to run on Windows or not -
and then we have to run these sexps
here, and then run the test that is below...
let me run this, and this, and this, and
this... and then the test is here -
now I have Lua running inside an
Emacs window,
and it was not invoked from a shell, it
was invoked directly.
Everything works,
and now we need to save these things in
our init file.
So, again: copy, go to the init file,
paste.
Let me go back to the main wconfig...
and now we need to configure mpv... the mpv
media player
this is similar to how we configured the
browser. We have to
configure the paths to mpv -
I mean people have to install mpv and
then configure the path to mpv -
I'm not going to repeat it...
it also has some tests...
and after configuring this thing here we
go to our init file and we save this
thing to our init file...
and that's it.
If we've done that
we will have five blocks here, each one
corresponding to one of the
the sub-wconfigs, and
each one contains some configurations
or customizations,
and also lots of links to help -
I mean,
we can treat these links here as
links that open the black boxes and
explain what these things are
and all the commands are very explicit
here... if we want to understand what
`require' does,
the main tutorial of
of eev - this one
explains in section... 4, if I remember
correctly...
that's it.
Suppose that we want information
about an Emacs function.
This video here explains that in details,
and explains also the rationale
behind all these things...
the standard way to get help about the
function is to type C-h f...
Emacs takes the name of the function from
the the position
under the cursor - the "point" - we can just
press enter here and get help...
this help contains too much magic
for example this thing here is a
hyperlink
and it's for me it's a black box that I
do not know how to open
i know how to type enter here
to go to the source code,
but I don't know what exactly
Emacs runs when it does that... I do not
know what is the Lisp code corresponding
to typing Enter here -
and I also don't know why these things
are in italics and other things are not...
so, many years ago
I started to experiment
with the way "without magic"
of doing something similar...
and my way is by typing M-h M-f
and then Enter
and this thing here contains hyperlinks
that are
not black boxes, and that are pure text -
I can copy these things to my notes...
and this one here goes to that
description, this one here goes to the
source code of require...
this one here goes to the manual,
and so on...
so this is the configuration without
magic.
I promised that I was also going to
show the configuration with just
a bit of magic.
If we type find-wconfig-links...
here, if you run this
it says that if we want to configure eev
on windows with _some_ magic we can follow
the instructions here...
and here we have something very similar,
but with fewer tests,
and less documentation...
and we just need to
configure these things here,
to follow the instructions here - that I'm
not going to follow - and the thing is
that after
running all these things
we can save our configuration as just this
thing here
so we can save this configuration
in Emacs instead of this big thing above
let me compare the version without
magic to the version with very little
magic. This is the result of running the
configuration
with no magic, and this is the result of
running the configuration with very
little magic
and note that this configuration here it
ends with this sexp here, that is a bit
magic...
if we want to understand what this
magic thing does
this sexp runs these three blocks
here... so this is the expansion
of whatthis sexp does.
Ok, so if we look at our init file again
this sexp here - (ee-wconfig-run-magic) -
corresponds to all this stuff here.
And now that we have everything
configured
we can
run an exercise:
we can learn Org!
Let me make a pause on this
video, and i'm going to record the part 4
of the video in a few minutes.
Hi! I'm back.
In this part of the video I'm going to
explain how to
do the exercise, which is how to use eev
to learn Org.
Remember that here in the main
wconfig buffer the last part says
"Exercise: Learn Org!" and it has this
expression here...
if we execute this expression we get all
the instructions - I mean
what we're going to see now is the
current version of
these instructions - this is a work in
progress, I'm probably going to
rewrite some things...
anyway, here we have
some URLs...
this is the page about eev-wconfig,
and its last section
is this one: "Exercise: Learn Org!"
and it has some links here that I'm not
going to open... the important thing is
that
this link goes to a README that explains
what is the .zip file with the
videos
so
here is the README of the playlist,
and we can download the video from this
link here.
At this moment this link points to
Google Drive,
and the file is quite big - it's
1.7 gigabytes -
and if we click here
Google Drive says that it can't open
the file, but we can download it...
so...
well, you have to download the file, you
have to unzip it somewhere,
and then
you have to follow these
instructions here.
The important thing of this exercise
is that you need to learn how to create
shorter hyperlinks.
They are explained in this section of
the main tutorial - remember that
find-eev-quick-intro is the main tutorial -
and I think that these video links are
quite good, because they explain how
this function creates several other
functions...
anyway,
so: this link points to that section...
you have to download the .zip you
have to unpack it somewhere, and then you
have to create a link to that directory...
which means that you have to
edit the directory here to
the right directory
and this is probably going to be very
useful: Emacs has a mode called Dired...
a mode for editing directories
by treating them as text...
so here we are in Dired mode,
and we can navigate directories -
for example here we open a
subdirectory, if you click here we go
back to where we were...
this directory is empty. Anyway, you need
to learn how to use this to navigate to
the directory
in which you unpacked the videos,
and then the next part of the exercise
is to learn how to use M-h M-e,
which is find-extra-file-links,
that is explained here,
in this section of the tutorial...
and then you need to to use M-h M-e
to create links like these ones.
Let me show how to do that using
links that corresponds to the place in
which I opened the
the zip file in my machine.
This is the directory... sorry - if I
execute this the code-c-d it defines several
functions,
including the function
find-rainerkoeniggrep...
it also defines the function
find-rainerkoenigfile and if we
execute that function we go to this
directory here
which is the directory in which
I unpacked the
the zip file..
and if I type M-h M-e in
that directory I get a temporary buffer
like this one...
i need to
use a smaller font here because
some lines are very long...
here you have to type "rainerkoenig"
and execute this line here... it will
regenerate the buffer.
So pay attention to the "c"s
between curly brackets...
they become "rainerkoenig" -
and then you have to
copy these things here to your notes -
to here -
and if we did everything correctly then
we can execute this thing here... it will
define the function
find-rainerkoenigfile
which will open this directory, as I did
above...
and now we can
choose one of these videos here, for
example, the first one...
but we have to choose the video
file, not the subtitle file.
we have to type M-h M-e again
and now we have to choose a short name
for the video - I suggest
either using this or using an
abbreviation of the title... but let me
choose this.
Now I will
run this first line again. It will
regenerate this buffer, so the
"c"s between curly braces will become
this thing...
and now this block here
points to that video file.
We can test that by executing
this line -
it opens the video -
and if we execute this line here
it defines the function
find-E01S01video
and we can execute this function
find-E01S01video,
and it will be a short hyperlink to this
video.
And after doing that we can copy
the relevant lines
to our notes
the relevant lines are these ones -
actually this one is not necessary -
and now that we have this we have
two functions, the sexps
that define short hyperlinks...
this one here define a hyperlink to the
directory, and this one here defines
a hyperlink to the video...
and this is
quite similar to these examples here but
note that the examples have
bad paths that people will have to fix
somehow...
and that's it.
I don't know if this exercise is easy
enough, I think that it's a bit hard,
unfortunately... but if people can manage
to do this they can use
these things to
create an index of the videos that they
have watched...
and note that we can duplicate
this line and change
the time mark here to, 5:00, say...
oops, this video is shorter than that -
2:00 -
and we can use these things to
create an index of the video
with a short summary of what this
position means here... sorry for my lack of
imagination, but
suppose that
at the moment 2:00 of the video
there's "blah" happening.
so this sexp here opens the video at 2:00
and we can use that to mark the
positions of the video that we want to
watch again - especially the parts of
the video
in which Rainer Koenig explains
things that
we
will have to watch many times to
understand and to memorize the key
sequences.
Uh, yeah, so that's it. =)