Quick
index
main
eev
eepitch
maths
angg
blogme
dednat6
littlelangs
PURO
(C2,C3,C4,
 λ,ES,
 GA,MD,
 Caepro,
 textos,
 Chapa 1)

emacs
lua
(la)tex
maxima
git
agda
forth
squeak
icon
tcl
tikz
fvwm
debian
irc
contact

Eev-wconfig.el: a way without "magic" to configure eev on M$ Windows (subtitles)

The main page about this video is here.
Its index is here.
Its subtitles in Lua are here.
The rest of this page contains a conversion of the subtitles in Lua
to a slightly more readable format.


00:01 Hi! My name is Eduardo Ochs
00:03 and this video is about two things...
00:06 first, it's about a way to configure
00:09 eev - my Emacs package - on M$ Windows,
00:14 and second, it's about magic, in a sense
00:16 that I'm going to explain soon.
00:18 There's a lot of information about eev
00:21 in this link here, and a lot of
00:24 information about this video in this
00:26 other link.

00:29 Let me start by explaining what I
00:31 mean by configuring eev.
00:34 Installing Emacs and eev is very easy
00:37 even on Windows,
00:38 but for more advanced usage eev needs
00:41 to play videos, to display PDFs, and to
00:44 download files... and so
00:46 to make it all these things work we need
00:48 to: download some things, configure some
00:50 paths, and put some commands in the
00:54 init file of Emacs, that is this one here:
00:57 ~/.emacs.

01:01 Let me explain what is my target
01:03 audience in this video
01:05 It is mainly for beginners - I mean, for
01:09 people who use Windows but they are
01:12 not even programmers
01:16 they know how to use a few programs but
01:18 they don't even know how to
01:20 use a terminal... they know how to open a
01:22 terminal, but they don't know how to
01:24 use it
01:26 fluently or in a productive way.
01:29 And my second target audience is people
01:32 who have been using Emacs for
01:35 years and who are interested in
01:37 alternatives to the standard way of
01:40 configuring things in Emacs, which is
01:42 M-x customize.

01:49 Let me now explain what is eev.
01:51 One second...
02:00 This expression here opens the
02:05 slides of my presentation in the
02:07 EmacsConf 2019.
02:09 Let me show you some things there...
02:12 the title of my presentation was: How to
02:14 record executable notes with eev
02:17 and how to play them back,
02:19 and I started the presentation by
02:21 explaining that I
02:24 started using GNU/Linux and Emacs in 1995
02:29 and I started using Emacs in a certain way
02:32 and I was sure that everybody was
02:35 using Emacs in that way, and that way
02:37 became eev... so, in a sense eev appeared
02:40 by accident.

02:46 My current favorite slogan for explaining
02:49 what is eev is: eev lets you record
02:51 executable notes and lets you play them
02:53 back -
02:55 but for many people this doesn't make
02:57 much sense... let me just enlarge this
03:00 emoji - one second -
03:08 These people they can understand what
03:10 they [this slogan] means
03:11 when I show a demo... for example here is a
03:14 demo of
03:19 me sending commands to an interpreter...
03:22 to Maxima, which is a program -
03:25 sorry - in this demo I
03:28 sent some commands to a program
03:31 called Maxima, that is a program for
03:33 doing symbolic computations, graphics, and
03:36 other things,
03:37 and Maxima calls GNUPlot to draw some
03:40 graphics and...
03:47 so: here are my notes, I mean, the commands
03:51 that I send to Maxima... and I just had to
03:53 type f8 to make Emacs send this commands
03:56 to Maxima.
04:00 So: many people can understand how
04:03 I do these things, but very few people
04:05 use eev fluently enough to record
04:08 executable notes of what they do.

04:11 My older slogan
04:13 was even more puzzling...
04:16 I used to say that "eev is a tool for
04:19 automating almost everything", and also
04:22 very few people
04:24 are using eev for automating their tasks -
04:29 which is very sad.

04:35 Let me explain the connection with
04:37 Org Mode - one second -

04:42 Org mode can also be used to record
04:45 executable notes and to automate almost
04:48 everything,
04:50 the problem is that org mode is
04:52 intuitive to many people and...
04:55 to MANY people, let me stress this -
04:58 and eev is intuitive to very, very,
05:02 very few people, and Org Mode
05:05 is "simple" in one certain way... it's
05:09 a way that is related to what people
05:12 called "user-friendliness" nowadays -
05:15 and eev is simple in another, totally
05:17 different, way, related to Lisp...
05:20 people sometimes say that Lisp is very
05:22 simple, and eev is simple in a way that is
05:24 similar to how Lisp is simple...
05:28 and, by the way, I find Org Mode very
05:30 hard... for me eev is simple
05:32 in a practical sense, and...
05:37 well, I'm going to explain my problems
05:39 with Org later, with examples.

05:44 So: I decided to
05:48 use a trick to make eev more popular
05:51 and the trick is that people can use
05:53 eev to learn both Emacs and Org Mode -
05:56 so in this video eev is going to be
05:58 something secondary, that people
06:01 can use to learn both Emacs and Org Mode,
06:08 and I'm going to show how we can
06:11 use a certain series of videos
06:15 about Org Mode, and how to index
06:17 those videos to learn Org Mode.
06:23 That's it - I'm recording this video in
06:25 several parts,
06:27 so this is the end of the first part. I'm
06:30 going to record all the parts and then
06:32 glue everything together.

06:35 Let me now explain the basic
06:37 installation in more details. I'm
06:39 not going to show how to install Emacs,
06:42 but once you have Emacs installed you just
06:45 have to follow these steps here,
06:47 and these steps are explained in many
06:49 places... for example, this is the link to
06:54 the material about eev in my home page...

06:57 If you access my home page without this
07:00 #eev you get this thing here, and if you
07:04 access it with the #eev
07:07 you go to this section...
07:10 and note that
07:11 here it says: "This video
07:14 about installation, navigation, etc..."
07:18 let me open this page in another tab -

07:22 and here we have a list of tutorials,
07:25 and let me open the first tutorial in
07:28 another tab.

07:33 Well,
07:35 in Emacs we can access this tutorial by
07:37 running this, so this is the tutorial
07:42 inside Emacs...
07:44 and this is the tutorial in the browser.

07:47 Here we have some links,
07:50 some instructions, and these things here
07:52 are links to that video
07:55 the "installation and navigation",
07:59 "eevnav" - and these links here
08:04 point to positions in the video, but if I
08:06 access them by clicking on these links
08:10 it takes ages to open this video because
08:12 it has to open youtube...
08:16 then it shows an ad, that I have to skip,
08:22 then sometimes another ad, and then it
08:24 plays the video...
08:32 but if we have everything configured
08:35 we can execute these things here -
08:37 these elisp hyperlinks here -
08:41 and they play the video in mpv
08:44 in one second or two. So
08:47 that's it -

08:51 and we can also access the
08:53 list of videos by typing
08:55 M-x find-1stclassvideos...
09:04 we get this listing here, and the video
09:06 about installation and navigation
09:08 is this one.
09:12 And one very nice thing is that -
09:16 sorry -
09:19 when we access this video, here...
09:22 we have a lot of information about the
09:24 video...
09:26 and here we have a link to a kind of
09:29 index to the video...
09:30 so if I execute this
09:33 I go to an index, that is made
09:38 of a series of sexps like this
09:41 this, and I can execute
09:45 one of these sexps by just
09:48 typing M-e on it
09:53 but of course this is only going to work
09:55 if we have the video player configured.
09:59 Let me close everything...

10:06 And configuring the video player is part
10:09 of the "non-basic installation", or the
10:12 "configuration" of eev.
10:15 In principle what we have to do is to
10:17 install mpv - a certain video player -
10:21 then we have to configure the paths
10:24 to the browser, that by default
10:27 is google chrome, and to mpv,
10:29 and then we have to download
10:31 all these things here, that people
10:34 who use windows have never heard about...

10:37 And then we have to configure a few
10:39 other things, some easier to understand
10:41 and some very mysterious...

10:45 Anyway, let me show why we need wget,
10:49 that is a program that downloads things
10:51 from the internet.

10:55 Note that if I just execute this
10:58 I play a video with mpv -
11:02 but I'm going to run a hack here that
11:04 hides all the videos
11:06 that I have downloaded,
11:10 and now if I try to play this video
11:13 eev is going to say that...
11:16 it's going to show me
11:18 all these things here...

11:20 If I don't understand them I can
11:24 follow these things here
11:27 to go to the tutorials
11:29 to understand what this other stuff
11:32 means...

11:35 So, this part here downloads
11:39 some local copies of files from
11:42 the internet...
11:43 this is explained in this tutorial...
11:46 note that this link goes to the
11:49 section 1 of the tutorial, that is
11:51 called "Local copies of files from the
11:53 internet"...

11:55 and this is also explained
11:57 in another tutorial in a way
11:59 that is more specific to videos,
12:02 and we also have this section
12:05 here that explains
12:07 that some videos have subtitles -
12:11 here -
12:12 and explains the functions of eev
12:15 that downloads videos with subtitles.

12:20 This video in particular, which is a
12:22 video for my presentation at the
12:25 EmacsConf 2021, it has subtitles.
12:28 if I execute these things with - oops,
12:31 let me switch to smaller font - if I
12:34 execute these things with f8, then
12:39 the f8s create a shell buffer here...
12:43 a shell running inside Emacs,
12:44 inside an Emacs window...

12:48 and if I type f8 in these lines here
12:50 they are sent to the shell...
12:52 the shell executes these things here,
12:56 and this wget here downloads
13:00 a copy of this file from the internet
13:02 and puts it in this directory...
13:04 and this other wget downloads the
13:06 subtitles for the video...

13:09 so: the .mp4 is the video itself,
13:09 the .vtt is the subtitles of the video,
13:12 and these things here just register
13:14 in a certain log file
13:18 what we have downloaded.

13:20 And now that we have a local copy
13:22 of the video, this sexp here
13:26 opens this directory and goes to the line
13:30 in which this file here is...

13:36 this sexp here, that starts with
13:39 find-video,
13:40 plays the video...

13:42 it works as a test -
13:44 it plays it from the beginning - and note
13:47 that it plays the video with the
13:48 subtitles...

13:51 and this other sexp is equivalent
13:54 to the other one.

13:56 And these other two sexps are
14:00 higher-level ways of
14:03 playing the same video...

14:06 this thing here plays
14:08 the "first class video" whose
14:14 "code" is this "eev2021" -
14:17 so: same thing as before,
14:19 and this thing is the same thing
14:21 as this one,
14:23 but in an even shorter form.

14:27 And for people who haven't
14:32 configured the video player - mpv -
14:36 they can still access the video by using
14:39 this url here.

14:42 Let me do something
14:45 even more hackish...
14:48 if I change this timestamp here to
14:51 2:34 and I execute this sexp again
14:54 it regenerates this buffer,
14:57 and it changes these timestamps here
14:59 to 2:34.
15:05 That's it... and note that
15:07 this url here has also changed...
15:11 and if I open this url in the browser
15:13 it plays this video in the browser,
15:17 but it takes a long time...
15:22 in this case it didn't play an ad
15:24 before, but anyway, it takes ages -
15:29 but anyway, it works - so if you don't have
15:33 the mpv video player configured you can
15:35 still play the videos, you can still
15:37 start them from the right position,
15:40 but it's painful.

15:51 So note that I haven't explained
15:55 how to do these things...
15:58 the thing is that these three steps
16:02 here... they can be
16:05 replaced by something much more
16:07 user-friendlier...

16:12 they can be replaced by these two sexps
16:14 here - this one just returns the name
16:20 of a package that has been loaded,
16:23 and this one here
16:26 opens a temporary buffer
16:29 that shows this.

16:36 And this is what we're going to use
16:39 to configure eev on Windows
16:43 "without magic"...

16:45 remember that I'm going to explain
16:49 the term "without magic" soon...
16:51 but anyway,
16:53 "wconfig" is an abbreviation for
16:56 "configuration on Microsoft Windows",
16:58 or "Windows config"...

17:00 And I'm going to refer to this temporary
17:02 buffer here - note that its name is here -
17:06 as the "main wconfig buffer" -
17:10 and these instructions say that
17:13 to configure eev on Windows
17:16 we have to follow the instructions
17:19 in each of these five wconfigs here...

17:23 I'm going to refer to these ones as the
17:27 "sub-wconfigs".

17:30 The first one is this one, that
17:34 is used to configure the browser -
17:37 I mean, the path to the browser...
17:39 by default the path to the browser
17:41 in eev is the one that is used
17:44 in GNU/Linux, which is this one...

17:48 I'm supposing that the default browser
17:51 is Google Chrome just because
17:53 many people have it installed,
17:55 but this is easy to change...

18:01 and the thing is that
18:06 to set the right path to Google Chrome
18:10 we have to run something like this -
18:14 this setq here sets a variable,
18:20 and note that here we have a line that
18:22 says "See: blah blah blah",
18:24 and this sexp here opens
18:28 one of the tutorials of eev,
18:30 that is a tutorial on Emacs Lisp...

18:34 Note that this header says:
18:38 "This intro is a very quick introduction
18:41 to Emacs Lisp. Its intent is not to teach
18:44 people how to write Elisp code, only to
18:46 teach them how to read Elisp code"...
18:47 so it's very basic.

18:51 There's a video about it, but I'm not
18:52 going to discuss that video now.
18:57 And in the first sections of this tutorial
19:02 you learn what are S-expressions,
19:07 what are numbers, what are functions,
19:09 how to call functions,
19:12 some basic kinds of elisp objects...

19:17 these things also have
19:19 links to the Emacs Lisp manual, so if you
19:22 execute something like this you have
19:26 the standard documentation of what are
19:28 the data types of Lisp...

19:34 And in the section 5 we learn
19:39 how to use variables.
19:41 We learn that we can
19:43 set the variable a to 2 by running this -
19:49 this expression returns the new value of
19:52 the variable - 2...
19:54 now if we execute this
19:56 the value of a is 2,
20:00 and if we execute this
20:01 the value of a becomes 3...

20:03 so the result of this is 30,
20:07 and if we run this again we set the
20:09 value of a to 2 again, and
20:13 this sexp here returns
20:16 10 times a, which is in this case is 20...

20:20 and of course we can change this line,
20:22 we can execute the changed version,
20:25 and so on...

20:29 so we have to do something like this to
20:31 set the variable
20:33 ee-googlechrome-program.

20:35 This section says that this is the
20:37 current value of the variable
20:40 ee-googlechrome-program...

20:44 and we have to change it
20:47 to the the right path on Windows,
20:50 that is going to be something
20:52 like this, "C:/blah blah blah"...

20:56 note that we NEED to replace
20:59 all the backslashes by
21:01 forward slashes,

21:08 and if we configure the path correctly,
21:12 I mean, if we execute this sexp here
21:14 to set ee-googlechrome-program
21:16 to the new value and we execute this,
21:20 then Google Chrome is going to open
21:23 this url here.

21:25 Let me try...
21:28 it says that I have configured it
21:30 INcorrectly.
21:31 I don't have a
21:34 "googlechrome" in that address
21:36 because i'm on GNU/Linux, so for me
21:39 the right path is this one.

21:43 If the path is configured correctly -
21:47 now I'm using this value -
21:50 if execute this, then
21:53 Emacs calles Google Chrome, and Google
21:55 Chrome opens this this page here.

22:03 And after setting
22:06 the variable to the right path -
22:09 let's suppose that it is this one -
22:11 we have to update this page,
22:14 in the sense that is explained
22:15 in this section of a tutorial...

22:20 This page here is generated by
22:22 a template -
22:28 most of my pages that are generated by
22:30 templates follow a convention that says
22:32 that "the first line
22:34 regenerates the buffer" -

22:37 note that if I execute this then this
22:40 string here is going to be changed to
22:43 the current value of this variable -

22:46 note that I can also check the
22:49 value of this variable by executing this
22:51 expression here with M-e -

22:55 and if I regenerate the buffer
22:59 then this thing here is replaced
23:03 by the current value of this variable.

23:07 And now that
23:11 that the page has been...
23:13 sorry, that the the variable
23:16 is set correctly, and that
23:19 the page has been updated,





23:22 now I need to save my configuration...
23:25 and this is explained here -
23:28 so at this point people have to to read
23:31 the section of the Emacs manual that explains
23:36 what is the
23:38 init file of Emacs...
23:43 and then they have to
23:48 check some things here...
23:51 one of the most basic keys of ev is M-j
23:56 if I type M-j
23:57 without any numeric prefixes
24:00 it shows
24:02 this page here that has a
24:04 a user-friendly header and
24:08 a user-unfriendly rest
24:11 and
24:14 it has some links to
24:17 to the main tutorial
24:18 and some links to this
24:20 other tutorial, that is a fake tutorial
24:22 that is just an index of the main keys -
24:26 and here we have a list of the current
24:32 targets - I use many targets in my
24:36 default setting -
24:39 this target here says that
24:42 when we type M-j with the prefix 55
24:46 it opens the init file - here -
24:49 so let's test...
24:53 so this was a very long explanation of
24:56 why
24:57 M-5 M-5 M-j opens the
25:00 init file... this sexp here also opens
25:03 the init file -
25:06 here is my init file - it is huge, let me
25:09 open a blank page here to avoid
25:11 confusion -
25:14 and now the instructions say that we
25:17 have to copy the _updated_ version of the
25:19 block below -
25:21 the updated version in the sense that
25:25 we have to update this page,
25:28 and when we update this page
25:30 some
25:32 places like these
25:34 are updated to the
25:37 current value of this variable here.
25:44 So
25:45 this template produced this thing here
25:48 that we have to save in our init
25:51 file
25:54 so we use copy and paste -
26:00 in general beginners will have
26:03 things like this
26:05 at the top - this is called the
26:09 "menu bar" and this is called the
26:12 "tool bar" and then they can use these
26:14 things here to remember the keys for
26:16 copy and paste...
26:18 anyway let me disable them. So, I have
26:22 to copy this to my init file...
26:26 Done! Copied...
26:30 Now let's go back, we have just
26:32 finished the first
26:34 sub-wconfig
26:38 and we can either run this, or delete
26:42 this buffer to return to the main
26:45 wconfig
26:47 and
26:48 this is the list of
26:50 the things that we have to
26:51 configure...
26:53 now we can go to the second one, that
26:55 configures wget.
27:05 Let me just show something before
27:09 running
27:10 this subconfig here
27:14 it says
27:15 in the line 4 of this
27:19 main wconfig
27:21 we have this link here
27:23 that goes to the source code of
27:26 eev-wconfig
27:28 and it has this introduction here.
27:31 The introduction starts with this
27:34 explanation, that some parts of eev
27:36 call external programs,
27:38 and then it has lots of hyperlinks that
27:41 show the sections of the tutorials that
27:46 explain
27:48 how these external programs are used.
27:51 So, for example if I execute this I go to
27:54 a place in which firefox is mentioned,
27:57 if execute this I go to a place in which
28:00 Chrome is mentioned -
28:04 here - it says...
28:08 sorry, remember
28:10 that
28:14 I ran something that would
28:17 split the window in two and would run
28:19 another program in the second window...
28:22 here's an example in which we run
28:24 python in the second window.
28:30 In my previous example I was just
28:32 running a shell but we can also run
28:35 other targets.
28:42 And these two lines here discuss why
28:46 we need wget.
28:50 I've shown that very quickly before
28:55 when i showed how to download a video
28:57 and its subtitles but the full
28:59 explanation is here.
29:02 There's a wget here, here is a demo of
29:05 how it works...
29:08 And here we have a
29:12 link that explains the video links...
29:16 again, a link to
29:18 how subtitles work, and so on.
29:32 Ah, sorry!
29:33 I was missing something very important.
29:40 This should be obvious now...
29:42 I said that on *NIX installation
29:45 is very easy -
29:46 we just need to install these programs
29:48 and eev knows how to find them...
29:52 but on Windows things are much harder
29:54 first eev needs to know the full
29:57 paths of the
30:00 executables of these programs
30:02 we just saw how to configure
30:04 the full path of Google Chrome
30:08 and also wget and pdftotext
30:11 are hard to install - I'm going to show
30:13 how to install them very soon -
30:16 and also on Windows it's better to
30:18 use a browser to open pdfs instead of
30:21 using a dedicated pdf viewer
30:25 and also - and this is very important - I
30:27 don't have access to a machine with
30:29 Windows, and I have very little access to
30:32 people who use Windows and who can
30:34 be convinced to test this,
30:36 so I'm testing this on a machine with
30:39 GNU/Linux, with some hacks to
30:42 try to make it behave like a Windows
30:44 machine...
30:48 and this is one of the most important
30:50 parts - I said that I was going to explain
30:54 the term "magic"
30:58 eev-wconfig is an attempt to solve the
31:01 problem of how to install these things
31:03 on Windows both "without magic" and
31:06 "with very little magic"
31:09 in this sense. Remember this slogan:
31:14 "any sufficiently advanced technology is
31:17 indistinguishable from magic"
31:21 and here in this video
31:23 I am going to use the term "magic" as a
31:26 shorthand for a
31:28 "sufficiently advanced technology" -
31:32 that is, something that is complex and
31:35 non-obvious, and
31:37 "that is
31:39 indistinguishable from magic"
31:41 in the sense of being almost impossible
31:43 to understand.
31:45 And i'm also going to use the term
31:48 "black box"
31:49 as a near-synonym for "magic"
31:53 and sometimes the term "black box" is more
31:55 convenient -
31:56 even though it is longer: it has more
31:58 letters - because when I use the term
32:02 "black box" it invites us to use the
32:05 expressions like "opening the black box".
32:07 I'm going to use that expression a lot.
32:11 I mentioned Org in the introduction
32:15 and I said that I find Org very
32:18 difficult -
32:19 but i'm a very
32:22 atypical person...
32:25 and I recorded a video explaining this.
32:29 People can access this video either
32:32 in this page, or
32:36 in this thing here: the index of the
32:39 video is here, so I can just, for example,
32:42 execute to sexp and play the video
32:45 from this position - 3:35 -
32:51 Oops! The video is not here -
32:55 I don't have a local copy of it, so I need
32:57 to run this thing here to
33:00 download the local copy.
33:05 It was downloaded -
33:07 it doesn't have subtitles, it seems...
33:17 and if execute this,
33:20 now mpv plays the video from this
33:22 position.
33:25 Anyway, let me go back.
33:27 So: in this video I explained why I have
33:30 always found Org so hard to learn...
33:34 and the thing is that many things in Org
33:36 are implemented in ways that i
33:39 don't understand,
33:40 and practically every time that i try to
33:42 learn more more features of org
33:45 I get stuck, because I start to ask
33:47 questions like:
33:49 hey, how is this implemented?
33:52 And I get stuck trying to trying to
33:54 answer these questions, that are not
33:57 typical user questions...
34:01 and I get stuck on that instead of
34:05 simply learning how to use the features
34:07 of Org as a user.
34:09 So: I find
34:11 Org confusing because my brain is wired
34:14 in a weird way...
34:16 and, in the language of black boxes what
34:19 happens is that when I try to learn Org...
34:24 I try to learn a new feature, I see lots
34:27 of black boxes,
34:29 I try to open these black boxes, and I
34:31 fail miserably... and I get frustrated and
34:34 exhausted I, do not learn the feature and
34:37 I postpone learning the feature
34:39 to another day, and in the other day I try
34:41 it again, I see other black boxes, I try
34:44 to understand them again, and blah blah,
34:46 rinse and repeat...
34:49 and I also have exactly the same
34:51 relationship with M-x customized, that
34:54 the standard way in Emacs to configure
34:58 certain things
35:00 and to customize certain things.
35:03 Let me show how customize works
35:08 We can either type M-x customize or
35:12 run this sexp here, that
35:14 simulates what happens when we type
35:17 M-x customize.
35:19 Customize creates a temporary buffer
35:21 like this one...
35:23 it has this mysterious field here, it
35:26 has parts that are not editable - for
35:28 example, if I type a letter here - oops
35:34 if I type a letter here
35:37 it says "you can't edit this part of the
35:39 Custom buffer"... it has buttons,
35:42 it has different fonts, different colors,
35:44 it has links, and so on...
35:49 and if i follow these links in
35:51 the right way I
35:53 can get to places like this one,
35:57 which is a sub menu with sub options,
36:02 I can get to a place like this one,
36:08 that offers many things
36:13 that can be configured, each one with an
36:16 explanation...
36:23 I can execute things like this one, that
36:26 opens this page, in which I can customize
36:28 a variable...
36:33 and things like this in which I can
36:35 customize a face to change its color, to
36:38 change its font... and so on -
36:42 and for me all these things - all these
36:44 buttons, this rectangle here, in which I
36:47 can put text
36:51 all these things are...
36:52 magic - and they are black boxes that I
36:55 find very hard to open.
37:00 And over the years I have experimented
37:02 with several alternatives to
37:04 customize that "use less magic"...
37:10 I've documented some of my attempts in
37:13 this page here,
37:16 and
37:18 this thing that I'm presenting now -
37:20 eev-wconfig.el - this is
37:23 the next step: it uses all the ideas in
37:26 this page, and a few other new ideas.
37:32 And eev-wconfig can be used both
37:33 "with no magic",
37:38 which is easier to explain, and we're
37:40 going to see that first,
37:42 and with "some magic", or "with
37:44 very little magic"
37:46 and both ways create temporary buffers
37:48 that have parts that perform
37:50 configuration steps
37:52 and parts
37:54 that "open the black boxes".
37:56 How? Because they contain elisp hyperlinks
37:59 that go to the documentation, that
38:01 perform tests, that show the values of
38:04 variables, and so on.
38:11 The documentation about usage is
38:13 incomplete at the moment, so let me
38:15 return.
38:17 We just saw that these
38:22 things have lots of links in comments
38:25 like this one, that goes
38:28 to a tutorial, and some
38:31 other links go to manuals of Emacs...
38:36 it has some tests in comments - remember
38:39 remember that we ran this and it tried
38:41 to open Google Chrome
38:43 to visit this url in Google Chrome,
38:48 and it failed, because
38:50 the path for Google Chrome is configured
38:52 incorrectly.
39:00 This is an example of a link that goes to one
39:02 of the manuals of Emacs,
39:09 this thing here opens the init file, and
39:12 so on...
39:14 so: we just finished the first sub-wconfig
39:20 and now we need to run the second
39:22 sub-wconfig
39:27 and this wconfig
39:30 can only be run after configuring the
39:33 browser - otherwise it's going to behave
39:35 in weird ways...
39:37 and the first step here is to download
39:40 wget.exe...
39:43 and note that it says: run each of the
39:46 uncommented texts below with M-e
39:50 the idea is that
39:52 this buffer here is
39:56 colored as Lisp - everything that
40:00 Emacs thinks that are elisp comments
40:03 is in brown, and everything that is
40:06 not comments is in other colors...
40:10 so this is an uncommented part and this
40:13 is a commented part.
40:21 Note that here we have some sexps that are
40:24 longer than one line. For example, this
40:26 one takes two lines, and this one also
40:29 takes two lines...
40:31 and we need to run each one of them.
40:37 This one just returns the name of a
40:40 package that has been loaded,
40:42 this one just returns the name
40:45 of a function that has been defined,
40:49 and some of these ones return
40:54 some trivial value that just says that
40:56 everything went right...
40:58 for example this one returns nil, this
41:01 one returns nil, again and this one is a
41:06 bit more problematic because it runs
41:08 something that may take a long time like
41:11 10 seconds, 20 seconds, i don't know...
41:14 Let me try.
41:17 Note the messages here now we have to
41:20 wait patiently... Ta-da.
41:23 It has downloaded wget.exe and saved it
41:27 in this file here
41:31 and now that wget.exe has been
41:34 downloaded we can use it to download
41:37 some other files...
41:39 but remember that I'm not on windows, so
41:42 I have to use some some
41:45 mysterious tricks to
41:47 make these things behave somewhat like
41:49 Windows.
41:51 Let me execute this string... so, please
41:54 don't pay attention to what i'm doing
41:56 now... this is like
42:01 "you are not expected to understand this"
42:09 anyway,
42:17 um -
42:19 sorry -
42:26 oops -
42:39 oh my god i forgot the details, sorry...
42:51 that's it -
42:57 Ah, yeah, sorry - now I remember:
43:01 I had to replace the real wget.exe,
43:03 that takes about 5MB, by a
43:05 fake wget.exe that calls the
43:09 wget that runs on GNU/Linux
43:13 so, sorry for the delay, let me go back to
43:16 the to the configuration of wget...
43:22 now that I have wget working
43:26 I can execute this
43:29 block here with f8...
43:33 Note the instructions here -
43:35 this thing points to the
43:37 the main tutorial of eev, in the part that
43:40 it explains how to run
43:43 shell-like programs - programs like the
43:46 shell, programs like Python, etc, with f8s...
43:50 so we need to run these things with f8.
43:53 The first commands are very quick...
44:04 and now I call wget to download
44:10 many small files...
44:22 and this block here contains some tests -
44:24 some very basic tests that just
44:27 call these programs to
44:30 check that they are executable
44:33 and to check that they can perform very
44:36 basic functions, like just displaying the
44:38 help.
44:40 This test here
44:42 works -
44:43 it shows the help of wget - here -
44:50 this one does not work because this file
44:53 is a file for windows... I have to run my
44:56 hacks to to make it executable on
44:59 GNU/Linux. so,
45:02 again, please don't pay attention to what
45:05 i'm going to do...
45:15 now these tests
45:17 work. So if you are on Windows and if
45:19 everything worked
45:21 this thing here should show the help of
45:25 pdftotext...
45:27 and these other lines here should show
45:30 the version of these
45:33 programs here
45:36 so if I execute this I get a message
45:39 that is just one line long
45:41 same here, same here -
45:45 and now I need to run this other block
45:48 here, that downloads a pdf file
45:50 that is going
45:52 to be used in some tests, and a very short
45:56 mp4 file... a very short video that is
45:58 going to be used in other tests.
46:01 so...
46:03 wget, wget again...

46:09 and now this section 3, here
46:14 has tests for one of the functions of
46:17 the functions of eev that call wget
46:22 we need to run this sexp here to
46:24 configure
46:25 the path that is used by this function
46:28 here
46:29 and now we run we need to run the tests
46:32 in the second sexp below... so this is a
46:36 sexp that is here just for the sake of
46:38 completeness, because it points to the
46:40 beginning of a section,
46:42 and this sexp here points to
46:48 a series of tests in that section, and we
46:51 need to run these tests to to check
46:54 that they really work.
46:58 Each of these `find-wget's here call
47:01 wgets to download the file from the
47:03 internet and it shows the the contents
47:06 of this file in a temporary buffer. Let's
47:08 try here...
47:12 note that the name of this buffer is
47:14 wget blah blah blah blah
47:17 wget, colon, space, the url...
47:20 with asterisks
47:24 in the beginning and the end
47:28 this is similar, but it also searches for
47:30 the first occurrence of this string in
47:33 that file...
47:34 that's it -
47:36 this one is similar, but it searches
47:40 for the first occurrence of this
47:43 in that file -
47:47 it works -
47:49 this test here tries to to download a
47:52 file that does not exist,
47:56 so it says that "wget can't download..."
48:00 and these two tests are similar
48:02 to the other
48:03 ones above but they tell Emacs
48:06 that this thing here is elisp code and
48:09 should be colorized...
48:12 the technical term is "fontified" -
48:15 fontified as Lisp, so Emacs colors these
48:18 things as comments,
48:22 these things as code, and so on...
48:29 so, that's it - all these tests work -
48:32 note that all these tests are hidden in
48:35 this sexp here -
48:39 and now
48:40 this link here explains the idea of
48:43 anchors that I explained very briefly in
48:45 the tests above...
48:47 so this section of the main tutorial
48:51 explains what are anchors
48:58 note that
49:00 we probably don't have a local copy
49:03 of this video here
49:06 so eev offers to download the local
49:09 copy...
49:10 but if we haven't configured
49:13 the mpv media player we can use this url
49:18 here to play the video starting from the
49:20 right position.

49:26 Now in section 4 we
49:28 configure the
49:30 pdf viewer that eev is going to use
49:33 to make eev use the browser as our
49:37 preferred pdf viewer
49:39 and the configuration is just this line
49:41 here, the tests are these...
49:43 let me go straight to
49:46 the one that is most interesting... it's
49:48 going to open this local file here, and
49:51 it's going to go to page 3 in that
49:53 local file - oops,
49:56 sorry I need to reconfigure one thing
49:59 again... let me cheat -
50:10 so please don't pay attention to what
50:12 i'm doing now,
50:16 please ignore me - um - oh sorry -
50:36 that's it. It opened the local file and
50:39 it opened it at page 3 - note
50:43 that there are two other pages here
50:46 and it's opening it at page 3...
50:49 so it's working.
50:53 People who want the technical details
50:55 can run these three links here to
50:59 to get more details... some of them are
51:01 readable, and some of them are very
51:03 technical, but anyway
51:05 the explanations are there, and I'm
51:06 supposing that people
51:08 can read the more readable parts and can
51:10 ignore the parts that are too technical.
51:17 And we also need to tell
51:20 eev to use this program here to
51:23 to view pdfs as text...
51:26 and this sexp here will open the pdf,
51:29 convert it to text and go to page 3...
51:33 that's it.
51:35 This is page 2, and this is page 1, and
51:37 this is a formfeed that separates the
51:39 pages...
51:42 and i'm going to skip this test.
51:47 And now that we have configured all
51:50 these things we have to save these
51:51 configurations in our init file...
51:54 and note that these configurations were
51:56 scattered here -
51:58 they were interspersed with tests.
52:05 We have this setq, this defalias,
52:09 and this other setq here,
52:14 and in this section here we have these
52:17 three lines
52:18 in the same place, and also a first line
52:21 that is a link to this sub-wconfig
52:25 here, the wconfig that configures
52:29 wget. The instructions here say that
52:33 this is similar to something that we did
52:35 before to save some configurations to
52:38 the init file...
52:40 let me go to my init file -
52:44 I've been using it for a long time, ok?
52:45 so I remember that the keys to go to
52:48 the init file are M-5 M-5 M-j...
52:52 and now:
52:55 paste! So this is the result of
53:01 running these configurations here...
53:04 and note that this first line
53:06 the line with the "See:"...
53:10 go to this sub-wconfig, so we can
53:16 run all these configurations and then
53:18 forget what we did
53:20 and then we can open our init file again
53:23 and if we want to understand what we did
53:26 we just need to run
53:28 this sexp or this sexp
53:30 and we go back to the
53:33 temporary buffers that were used to
53:36 configure all these things.

53:42 So, now i've explained
53:46 most of the basic ideas of the
53:48 configuration... I can go a bit faster now.
53:51 Now we have to configure some things
53:53 for the shell...
53:55 the thing is that on Windows it's
53:58 better to use Eshell, that is a shell
54:00 that is
54:03 written in lisp, than to use the default
54:05 shell from Windows...
54:09 and we need to run these things,
54:14 and we need to run
54:16 these things here...
54:19 and note that
54:20 this line here says that this block
54:22 here only needs to be run once -
54:29 and the technical details are here - I'm
54:31 not going to discuss them now -
54:34 and here is a test...
54:45 the important part is that
54:48 these configs here define
54:51 wget - note that it's not "wget.exe",
54:54 it's simply "wget"...
54:56 it defines wget as an alias that
54:59 points to the wget.exe there that
55:01 I have downloaded
55:04 and we also need to
55:07 run these very technical things here
55:14 and the explanation is that...
55:23 remember that
55:29 I've shown how to run
55:33 shells in Emacs...
55:36 for example this shell here - and I've
55:38 shown how we can
55:40 use eepitch to control other targets, and
55:42 the example that I gave was to
55:45 to use it to run Python, in this
55:48 window here...
55:53 and the thing is that
55:55 I don't know how to install Python on
55:57 windows - at this moment I don't
55:59 have anyone who can test it for me, I
56:02 don't know if it works...
56:05 so I did my basic tests with Lua, that I
56:09 can install by just downloading two
56:11 files and we did that when we were
56:14 downloading many files with wget.
56:19 Oh no, sorry -
56:21 I'm talking about something that is only
56:23 going to appear in another sub-wconfig -
56:26 sorry -
56:28 anyway, here the test just checks that
56:31 both Eshell and the normal shell
56:36 run the same thing here... they both run
56:39 Eshell...
56:41 we need to run this thing here too...
56:45 the explanation is here - I'm not going to
56:47 open the tutorial with the
56:49 explanation -
56:52 now there are some tests that we can do,
56:54 but i'm not going to run these tests now...
56:57 and then we have to save these things
56:59 here in our init file...
57:04 Again, there's a line that says
57:07 that this is similar to
57:09 these instructions here, so the detailed
57:12 instructions are
57:13 in our first sub-wconfig...
57:20 and we need to copy this thing,
57:23 and then go to our init file,
57:30 and add these things to our init file.

57:33 Done. Let me go back to the main wconfig.
57:41 Note that we have completed this one,
57:43 this one, and this one...
57:46 and this thing here just
57:49 checks that that we can run Lua from Emacs
57:53 it's what I was saying before about
57:56 running Python or running Lua...
58:01 so this is a basic test that calls Lua
58:04 with its full path.
58:11 Remember that I had to to run some hacks
58:14 here to make things behave as as if we
58:16 were on Windows...
58:18 so I'm not sure if all these things
58:21 are going to run on Windows or not -
58:24 and then we have to run these sexps
58:27 here, and then run the test that is below...
58:31 let me run this, and this, and this, and
58:34 this... and then the test is here -
58:39 now I have Lua running inside an
58:44 Emacs window,
58:46 and it was not invoked from a shell, it
58:48 was invoked directly.
58:52 Everything works,
58:55 and now we need to save these things in
58:57 our init file.
59:00 So, again: copy, go to the init file,
59:07 paste.

59:09 Let me go back to the main wconfig...
59:17 and now we need to configure mpv... the mpv
59:21 media player
59:26 this is similar to how we configured the
59:28 browser. We have to
59:34 configure the paths to mpv -
59:38 I mean people have to install mpv and
59:40 then configure the path to mpv -
59:45 I'm not going to repeat it...
59:47 it also has some tests...
59:50 and after configuring this thing here we
59:54 go to our init file and we save this
59:57 thing to our init file...
1:00:00 and that's it.
1:00:02 If we've done that
1:00:05 we will have five blocks here, each one
1:00:07 corresponding to one of the
1:00:09 the sub-wconfigs, and
1:00:13 each one contains some configurations
1:00:17 or customizations,
1:00:19 and also lots of links to help -
1:00:23 I mean,
1:00:24 we can treat these links here as
1:00:26 links that open the black boxes and
1:00:29 explain what these things are
1:00:32 and all the commands are very explicit
1:00:35 here... if we want to understand what
1:00:37 `require' does,
1:00:41 the main tutorial of
1:00:43 of eev - this one
1:00:46 explains in section... 4, if I remember
1:00:49 correctly...
1:00:57 that's it.
1:01:01 Suppose that we want information
1:01:03 about an Emacs function.
1:01:10 This video here explains that in details,
1:01:14 and explains also the rationale
1:01:18 behind all these things...
1:01:21 the standard way to get help about the
1:01:23 function is to type C-h f...
1:01:28 Emacs takes the name of the function from
1:01:31 the the position
1:01:32 under the cursor - the "point" - we can just
1:01:35 press enter here and get help...
1:01:41 this help contains too much magic
1:01:43 for example this thing here is a
1:01:45 hyperlink
1:01:46 and it's for me it's a black box that I
1:01:49 do not know how to open
1:01:51 i know how to type enter here
1:01:53 to go to the source code,
1:01:56 but I don't know what exactly
1:01:59 Emacs runs when it does that... I do not
1:02:01 know what is the Lisp code corresponding
1:02:04 to typing Enter here -
1:02:07 and I also don't know why these things
1:02:10 are in italics and other things are not...
1:02:14 so, many years ago
1:02:16 I started to experiment
1:02:18 with the way "without magic"
1:02:21 of doing something similar...
1:02:23 and my way is by typing M-h M-f
1:02:28 and then Enter
1:02:29 and this thing here contains hyperlinks
1:02:34 that are
1:02:36 not black boxes, and that are pure text -
1:02:39 I can copy these things to my notes...
1:02:43 and this one here goes to that
1:02:44 description, this one here goes to the
1:02:47 source code of require...
1:02:50 this one here goes to the manual,
1:02:55 and so on...
1:03:00 so this is the configuration without
1:03:02 magic.

1:03:06 I promised that I was also going to
1:03:09 show the configuration with just
1:03:12 a bit of magic.
1:03:16 If we type find-wconfig-links...
1:03:21 here, if you run this
1:03:25 it says that if we want to configure eev
1:03:28 on windows with _some_ magic we can follow
1:03:30 the instructions here...
1:03:34 and here we have something very similar,
1:03:36 but with fewer tests,
1:03:40 and less documentation...
1:03:45 and we just need to
1:03:49 configure these things here,
1:03:51 to follow the instructions here - that I'm
1:03:53 not going to follow - and the thing is
1:03:55 that after
1:03:58 running all these things
1:04:01 we can save our configuration as just this
1:04:06 thing here
1:04:07 so we can save this configuration
1:04:09 in Emacs instead of this big thing above
1:04:14 let me compare the version without
1:04:17 magic to the version with very little
1:04:19 magic. This is the result of running the
1:04:21 configuration
1:04:24 with no magic, and this is the result of
1:04:29 running the configuration with very
1:04:30 little magic
1:04:33 and note that this configuration here it
1:04:36 ends with this sexp here, that is a bit
1:04:38 magic...
1:04:40 if we want to understand what this
1:04:43 magic thing does
1:04:46 this sexp runs these three blocks
1:04:53 here... so this is the expansion
1:04:56 of whatthis sexp does.
1:05:03 Ok, so if we look at our init file again
1:05:13 this sexp here - (ee-wconfig-run-magic) -
1:05:17 corresponds to all this stuff here.

1:05:29 And now that we have everything
1:05:31 configured
1:05:33 we can
1:05:35 run an exercise:
1:05:36 we can learn Org!
1:05:40 Let me make a pause on this
1:05:42 video, and i'm going to record the part 4
1:05:45 of the video in a few minutes.

1:05:51 Hi! I'm back.
1:05:54 In this part of the video I'm going to
1:05:57 explain how to
1:06:00 do the exercise, which is how to use eev
1:06:03 to learn Org.
1:06:06 Remember that here in the main
1:06:09 wconfig buffer the last part says
1:06:13 "Exercise: Learn Org!" and it has this
1:06:15 expression here...
1:06:16 if we execute this expression we get all
1:06:19 the instructions - I mean
1:06:23 what we're going to see now is the
1:06:24 current version of
1:06:26 these instructions - this is a work in
1:06:28 progress, I'm probably going to
1:06:30 rewrite some things...
1:06:34 anyway, here we have
1:06:36 some URLs...
1:06:38 this is the page about eev-wconfig,
1:06:42 and its last section
1:06:44 is this one: "Exercise: Learn Org!"
1:06:48 and it has some links here that I'm not
1:06:51 going to open... the important thing is
1:06:53 that
1:06:55 this link goes to a README that explains
1:06:58 what is the .zip file with the
1:07:01 videos
1:07:03 so
1:07:04 here is the README of the playlist,
1:07:09 and we can download the video from this
1:07:11 link here.
1:07:13 At this moment this link points to
1:07:17 Google Drive,
1:07:18 and the file is quite big - it's
1:07:20 1.7 gigabytes -
1:07:24 and if we click here
1:07:29 Google Drive says that it can't open
1:07:31 the file, but we can download it...
1:07:34 so...
1:07:38 well, you have to download the file, you
1:07:40 have to unzip it somewhere,
1:07:42 and then
1:07:44 you have to follow these
1:07:45 instructions here.

1:07:48 The important thing of this exercise
1:07:50 is that you need to learn how to create
1:07:52 shorter hyperlinks.
1:07:55 They are explained in this section of
1:07:57 the main tutorial - remember that
1:08:00 find-eev-quick-intro is the main tutorial -
1:08:03 and I think that these video links are
1:08:06 quite good, because they explain how
1:08:11 this function creates several other
1:08:13 functions...
1:08:15 anyway,
1:08:21 so: this link points to that section...
1:08:27 you have to download the .zip you
1:08:30 have to unpack it somewhere, and then you
1:08:33 have to create a link to that directory...
1:08:35 which means that you have to
1:08:38 edit the directory here to
1:08:41 the right directory
1:08:44 and this is probably going to be very
1:08:47 useful: Emacs has a mode called Dired...
1:09:01 a mode for editing directories
1:09:03 by treating them as text...
1:09:08 so here we are in Dired mode,
1:09:11 and we can navigate directories -
1:09:14 for example here we open a
1:09:16 subdirectory, if you click here we go
1:09:20 back to where we were...
1:09:26 this directory is empty. Anyway, you need
1:09:30 to learn how to use this to navigate to
1:09:33 the directory
1:09:34 in which you unpacked the videos,

1:09:38 and then the next part of the exercise
1:09:40 is to learn how to use M-h M-e,
1:09:47 which is find-extra-file-links,
1:09:50 that is explained here,
1:09:52 in this section of the tutorial...
1:09:55 and then you need to to use M-h M-e
1:10:01 to create links like these ones.
1:10:04 Let me show how to do that using
1:10:07 links that corresponds to the place in
1:10:09 which I opened the
1:10:11 the zip file in my machine.
1:10:18 This is the directory... sorry - if I
1:10:21 execute this the code-c-d it defines several
1:10:25 functions,
1:10:27 including the function
1:10:30 find-rainerkoeniggrep...
1:10:35 it also defines the function
1:10:37 find-rainerkoenigfile and if we
1:10:40 execute that function we go to this
1:10:43 directory here
1:10:46 which is the directory in which
1:10:50 I unpacked the
1:10:53 the zip file..
1:10:57 and if I type M-h M-e in
1:11:00 that directory I get a temporary buffer
1:11:03 like this one...
1:11:04 i need to
1:11:06 use a smaller font here because
1:11:09 some lines are very long...
1:11:12 here you have to type "rainerkoenig"
1:11:17 and execute this line here... it will
1:11:20 regenerate the buffer.
1:11:22 So pay attention to the "c"s
1:11:25 between curly brackets...
1:11:27 they become "rainerkoenig" -
1:11:32 and then you have to
1:11:35 copy these things here to your notes -
1:11:42 to here -
1:11:48 and if we did everything correctly then
1:11:51 we can execute this thing here... it will
1:11:54 define the function
1:11:57 find-rainerkoenigfile
1:11:59 which will open this directory, as I did
1:12:01 above...
1:12:03 and now we can
1:12:05 choose one of these videos here, for
1:12:07 example, the first one...
1:12:10 but we have to choose the video
1:12:13 file, not the subtitle file.
1:12:17 we have to type M-h M-e again
1:12:24 and now we have to choose a short name
1:12:26 for the video - I suggest
1:12:28 either using this or using an
1:12:32 abbreviation of the title... but let me
1:12:34 choose this.

1:12:38 Now I will
1:12:40 run this first line again. It will
1:12:42 regenerate this buffer, so the
1:12:45 "c"s between curly braces will become
1:12:48 this thing...
1:12:51 and now this block here
1:12:54 points to that video file.
1:12:57 We can test that by executing
1:13:00 this line -
1:13:03 it opens the video -
1:13:06 and if we execute this line here
1:13:10 it defines the function
1:13:12 find-E01S01video
1:13:17 and we can execute this function
1:13:20 find-E01S01video,
1:13:23 and it will be a short hyperlink to this
1:13:25 video.
1:13:27 And after doing that we can copy
1:13:31 the relevant lines
1:13:33 to our notes
1:13:36 the relevant lines are these ones -
1:13:38 actually this one is not necessary -
1:13:43 and now that we have this we have
1:13:47 two functions, the sexps
1:13:51 that define short hyperlinks...
1:13:54 this one here define a hyperlink to the
1:13:56 directory, and this one here defines
1:13:58 a hyperlink to the video...
1:14:01 and this is
1:14:03 quite similar to these examples here but
1:14:07 note that the examples have
1:14:10 bad paths that people will have to fix
1:14:13 somehow...
1:14:17 and that's it.

1:14:19 I don't know if this exercise is easy
1:14:22 enough, I think that it's a bit hard,
1:14:24 unfortunately... but if people can manage
1:14:26 to do this they can use
1:14:29 these things to
1:14:32 create an index of the videos that they
1:14:34 have watched...
1:14:36 and note that we can duplicate
1:14:39 this line and change
1:14:41 the time mark here to, 5:00, say...
1:14:46 oops, this video is shorter than that -
1:14:50 2:00 -
1:14:53 and we can use these things to
1:14:56 create an index of the video
1:15:01 with a short summary of what this
1:15:06 position means here... sorry for my lack of
1:15:08 imagination, but
1:15:10 suppose that
1:15:12 at the moment 2:00 of the video
1:15:14 there's "blah" happening.
1:15:16 so this sexp here opens the video at 2:00
1:15:22 and we can use that to mark the
1:15:24 positions of the video that we want to
1:15:26 watch again - especially the parts of
1:15:29 the video
1:15:31 in which Rainer Koenig explains
1:15:34 things that
1:15:36 we
1:15:37 will have to watch many times to
1:15:38 understand and to memorize the key
1:15:41 sequences.
1:15:43 Uh, yeah, so that's it. =)