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

How I write 5-minute hacks in eev with `M-x find-find-links-links-new' - DO try this at home!!!

In my presentation at the EmacsConf2020 I showed that many of the functions of eev started as 5-minute hacks and I mentioned that I used `M-x find-find-links-links-new' to create their first versions, but I didn't explain how people can learn how to use find-find-links-links-new themselves, because that's hard... people need to understand apply, backquote, ee-template0, and find-elinks, and there isn't an easy way to check what small changes do.

In this video I show a series of exercises - most of them very easy - that people can run to learn how to use find-find-links-links-new. They are all in the file foo.el.

...to be more precise: all the exercises in the first 43 minutes of the video are like "try this sexp and understand what it does", and they only need basic keys - and this include the steps that let us create a function called find-mytaskC-links, that is our 5-minute hack. Then things become harder: we need to see how the behavior of find-mytaskC-links changes after small changes in its code, and for that I define a bizarre hack that makes M-9j eval both the (defun find-mytaskC-links ...) and the sexp that shows its behavior.

^ Update: the "bizarre hack" in the second part of the video - from 43:00 onwards - can be rewritten in a much simpler way using eval-defun, but when I recorded the video I didn't know that eval-defun existed. =(

This video was inspired by a question by Bruno Macedo. I recorded it in 2021dec25.

Important: I don't know if this way of explaining things is clear or not - I haven't tested it on humans yet, and I would love to have feedback on it. So: if you get stuck get in touch, and let's try to arrange a chat by IRC!

Index of the video (elisp here):

 0:00  
 
9:06  find-latex-links
18:17  eev-mode and eev-mode-map
18:42  Mouse-2 in the mode line
19:40  For better lists, see...
19:57  find-ekeymapdescr
20:20  several obscure functions
20:32  find-eface-links
21:41  M-h M-k M-h M-s
22:04  (find-efunction 'find-eface-links)
22:17  it has a test here
23:15  these mysterious hyperlinks
23:34  find-ecolor-links
24:14  but let me go back to red
24:22  (insert (propertize ...))
25:05  So we were looking in details
25:57  a sample of chocolate1
26:05  lists all colors
26:24  as always you can look at the source code
26:42  find-epackage-links
27:25  find-epp
28:03  find-estruct
28:18  and this sequence of sexps
28:26  when someone mentions a package
28:55  find-epackage shows the description
29:19  find-epackage
29:31  and also the official website of the package
29:47  (ee-package-dir 'magit)
30:06  btw, just a parenthesis: ...
30:42  if people want to know what find-epp does
30:50  I can go here, to the source code
31:19  (ee-package-url 'magit)
31:40  this one inserts a line
31:48  and I can visit the URL with M-x brg
31:55  package-delete
32:09  a hack: the `t' in the 3rd argument
32:39  regenerate this buffer using the directory
33:39  all these lines are indented
34:08  how did I do that?
34:14  execute this sexp to show the source code
43:10  Tricks with eek
56:40  M-9 M-j

E-script: http://angg.twu.net/2021-ffll/foo.el.html
          http://angg.twu.net/2021-ffll/foo.el