| 
     | 
  Eev @ EmacsConf2019 - subtitles for the video
See the page Eev @ EmacsConf2019. 
This page is a bit messy at this moment 😕...
 
 right now it contains two versions of the subtitles of the video -
 
 first a version that I made by hand with very primitive tools,
 
 then one that was generated from the subtitles in Lua
     (using less primitive tools).
 
The transcription of the first 13 minutes was done by Viking667.
 
 
0:00 Hello. The name of this talk is 
 
0:03 "How to record executable notes with Eev and how to play them back." 
 
0:07 I'm Eduardo Ochs - this person here - the author of Eev, 
 
0:11 and this is Selana Ochs, my main contributor at the moment. 
 
 
0:16 Let me start by explaining the prehistory of Eev.
 
0:19 Eev appeared by accident.
 
0:21 I was fascinated by programming and from what I knew
 
0:26 UNIX seemed to be the right thing...
 
0:28 In 1995 I bought a computer that could run GNU Linux, 
 
0:31 and a Linux CD.
 
0:32 I was studying mathematics at the University -
 
0:35 not computer science - and I was able to learn at the university
 
0:40 a tiny bit of UNIX and Lisp.
 
0:45 But my social skills were very bad.
 
0:46 I couldn't socialize properly with
 
0:48 the people there who really knew Unix.
 
0:52 They kept saying to me that
 
0:54 everybody uses VI,
 
0:55 but my memory was very bad -
 
0:56 as bad as my social skills -
 
0:58 and I typed slowly and with lots of mistakes
 
1:00 so at one point I decided to give up
 
1:03 learning VI and tried Emacs
 
1:05 and I found it <strong>mind-blowing</strong>.
 
 
1:10 I was taking notes about
 
1:10 everything that I was learning 
 
1:14 and my notes started to have
 
1:16 lots of elisp hyperlinks like these.
 
1:19 When we execute this: (find-file "/usr/share/emacs/19.24/lisp")
 
1:21 it opens a certain directory
 
1:22 with lots of interesting files in it
 
1:25 and when we execute this: (find-file "/usr/share/emacs/19.24/lisp/files.el")
 
1:27 it opens a specific file in the directory.
 
1:30 So I was using hundreds of hyperlinks like this
 
1:35 to take notes of everything that I found interesting -
 
1:39 it was easy to follow these expressions as hyperlinks.
 
1:43 In the beginning I used the standard function find-file
 
1:47 and then I created a variant of it called find-fline
 
1:50 that accepted extra arguments.
 
1:52 In the beginning it only supported a line number, like this,
 
1:55 that would open this file and go to the line 423
 
2:01 and then I made it accept also strings to search for -
 
2:06 so this variant here would open this file
 
2:09 and search for the first occurrence of this string here
 
2:13 and I also invented shorter hyperlinks, like these three here,
 
2:19 in which I do not need to specify the directory, like this,
 
2:25 because this directory is somehow embedded in this "code" here: "e". 
 
2:31 So: "e" means the directory with the Lisp files in Emacs.
 
 
2:36 I also wrote a very primitive way
 
2:38 to send the current region to a shell.
 
2:42 When I typed "M-x eev" - which means "emacs-execute-verbosely" -
 
2:48 this command wrote the region into a certain temporary file,
 
2:53 and if I went to the shell and I typed 'ee' 
 
2:56 it would run the commands in this temporary file to execute them.
 
3:00 These are some technical details that I do not want to discuss now.
 
3:04 And in a few months using that I had created several other kinds
 
3:10 of elisp hyperlinks, all of them also supporting these
 
3:13 extra arguments that indicated - usually - strings to search for,
 
3:18 but also sometimes I could use that to point to a certain line number.
 
3:24 I called these extra arguments "pos-spec-lists",
 
3:28 and here are some examples. These hyperlinks here
 
3:32 would open the man page of GNU awk - and go to the specific sections in it.
 
3:40 These hyperlinks open the info manual of "make" and go to
 
3:47 certain nodes in this manual,
 
3:50 and in some cases it also looks for these strings in these nodes.
 
3:57 And these hyperlinks here - they run certain commands in the shell
 
4:02 and then display its output.
 
 
4:09 The Elisp hyperlinks that I was using
 
4:11 could be always be put in comments in scripting languages.
 
4:16 They were always the sexp at the end of the line - let me show you an example.
 
4:21 This thing here is a small TCL script,
 
4:25 this line is a comment,
 
4:27 and this s-expression here
 
4:30 is treated by TCL as a comment
 
4:33 but in Emacs we can put the cursor here, say, and then
 
4:36 we type "Ctrl-e" to go to the end of the line and then "Ctrl-x Ctrl-e" to 
 
4:40 execute this and if we execute this we visit the file 
 
4:45 that is mentioned in the line below. 
 
4:48 I was doing that so much going to the end of the line and then 
 
4:53 executing the expression before point that I defined a key that would do that; 
 
4:59 so the fact that "Meta-e" would work like "Ctrl-e" to go to 
 
5:02 the end of the line and then "Ctrl-x Ctrl-e" 
 
5:06 and my name for it was 'eval-sexp-eol' (end of line here). 
 
5:12 So "Ctl-x Ctl-e",  that's the standard key sequence, means 
 
5:16 'eval-last-sexp' and I named "Meta-e" 'eval-sexp-eol'. 
 
5:24 At the time all the languages and interpreters that I was using 
 
5:30 supported at least hyperlinks in comments like this 
 
5:34 and I also created variants of "Meta-x eev" that could 
 
5:38 send the region to other interpreters and in a few years using that, 
 
5:44 I had several megabytes of notes and scripts. 
 
5:47 I not only had scripts with elisp hyperlinks in comments, 
 
5:52 but also I had tons of executable notes -  
 
5:56 I called them "e-scripts" - that were totally free form; 
 
6:00 some parts of them were blocks of elisp hyperlinks, 
 
6:04 some other parts were blocks of codes to be sent to shells and to other interpreters, 
 
6:08 and some other parts with just comments in English or Portuguese or whatever. 
 
6:15 In 1995 I started to have dial-up internet at home and in 1999 
 
6:21 I created a home page and I uploaded all the scripts and notes 
 
6:25 to my home page because it was good karma and it was a way to become a person 
 
6:33 who deserves hints and help, instead of just being the idiot that I was 
 
6:38 considered in my University because I couldn't learn VI. 
 
6:41 And at that point I was absolutely sure that everybody was using Emacs like that, 
 
6:48 that Emacs was made to be used with elisp hyperlinks. 
 
6:56 At one point I sent an email to one of the Emacs mailing lists, in the email 
 
7:02 I used some of the things that I use at home - some elisp hyperlinks 
 
7:06 and some other tricks - and I explained how to use everything there, 
 
7:11 and I apologized for the ugly names. I said: 
 
7:14 "I don't know what are the standard functions that do that, so I wrote my own ones" 
 
7:19 and I apologized for choosing bad names with them. 
 
7:23 Richard Stallman himself answered and his answer was sort of: 
 
7:27 "This looks interesting and as far as I know no one else is using Emacs like this. 
 
7:34 Someone should clean up the code and document it so that 
 
7:38 we can include it in Emacs; can you do that?" 
 
7:41 Well, this was amazing, it was unbelievable; I wasn't no one in 
 
7:46 the university. I was just an idiot; and suddenly God spoke to me 
 
7:50 and gave me a mission. So I started then to work to 
 
7:57 make Eev into an official package. I submitted some code 
 
8:00 and Stallman answered very briefly. He had some objections that I didn't 
 
8:06 understand very well, they didn't make much sense to me. 
 
8:10 And in the year 2000 I discovered that he was going to give a talk 
 
8:14 in a city close to where I live. I live in Rio De Janerio in Brazil, 
 
8:18 and he was going to give a talk in Campinas that is just 500 kilometers away  
 
8:23 from Rio De Janerio. I went there, I attended the talk 
 
8:27 and I chatted with Stallman after the talk. I mentioned 
 
8:31 things about Eev and he remembered the discussion and the code 
 
8:36 and he said that "&users should not be forced to see elisp&" 
 
8:39 and then I was incredibly offended, that was totally absurd 
 
8:44 and Stallman was so scared so startled by my reaction that he walked away! 
 
8:51 And the thing is that for me, the ability to write one-liners in Emacs Lisp 
 
8:56 was the thing that completely dissolved the barrier between users and programmers. 
 
9:01 It was a kind of a philosopher's stone that could turn users into 
 
9:06 programmers almost magically. It was a catalyst and it was the distilled essence 
 
9:13 of free software so it was absurd to say this; it was sick to say that 
 
9:19 users should not be forced to see elisp. 
 
9:23 Okay, so let me fast forward many years. 
 
9:26 In the year 2000 I had "users should not be forced to see elisp" and also 
 
9:32 "M-x eev" that was one of my ways of saving as executable notes. 
 
9:39 It was difficult to set up because users that wanted to use it had to change their 
 
9:45 rcfiles a bit, so very few people were trying Eev and installing it and using it. 
 
9:54 So let me fast forward many years to 2019. "M-x eev" is obsolete now, I use something 
 
10:03 called eepitch instead. The setup is now totally trivial, Eev comes with lots of 
 
10:09 sandboxed tutorials with names like "find-*-intro". I've been using 
 
10:16 Eev to teach Emacs and free software principles to people who 
 
10:20 don't know anything about programming or UNIX that they're just kind of 
 
10:24 fascinated by the idea of programming but they know very little. 
 
10:28 Now people can learn Eev by memorizing just three keys or just two, 
 
10:33 because this third one is secondary. M-e is for execute and M-j is for jump 
 
10:39 M-k runs a kind of "kill this buffer" and sometimes can be used to go back from a hyperlink. 
 
10:47 In April 10, 2019 Eev finally became an ELPA package, 
 
10:55 it finally became official in some way. 
 
10:59 This new Eev has lots of tutorials with names like this: "find-*-intro" 
 
11:04 and when you install it with the beginner setup, and you start Emacs 
 
11:10 in a certain way this starts Emacs, turning Eev mode on, and it opens the  main tutorial. 
 
11:21 If you type just "M-j" without a numeric prefix you get a page with this header. 
 
11:27 So it opens a page with this header and some mysterious things below it. 
 
11:32 This part of the header explains how to run Eev "M-j" with some of the main numeric prefixes. 
 
11:42 And so "M-5 M-j" goes to the main tutorial method, 
 
11:50 "M-2 M-j" goes to a kind of a tutorial that is mainly an index of the main keys of 
 
11:56 both Eev and Emacs, and we also have these three hyperlinks here. 
 
12:04 This first one goes to a section of the manual of the main tutorial that explains "M-j", 
 
12:12 this one goes to the section about the Eev keys in the tutorial about keys, 
 
12:18 and this one goes to the first section about Emacs keys in this tutorial 
 
12:25 that works like an index of keys. 
 
12:29 If people followed this and they can follow hyperlinks that go to the 
 
12:38 two pages in the Emacs manuals, they usually learned very quickly how to 
 
12:43 navigate these manuals and how to go back to the tutorials  
 
12:47 and how to switch between tutorials, other files, the  
 
12:52 manuals and so on. Okay, let me show you a demo now. 
 
12:57 I mentioned that "M-x eev" is now obsolete; it has been replaced by 
 
13:04 something that we run, but by just typing "F8", 
 
13:08 that always operates on the current line and moves down. 
 
 
13:11 Let me show you an example of "executable notes and how to play them back".
 
13:18 I will only be able to explain how to _record_ these executable notes in the longer video.
 
13:25 Anyway: when I was recording this video I realized that xpdf was behaving in a very annoying way -
 
13:34 it was changing the page in moments that I didn't want it to...
 
13:39 and the problem was that when my finger was at the right side of the touchpad
 
13:45 and I moved it up or down this would be interpreted as a _mousewheel scroll_,
 
13:52 that would be interpreted as PageUp or PageDown,
 
13:57 and I wanted to disable that - I wanted to disable the support for mousewheel scroll in xpdf.
 
14:01 So I took a look at the man page for xpdf - here -
 
14:06 I didn't find a simple way to change that by changing a configuration file
 
14:11 but I found a section that described all the default mouse bindings - here -
 
14:18 I found a line that seemed to be relevant - this one -
 
14:21 I created a hyperlink that pointed directly to that line - this one -
 
14:30 and I also found an explanation for what this function does
 
14:35 and the explanation says that this function either scrolls up by some pixels
 
14:41 or it moves to the previous page - which means PageUp.
 
14:46 So the _quickest_ way to change xpdf - because I was in a hurry -
 
14:51 was by downloading and recompiling the Debian source with some changes.
 
14:56 I used this hyperlink here, that uses a template, to generate several links
 
15:01 and several shell commands for downloading and recompiling a debian source package.
 
15:08 I copied these lines to my notes with some small changes,
 
15:15 and this part - here - uses the alternative to M-x eev...
 
15:20 remember that I said that my old way of sending lines to the shell was by using M-x eev,
 
15:27 that was very clumsy: it needed several keystrokes, and it was difficult to install
 
15:34 because we would need to change an rcfile.
 
15:38 So, the new alternative to it uses just <f8>,
 
15:43 that behaves in one way in lines that start with a red star - like these ones -
 
15:49 and in another way in lines that do not start with a red star.
 
15:54 Let me change the font to a smaller one to show how it works.
 
16:00 If I type <f8> in these three lines - here -
 
16:03 this will set up a target buffer - here - running a shell,
 
16:08 and if I type <f8> in these lines - here - this will send these commands to the shell.
 
16:14 This command, in particular, it downloads - sorry, it _makes sure_ that I have
 
16:20 all the Debian packages that I need to be able to compile the source for xpdf,
 
16:27 and this command - here - downloads the source package for xpdf
 
16:34 and unpacks it. It takes a few seconds - here.
 
16:40 I do not want to execute this thing now - this thing would recompile the source.
 
16:49 So, this hyperlink - here - opens this temporary directory,
 
16:54 and it turns out that the source package was unpacked in this subdirectory - here -
 
17:04 so this hyperlink points to the subdirectory,
 
17:07 and this s-expression - here - defines several shorter hyperlinks with "find-xpdf" in their names
 
17:17 that operate in this subdirectory - here.
 
17:22 So, this hyperlink - here - opens that directory,
 
17:30 this one - here - runs these shell commands in that directory
 
17:37 to list all the files - remember that I haven't compiled anything yet,
 
17:41 so all these files belong to the source package,
 
17:46 and this one is much more interesting - it runs a grep in that directory.
 
17:51 Remember that I discovered that the name of the mouse event that was bound to
 
17:57 PageUp, or to the _bad_ PageUp in the bad PageDown,
 
18:02 was MousePress4 (and MousePress5)...
 
18:06 So this grep here searches for all the occurrences of MousePress4
 
18:12 in the source... and it shows that there are only two occurrences,
 
18:18 one of them in the source for the man page and the other one
 
18:22 in the rendered version of that source, which is not good...
 
18:27 Let me change to the bigger font again.
 
18:31 So I decided to search for the function that was associated to that mouse event -
 
18:39 this function here - and I found several occurrences of that string,
 
18:45 and it turned out that _this_ is a relevant occurrence,
 
18:49 so I created a direct link to that source file,
 
18:53 and I discovered that if I commented out these lines by hand
 
19:03 and recompiled everything and installed the new debian binary package
 
19:09 then I would get an xpdf that does not have the annoying behavior. But...
 
19:15 That's it.
 
  
 
  
 
  Part 1: the slides
 
  The slides are here:
 
    http://anggtwu.net/LATEX/2019emacsconf.pdf
 
 
00:00 Hello! The name of this talk is "How to
 
00:03 record executable notes with eev and
 
00:05 how to play them back", and I'm Eduardo
 
00:08 Ochs, this person here, the author of eev,
 
00:11 and this is Selana Ochs, my main
 
00:13 contributor at the moment. Let me start
 
00:17 by explaining the prehistory of eev. Eev
 
00:19 appeared by accident. I was fascinated
 
00:23 by programming, and from what I knew
 
00:25 UNIX seemed to be the right thing... and
 
00:28 in 1995 I bought a computer that could run
 
00:30 GNU Linux and a Linux CD. I was studying
 
00:33 mathematics at the University - not
 
00:35 Computer Science - and I was able to learn
 
00:39 at the University a tiny bit of UNIX and
 
00:41 Lisp, but my social skills were very bad.
 
 
00:46 I couldn't socialized properly with
 
00:48 the people there who really knew Unix,
 
00:51 and they kept saying to me that
 
00:53 "everybody uses vi", but my memory was
 
00:56 very bad - as bad as my social skills -
 
00:58 and I typed slowly, and with lots of
 
01:00 mistakes... so at one point I decided to
 
01:03 give up learning vi, and I tried Emacs...
 
01:05 and I found it MIND-BLOWING.
 
 
01:07 I was taking notes about everything
 
01:11 that I was learning, and my notes
 
01:14 started to have lots of elisp hyperlinks
 
01:17 like these... When we execute this it
 
01:21 opens a certain directory with lots of
 
01:23 interesting files in it, and when we
 
01:25 execute this it opens a specific
 
01:28 file in that directory. I was
 
01:32 using hundreds of hyperlinks like these
 
01:34 to take notes of everything that I
 
01:37 found interesting... it was easy to follow
 
01:40 these expressions as hyperlinks: in the
 
01:43 beginning I used the standard
 
01:45 function `find-file', and then I created
 
01:48 a variant of it called `find-fline, that
 
01:50 accepted extra arguments... in the
 
01:52 beginning it only supported a line
 
01:54 number, like this, that would open this
 
01:57 file and go to the line 423, and then
 
 
02:02 I made it accept also strings to
 
02:04 search for... so this variant here would
 
02:07 open this file and search for the first
 
02:10 occurrence of this string here...
 
 
02:12 and I also invented shorter hyperlinks,
 
02:14 like these three here, in which
 
02:19 I do not need to specify the directory -
 
02:22 like this - because this directory is
 
02:26 somehow embedded in this code here... so
 
02:31 "e" means the directory with the elisp
 
02:34 files in Emacs. And I also wrote a very
 
02:38 primitive way to send the current
 
02:41 region to a shell: when I typed `M-x eev' -
 
02:44 which meant: "emacs-execute-verbosely" -
 
02:48 this command wrote the region into a
 
02:51 certain temporary file, and if I went to
 
02:53 a shell and I typed `ee'
 
02:55 it would run the commands in this
 
02:57 temporary file, and it would executed them.
 
03:00 These are some technical details that I
 
03:02 do not want to discuss now... and in a few
 
03:06 months using that I had created several
 
03:08 other kinds of elisp hyperlinks, all
 
03:11 of them also supporting these extra
 
03:13 arguments that indicated usually strings
 
03:17 to search for, but sometimes
 
03:19 I could use that to point a certain line
 
03:21 number. I called these extra arguments
 
03:25 "pos-spec-lists", and here are
 
03:28 some examples. These hyperlinks here
 
03:31 would open the manpage of GNU Awk
 
03:35 and go to specific sections in it...
 
 
03:39 and these hyperlinks open the info
 
03:44 manual of Make and go to certain nodes
 
03:48 in this manual... and in some cases it also
 
03:51 looks for these strings in these nodes.
 
 
03:56 And these hyperlinks here
 
03:59 they run certain commands in the shell
 
04:02 and then display its output. And the
 
04:09 elisp hyperlinks that I was using
 
04:11 could be always be put in comments in
 
04:14 scripting languages... they were
 
04:17 always the sexp at the end of the line.
 
 
04:19 Let me show you an example here.
 
04:21 This thing here is a small Tcl script...
 
04:24 this line is a comment,
 
04:26 and this S-expression here is
 
04:30 treated by Tcl as a comment, but in Emacs
 
04:33 we can put the cursor here, say, and then
 
04:36 we type `C-e' to go to the end of the
 
04:38 line and then `C-x C-e' to execute this...
 
 
04:40 and if we execute this we
 
04:43 visit the file that is mentioned in the
 
04:47 line below. I was doing that so much -
 
04:51 going to the end of the line and then
 
04:53 executing the expression before point -
 
04:56 that I defined a key that would do that.
 
 
04:59 So I defined that `M-e' would work
 
05:02 like `C-e' to go to the end of the line,
 
05:04 and then `C-x C-e'... and my name for it
 
05:07 it was `eval-sexp-eol' - "end of line"
 
05:11 here. So `C-x C-e', that is a standard
 
05:14 key sequence, means `eval-last-sexp',
 
05:17 and I named `M-e' `eval-sexp-eol'.
 
05:24 And at the time all the languages and
 
05:26 interpreters that I was using supported
 
05:31 elisp hyperlinks in comments, like this...
 
 
05:34 and I also created variants of `M-x eev'
 
05:37 that could send the region to other
 
05:40 interpreters, and in a few years using
 
05:43 that I had several megabytes of notes
 
05:45 and scripts... not only had scripts with
 
05:50 elisp hyperlinks and comments, but
 
05:53 also I had tons of "executable notes" -
 
05:56 I called them "e-scripts" - that were
 
05:59 totally free-form... some parts of them
 
06:02 were blocks of elisp hyperlinks, some
 
06:04 other parts were were blocks of code to
 
06:06 be sent to shells and to other
 
06:08 interpreters, and some other parts were
 
06:11 just comments, in English, or Portuguese,
 
06:13 or whatever... and in 1997 I started
 
06:17 to have dial-up internet at home,
 
06:20 and in 1999 I created a home page, and I
 
06:22 uploaded all these scripts and notes to it,
 
06:25 to my home page, because it was
 
06:28 good karma and it was a way to to become
 
06:30 a person who deserves
 
06:33 hints and help instead of
 
06:36 just being the idiot that I was
 
06:38 considered in my university because
 
06:40 I couldn't learn vi.
 
 
06:42 And at that point I was absolutely sure
 
06:45 that everybody was using Emacs like
 
06:47 that - that Emacs was made to be used with
 
06:52 elisp hyperlinks... and at one
 
06:58 point I sent an e-mail to one of the Emacs
 
07:00 mailing lists, and in the e-mail I used some
 
07:03 of the things that I used at home...
 
07:05 some elisp hyperlinks, and some other
 
07:07 tricks, and I explained how to use
 
07:10 everything there, and I apologized for
 
07:12 the ugly names... I said: I don't know what
 
07:15 are the standard functions that do that, so
 
07:17 I wrote my own ones... and I apologized for
 
07:20 choosing bad names for them. And Richard
 
07:24 Stallman himself answered, and his answer
 
07:27 was sort of: this looks interesting,
 
07:30 and as far as I know no one else is
 
07:33 using Emacs like this. Someone should
 
07:35 clean up the code and document it so
 
07:37 that we can include it in Emacs. Can you
 
07:39 do that? And, well this was amazing, it
 
07:43 was unbelievable, I was a no one in
 
07:45 the university, I was just an idiot, and
 
07:48 suddenly God spoke to me, and gave me a
 
07:51 mission. So I started to work to
 
07:56 make eev into an official package...
 
 
07:58 I submitted some code, and Stallman
 
08:01 answered very briefly... he had some
 
08:03 objections that I didn't
 
08:05 understand very well, they didn't make
 
08:07 much sense to me... and in the year 2000
 
08:12 I discovered that he was going to give a
 
08:14 talk in a city close to where I live. I
 
08:16 live in Rio de Janeiro, Brazil and he
 
08:18 was going to give a talk in Campinas,
 
08:20 that is just 500 kilometers away from
 
08:23 Rio de Janeiro... I went there, I
 
08:26 attended the talk, and I chatted with
 
08:28 Stallman after the talk. I mentioned
 
08:31 things about eev, and he remembered that
 
08:34 the discussion and the code, and he said
 
08:36 that "users should not be forced to see
 
08:39 Lisp". And then I was INCREDIBLY OFFENDED.
 
 
08:42 That was totally absurd. And Stallman
 
08:47 was so scared, so startled by my reaction,
 
08:49 that he walked away... and the thing is that
 
08:53 for me the ability to write one-liners in
 
08:55 Emacs Lisp was THE thing that
 
08:57 completely dissolved the barrier between
 
09:00 users and programmers... it was a kind of a
 
09:02 Philosopher's Stone that could turn
 
09:05 users into programmers almost
 
09:07 magically, it was a catalyst, and it was
 
09:10 the distilled essence of Free Software.
 
 
09:13 So it was absurd to say this, it was sick
 
09:17 to say that "users should not be forced
 
09:20 to see Lisp". Ok, so let me fast-forward
 
09:24 many years... in the year 2000 I had
 
09:28 "users should not be forced to see Lisp",
 
09:30 and also `M-x eev', that was one of
 
09:34 my ways of saving executable notes...
 
 
09:39 it was difficult to set up because users
 
09:43 that wanted to use it had to change
 
09:45 their rcfiles a bit... so very few people
 
09:50 were trying eev, and installing it and
 
09:53 using it... so let me fast-forward many
 
09:57 years to 2019. `M-x eev' is now obsolete,
 
10:01 now I used something called
 
10:04 `eepitch' instead... the setup is now
 
10:07 totally trivial, eev comes with lots of
 
10:09 sandboxed tutorials with names like
 
10:11 `find-something-intro', and I've been using
 
10:16 eev to teach Emacs and Free Software
 
10:18 principles to people who don't know
 
10:20 anything about programming or *NIX, that
 
10:22 are just kind of fascinated by the
 
10:25 idea of programming, but they know very
 
10:27 little... and now people can learn eev by
 
10:30 memorizing just three keys, or just two
 
10:33 because this third one is secondary...
 
10:36 `M-e' is for "execute", and `M-j' is for
 
10:39 "jump"... `M-k' runs a kind of "kill
 
10:43 this buffer", and sometimes can be used to go
 
10:46 back from a hyperlink...
 
 
10:49 And in April 10 eev finally became an ELPA
 
10:54 package - It finally became official
 
10:56 in some way...
 
10:58 and this new eev has lots of tutorials
 
11:00 with names like this:
 
11:02 `find-something-intro'
 
11:04 and when you install it with the
 
11:07 "beginner setup" and you start Emacs
 
11:10 in a certain way this starts Emacs
 
11:15 turning eev-mode on and it opens the
 
11:18 main tutorial, and if we type just `M-j'
 
11:23 without a numeric prefix you get
 
11:26 a page whose header is this... so it opens
 
11:28 a page with this header, and some
 
11:30 mysterious things below it...
 
 
11:33 this part of the header explains how to
 
11:35 run `M-j' with some of the main numeric
 
11:40 prefixes... so `M-5 M-j' goes to the
 
11:47 main tutorial, `M-2 M-j' goes to a kind of
 
11:51 a tutorial that is mainly an index of the
 
11:54 main keys of both eev and Emacs...
 
 
11:58 and we also have these three hyperlinks
 
12:02 here... this first one goes to the section
 
12:05 of the main tutorial that explains `M-j',
 
12:12 and this one goes to the section about
 
12:15 the eev keys in the tutorial about keys,
 
12:19 and this one goes the the first section
 
12:22 about Emacs keys in this tutorial that
 
12:25 works like an index of keys. And if
 
12:30 people follow this they can follow
 
12:34 hyperlinks that go to the pages
 
12:38 in the Emacs manuals... and they
 
12:41 usually learn very quickly how to
 
12:43 navigate these manuals, and how to go
 
12:45 back to the tutorials, and how to switch
 
12:48 between tutorials, other files, the
 
12:51 manuals, and so on...
 
 
12:54 Ok, let me show a demo.
 
12:57 I mentioned that `M-x eev' is now
 
13:02 obsolete, it has been replaced by
 
13:04 something that we run by just typing
 
13:06 f8, that always operates on the current
 
13:08 line and moves down.
 
 
  Part 2: The demo
 
  The "script" for the demo is here:
 
emacsconf2019 short
 
 
13:10 Let me show an example of executable
 
13:13 notes and how to play them back.
 
13:16 I will only be able to explain how to
 
13:19 record these executable notes in
 
13:22 the other video - in the longer video.
 
 
13:25 Anyway, when I was recording this video I
 
13:29 realized that xpdf was behaving in a
 
13:32 very annoying way... it was
 
13:34 changing the page in moments that I
 
13:37 didn't want it to, and the problem was
 
13:40 that when my finger was at the right
 
13:42 side of the touchpad and I
 
13:44 moved it up or down this would be
 
13:47 interpreted as a "mousewheel scroll",
 
13:50 that would be interpreted
 
13:53 as PgUp or PgDn... and I wanted to
 
13:56 disable that. I wanted to disable the
 
13:58 support for mousewheel scroll in xpdf.
 
 
14:01 So I took a look at the man page for xpdf,
 
14:04 here... I didn't find a simple way to
 
14:08 change that by changing a configuration
 
14:10 file, but I found a section that described
 
14:14 all the default mouse bindings, here...
 
14:18 I found the line that seemed to be relevant,
 
14:20 this one... I created a hyperlink that
 
14:24 pointed directly to that line -
 
14:27 this one - and I also found an
 
14:30 explanation for what this function does.
 
 
14:33 And the explanation says that this function
 
14:37 either scrolls up by some pixels or it
 
14:41 moves to the previous page, which means
 
14:43 PgUp. So the quickest way to change xpdf -
 
14:48 because I was in a hurry - was by
 
14:51 downloading and recompiling the Debian
 
14:53 source with some changes.
 
14:55 I used this hyperlink here, that uses a
 
14:58 template to generate several links and
 
15:01 several shell commands for downloading
 
15:04 and recompiling a debian source package...
 
15:07 I copied these lines to my notes with
 
15:13 some small changes... and this part here
 
15:16 uses the alternative to `M-x eev'.
 
 
15:20 Remember that I said that my old way of
 
15:22 sending lines to the shell was by using
 
15:26 `M-x eev', that was very clumsy...
 
15:29 it needed several keystrokes, and
 
15:32 it was difficult to install because
 
15:34 we would need to change an rcfile. So
 
15:38 the new alternative to it uses just f8,
 
15:42 that behaves in one way in lines that
 
15:45 start with a red star, like these ones...
 
15:48 and in another way in lines that do not
 
15:52 start with a red star. Let me change
 
15:55 the font to a smaller one to show how it
 
15:58 works. If I type f8 in these three
 
16:01 lines here
 
16:03 this will set up a target buffer here
 
16:06 running a shell, and if I type f8 in
 
16:10 these lines here this will send these
 
16:12 commands to a shell. This command in
 
16:16 particular it downloads... sorry, it makes
 
16:20 sure that I have all the Debian packages
 
16:22 that I need to be able to compile the
 
16:25 source for xpdf, and this command here
 
16:28 downloads the source package
 
16:32 for xpdf, and unpacks it. It takes
 
16:37 a few seconds... here. I do not want
 
16:41 to execute this thing now... this thing
 
16:43 would recompile the source. So... this
 
16:50 hyperlink here opens this temporary
 
16:53 directory, and it turns out that the
 
16:56 source the source package was
 
16:59 unpacked in this subdirectory here...
 
17:02 so this hyperlink points to that
 
17:05 subdirectory, and this S-expression here
 
17:09 defines several shorter hyperlinks with
 
17:13 `find-xpdf' in their names, that operate
 
17:17 in this subdirectory here. So this
 
17:23 hyperlink here opens the directory,
 
17:30 this one here runs this shell
 
17:34 command in the directory to list all
 
17:38 the files... remember that I haven't
 
17:40 compiled anything yet, so all these files
 
17:42 belong to the source package...
 
 
17:44 and this one is much more interesting:
 
17:46 it runs a grep in that directory.
 
17:49 Remember that I
 
17:51 discovered that the name of the mouse
 
17:54 event that was bound to PgUp or...
 
17:59 to the _bad_ PgUp or to the bad PgDn was
 
18:02 mousePress4 - and mousePress5...
 
18:05 so this grep here searches for all the
 
18:10 occurrences of mousePress4 in the
 
18:13 source, and it shows that there are only
 
18:16 two occurrences: one of them in the
 
18:19 source for the manpage, and the other
 
18:21 one in the rendered version of
 
18:23 that source, which is not good...
 
18:26 let me change to a bigger font again. So I
 
18:31 decided to search for the function that
 
18:34 was associated to that mouse event - this
 
18:40 function here - and I found several
 
18:43 occurrences of that string, and it turned
 
18:46 out that this is the relevant occurrence...
 
18:48 so I created a direct link to that
 
18:52 source file, and I discovered that if I
 
18:56 commented out these lines by hand and
 
19:02 recompiled everything, and installed the
 
19:06 new debian binary package... then I would
 
19:09 get an xpdf that does not have the
 
19:12 annoying behavior. But... that's it. =)
 
 
   |