1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
|
WEBVTT
00:00:00.080 --> 00:00:01.708
Hi, my name is Eduardo Ochs.
00:00:01.708 --> 00:00:03.439
I'm this person here,
00:00:03.439 --> 00:00:06.240
and the title of this talk is on "Why
00:00:07.120 --> 00:00:09.519
Most of the Best Features in eev Look
00:00:09.519 --> 00:00:11.599
Like Five Minute Hacks."
00:00:11.599 --> 00:00:15.280
This is a presentation at the
EmacsConf 2020
00:00:15.280 --> 00:00:23.199
happening on November 28 and 29, 2020.
00:00:23.199 --> 00:00:25.519
So this is part one of the presentation.
00:00:25.519 --> 00:00:27.680
Here I'm going to explain
00:00:27.680 --> 00:00:29.840
some ideas that are prerequisites for
00:00:29.840 --> 00:00:32.320
understanding the rest of the
presentation.
00:00:32.320 --> 00:00:35.440
The three main keys of eev are
00:00:35.440 --> 00:00:37.920
M-e, M-k, and M-j.
I'm going to start by
00:00:37.920 --> 00:00:42.079
explaining M-e and M-k.
00:00:42.079 --> 00:00:44.960
M-e is used to follow hyperlinks.
00:00:44.960 --> 00:00:47.592
Technically, it is essentially
00:00:47.592 --> 00:00:49.345
just a C-e to move to
00:00:49.345 --> 00:00:50.402
the end of the line,
00:00:50.402 --> 00:00:53.918
and then a C-x C-e to
execute this,
00:00:53.918 --> 00:00:58.960
the sexp before point at
the end of the line.
00:00:58.960 --> 00:01:00.879
And the thing is that Emacs comes with
00:01:00.879 --> 00:01:02.479
many functions that can be
00:01:02.479 --> 00:01:05.040
used as sexp hyperlinks.
00:01:05.040 --> 00:01:07.540
We can consider that they point to
somewhere.
00:01:07.540 --> 00:01:09.040
I'm going to refer to that as
00:01:09.040 --> 00:01:11.411
the target of the hyperlink.
00:01:11.411 --> 00:01:12.960
If we execute this
00:01:12.960 --> 00:01:15.759
sexp hyperlinks, we coul go to that target.
00:01:15.759 --> 00:01:17.119
For example, this one
00:01:17.119 --> 00:01:20.000
is a hyperlink that points to a buffer
00:01:20.000 --> 00:01:22.720
with the manpage for cat.
00:01:22.720 --> 00:01:25.040
And usually, but not always, after
00:01:25.040 --> 00:01:27.040
following the hyperlink, we can go back
00:01:27.040 --> 00:01:29.840
by just killing the current buffer
00:01:29.840 --> 00:01:31.537
that the hyperlink created:
00:01:31.537 --> 00:01:34.400
the target of the hyperlink.
00:01:34.400 --> 00:01:38.000
But this example here is badly behaved.
00:01:38.000 --> 00:01:41.360
If we execute it, it creates a new frame,
00:01:41.360 --> 00:01:43.360
and to go back to the previous situation,
00:01:43.360 --> 00:01:52.840
we have to either click here
or type C-x 5 0.
00:01:54.880 --> 00:01:57.120
So here are some examples of
00:01:57.120 --> 00:01:58.726
sexp hyperlinks using
00:01:58.726 --> 00:02:00.640
standard Emacs functions.
00:02:00.640 --> 00:02:03.188
This third one is badly behaved
00:02:03.188 --> 00:02:04.880
in a different way.
00:02:04.880 --> 00:02:08.554
If executed, the target is created
00:02:08.554 --> 00:02:11.006
in the same window as we are now,
00:02:11.006 --> 00:02:14.312
but it also shows a lot of
garbage
00:02:14.312 --> 00:02:15.797
here in the echo area,
00:02:15.797 --> 00:02:23.280
so the current frame becomes
a bit messy.
00:02:23.280 --> 00:02:25.728
And well, one of the first things
00:02:25.728 --> 00:02:28.319
that I did when I was creating eev
00:02:28.319 --> 00:02:30.720
many many years ago was that I created
00:02:30.720 --> 00:02:33.380
variants of all these functions
00:02:33.380 --> 00:02:36.640
that were better behaved.
00:02:36.640 --> 00:02:39.200
They were better behaved in two
senses.
00:02:39.200 --> 00:02:40.839
The obvious one was that
00:02:40.839 --> 00:02:43.680
they all created the target
00:02:43.680 --> 00:02:45.246
in the same window as before,
00:02:45.246 --> 00:02:48.720
so I could go back by just typing M-k
00:02:48.720 --> 00:02:52.879
which has essentially just killed this
buffer.
00:02:52.879 --> 00:02:56.480
I also implemented something extra that
00:02:56.480 --> 00:02:59.040
are the postback lists.
00:02:59.040 --> 00:03:03.599
For example, these extra arguments here
are a postback list.
00:03:03.599 --> 00:03:06.080
These extra arguments specify
00:03:06.080 --> 00:03:09.599
position and the target buffer.
00:03:09.599 --> 00:03:14.337
In this example,
this postback list means:
00:03:14.337 --> 00:03:18.239
starting from the beginning of
the buffer,
00:03:18.239 --> 00:03:22.757
search for the first occurrence
of this string after that,
00:03:22.757 --> 00:03:24.754
after the beginning
of the buffer,
00:03:24.754 --> 00:03:27.662
and then search for
the first occurrence
00:03:27.662 --> 00:03:33.760
of this string after that.
00:03:33.760 --> 00:03:36.070
eev also defines some hyperlinks
00:03:36.070 --> 00:03:38.799
that do not create new buffers.
00:03:38.799 --> 00:03:40.879
Here is the first example.
00:03:40.879 --> 00:03:42.971
If I execute this one,
00:03:42.971 --> 00:03:45.920
this one is a hyperlink
00:03:45.920 --> 00:03:46.959
to the result
00:03:46.959 --> 00:03:50.720
of running this show comment date,
00:03:50.720 --> 00:03:52.623
but instead of showing the result
00:03:52.623 --> 00:03:53.767
in the new buffer,
00:03:53.767 --> 00:03:55.475
the result is shown
here.
00:03:55.475 --> 00:03:58.959
So, if I execute this hyperlink,
00:03:58.959 --> 00:04:01.634
the result of date, the output of date,
00:04:01.634 --> 00:04:03.339
is shown in the echo area.
00:04:03.339 --> 00:04:07.120
And if executed again,
00:04:07.120 --> 00:04:08.673
it shows the result again,
00:04:08.673 --> 00:04:09.519
and the result
00:04:09.519 --> 00:04:11.519
changes every second.
00:04:11.519 --> 00:04:18.720
So this is a variant of find-sh.
00:04:18.720 --> 00:04:21.840
find-sh0 is the variant that
00:04:21.840 --> 00:04:24.960
just shows the output in the echo area,
00:04:24.960 --> 00:04:28.080
and find-sh shows the output in
00:04:28.080 --> 00:04:31.759
a new buffer.
00:04:31.759 --> 00:04:35.919
Here is an example of a hyperlink
00:04:35.919 --> 00:04:39.173
that calls an external program.
00:04:39.173 --> 00:04:41.280
If I execute this,
00:04:41.280 --> 00:04:43.604
it calls Google Chrome to open
00:04:43.604 --> 00:04:46.639
a certain URL.
00:04:46.639 --> 00:04:51.520
Here it is. Let's go back to Emacs.
00:04:51.520 --> 00:04:55.280
If I execute this hyperlink here,
00:04:55.280 --> 00:04:57.986
it invokes my favorite PDF viewer
00:04:57.986 --> 00:05:02.560
which is xpdf. It makes xpdf
00:05:02.560 --> 00:05:07.759
open this PDF page. It is PDF
00:05:07.759 --> 00:05:10.880
in this page, and these other arguments
00:05:10.880 --> 00:05:15.199
are ignored. Let me show how it works.
00:05:15.199 --> 00:05:20.160
Here it is. This is an excerpt from a
book.
00:05:20.160 --> 00:05:22.639
So page 3 in the pdf corresponds to
00:05:22.639 --> 00:05:26.400
page 113 in the book.
00:05:26.400 --> 00:05:29.360
This variant here of the hyperlink above,
00:05:29.360 --> 00:05:31.759
it opens the PDF in a different way.
00:05:31.759 --> 00:05:34.560
It runs a program called pdftotext on
00:05:34.560 --> 00:05:36.479
this PDF here,
00:05:36.479 --> 00:05:39.600
and Emacs takes the output of
00:05:39.600 --> 00:05:42.880
running pdftotext on this pdf here
00:05:42.880 --> 00:05:45.301
and displays it in a buffer.
00:05:45.301 --> 00:05:47.280
Now this postback list
00:05:47.280 --> 00:05:49.651
is interpreted in a different way.
00:05:49.651 --> 00:05:51.280
This thing is interpreted
00:05:51.280 --> 00:05:53.425
as a number of a page,
00:05:53.425 --> 00:05:55.548
and Emacs goes to page three
00:05:55.548 --> 00:05:57.520
by counting form feeds in
00:05:57.520 --> 00:06:00.370
the converted version of the PDF
00:06:00.370 --> 00:06:03.039
and then it searches for this string.
00:06:03.039 --> 00:06:06.319
and in this three... So let's execute this
00:06:06.319 --> 00:06:09.169
to see what happens.
Here it is.
00:06:09.169 --> 00:06:14.800
I opened the same page
as before.
00:06:14.800 --> 00:06:18.400
It starts with lecture one.
00:06:18.400 --> 00:06:20.720
So the other hyperlink searched for this
00:06:20.720 --> 00:06:25.520
string and for this string here.
00:06:25.520 --> 00:06:30.400
This thing here is a hyperlink
to video,
00:06:30.400 --> 00:06:31.644
and when I execute it,
00:06:31.644 --> 00:06:34.560
it's going to open this video here
00:06:34.560 --> 00:06:37.759
at this timestamp. Let's see.
00:06:37.759 --> 00:06:49.440
1, 2, 3. 1, 2, 3.
That's the way to do it.
00:06:49.440 --> 00:06:51.956
And also some hyperlinks
00:06:51.956 --> 00:06:53.680
that I defined,
00:06:53.680 --> 00:06:55.940
they don't work like
00:06:55.940 --> 00:06:58.160
usual hyperlinks. They work more
00:06:58.160 --> 00:07:01.440
like browser buttons,
00:07:01.440 --> 00:07:06.240
these buttons that appear in web pages,
00:07:06.240 --> 00:07:09.120
in the sense that these buttons usually
00:07:09.120 --> 00:07:11.360
don't open a new page. They usually
00:07:11.360 --> 00:07:14.960
just do something to change
the current page.
00:07:14.960 --> 00:07:17.312
If I execute this, the action
00:07:17.312 --> 00:07:22.240
of this function eek is to...
00:07:22.240 --> 00:07:25.423
It interprets this string
as a series of keys
00:07:25.423 --> 00:07:30.051
and it acts as if the user had
typed all these keys.
00:07:30.051 --> 00:07:32.706
So if executed, I get a hello
00:07:32.706 --> 00:07:34.400
in the next line.
00:07:34.400 --> 00:07:36.639
If executed again, I get another hello.
00:07:36.639 --> 00:07:39.440
Another hello. hello. hello. etc. etc.
00:07:39.440 --> 00:07:44.319
Let me undo this mess. Oops.
00:07:44.319 --> 00:07:47.840
And here is another kind of button
00:07:47.840 --> 00:07:51.440
that defines a new function. If I execute
00:07:51.440 --> 00:07:54.879
this sexp here, at this moment, though it's
00:07:54.879 --> 00:07:55.759
not defined.
00:07:55.759 --> 00:07:57.919
And if I execute this, Emacs is going to
00:07:57.919 --> 00:08:00.000
show me a message saying
00:08:00.000 --> 00:08:03.599
symbol as function cell is not defined,
00:08:03.599 --> 00:08:05.840
something like this.
00:08:05.840 --> 00:08:09.520
But if I execute the defun,
00:08:09.520 --> 00:08:12.960
the action of this function o here
00:08:12.960 --> 00:08:18.960
is to run this, which opens a certain
directory.
00:08:18.960 --> 00:08:21.840
Let me go back. Here is another
00:08:21.840 --> 00:08:23.039
button that defines
00:08:23.039 --> 00:08:25.489
several functions at the same time.
00:08:25.489 --> 00:08:32.320
If I execute this,
00:08:32.320 --> 00:08:34.561
note that the the result of
00:08:34.561 --> 00:08:36.719
executing this expression
00:08:36.719 --> 00:08:38.447
is the name of one of the functions
00:08:38.447 --> 00:08:40.080
that it defined.
00:08:40.080 --> 00:08:42.800
That is this one here. Let me explain
00:08:42.800 --> 00:08:46.959
these examples. One of the functions
00:08:46.959 --> 00:08:48.800
that this thing here defined
00:08:48.800 --> 00:08:51.839
is called find-orggitfile, where
00:08:51.839 --> 00:08:54.640
this orggit in the middle of its name
00:08:54.640 --> 00:08:59.600
is exactly this first argument to
code-c-d.
00:08:59.600 --> 00:09:03.120
The action of running find-orggitfile
00:09:03.120 --> 00:09:06.399
on a string like this is that
00:09:06.399 --> 00:09:09.680
find-orggitfile takes the string
00:09:09.680 --> 00:09:13.360
and prepends this string to it,
00:09:13.360 --> 00:09:15.600
this one here which is the second
00:09:15.600 --> 00:09:17.920
argument to code-c-d,
00:09:17.920 --> 00:09:21.760
and then it executes find-fline
00:09:21.760 --> 00:09:25.680
on the result, which is this one.
00:09:25.680 --> 00:09:28.320
find-fline is my variant of find-file
00:09:28.800 --> 00:09:32.080
that supports both spec lists.
00:09:32.080 --> 00:09:36.880
This function here that I'm
00:09:36.880 --> 00:09:38.538
referring to as a button,
00:09:38.538 --> 00:09:41.200
it also defines a function called
00:09:41.200 --> 00:09:44.880
find-orggitnode here, where the orggit
00:09:44.880 --> 00:09:46.839
is the same string as here.
00:09:46.839 --> 00:09:50.320
This function opens a node
00:09:50.320 --> 00:09:54.160
of an info manual. This one,
00:09:54.160 --> 00:09:57.310
this text here opens this node
00:09:57.310 --> 00:10:00.080
in the Org manual.
00:10:00.080 --> 00:10:03.519
It is equivalent to this text here.
00:10:03.519 --> 00:10:06.225
So in the passage from this line
00:10:06.225 --> 00:10:08.720
to this line, we prepended
00:10:08.720 --> 00:10:12.310
to the node name the name of
the manual here.
00:10:12.310 --> 00:10:15.040
find-node is my variant
00:10:15.040 --> 00:10:18.160
of this standard Emacs function here,
00:10:18.160 --> 00:10:20.119
but find-node also supports
00:10:20.119 --> 00:10:23.519
postback lists.
00:10:23.519 --> 00:10:26.640
eev also defines some functions that
00:10:26.640 --> 00:10:28.423
define shorter hyperlinks to PDFs
00:10:28.423 --> 00:10:30.800
and videos.
00:10:30.800 --> 00:10:32.574
Remember that this thing here
00:10:32.574 --> 00:10:34.322
is a shorter hyperlink
00:10:34.322 --> 00:10:36.668
to a file. This thing here
00:10:36.668 --> 00:10:39.040
is a shorter hyperlink to a node
00:10:39.040 --> 00:10:43.200
in an Emacs menu in an info manual.
00:10:43.200 --> 00:10:47.279
If we run this thing here, this
code-pdf-page,
00:10:47.279 --> 00:10:50.240
this acts like a button that defines a
00:10:50.240 --> 00:10:52.880
certain function
00:10:52.880 --> 00:10:56.669
and this string,
this other sexp here,
00:10:56.669 --> 00:10:58.430
defines another function.
00:10:58.430 --> 00:11:00.240
The first one defines
00:11:00.240 --> 00:11:02.745
the function find-fongspivak-page,
00:11:02.745 --> 00:11:05.360
and the second one defines the
function find-fongspivak-text.
00:11:05.360 --> 00:11:09.608
When we run the file,
00:11:09.608 --> 00:11:12.020
when we run find-fongspivak-page,
00:11:12.020 --> 00:11:15.686
it opens this PDF here.
00:11:15.686 --> 00:11:20.640
The name is quite long.
00:11:20.640 --> 00:11:23.839
This example opens this PDF at page 8
00:11:23.839 --> 00:11:26.079
and searches for the string contents.
00:11:26.079 --> 00:11:31.279
In this case, it just ignores
this string.
00:11:31.279 --> 00:11:33.519
Here it only considers
00:11:33.519 --> 00:11:37.360
the number of the page. Let's try.
00:11:42.640 --> 00:11:45.200
Here it is, the contents of a book
00:11:45.200 --> 00:11:51.760
that is freely available. Here is
another page of the book.
00:11:51.760 --> 00:11:55.519
And if we execute this
hyperlink here,
00:11:55.519 --> 00:11:58.399
find-fongspivak-text, it converts the
00:11:58.399 --> 00:11:59.920
PDF to text
00:11:59.920 --> 00:12:03.382
and it searches for
page eight in it,
00:12:03.382 --> 00:12:04.754
and then for the string,
00:12:04.754 --> 00:12:08.079
this string here in page eight.
00:12:08.079 --> 00:12:12.240
It takes a few seconds.
00:12:12.240 --> 00:12:16.160
Here it is. So this is the
00:12:16.160 --> 00:12:20.892
ASCII version of this contents page
here.
00:12:20.892 --> 00:12:25.040
Note that this block here
00:12:25.040 --> 00:12:28.800
is a kind of an index to that book.
00:12:28.800 --> 00:12:31.360
I have the full index somewhere,
00:12:31.360 --> 00:12:32.506
but it's very long,
00:12:32.506 --> 00:12:34.959
so I just copied a few lines here.
00:12:34.959 --> 00:12:38.959
So this is a link to s
00:12:38.959 --> 00:12:42.160
section one, chapter one. This is the
00:12:42.160 --> 00:12:48.959
section 1.1, section 1.1.1, and so on.
00:12:48.959 --> 00:12:54.000
Here is a link to the index.
00:12:54.000 --> 00:12:58.079
Here is a part of my index
00:12:58.079 --> 00:13:03.279
of positions in the video
that we just saw
00:13:03.279 --> 00:13:07.360
that I think that are especially
relevant.
00:13:07.360 --> 00:13:11.940
So this hyperlink is a kind
of a button
00:13:11.940 --> 00:13:14.160
that defines this function here,
00:13:14.160 --> 00:13:18.839
find-punchandjudyvideo. Into the video.
00:13:27.600 --> 00:13:30.800
We can also use this for
00:13:30.800 --> 00:13:33.360
video tutorials. For example,
00:13:33.360 --> 00:13:37.200
this is a very good tutorial on Magit.
00:13:37.200 --> 00:13:40.880
If we execute this,
00:13:40.880 --> 00:13:42.560
then these functions are going to be
00:13:42.560 --> 00:13:44.800
defined, and these functions open
00:13:44.800 --> 00:13:48.399
this tutorial on Magit.
00:13:48.399 --> 00:13:50.079
These are some of the positions in the
00:13:50.079 --> 00:13:52.904
tutorial that I found
especially relevant.
00:13:52.904 --> 00:13:54.408
This is a very dense tutorial.
00:13:54.408 --> 00:13:56.480
I had to take notes
of everything,
00:13:56.480 --> 00:13:59.040
and I had to watch everything
00:13:59.040 --> 00:14:00.800
several times.
00:14:00.800 --> 00:14:02.896
For example, this is a link
00:14:02.896 --> 00:14:05.444
to the position in the tutorial
00:14:05.444 --> 00:14:11.005
that explains how in Spacemacs,
00:14:11.005 --> 00:14:17.600
Magit interprets SPC g s as magit-status.
00:14:17.600 --> 00:14:20.480
Let's see. "...beginners.
SPC g s to initiate
00:14:20.480 --> 00:14:22.320
Magit's git status.
00:14:22.320 --> 00:14:25.600
You can also do..." That's it.
00:14:25.600 --> 00:14:28.800
Here are some examples that I
00:14:28.800 --> 00:14:31.200
took from somewhere else.
00:14:31.200 --> 00:14:34.240
The video tutorials from
00:14:34.240 --> 00:14:43.519
Rainer Koenig about Org Mode.
00:14:43.519 --> 00:14:45.308
Now let me show how the functions
00:14:45.308 --> 00:14:47.220
that define these shorter hyperlinks
00:14:47.220 --> 00:14:48.720
are implemented.
00:14:48.720 --> 00:14:50.509
The standard ways in Emacs
00:14:50.509 --> 00:14:53.741
to define functions that define
other functions
00:14:53.741 --> 00:14:55.760
would be with macros.
00:14:55.760 --> 00:14:58.320
Let's see an example. This is a standard
00:14:58.320 --> 00:15:01.540
function that defines new functions.
00:15:02.959 --> 00:15:06.959
If we execute it,
00:15:06.959 --> 00:15:09.040
its result is the last function that it
00:15:09.040 --> 00:15:11.527
defined, which is ee-glyph,
00:15:11.527 --> 00:15:13.920
which is here.
00:15:13.920 --> 00:15:16.959
It's implemented as a macro. We can
00:15:16.959 --> 00:15:20.880
look at the result of macro-expand,
which is going to
00:15:20.880 --> 00:15:22.975
show us the result of this,
00:15:22.975 --> 00:15:25.519
of the expansion of this.
00:15:25.519 --> 00:15:27.804
Instead of expanding and executing,
00:15:27.804 --> 00:15:33.199
it just expands and shows us the result.
00:15:33.199 --> 00:15:35.439
Here the result is a bit messy.
00:15:35.439 --> 00:15:39.396
It's too big for humans to understand,
00:15:39.396 --> 00:15:42.894
but we can run this or this text here.
00:15:42.894 --> 00:15:47.519
That takes that result
and pretty-prints it.
00:15:47.519 --> 00:15:50.701
So this is the pretty-printed version
00:15:50.701 --> 00:15:54.000
of this macro here.
00:15:54.000 --> 00:15:57.600
We can see that it defines
00:15:57.600 --> 00:16:01.120
several functions here.
00:16:01.120 --> 00:16:06.399
For example, this one.
00:16:06.399 --> 00:16:09.360
And this, just as a curiosity, is a link
00:16:09.360 --> 00:16:13.839
to the definition of cl-defstruct.
00:16:13.839 --> 00:16:16.880
Note that the code is huge.
00:16:16.880 --> 00:16:18.677
Well, it's very well-commented,
00:16:18.677 --> 00:16:22.577
but it has lots of special cases.
00:16:22.577 --> 00:16:26.210
It supports lots of constructions,
00:16:26.210 --> 00:16:27.920
and so it's huge.
00:16:27.920 --> 00:16:30.174
It's very difficult to understand.
00:16:30.174 --> 00:16:33.360
I mean, I found it very difficult
to understand.
00:16:33.360 --> 00:16:35.040
Here's a link to document the
00:16:35.040 --> 00:16:37.759
documentation of cl-defstruct
00:16:37.759 --> 00:16:42.210
here in the manual for cl,
00:16:42.210 --> 00:16:45.025
which is a kind of support
00:16:45.025 --> 00:16:50.480
for some features of Common Lisp
in Emacs.
00:16:50.480 --> 00:16:53.825
So let's compare this standard way of
00:16:53.825 --> 00:16:56.560
defining functions that
define new functions,
00:16:56.560 --> 00:16:59.253
which is with macros,
with this.
00:16:59.253 --> 00:17:02.300
I'm going to use a slogan
repeatedly.
00:17:02.300 --> 00:17:06.319
The slogan is: "I am a very bad
programmer."
00:17:06.319 --> 00:17:08.005
I'm a very bad programmer.
00:17:08.005 --> 00:17:10.082
So, when I was trying to create
functions
00:17:10.082 --> 00:17:12.240
that would define new functions,
00:17:12.240 --> 00:17:14.480
I found it easier to generally generate
00:17:14.480 --> 00:17:16.400
this code as text,
00:17:16.400 --> 00:17:20.559
and then run read and eval in it.
00:17:20.559 --> 00:17:24.640
The code-c-d that we saw
in the previous section,
00:17:24.640 --> 00:17:28.079
we can see the code that it produces
00:17:28.079 --> 00:17:30.769
by making a copy of this line
00:17:30.769 --> 00:17:32.579
and prepending this string here
00:17:32.579 --> 00:17:34.480
to the name of the function.
00:17:34.480 --> 00:17:36.317
So, instead of running code-c-d,
00:17:36.317 --> 00:17:38.400
we run find-code-cd,
00:17:38.400 --> 00:17:41.280
and it creates a new temporary buffer
00:17:41.280 --> 00:17:44.400
with the code that
00:17:44.400 --> 00:17:47.760
code-c-d would execute.
00:17:47.760 --> 00:17:54.080
So it's a series of the defuns
and a few setqs and so on.
00:17:54.080 --> 00:17:59.120
And this thing is implemented mostly as
a template.
00:18:02.160 --> 00:18:04.045
There's an inner function called
00:18:04.045 --> 00:18:06.240
ee-code-c-d-base that receives just
00:18:06.240 --> 00:18:08.799
these two arguments, and it says...
00:18:08.799 --> 00:18:10.640
Essentially, it just runs the function
00:18:10.640 --> 00:18:14.320
ee-template0 on the string here, and
00:18:14.320 --> 00:18:16.480
the things between curly braces are
00:18:16.480 --> 00:18:18.559
substituted by the values
00:18:18.559 --> 00:18:23.600
of these arguments here.
00:18:23.600 --> 00:18:25.919
There's one part of the tutorial here
00:18:25.919 --> 00:18:28.480
that explains all these things,
00:18:28.480 --> 00:18:31.039
except for the rationale for some
00:18:31.039 --> 00:18:32.559
design decisions,
00:18:32.559 --> 00:18:35.360
and those design decisions are one of
00:18:35.360 --> 00:18:37.280
the many motivations for this talk.
00:18:37.760 --> 00:18:39.679
I'm only going to explain these
00:18:39.679 --> 00:18:42.640
things in detail at the end,
00:18:42.640 --> 00:18:48.480
which is kind of...
00:18:48.480 --> 00:18:49.662
So in the beginning, I said
00:18:49.662 --> 00:18:51.600
that the three main keys of eev
00:18:51.600 --> 00:18:56.000
are M-e, M-k and M-j.
00:18:56.000 --> 00:19:00.080
Let's see now what M-j does.
00:19:00.080 --> 00:19:02.447
I need to start with some
motivation.
00:19:02.447 --> 00:19:04.640
The motivation is that we
00:19:04.640 --> 00:19:06.559
can define commands with very short
00:19:06.559 --> 00:19:08.240
names. Actually, I became kind of
00:19:08.240 --> 00:19:10.160
addicted to that.
00:19:10.160 --> 00:19:13.200
This is an example of defun that
00:19:13.200 --> 00:19:15.600
defines a comment with a very short name.
00:19:15.600 --> 00:19:18.000
Its name is just one letter, "e."
00:19:18.000 --> 00:19:20.530
and I can invoke... You invoke it
00:19:20.530 --> 00:19:21.856
with M-x e.
00:19:21.856 --> 00:19:24.720
If I type M-x p,
00:19:24.720 --> 00:19:26.661
now it opens a LaTeX file
00:19:26.661 --> 00:19:31.130
that I'm working on.
00:19:32.559 --> 00:19:35.200
I create most of my LaTeX files
00:19:35.200 --> 00:19:39.200
using template-based functions like
00:19:39.200 --> 00:19:43.760
the implementation of code-c-d above.
00:19:43.760 --> 00:19:45.576
These template-based functions
00:19:45.576 --> 00:19:49.280
create files with extension .tex
00:19:49.280 --> 00:19:51.280
that start with a series of defuns
00:19:51.280 --> 00:19:53.919
in comments. For example,
00:19:53.919 --> 00:19:55.926
let's look at this example here.
00:19:55.926 --> 00:19:58.049
If I execute find-latex-links
00:19:58.049 --> 00:19:59.440
with this argument,
00:19:59.440 --> 00:20:02.525
it's going to do several things
00:20:02.525 --> 00:20:08.320
for creating a file called /tmp/foo.tex,
00:20:08.320 --> 00:20:10.387
and the header of that file
00:20:10.387 --> 00:20:12.400
is going to be this,
00:20:12.400 --> 00:20:16.080
which starts with three
00:20:16.080 --> 00:20:19.280
defuns with functions with very short
00:20:19.280 --> 00:20:21.919
names and comments.
00:20:21.919 --> 00:20:27.520
Let's compare with the situation here.
00:20:27.520 --> 00:20:32.799
In my file, 2020favorite-conventions.tex,
00:20:32.799 --> 00:20:34.640
I have this header here in which I
00:20:34.640 --> 00:20:39.360
define six functions with
very short names.
00:20:39.360 --> 00:20:41.919
And in this case here, that is even
00:20:41.919 --> 00:20:44.799
explained in the tutorial.
00:20:44.799 --> 00:20:48.000
These... We have mnemonics for
00:20:48.000 --> 00:20:51.520
these short names here. c is compile,
00:20:51.520 --> 00:20:54.799
d is display. I mean, display the PDF.
00:20:54.799 --> 00:20:57.377
e is added in the sense of
00:20:57.377 --> 00:21:02.320
make Emacs visit that file.
00:21:02.320 --> 00:21:06.480
Now I can explain what is M-j
itself.
00:21:06.480 --> 00:21:09.600
We just saw commands with
very short names.
00:21:09.600 --> 00:21:12.048
The idea behind M-j is that
00:21:12.048 --> 00:21:14.031
we can define commands with
00:21:14.031 --> 00:21:16.480
very short numbers.
00:21:16.480 --> 00:21:19.679
Let me explain this.
00:21:19.679 --> 00:21:23.039
The short explanation
for what M-j does
00:21:23.039 --> 00:21:25.360
is that it jumps to set certain
00:21:25.360 --> 00:21:27.039
predefined places.
00:21:27.039 --> 00:21:30.799
In particular, a M-j without
a numeric argument
00:21:30.799 --> 00:21:32.216
takes us to a buffer
00:21:32.216 --> 00:21:34.080
with the basic help
00:21:34.080 --> 00:21:37.679
and a list of the current jump targets.
00:21:37.679 --> 00:21:39.760
This is something that is a bit
00:21:39.760 --> 00:21:41.520
simpler to understand.
00:21:41.520 --> 00:21:44.559
If we type M-5 M-j,
00:21:44.559 --> 00:21:48.411
then M-j runs this sexp here
00:21:48.411 --> 00:21:51.120
that is associated to
00:21:51.120 --> 00:21:55.440
the argument 5. I say that the target
00:21:55.440 --> 00:21:59.039
for the argument 5 is this one,
00:21:59.039 --> 00:22:01.520
and if the argument is true, then the
00:22:01.520 --> 00:22:03.760
target associated to the true
00:22:03.760 --> 00:22:07.039
is this sexp here that opens...
00:22:07.039 --> 00:22:09.600
This one opens the main tutorial
for eev,
00:22:09.600 --> 00:22:13.679
and this one opens another tutorial.
00:22:13.679 --> 00:22:15.679
This is a link to one of the tutorials
00:22:15.679 --> 00:22:20.480
of eev to the part that explains M-j.
00:22:20.480 --> 00:22:22.212
I've copied the the main part
00:22:22.212 --> 00:22:24.559
of the text here.
00:22:24.559 --> 00:22:28.159
The header that M-j shows...
00:22:28.159 --> 00:22:31.360
Let me show it very quickly here.
00:22:31.360 --> 00:22:36.320
Here is their head and
here is the rest.
00:22:36.320 --> 00:22:38.773
The header is very beginner friendly,
00:22:38.773 --> 00:22:40.000
and if you're a beginner
00:22:40.000 --> 00:22:42.159
who only knows how to use M-e to
00:22:42.159 --> 00:22:44.559
execute and...
00:22:44.559 --> 00:22:46.706
This should be okay.
00:22:46.706 --> 00:22:48.240
M-k to go back.
00:22:48.240 --> 00:22:52.320
Then you can and should use that header--
00:22:52.320 --> 00:22:56.720
I mean, this header here--
00:22:56.720 --> 00:22:58.894
as your main starting point.
00:22:58.894 --> 00:23:00.799
Every time that you feel lost,
00:23:00.799 --> 00:23:04.799
you can type M-j to go back to
that header,
00:23:04.799 --> 00:23:08.000
and you can use its links to
navigate to the documentation
00:23:08.000 --> 00:23:11.360
for Emacs and eev. Let me explain that.
00:23:11.360 --> 00:23:15.679
This header here has several elisp
hyperlinks.
00:23:15.679 --> 00:23:22.400
One here, one here, one here,
one here, and so on.
00:23:22.400 --> 00:23:25.760
These ones are links to the
00:23:25.760 --> 00:23:29.280
to the intros, which are the tutorials.
00:23:29.280 --> 00:23:31.520
find-eev-quick-intro is the
main tutorial,
00:23:31.520 --> 00:23:35.760
and find-emacs-keys-intro is a
kind of tutorial that is
00:23:35.760 --> 00:23:40.000
an index of the main keys.
00:23:40.000 --> 00:23:42.559
After that, we have an explanation of
00:23:42.559 --> 00:23:45.449
what some numeric prefixes do.
00:23:45.449 --> 00:23:49.913
So if we type M-1 M-j,
the effect of that
00:23:49.913 --> 00:23:53.200
is exactly the same as
executing this.
00:23:53.200 --> 00:24:00.159
We can execute this with M-e also.
00:24:00.159 --> 00:24:03.679
M-2 M-j runs this sexp and
00:24:03.679 --> 00:24:06.960
I can also execute it with M-e.
00:24:06.960 --> 00:24:18.400
Here it is. It's this intro, this
sandbox tutorial.
00:24:18.400 --> 00:24:24.640
Here is another sandbox tutorial.
00:24:24.640 --> 00:24:27.039
Let me go back. Then the
00:24:27.039 --> 00:24:29.388
documentation says that header,
00:24:29.388 --> 00:24:31.760
the header that is beginner-friendly
00:24:31.760 --> 00:24:33.679
is followed by a section that is very
00:24:33.679 --> 00:24:35.520
beginner-unfriendly
00:24:35.520 --> 00:24:40.400
that contains a series of defuns
like these ones.
00:24:40.400 --> 00:24:44.640
Here, the last line of the header is
this comment here.
00:24:44.640 --> 00:24:48.559
Then we have several defuns like this.
00:24:48.559 --> 00:24:51.440
Let me explain how these things work.
00:24:51.440 --> 00:24:53.082
Technically, what happens
00:24:53.082 --> 00:24:56.399
when we type M-j without any arguments
00:24:56.399 --> 00:25:00.230
is that it runs eejump with argument nil,
00:25:00.230 --> 00:25:04.640
and then this runs 5 eejumps.
00:25:04.640 --> 00:25:07.224
When I run M-j with a numeric argument,
00:25:07.224 --> 00:25:13.374
for example, with argument 5,
it runs a jump 5.
00:25:13.374 --> 00:25:17.679
eejump-5 concatenates this 5 one
00:25:17.679 --> 00:25:19.999
to make a name of a function,
00:25:19.999 --> 00:25:21.679
this function here.
00:25:21.679 --> 00:25:24.720
and it executes this function
eejump-5.
00:25:24.720 --> 00:25:31.919
You jump -5, and eejump-5
00:25:31.919 --> 00:25:35.520
executes find-eev-quick-intro.
00:25:35.520 --> 00:25:39.360
If I execute just M-j,
00:25:39.360 --> 00:25:40.533
the section that shows
00:25:40.533 --> 00:25:43.919
the current jump targets
00:25:43.919 --> 00:25:46.719
has a line for eejump-5. This is...
00:25:46.719 --> 00:25:52.400
That is exactly the thing
that I was explaining before.
00:25:52.400 --> 00:25:54.544
So we can use M-j to navigate
00:25:54.544 --> 00:25:59.520
the tutorials. We can copy the links.
00:25:59.520 --> 00:26:03.440
Sorry. We can copy links to the
00:26:03.440 --> 00:26:07.919
tutorials to our notes.
00:26:07.919 --> 00:26:11.840
Oh, sorry, this has some typos.
00:26:11.840 --> 00:26:14.880
For example, if I execute this,
00:26:14.880 --> 00:26:18.080
I go to a section of this tutorial here
00:26:18.080 --> 00:26:20.640
that explains the main keys of eev.
00:26:20.640 --> 00:26:23.670
These things are hyperlinks.
00:26:23.670 --> 00:26:25.597
I can mark a hyperlink like this.
00:26:25.597 --> 00:26:27.286
it is just plain text.
00:26:27.286 --> 00:26:29.525
I can copy it to my notes.
00:26:29.525 --> 00:26:31.760
The idea is that every time
00:26:31.760 --> 00:26:34.016
that I find something that is
interesting,
00:26:34.016 --> 00:26:36.240
I can create a hyperlink to it.
00:26:36.240 --> 00:26:38.513
I can put these links in my notes
00:26:38.513 --> 00:26:40.799
so I can navigate back
00:26:40.799 --> 00:26:42.667
to all the interesting positions
00:26:42.667 --> 00:26:48.799
very quickly.
00:26:48.799 --> 00:26:57.600
Okay, next feature.
If we type M-J (uppercase), then
00:26:57.600 --> 00:27:00.080
this is a function that transforms
00:27:00.080 --> 00:27:03.679
the current line in a certain way.
00:27:03.679 --> 00:27:06.471
Let me give an example.
Let me isolate this.
00:27:06.471 --> 00:27:11.039
Let me duplicate this line
to make clear what happens.
00:27:11.039 --> 00:27:14.240
If I type M-J (uppercase) here,
00:27:14.240 --> 00:27:17.561
this line here becomes
the defun for eejump-6,
00:27:17.561 --> 00:27:21.200
and the target of this eejump
00:27:21.200 --> 00:27:24.799
is exactly this sexp here.
00:27:24.799 --> 00:27:28.559
Let me undo this mess.
00:27:28.559 --> 00:27:30.815
If the first word in the line
00:27:30.815 --> 00:27:32.840
is not a number... For example,
00:27:32.840 --> 00:27:36.240
here, let me do the same thing:
00:27:36.240 --> 00:27:41.200
duplicate the line and type M-J,
00:27:41.200 --> 00:27:44.014
then M-J (uppercase) converts that to
00:27:44.014 --> 00:27:49.440
a defun that defines a function
with a very short name.
00:27:49.440 --> 00:27:52.720
This function with a very short name
00:27:52.720 --> 00:27:56.720
opens this file here in the directory
00:27:56.720 --> 00:27:59.360
with the copy of the git repository
00:27:59.360 --> 00:28:01.360
for Org Mode.
00:28:01.360 --> 00:28:05.360
Let me undo the mess again.
00:28:05.360 --> 00:28:14.640
Oops. That's it.
00:28:14.640 --> 00:28:21.279
M-J (uppercase) is a particular case
of something that
00:28:21.279 --> 00:28:23.708
I use a lot in eev.
00:28:23.708 --> 00:28:28.799
eev has lots of commands that--
sorry, key sequences
00:28:28.799 --> 00:28:31.466
that are like M- uppercase letter,
00:28:31.466 --> 00:28:34.660
and almost all of them operate
00:28:34.660 --> 00:28:36.019
on the current line and
00:28:36.019 --> 00:28:37.616
transform the current line
00:28:37.616 --> 00:28:38.880
in a certain way.
00:28:38.880 --> 00:28:42.000
For example, this is a filename.
00:28:42.000 --> 00:28:45.360
If I type M-F (uppercase) here,
00:28:45.360 --> 00:28:47.967
it becomes a link to that file.
00:28:47.967 --> 00:28:50.000
This is the name of a man page.
00:28:50.000 --> 00:28:53.600
If I type M-M (uppercase) here,
00:28:53.600 --> 00:28:55.292
it converts that to the link
00:28:55.292 --> 00:28:58.080
to a manpage. This is a shell command.
00:28:58.080 --> 00:29:01.679
If I type M-S (uppercase) here,
00:29:01.679 --> 00:29:04.960
it converts that to a link to a
00:29:04.960 --> 00:29:08.720
to find-sh (shell).
00:29:08.720 --> 00:29:12.960
Until a few years ago,
these functions
00:29:12.960 --> 00:29:16.159
with M- uppercase letter were half
00:29:16.159 --> 00:29:18.880
of my main ways of creating
sexp hyperlinks
00:29:18.880 --> 00:29:20.085
with a few key strokes.
00:29:20.085 --> 00:29:22.399
In the beginning, of course,
I had to create my
00:29:22.399 --> 00:29:25.600
sexp pipelines by typing each character.
00:29:25.600 --> 00:29:28.640
But after some time, I decided that
00:29:28.640 --> 00:29:31.520
I needed something more efficient.
00:29:31.520 --> 00:29:38.480
So this is the end of part one
of the presentation.
00:29:38.480 --> 00:29:40.640
So this is part two of the presentation,
00:29:40.640 --> 00:29:42.070
and the main theme here
00:29:42.070 --> 00:29:44.320
is the standard describe-key
00:29:44.320 --> 00:29:46.320
function that comes with Emacs.
00:29:46.320 --> 00:29:49.200
My variant of it... The thing is that
00:29:49.200 --> 00:29:50.960
the standard describe-key in Emacs
00:29:50.960 --> 00:29:52.738
is user-friendly, but it is
00:29:52.738 --> 00:29:55.600
hacker-unfriendly. Well, I felt so.
00:29:55.600 --> 00:29:58.281
When I tried to complement it
00:29:58.281 --> 00:30:00.799
by writing a hacker-friendly
version of it
00:30:00.799 --> 00:30:03.919
that produced the sexp hyperlinks
that I needed,
00:30:03.919 --> 00:30:06.457
I got something that
I found really lovely.
00:30:07.039 --> 00:30:08.994
Several of the main
00:30:08.994 --> 00:30:12.480
design decisions of eev can be seen there.
00:30:12.480 --> 00:30:13.995
When I showed my variants to
00:30:13.995 --> 00:30:15.520
other people, they hated it.
00:30:15.520 --> 00:30:16.851
They felt that it was
00:30:16.851 --> 00:30:19.360
totally against their notions of
00:30:19.360 --> 00:30:23.440
user-friendliness.
00:30:23.440 --> 00:30:24.606
Okay. So let's see.
00:30:24.606 --> 00:30:26.297
The standard describe-key,
00:30:26.297 --> 00:30:30.401
if I run this hyperlink here,
I get this.
00:30:30.401 --> 00:30:31.866
The result of running
00:30:31.866 --> 00:30:34.399
describe-key on the key down...
00:30:34.399 --> 00:30:35.799
This is a big buffer
00:30:35.799 --> 00:30:38.080
with some things in italics.
00:30:38.080 --> 00:30:40.752
Some hyperlinks here.
00:30:40.752 --> 00:30:42.387
These hyperlinks are standard
00:30:42.387 --> 00:30:43.679
in the sense that
00:30:43.679 --> 00:30:45.407
the targets are not visible,
00:30:45.407 --> 00:30:47.760
and they are implemented using
00:30:47.760 --> 00:30:49.519
buttons in Emacs Lisp.
00:30:49.519 --> 00:30:52.385
This section of the Emacs Lisp manual
00:30:52.385 --> 00:30:56.799
describes how buttons work.
00:30:56.799 --> 00:31:01.957
The source code is quite difficult.
00:31:01.957 --> 00:31:04.240
I mean, when I was starting to
00:31:04.240 --> 00:31:05.721
to try to decipher this
00:31:05.721 --> 00:31:07.600
when I was a beginner
00:31:07.600 --> 00:31:11.200
using Emacs 19.34, I felt that this
00:31:11.200 --> 00:31:12.320
describe-key was
00:31:12.320 --> 00:31:15.519
very difficult to understand.
00:31:15.519 --> 00:31:20.080
I felt that the the designers,
00:31:20.080 --> 00:31:22.640
the people who wrote it,
were sacrificing
00:31:22.640 --> 00:31:24.839
too much of the hacker-friendliness
00:31:24.839 --> 00:31:27.154
that I was expecting from it
00:31:27.154 --> 00:31:31.279
to make it beginner-friendly.
00:31:31.279 --> 00:31:33.600
Let me explain. What are the problems
00:31:33.600 --> 00:31:35.511
with the standard describe-key?
00:31:35.511 --> 00:31:37.336
If we think that hyperlinks
00:31:37.336 --> 00:31:38.640
are things like this
00:31:38.640 --> 00:31:41.600
with the target and the text, then in the
00:31:41.600 --> 00:31:43.600
button hyperlinks of describe-key,
00:31:43.600 --> 00:31:46.516
these three bad things happen.
00:31:46.516 --> 00:31:49.983
First, it is hard to extract
the target from the hyperlink.
00:31:49.983 --> 00:31:52.000
Second, it is hard to recreate
00:31:52.000 --> 00:31:55.440
a list of code that would
go to that target.
00:31:55.440 --> 00:31:57.519
Third, it is hard to copy the full
00:31:57.519 --> 00:32:00.640
hyperlink, including the targets
to other buffers.
00:32:00.640 --> 00:32:04.960
I only knew how to copy the text
00:32:04.960 --> 00:32:06.937
when I was trying to decipher
00:32:06.937 --> 00:32:09.039
what describe-key was doing.
00:32:09.039 --> 00:32:11.679
I created lots of hyperlinks like this
00:32:11.679 --> 00:32:16.159
to inspect the text properties and
things like that.
00:32:16.159 --> 00:32:18.113
For example, in the description
00:32:18.113 --> 00:32:20.390
of the key down here,
00:32:20.390 --> 00:32:26.799
we have a button that points to
simple.el.
00:32:26.799 --> 00:32:29.336
The text of that button is simple.el.
00:32:29.336 --> 00:32:31.600
This hyperlink goes to the
00:32:31.600 --> 00:32:35.519
to the middle of this
button hyperlink here.
00:32:35.519 --> 00:32:39.120
This hyperlink here
00:32:39.120 --> 00:32:43.279
goes to the middle of the button
of this button hyperlink,
00:32:43.279 --> 00:32:46.240
and then inspects its text properties,
00:32:46.240 --> 00:32:51.679
and then goes to this section here
of the description.
00:32:51.679 --> 00:32:53.521
So this is a high-level description
00:32:53.521 --> 00:32:56.159
of the text properties.
00:32:56.159 --> 00:32:58.782
I mean, the text properties that make it
a button.
00:32:58.782 --> 00:33:04.320
This is a lower-level description of
these text properties.
00:33:04.320 --> 00:33:08.000
The button that points to
00:33:08.000 --> 00:33:11.440
forward-line--sorry, the button
00:33:11.440 --> 00:33:14.399
whose text is forward-line, this one is
00:33:14.399 --> 00:33:16.480
slightly different--
00:33:16.480 --> 00:33:21.200
this hyperlink here goes to the middle
of that button.
00:33:21.200 --> 00:33:25.760
This hyperlink goes to the middle of
that button,
00:33:25.760 --> 00:33:28.173
inspects its text properties,
00:33:28.173 --> 00:33:29.360
and goes to the section
00:33:29.360 --> 00:33:33.617
of this button of this help buffer here
00:33:33.617 --> 00:33:36.399
that describes the button
00:33:36.399 --> 00:33:41.679
and the lower-level view of the text
properties.
00:33:41.679 --> 00:33:45.519
So I started with things like this
00:33:45.519 --> 00:33:47.866
to understand what these buttons
were doing
00:33:47.866 --> 00:33:49.339
and I was able to figure out
00:33:49.339 --> 00:33:51.620
how these things are implemented
00:33:51.620 --> 00:33:53.120
in describe-key, and then
00:33:53.120 --> 00:33:55.519
similar help functions in Emacs.
00:33:55.519 --> 00:33:57.506
I discovered that one of the
00:33:57.506 --> 00:33:59.049
main lower-level functions
00:33:59.049 --> 00:34:01.360
that Emacs used for this
00:34:01.360 --> 00:34:05.279
is a function called
find-function-noselect.
00:34:05.279 --> 00:34:09.929
If I run find-function-noselect
on next line,
00:34:11.200 --> 00:34:14.240
it returns a pair:
00:34:14.240 --> 00:34:18.079
a cons made of a buffer and a position.
00:34:18.079 --> 00:34:20.560
So I created functions that would
00:34:21.679 --> 00:34:24.320
follow this. That would open that
00:34:24.320 --> 00:34:26.510
buffer in that position
00:34:26.510 --> 00:34:29.679
and then this is a postback list.
00:34:29.679 --> 00:34:31.679
So we could go to these positions and
00:34:31.679 --> 00:34:33.919
then search for this string, and another
00:34:33.919 --> 00:34:36.000
string, and another string, and so on.
00:34:36.000 --> 00:34:41.040
So this goes to the definition
of find-efunction
00:34:41.040 --> 00:34:45.006
and then to a string after it.
00:34:45.006 --> 00:34:48.296
I use these things to implement
00:34:48.296 --> 00:34:51.839
my own functions that pointed to the
00:34:51.839 --> 00:34:55.339
same targets as the button hyperlinks
00:34:55.339 --> 00:35:00.240
and describe-key.
00:35:00.240 --> 00:35:02.673
Again, let me show the comparison.
00:35:02.673 --> 00:35:06.322
This is the standard
describe-key here,
00:35:06.322 --> 00:35:10.480
and this is my variant.
00:35:10.480 --> 00:35:13.839
It creates a buffer with links,
00:35:13.839 --> 00:35:17.680
with the list of hyperlinks about this key.
00:35:17.680 --> 00:35:20.960
We get this. So, each one of these
00:35:20.960 --> 00:35:22.960
functions is either a blank line
00:35:22.960 --> 00:35:28.720
or an elisp hyperlink.
00:35:28.720 --> 00:35:34.506
Here is a slight variant of the
function find-ekey-links above.
00:35:34.506 --> 00:35:39.280
In this variant, the argument is a
string that has to be processed by
00:35:39.280 --> 00:35:42.400
read-kbd-macro to convert it to the
00:35:42.400 --> 00:35:45.280
lower-level format.
00:35:45.280 --> 00:35:49.040
Note that these functions here
that I wrote,
00:35:49.040 --> 00:35:50.934
they display temporary buffers
00:35:50.934 --> 00:35:53.599
with no help at all.
00:35:53.599 --> 00:35:57.131
To be honest, there's a link to
00:35:57.131 --> 00:35:58.345
a tutorial here,
00:35:58.345 --> 00:36:00.467
but this is a recent edition
00:36:00.467 --> 00:36:03.200
so let's ignore this.
00:36:03.200 --> 00:36:06.640
They display temporary buffers
00:36:06.640 --> 00:36:07.949
with no help at all,
00:36:07.949 --> 00:36:09.520
just lots of hyperlinks.
00:36:09.520 --> 00:36:11.172
And these hyperlinks can be...
00:36:11.172 --> 00:36:13.359
They are very hacker-friendly
in the sense that
00:36:13.359 --> 00:36:15.477
they can be followed with M-e.
00:36:15.477 --> 00:36:17.520
They can be copied to other
00:36:17.520 --> 00:36:19.920
buffers because they are plain text,
00:36:19.920 --> 00:36:23.680
because they are just sexp.
00:36:23.680 --> 00:36:28.000
And they can be inspected
in the sense that...
00:36:28.000 --> 00:36:32.400
For example, here,
00:36:32.400 --> 00:36:35.520
we have a hyperlink to a function
that we...
00:36:35.520 --> 00:36:37.599
It may be difficult to figure out what
00:36:37.599 --> 00:36:39.200
this function does,
00:36:39.200 --> 00:36:41.600
but we can go to that position,
00:36:41.600 --> 00:36:45.839
and then type C-h f to see the
00:36:45.839 --> 00:36:48.240
description of this function.
00:36:48.240 --> 00:36:53.890
And here is a hyperlink that does that
00:36:56.000 --> 00:37:00.160
in my syntax, say.
00:37:00.160 --> 00:37:02.800
This list of hyperlinks were
00:37:02.800 --> 00:37:08.000
generated by this code here that just
00:37:08.000 --> 00:37:11.119
used a back quote to generate
00:37:11.119 --> 00:37:14.640
lists of sexps.
00:37:14.640 --> 00:37:18.240
I felt that this function here
00:37:18.240 --> 00:37:20.700
that just generated this list
00:37:20.700 --> 00:37:23.393
was very easy to understand
and to modify,
00:37:23.393 --> 00:37:28.480
so this was hacker-friendly
in the way that I wanted.
00:37:28.480 --> 00:37:31.599
So I started using this,
00:37:31.599 --> 00:37:33.459
and this idea of using buffers
00:37:33.459 --> 00:37:36.066
with sexp hyperlinks and no help
00:37:36.066 --> 00:37:38.720
violated all the notions
of user-friendliness
00:37:38.720 --> 00:37:40.079
that I knew, so I was
00:37:40.079 --> 00:37:41.504
exploring something new
00:37:41.504 --> 00:37:46.160
at that time. This is the end of
part two.
00:37:46.160 --> 00:37:49.359
Part three of this presentation is
00:37:49.359 --> 00:37:51.735
about the killer features of eev,
00:37:51.735 --> 00:37:53.778
or why everybody should use eev
00:37:53.778 --> 00:37:55.789
or at least have eev installed
00:37:55.789 --> 00:37:59.280
even if they think that eev
is too weird.
00:37:59.280 --> 00:38:01.200
So this is a very quick listing.
00:38:01.200 --> 00:38:04.240
eev has elisp hyperlinks
which are super nice.
00:38:04.240 --> 00:38:06.050
It comes with lots of tutorials.
00:38:06.050 --> 00:38:10.800
The main one here explains all the
main features.
00:38:10.800 --> 00:38:14.079
There's also a tutorial that's
00:38:14.079 --> 00:38:18.079
an index of all the other tutorials here.
00:38:18.079 --> 00:38:20.509
Many, many, many tutorials.
00:38:20.509 --> 00:38:24.079
If we forget everything,
we can just type M-j.
00:38:24.079 --> 00:38:28.104
Remember that this part here
is beginner-friendly,
00:38:28.104 --> 00:38:32.960
and the rest is
beginner-unfriendly.
00:38:32.960 --> 00:38:38.320
There's a tutorial on Emacs Lisp here.
00:38:38.320 --> 00:38:41.920
It mainly explains how to understand
00:38:41.920 --> 00:38:44.640
Elisp code, which is much easier than...
00:38:44.640 --> 00:38:46.673
It's much easier to understand
Elisp code
00:38:46.673 --> 00:38:50.160
than to understand how to
program in Elisp.
00:38:50.160 --> 00:38:53.440
Most people are only going to need this.
00:38:53.440 --> 00:38:55.368
eev is very easy to install.
00:38:55.368 --> 00:38:58.240
It's in ELPA, so we just need to do
00:38:58.240 --> 00:39:03.520
this thing here, and it's very
non-invasive.
00:39:03.520 --> 00:39:05.472
Years ago, several years ago,
00:39:05.472 --> 00:39:07.039
it was a very invasive package,
00:39:07.039 --> 00:39:08.960
but then I changed everything.
00:39:08.960 --> 00:39:13.520
Now, if we toggle eev-mode on and off,
00:39:13.520 --> 00:39:16.320
what's going to happen is just that
00:39:16.320 --> 00:39:21.599
the eev-keymap becomes activated or
deactivated.
00:39:21.599 --> 00:39:24.720
When we install eev--
00:39:24.720 --> 00:39:27.064
I mean when we require eev,
00:39:27.064 --> 00:39:32.640
the only things that happens globally
are these things here:
00:39:32.640 --> 00:39:34.993
several functions and variables
become defined.
00:39:34.993 --> 00:39:40.079
All of them have standard prefixes,
except for one.
00:39:40.079 --> 00:39:43.040
Three characters are changed in the
00:39:43.040 --> 00:39:44.480
standard display table
00:39:44.480 --> 00:39:48.640
to make them appear as colored glyphs:
00:39:48.640 --> 00:39:52.780
the red star, the open
double angle brackets,
00:39:52.780 --> 00:39:58.160
and the closed double angle brackets.
00:39:58.160 --> 00:40:01.359
Two environment variables are set.
00:40:01.359 --> 00:40:04.560
This is a trivial technicality.
00:40:04.560 --> 00:40:10.800
We just run a defadvice around one
function that is used by "man."
00:40:10.800 --> 00:40:18.400
Also, eev has a very high
discoverability factor.
00:40:18.400 --> 00:40:22.135
There's a way to create,
a very easy way
00:40:22.135 --> 00:40:25.200
to create a hyperlink to here.
00:40:25.200 --> 00:40:27.760
I do not have time to show this now,
00:40:27.760 --> 00:40:31.200
but for example, if I'm here
in a tutorial,
00:40:31.200 --> 00:40:35.736
and I think that this section
is something interesting
00:40:35.736 --> 00:40:39.520
and I want to create a hyperlink to it,
00:40:39.520 --> 00:40:43.040
I just have to type a certain key
sequence here,
00:40:43.040 --> 00:40:45.783
and here I got a hyperlink
00:40:45.783 --> 00:40:48.269
that I can copy to my notes,
00:40:48.269 --> 00:40:52.260
and this hyperlink goes to that section.
00:40:58.240 --> 00:41:02.092
We have hyperlinks that point to
specific positions
00:41:02.092 --> 00:41:05.382
in PDF documents and in video files.
00:41:05.382 --> 00:41:09.119
Here, this one opens a PDF
and displays it.
00:41:09.119 --> 00:41:13.920
This one opens a PDF
and converts it to text.
00:41:13.920 --> 00:41:18.400
and this one opens the video in a
certain position.
00:41:18.400 --> 00:41:20.480
We also have a way to control
00:41:20.480 --> 00:41:22.079
shell-like programs.
00:41:22.079 --> 00:41:25.111
In my presentation of the last year,
00:41:25.111 --> 00:41:28.163
I spent one third of the presentation
explaining this,
00:41:28.163 --> 00:41:31.839
and I think that I gave a very good
demonstration there.
00:41:31.839 --> 00:41:35.680
The demonstration is here.
00:41:35.680 --> 00:41:37.908
We can go to the web page,
00:41:37.908 --> 00:41:41.839
go to this section of the web page,
00:41:41.839 --> 00:41:47.680
and start by this point.
00:41:47.680 --> 00:41:55.920
And here we have an explanation
and so on. Whatever.
00:41:55.920 --> 00:41:58.720
I've already mentioned this before.
00:41:59.200 --> 00:42:02.240
eev comes with a very nice Elisp
tutorial.
00:42:02.240 --> 00:42:05.599
So that's it. This is the end of part
three.
00:42:05.599 --> 00:42:08.103
So this is the last part of my
presentation,
00:42:08.103 --> 00:42:10.965
and it's about the title of the
presentation.
00:42:10.965 --> 00:42:13.599
I called the presentation, "Why
00:42:13.599 --> 00:42:16.560
Most of the Best Features in eev Look
00:42:16.560 --> 00:42:20.480
Like Five-Minute Hacks." I've already
00:42:20.480 --> 00:42:23.920
run out of time, so I have to skip this
00:42:23.920 --> 00:42:28.485
first part here in which
I describe how
00:42:28.485 --> 00:42:33.440
I was exposed to several different
notions of user-friendliness,
00:42:33.440 --> 00:42:35.920
and how the one that really blew my mind
00:42:35.920 --> 00:42:41.680
was the one in a certain
Forth environment.
00:42:41.680 --> 00:42:44.160
Let me make the long, long story
00:42:44.160 --> 00:42:46.560
very, very short.
00:42:46.560 --> 00:42:49.280
In all this process, I switched from
00:42:49.680 --> 00:42:52.960
the belief that the user was always
someone else,
00:42:52.960 --> 00:42:55.359
someone external, and that I always
00:42:55.359 --> 00:42:57.040
had to write my programs for
00:42:57.040 --> 00:43:00.079
this external user. I switched
00:43:00.079 --> 00:43:00.173
from that to the belief
00:43:00.173 --> 00:43:03.200
that I am the user.
00:43:03.200 --> 00:43:06.319
I can play with the interface
that I want.
00:43:06.319 --> 00:43:10.079
I can write programs
00:43:10.079 --> 00:43:11.786
that only I am going to understand.
00:43:11.786 --> 00:43:14.240
I can experiment with
hundreds of interfaces,
00:43:14.240 --> 00:43:16.079
select the best ones,
00:43:16.079 --> 00:43:18.720
document them, and then share them
00:43:18.720 --> 00:43:20.960
with other people
00:43:20.960 --> 00:43:24.056
who are also experimenting
with interfaces
00:43:24.056 --> 00:43:27.050
in their own ways.
00:43:27.050 --> 00:43:30.879
So eev has lots of things
that are user-friendly
00:43:30.879 --> 00:43:34.880
in these unusual ways that I've
explained before.
00:43:34.880 --> 00:43:37.160
If we consider that
00:43:37.160 --> 00:43:40.319
this notion of user-friendliness
is valid,
00:43:40.319 --> 00:43:44.651
then these things that eev implements,
00:43:44.651 --> 00:43:46.904
they are user-friendly
and hacker-friendly
00:43:46.904 --> 00:43:48.800
at the same time.
00:43:48.800 --> 00:43:50.346
Let me show one example.
00:43:51.119 --> 00:43:56.640
This is one that really took me only
five minutes to implement.
00:43:56.640 --> 00:43:59.430
At one point a few months ago,
00:43:59.430 --> 00:44:05.599
I discovered that Sacha Chua's weekly
posts about Emacs News
00:44:05.599 --> 00:44:08.800
were also being posted to a
00:44:08.800 --> 00:44:12.893
mailing list that is stored at
lists.gnu.org,
00:44:12.893 --> 00:44:16.319
and it's called emacs-tangents.
00:44:16.319 --> 00:44:19.760
I found a way to create
00:44:19.760 --> 00:44:25.440
the links to the posts in both places,
00:44:25.440 --> 00:44:28.178
but I had to use a template for that.
00:44:28.178 --> 00:44:30.640
So what we are seeing here now
00:44:30.640 --> 00:44:33.221
is a template with
the default values.
00:44:33.221 --> 00:44:38.243
So this means that we have not set the
year correctly.
00:44:38.243 --> 00:44:40.720
We have not set the month correctly,
00:44:40.720 --> 00:44:42.173
or the day correctly,
00:44:42.173 --> 00:44:45.462
but if we run this sexp here...
00:44:45.462 --> 00:44:48.960
Let me do something else before...
00:44:48.960 --> 00:44:53.359
If we run this sexp here,
00:44:53.359 --> 00:45:00.880
we change some of these entries
00:45:00.880 --> 00:45:05.200
in the template, and we get
these links here.
00:45:05.200 --> 00:45:07.719
They all work. For example,
00:45:07.719 --> 00:45:13.552
this one opens the blog post in
Sacha Chua's site,
00:45:13.552 --> 00:45:21.280
and this one opens it
in the mailing list.
00:45:21.280 --> 00:45:23.672
Sometimes I want
the Org source of that,
00:45:23.672 --> 00:45:26.520
and the easiest way
to get the Org source
00:45:26.520 --> 00:45:31.680
is to look at this link here
that has an attachment.
00:45:31.680 --> 00:45:35.839
If I take this link here,
00:45:35.839 --> 00:45:43.342
and I take this stem that points to the
attachment, and I put it here,
00:45:43.342 --> 00:45:45.440
and I generate this page again
00:45:45.440 --> 00:45:50.000
with all this data,
then I get a script here
00:45:50.000 --> 00:45:51.673
that downloads...
00:45:51.673 --> 00:45:54.640
Let me switch to a smaller font.
00:45:54.640 --> 00:45:58.160
It downloads this attachment
00:45:58.160 --> 00:46:01.599
and it renames that attachment to
something:
00:46:01.599 --> 00:46:06.000
./emacs-news -- sorry, something's...
00:46:06.000 --> 00:46:10.720
-emacs-news-something
00:46:10.720 --> 00:46:15.119
something emacs-news.org here.
00:46:15.119 --> 00:46:16.750
The file is already here,
00:46:16.750 --> 00:46:18.400
already with the right name.
00:46:18.400 --> 00:46:22.079
So I can open it with
just this hyperlink.
00:46:22.079 --> 00:46:23.780
Let me go to the big font again.
00:46:25.200 --> 00:46:28.673
And now I have the Org source
for that hyperlink--
00:46:28.673 --> 00:46:33.839
Sorry, for that blog post.
00:46:33.839 --> 00:46:37.911
And so this one-line thing here
00:46:37.911 --> 00:46:40.960
is, in a sense,
00:46:40.960 --> 00:46:45.119
a hyperlink to this blog post
in all its formats.
00:46:45.119 --> 00:46:48.640
If I execute this, I get links to
00:46:48.640 --> 00:46:52.000
all the places where it is posted,
00:46:52.000 --> 00:46:56.000
and I get a script to
download the local copy
00:46:56.000 --> 00:47:00.480
of the Org source of it. And that's it.
00:47:00.480 --> 00:47:02.506
Well, I'm already out of time,
00:47:02.506 --> 00:47:04.480
so let me finish here.
00:47:04.480 --> 00:47:10.079
Thanks. Bye.
|