Chapa 1)


Some template-based functions of eev that are not five-minute hacks (2020)

My presentation at the EmacsConf 2020 was titled "On why most of the best features in eev look like 5-minute hacks"; this is a complement to it.

You can watch this video on youtube here, but Youtube always converts my videos to a format that is blurry at some points... the best way to watch it is by running the two "wget"s and the "mpv" below; then you can use these keys to make mpv play it in high speed.

# See:  http://anggtwu.net/eev-videos.html
#       http://anggtwu.net/eev-videos.html#mpv-keys
# Play: (find-eevtemplvideo "0:00")
# Info: (find-1stclassvideo-links "eevtempl")
# Subs: (find-1stclassvideolsubs  "eevtempl")

wget -nc http://anggtwu.net/eev-videos/2020-some-template-based.mp4
wget -N  http://anggtwu.net/eev-videos/2020-some-template-based.vtt
mpv --fs --osd-level=2 2020-some-template-based.mp4

In most cases when I record "executable notes" on how to perform tasks (see my talk at the EmacsConf 2019!) I record them as plain text, but in a few cases I prefer to use functions that generate text from templates. This video is about some non-trivial cases of functions that use templates to generate "executable notes" that can then be executed in several different ways.

For more on eev see http://angg.twu.net/#eev.

I recorded this video without rehearsing it first, so it's a bit messy... sorry!

The "script" that I used in the video is here.
Its thread on reddit is here (but it has 0 comments).

Index of the video (elisp here):
 0:00  Title
0:17    the reason for this title
0:18  1. `find-find-links-links-new'
1:29    generated again with these values
1:50    the implementation is very simple
2:00    in five minutes because ... generates skeletons
5:03  2. `M-x brep'
5:43    a way to download local copies
7:11    The new way: `M-x brep'
8:15    by typing `M-x brep'
8:50    and then we get this buffer here
9:17  3. The function that defines brep
9:38    `code-brurl' is a variant of `code-c-d'
10:07    find-code-url shows the code instead of executing it
11:26    this is explained in the main tutorial
12:12    accept extra arguments
12:34    if we run just this
12:40    one of the reasons for using text: comments
13:03    if we run just this with extra arguments
14:10    code-brurl executes this code here
14:20  4. `find-esetkey-links'
15:20    a big header with lots of help
16:28    I have these keybindings, for toggling
17:06    I realized that I use `M-x wrap' very often
18:18    in the emacs-devel mailing list
18:32    users should not be forced to see lisp
19:23  5. `find-youtubedl-links'
19:43    if we twist the notion user enough
20:02    user-friendly to me
20:05    The documentation is in this tutorial:
21:36    its code is here
21:55    Let me show a demo
22:15    I never type these rm -Rv/mkdir/cd by hand
22:48    let me show how to download ... the hash is here
23:25    they regenerate this buffer in slightly different ways
24:03    a video with this hash. If I visit the directory
24:32    my magic functions have to
24:50    if I run this sexp here with nil
25:00    it tries to guess the title
25:28    and if I change this {stem} here I get short links
26:14    has very long lines, but if I type super-w
26:28    I get a buffer that shows the code for find-preadingvideo
26:50    if I execute this I play the video
27:15    make a copy of this that points to the right position
27:53    summary: this is how I download videos from youtube
28:12  6. `find-here-links' and `find-extra-file-links'
28:20    it deserves another presentation just to itself
28:32    the central idea of eev
29:17    it is bound to `M-h M-h'
29:25    generates a temporary buffer with hyperlinks to here
29:30    help and a link to the tutorial in which I was
29:45    not very well documented yet
30:05    it is explained in this section of the tutorial
30:18    if we type `M-h M-e' this runs `find-extra-file-links'
30:42    here is an example in Lisp
31:06    and I can change this {c}
31:22    Let me show a more realistic example of how to use it
31:28    let's go to the directory with the video file
31:45    this file is a video file
32:00    (a glitch)
33:03    these were the things that I wanted to show